X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Fplanet.cpp;fp=bs%2Fplanet.cpp;h=94fa4325c2bcea641bbe984942caba991ca13e77;hp=e5aba8575eaed8c659ecc58a4818ec31d2debc2c;hb=935b6de2d1428854d76acc20b1727eb4a30f9273;hpb=cb2fabf93c2f6ba8b57833309038adb972f58925 diff --git a/bs/planet.cpp b/bs/planet.cpp index e5aba85..94fa432 100644 --- a/bs/planet.cpp +++ b/bs/planet.cpp @@ -159,8 +159,8 @@ void Planet::runBattle(std::vector friendly, std::vector hostile for(int tick = 1; skipped < 20; ++tick) { //See who's in the battle at the current tick - vector friends = calculateSide(friendly, 6, tick); - vector hostiles = calculateSide(hostile, 3, tick); + vector friends = calculateSide(friendly, tick); + vector hostiles = calculateSide(hostile, tick); // No idea to calculate anything if noone is there.. ;) if (hostiles.size() == 0) @@ -327,10 +327,16 @@ void Planet::calcOneTick(Planet* friendly, Fleet* hostile, std::map 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;