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
+20
View File
@@ -66,6 +66,7 @@
#include "Soldier Functions.h"//dnl ch40 200909
#include "Text.h" // added by SANDRO
#include "campaign.h" // yet another one added
#include "CampaignStats.h" // added by Flugente
#endif
#include "Soldier Macros.h"
@@ -309,6 +310,13 @@ void InternalIgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32
{
return; // no explosive and attackers gun is not fireing HE
}
// Flugente: campaign stats
if ( MercPtrs[ ubOwner ]->bTeam == OUR_TEAM )
{
if ( Item[ usItem ].usItemClass & IC_EXPLOSV )
gCampaignStats.AddConsumption(CAMPAIGN_CONSUMED_EXPLOSIVES, (FLOAT)(Item[usItem].ubWeight) );
}
}
// Increment attack counter...
@@ -366,6 +374,9 @@ void InternalIgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32
if ( Item[ usItem ].usItemClass & IC_EXPLOSV && ubOwner != NOBODY && ubOwner < NUM_PROFILES && InARoom( sGridNo, &tmp ) )
{
HandleLoyaltyForDemolitionOfBuilding( MercPtrs[ubOwner], Explosive[ Item[ usItem ].ubClassIndex ].ubDamage );
// Flugente: campaign stats
gCurrentIncident.usIncidentFlags |= INCIDENT_BUILDINGS_DAMAGED;
}
// HEADROCK HAM 5.1: Launch fragments from the explosion.
@@ -2870,6 +2881,15 @@ void SpreadEffect( INT32 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT8 ubOwner,
// with the client that spawns set off the explosion/grenade/whatever
return;
}
// Flugente: campaign stats
if ( Explosive[Item[usItem].ubClassIndex].ubType == EXPLOSV_MUSTGAS )
{
if ( IsOurSoldier(pAttacker) )
gCurrentIncident.usIncidentFlags |= INCIDENT_MUSTARDGAS_PLAYERSIDE;
else
gCurrentIncident.usIncidentFlags |= INCIDENT_MUSTARDGAS_ENEMY;
}
}
#ifdef JA2BETAVERSION
CHAR tmpMPDbgString[512];