New Feature: Campaign History collects combat data and displays battle reports on the website.

requires GameDir >= r1901.

For more info, see http://www.bears-pit.com/board/ubbthreads.php/topics/329205.html#Post329205

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6705 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-12-22 23:22:45 +00:00
parent b3df6f55b5
commit f4dcc15ffa
57 changed files with 5074 additions and 220 deletions
+11 -4
View File
@@ -34,10 +34,11 @@
#include "Map Information.h"
#include "Interface Items.h"
#include "Soldier Control.h" // added by SANDRO
#include "opplist.h" // added by SANDRO
#include "lighting.h" // added by SANDRO
#include "Food.h" // added by Flugente
#include "AIInternals.h"//dnl ch69 150913
#include "opplist.h" // added by SANDRO
#include "lighting.h" // added by SANDRO
#include "Food.h" // added by Flugente
#include "AIInternals.h" //dnl ch69 150913
#include "CampaignStats.h" // added by Flugente
#endif
#include "connect.h"
//rain
@@ -2841,6 +2842,12 @@ void DeductAmmo( SOLDIERTYPE *pSoldier, INT8 bInvPos )
(*pObjUsed)[0]->data.gun.ubGunShotsLeft--;
}
}
// Flugente: campaign stats - ammo. explosive consumption is handled elsewhere
if ( pSoldier->bTeam == OUR_TEAM )
{
gCampaignStats.AddConsumption(CAMPAIGN_CONSUMED_AMMO, (FLOAT)(Item[(*pObjUsed)[0]->data.gun.usGunAmmoItem].ubWeight) / (FLOAT)(Magazine[ Item[ (*pObjUsed)[0]->data.gun.usGunAmmoItem ].ubClassIndex ].ubMagSize ) );
}
}
else if ( Item[ pObj->usItem ].usItemClass == IC_LAUNCHER || Item[pObj->usItem].cannon || pSoldier->bWeaponMode == WM_ATTACHED_GL || pSoldier->bWeaponMode == WM_ATTACHED_GL_BURST || pSoldier->bWeaponMode == WM_ATTACHED_GL_AUTO )
{