Skip to content

Commit

Permalink
Calculate tidalsize before using it in mouseovers.
Browse files Browse the repository at this point in the history
This way the game doesn't immediately crash when restoring a save
in tidal areas.
  • Loading branch information
Jacob Mandelson committed Feb 14, 2024
1 parent 51f59cc commit acd8837
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@ EX void describeMouseover() {
if(shmup::on)
out += " (" + its(c->landparam)+")";
else {
calcTidalPhase();
bool b = c->landparam >= tide[(turncount-1) % tidalsize];
int t = 1;
for(; t < 1000 && b == (c->landparam >= tide[(turncount+t-1) % tidalsize]); t++) ;
Expand Down

0 comments on commit acd8837

Please sign in to comment.