Skip to content

Commit

Permalink
fix: multiplayer fix and more
Browse files Browse the repository at this point in the history
  • Loading branch information
Stradex committed Jun 13, 2020
1 parent 15f4e5e commit d6c7304
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion neo/d3xp/Game_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ class idGameLocal : public idGame {
// added the following to assist licensees with merge issues
int GetFrameNum() const { return framenum; };
int GetTime() const { return time; };
float GetMSec() const { return msec; };
int GetMSec() const { return (int)idMath::Rint(msec); };

int GetNextClientNum( int current ) const;
idPlayer * GetClientByNum( int current ) const;
Expand Down
2 changes: 1 addition & 1 deletion neo/game/Game_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ class idGameLocal : public idGame {
// added the following to assist licensees with merge issues
int GetFrameNum() const { return framenum; };
int GetTime() const { return time; };
int GetMSec() const { return msec; };
int GetMSec() const { return (int)idMath::Rint(msec); };

int GetNextClientNum( int current ) const;
idPlayer * GetClientByNum( int current ) const;
Expand Down
4 changes: 2 additions & 2 deletions neo/game/Game_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ void idGameLocal::ClientReadSnapshot( int clientNum, int sequence, const int gam
// update the game time
framenum = gameFrame;
time = gameTime;
previousTime = time - msec;
previousTime = time - idMath::Rint(msec);

// so that StartSound/StopSound doesn't risk skipping
isNewFrame = true;
Expand Down Expand Up @@ -1492,7 +1492,7 @@ gameReturn_t idGameLocal::ClientPrediction( int clientNum, const usercmd_t *clie
// update the game time
framenum++;
previousTime = time;
time += msec;
time = FRAME_TO_MSEC(framenum);

// update the real client time and the new frame flag
if ( time > realClientTime ) {
Expand Down

0 comments on commit d6c7304

Please sign in to comment.