- Fix: Tanks take damage even when crushing down simple wooden fence. (by anv)

- dynamic opinion events no longer happen for non-player or vehicular characters
- renamed a flag

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7340 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-07-15 21:00:59 +00:00
parent 64bd7f3f07
commit 05cb329230
4 changed files with 15 additions and 5 deletions
+10
View File
@@ -1160,6 +1160,16 @@ void AddOpinionEvent( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent, BOOLEAN
if ( usEvent >= OPINIONEVENT_MAX )
return;
// we don't want any events for people not on our team or vehicles
SOLDIERTYPE* pSoldier = FindSoldierByProfileID( usProfileA, TRUE );
if ( !pSoldier || pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
return;
pSoldier = FindSoldierByProfileID( usProfileB, TRUE );
if ( !pSoldier || pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE )
return;
UINT32 ustmpFlagmask[OPINION_FLAGMASKS_NUMBER];
for ( UINT8 i = 0; i < OPINION_FLAGMASKS_NUMBER; ++i )
{
+3 -3
View File
@@ -737,7 +737,7 @@ extern OBJECTTYPE gTempObject;
#define WATER_DRUM 0x00000010 //16 // water drums allow to refill canteens in the sector they are in
#define MEAT_BLOODCAT 0x00000020 //32 // retrieve this by gutting a bloodcat
#define COW_MEAT 0x00000040 //64 // retrieve this by gutting a cow
#define MEAT_COW 0x00000040 //64 // retrieve this by gutting a cow
#define BELT_FED 0x00000080 //128 // item can be fed externally
#define AMMO_BELT 0x00000100 //256 // this item can be used to feed externally
@@ -765,8 +765,8 @@ extern OBJECTTYPE gTempObject;
#define SIGNAL_SHELL 0x04000000 //67108864 // this is a signal shell that precedes artillery barrages
#define POWER_PACK 0x08000000 //134217728 // item continously powers an item it is attached to
#define SPOTTERITEM 0x10000000 //268435456 // binocular
/*#define PLAYER_NET_2_LVL_4 0x20000000 //536870912
/*#define SPOTTERITEM 0x10000000 //268435456 // binocular
#define PLAYER_NET_2_LVL_4 0x20000000 //536870912
#define PLAYER_NET_3_LVL_4 0x40000000 //1073741824
#define PLAYER_NET_4_LVL_4 0x80000000 //2147483648*/
// ----------------------------------------------------------------
+1 -1
View File
@@ -1955,7 +1955,7 @@ BOOLEAN GutCorpse( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel )
}
else
{
if ( HasItemFlag(usCowMeatIndex, COW_MEAT) || GetFirstItemWithFlag(&usCowMeatIndex, COW_MEAT) )
if ( HasItemFlag( usCowMeatIndex, MEAT_COW ) || GetFirstItemWithFlag( &usCowMeatIndex, MEAT_COW ) )
meatindex = usCowMeatIndex;
}
+1 -1
View File
@@ -1896,7 +1896,7 @@ BOOLEAN DamageStructure( STRUCTURE * pStructure, UINT8 ubDamage, UINT8 ubReason,
gpWorldLevelData[ sGridNo ].uiFlags |= MAPELEMENT_STRUCTURE_DAMAGED;
// handle structure revenge - damage to vehicle
if( ubOwner != NOBODY )
if ( ubOwner != NOBODY && MercPtrs[ubOwner] && !TANK( MercPtrs[ubOwner] ) )
{
MercPtrs[ ubOwner ]->SoldierTakeDamage( 0, Random(max(0,(ubBaseArmour-10)/5))+max(0,(ubBaseArmour-10)/5), 0, 0, TAKE_DAMAGE_STRUCTURE_EXPLOSION, NOBODY, MercPtrs[ ubOwner ]->sGridNo, 0, TRUE );
}