for(int tick = 1; skipped < 20; ++tick)
{
//See who's in the battle at the current tick
- vector<Fleet*> friends = calculateSide(friendly, 6, tick);
- vector<Fleet*> hostiles = calculateSide(hostile, 3, tick);
+ vector<Fleet*> friends = calculateSide(friendly, tick);
+ vector<Fleet*> hostiles = calculateSide(hostile, tick);
// No idea to calculate anything if noone is there.. ;)
if (hostiles.size() == 0)
return;
}
- m_Report[tick][init]["Friendly"][unittype] = friendlyhits;
- m_Report[tick][init]["Friendly"][unittype]["000"] = freefriendly;
- m_Report[tick][init]["Hostile"][unittype] = hostilehits;
- m_Report[tick][init]["Hostile"][unittype]["000"] = freehostile;
+ if (freefriendly > 0)
+ {
+ m_Report[tick][init]["Friendly"][unittype] = friendlyhits;
+ m_Report[tick][init]["Friendly"][unittype]["000"] = freefriendly;
+ }
+ if (freehostile > 0)
+ {
+ m_Report[tick][init]["Hostile"][unittype] = hostilehits;
+ m_Report[tick][init]["Hostile"][unittype]["000"] = freehostile;
+ }
//set the the objects so they point at the modified objects
*friendly = *friendlytemp;