X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Fplanet.cpp;h=d62bf579996a1f0d583a66302fce706531c9ac59;hp=f57d20877ed5455f262c495271204c4daa1f6795;hb=7311d423f454c500dbc60dd822007da3981b0d56;hpb=217cda78005f993fd6b2e575d4abd97c93cec655 diff --git a/bs/planet.cpp b/bs/planet.cpp index f57d208..d62bf57 100644 --- a/bs/planet.cpp +++ b/bs/planet.cpp @@ -23,6 +23,7 @@ using namespace std; Planet::Planet() { m_sRace = "Planet"; + m_iStays = -1; } Planet::~Planet(){ @@ -225,6 +226,7 @@ void Planet::calcOneTick(Planet* friendly, Fleet* hostile, std::map pods; + //FIXME: Need to change this and allow multiple shiptypes with the same initiative. map unitsinit; // order units after their ininitiative for (UnitList::iterator i = s_Units.begin(); i != s_Units.end(); ++i) unitsinit[i->second.initiative()] = i->first; @@ -247,6 +249,9 @@ void Planet::calcOneTick(Planet* friendly, Fleet* hostile, std::maptakeShoot(unittype, friendly->freeFleet(unittype, 1), stealfriendly[unittype]); friendlytemp->takeShoot(unittype, hostile->freeFleet(unittype, 1), stealhostile[unittype]); + + friendlytemp->calculateLostStealships(unittype, stealfriendly[unittype], 1); + hostiletemp->calculateLostStealships(unittype, stealhostile[unittype], 1); } else { @@ -257,6 +262,7 @@ void Planet::calcOneTick(Planet* friendly, Fleet* hostile, std::map 0)