Skip to content

Commit

Permalink
Merge pull request #416 from avaraline/fix-FramesFromNow
Browse files Browse the repository at this point in the history
make FramesFromNow() accept a float arg
  • Loading branch information
tra authored Jul 3, 2024
2 parents 402105d + 2b07dfc commit 862a756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game/CAvaraGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ void CAvaraGame::IncrementFrame(bool firstFrame) {
isClassicFrame = (frameNumber % (CLASSICFRAMETIME / frameTime) == 0);
}

FrameNumber CAvaraGame::FramesFromNow(FrameNumber classicFrameCount) {
FrameNumber CAvaraGame::FramesFromNow(double classicFrameCount) {
return frameNumber + classicFrameCount / fpsScale;
}

Expand Down
2 changes: 1 addition & 1 deletion src/game/CAvaraGame.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class CAvaraGame {
virtual FrameNumber NextFrameForPeriod(long period, long referenceFrame = 0);
virtual void SetFrameTime(int32_t ft);
virtual void IncrementFrame(bool firstFrame = false);
virtual FrameNumber FramesFromNow(FrameNumber classicFrames);
virtual FrameNumber FramesFromNow(double classicFrames);
virtual void SetSpawnOrder(SpawnOrder order);

void SetKeysFromStdin() { keysFromStdin = true; };
Expand Down

0 comments on commit 862a756

Please sign in to comment.