Skip to content

Commit

Permalink
set seconds remaining for ufos that spawn on the ground
Browse files Browse the repository at this point in the history
  • Loading branch information
Warboy1982 committed Apr 14, 2014
1 parent 183c081 commit 0d03fc7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Savegame/AlienMission.cpp
Expand Up @@ -326,6 +326,10 @@ Ufo *AlienMission::spawnUfo(const SavedGame &game, const Ruleset &ruleset, const
const RuleRegion &regionRules = *ruleset.getRegion(_region);
std::pair<double, double> pos = getWaypoint(trajectory, 0, globe, regionRules);
ufo->setAltitude(trajectory.getAltitude(0));
if (trajectory.getAltitude(0) == "STR_GROUND")
{
ufo->setSecondsRemaining(trajectory.groundTimer());
}
ufo->setSpeed(trajectory.getSpeedPercentage(0) * ufoRule.getMaxSpeed());
ufo->setLongitude(pos.first);
ufo->setLatitude(pos.second);
Expand Down

0 comments on commit 0d03fc7

Please sign in to comment.