Build 1576. Timer fixed.
This commit is contained in:
parent
f0169b06ab
commit
099e464e2f
@ -123,10 +123,8 @@ bool Crawler::OnUserCreate(){
|
||||
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.
|
||||
levelTime+=fElapsedTime;
|
||||
if(totalBossEncounterMobs>0){
|
||||
bossDisplayTimer=std::max(0.f,bossDisplayTimer-fElapsedTime);
|
||||
}
|
||||
if(encounterStarted){
|
||||
bossDisplayTimer=std::max(0.f,bossDisplayTimer-fElapsedTime);
|
||||
if(encounterStarted&&totalBossEncounterMobs>0){
|
||||
encounterDuration+=fElapsedTime;
|
||||
}
|
||||
HandleUserInput(fElapsedTime);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 1572
|
||||
#define VERSION_BUILD 1576
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
||||
@ -35,15 +35,11 @@ std::string util::timerStr(float time){
|
||||
timeStr+=std::to_string(hours)+":";
|
||||
}
|
||||
|
||||
if(minutes>0){
|
||||
if(minutes%60<10)timeStr+="0";
|
||||
timeStr+=std::to_string(minutes%60)+":";
|
||||
}
|
||||
if(minutes%60<10)timeStr+="0";
|
||||
timeStr+=std::to_string(minutes%60)+":";
|
||||
|
||||
if(seconds>0){
|
||||
if(seconds%60<10&&minutes>0)timeStr+="0";
|
||||
timeStr+=std::to_string(seconds%60);
|
||||
}
|
||||
if(seconds%60<10)timeStr+="0";
|
||||
timeStr+=std::to_string(seconds%60);
|
||||
|
||||
return timeStr;
|
||||
}
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user