Skip to content

Commit

Permalink
Fix activity timeout timer check
Browse files Browse the repository at this point in the history
This previously relied on the underflow issue and not correcting it would mean no timer would appear.
  • Loading branch information
KJeff01 committed Jun 26, 2024
1 parent ad280cc commit 893a3b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions data/mp/multiplay/script/rules/endconditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,9 @@ function activityAlert()
console(
_("- unit building - research completion - construction of base structures (factories, power plants, laboratories, modules and oil derricks) - dealing damage")
);
if (getMissionTime() > idleTime)
if (getMissionTime() <= -1)
{
setMissionTime(
(playersTeam[selectedPlayer].lastActivity + idleTime - gameTime) / 1000);
setMissionTime((playersTeam[selectedPlayer].lastActivity + idleTime - gameTime) / 1000);
}
}
if (playersTeam[selectedPlayer].lastActivity + idleTime / 2 > gameTime)
Expand Down

0 comments on commit 893a3b4

Please sign in to comment.