File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -388,17 +388,25 @@ DWORD __stdcall ProcessClient(LPVOID arg)
388388 err_display (" " );
389389
390390 SettingPlayersMine (threadId);
391- UpdatePlayerLocation (&(*ClientManager[threadId]).player , ClientData.Input );
392- (*ClientManager[threadId]).player .Update ();
393- InitPlayerLocation (&(*ClientManager[threadId]).player , ClientData.Input );
394- UpdateFootholdbyPlayer (&(*ClientManager[threadId]).player ,Bottom);
395- CheckCollideFoothold (Bottom);
391+
392+ if (!(*ClientManager[threadId]).bGameOver )
393+ {
394+ UpdatePlayerLocation (&(*ClientManager[threadId]).player , ClientData.Input );
395+ (*ClientManager[threadId]).player .Update ();
396+ InitPlayerLocation (&(*ClientManager[threadId]).player , ClientData.Input );
397+ UpdateFootholdbyPlayer (&(*ClientManager[threadId]).player , Bottom);
398+ CheckCollideFoothold (Bottom);
399+ }
396400
397401 (*ClientManager[threadId]).bGameOver = IsGameOver (&(*ClientManager[threadId]).player );
398- // CheckGameWin(threadId);
399402
400403 SetCilentData ();
401404
405+ if (IsAllPlayerGameOver ())
406+ {
407+ CheckGameWin (threadId);
408+ }
409+
402410 retval = send (clientSock, (char *)&ServerGameData, nServerDataLen, 0 );
403411 if (retval == SOCKET_ERROR )
404412 err_display (" " );
You can’t perform that action at this time.
0 commit comments