Build 1576. Timer fixed.

pull/28/head
sigonasr2 1 year ago
parent f0169b06ab
commit 099e464e2f
  1. 6
      Crawler/Crawler.cpp
  2. 2
      Crawler/Version.h
  3. 12
      Crawler/utils.cpp
  4. BIN
      x64/Release/Crawler.exe

@ -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…
Cancel
Save