diff --git a/Tactical/DynamicDialogue.cpp b/Tactical/DynamicDialogue.cpp index 54fee457..4412cff9 100644 --- a/Tactical/DynamicDialogue.cpp +++ b/Tactical/DynamicDialogue.cpp @@ -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 ) { diff --git a/Tactical/Item Types.h b/Tactical/Item Types.h index bf09a3d4..4328a738 100644 --- a/Tactical/Item Types.h +++ b/Tactical/Item Types.h @@ -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*/ // ---------------------------------------------------------------- diff --git a/Tactical/Rotting Corpses.cpp b/Tactical/Rotting Corpses.cpp index 5160dbaa..dc6d1762 100644 --- a/Tactical/Rotting Corpses.cpp +++ b/Tactical/Rotting Corpses.cpp @@ -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; } diff --git a/TileEngine/structure.cpp b/TileEngine/structure.cpp index af027541..f7c1ae8a 100644 --- a/TileEngine/structure.cpp +++ b/TileEngine/structure.cpp @@ -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 ); }