Should not require pointers for its own self in Crawler class' update loop.

This commit is contained in:
sigonasr2 2023-10-05 02:17:44 -05:00
parent 773f72a45c
commit ce1a2adf81

View File

@ -121,9 +121,9 @@ bool Crawler::OnUserUpdate(float fElapsedTime){
fElapsedTime=std::clamp(fElapsedTime,0.f,1/30.f); //HACK fix. We can't have a negative time. Although using a more precise system clock should make this never occur. Also make sure if the game is too slow we advance by only 1/30th of a second. fElapsedTime=std::clamp(fElapsedTime,0.f,1/30.f); //HACK fix. We can't have a negative time. Although using a more precise system clock should make this never occur. Also make sure if the game is too slow we advance by only 1/30th of a second.
levelTime+=fElapsedTime; levelTime+=fElapsedTime;
GameState::STATE->OnUserUpdate(this); GameState::STATE->OnUserUpdate(this);
game->RenderWorld(game->GetElapsedTime()); RenderWorld(GetElapsedTime());
game->RenderHud(); RenderHud();
game->RenderMenu(); RenderMenu();
GameState::STATE->Draw(this); GameState::STATE->Draw(this);
return true; return true;
} }