diff --git a/Tactical/Handle Items.cpp b/Tactical/Handle Items.cpp index 0928906d..c986afbc 100644 --- a/Tactical/Handle Items.cpp +++ b/Tactical/Handle Items.cpp @@ -6295,7 +6295,17 @@ UINT8 StealItems(SOLDIERTYPE* pSoldier,SOLDIERTYPE* pOpponent, UINT8* ubIndexRet { // Flugente: if we are on the same team, allow guaranteed full access if ( gGameExternalOptions.fAccessOtherMercInventories && pOpponent->bTeam == pSoldier->bTeam && pOpponent->ubID != pSoldier->ubID ) + { fStealItem = TRUE; + + // yuk, this is ugly... stealing items is counted as an attack. So what happens that if we steal from a teammember, the merc that we have stored in our targetD + // (which will be the first merc hired when we land in Arulco) will react to our 'attack' and 'shoot back'. + // so we now have 2 ways to resolve this issue: + // - remove the 'steal from teammember' stuff from the usual stealing stuff, and add it as a new action (like handcuffing), complete with building the steal-sub-menu and everything + // - or introduce a flag that prohibits teammembers from 'reaction-firing' on us. Set it upon stealing (here) and remove it after the steal menu is closed + // or simplicity reasons, I will do #2 here. Until it breaks, then I'll be forced to do #1. + pSoldier->bSoldierFlagMask |= SOLDIER_ACCESSTEAMMEMBER; + } else { // Check, if we can steal the item diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 8255da91..05add7dd 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -10813,6 +10813,9 @@ void RemoveItemPickupMenu( ) // Unfreese guy! gItemPickupMenu.pSoldier->flags.fPauseAllAnimation = FALSE; + // Flugente: remove the marker notifying we are currently stealing + gItemPickupMenu.pSoldier->bSoldierFlagMask &= ~SOLDIER_ACCESSTEAMMEMBER; + // Remove graphics! DeleteVideoObjectFromIndex( gItemPickupMenu.uiPanelVo ); diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 758dcb80..ba41aa62 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -8552,8 +8552,13 @@ BOOLEAN ProcessImplicationsOfPCAttack( SOLDIERTYPE * pSoldier, SOLDIERTYPE ** pp } else if ( pTarget->bTeam == gbPlayerNum && !(gTacticalStatus.uiFlags & INCOMBAT) ) { + // Flugente: if we are on the same team adn are currently stealing (accessing inventory) from a teammember, do NOT retaliate + if ( gGameExternalOptions.fAccessOtherMercInventories && pTarget->bTeam == pSoldier->bTeam && pTarget->ubID != pSoldier->ubID && pSoldier->bSoldierFlagMask & SOLDIER_ACCESSTEAMMEMBER ) + { + + } // firing at one of our own guys who is not a rebel etc - if ( pTarget->stats.bLife >= OKLIFE && !(pTarget->bCollapsed) && !AM_A_ROBOT( pTarget ) && (bReason == REASON_NORMAL_ATTACK ) ) + else if ( pTarget->stats.bLife >= OKLIFE && !(pTarget->bCollapsed) && !AM_A_ROBOT( pTarget ) && (bReason == REASON_NORMAL_ATTACK ) ) { // OK, sturn towards the prick // Change to fire ready animation diff --git a/Tactical/Soldier Control.h b/Tactical/Soldier Control.h index 1827706d..bceb2b43 100644 --- a/Tactical/Soldier Control.h +++ b/Tactical/Soldier Control.h @@ -366,8 +366,8 @@ enum #define SOLDIER_POW_PRISON 0x00001000 //4096 // this guy is a prisoner of war in a prison sector. SOLDIER_POW refers to people we capture, this refers to people we hold captive #define SOLDIER_EQUIPMENT_DROPPED 0x00002000 //8192 // under certain circumstances, militia can be ordered to drop their gear twice. Thus we set a marker to avoid that. -/*#define ENEMY_NET_3_LVL_4 0x00004000 //16384 -#define ENEMY_NET_4_LVL_4 0x00008000 //32768 +#define SOLDIER_ACCESSTEAMMEMBER 0x00004000 //16384 // this merc is accessing another team member'S inventory (via abusing the stealing mechanic) +/*#define ENEMY_NET_4_LVL_4 0x00008000 //32768 #define PLAYER_NET_1_LVL_1 0x00010000 //65536 #define PLAYER_NET_2_LVL_1 0x00020000 //131072