mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
- Fix: item name in spy disguise notification was wrong
- MTAs don't have to stop when no hand item is found (the ones in the trunk use this though) - Fix: militia drops sector equipment it took, even if it should not drop other gear - otherwise militia ould 'consume' sector invetories git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6141 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -987,7 +987,7 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// OK, Place what objects this guy was carrying on the ground!
|
// OK, Place what objects this guy was carrying on the ground!
|
||||||
for ( cnt = 0; cnt < pSoldier->inv.size(); cnt++ )
|
for ( cnt = 0; cnt < pSoldier->inv.size(); ++cnt )
|
||||||
{
|
{
|
||||||
pObj = &( pSoldier->inv[ cnt ] );
|
pObj = &( pSoldier->inv[ cnt ] );
|
||||||
|
|
||||||
@@ -1020,9 +1020,11 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(UsingNewAttachmentSystem()==true){
|
if(UsingNewAttachmentSystem()==true)
|
||||||
|
{
|
||||||
ReduceAttachmentsOnGunForNonPlayerChars(pSoldier, pObj);
|
ReduceAttachmentsOnGunForNonPlayerChars(pSoldier, pObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
// HEADROCK HAM B2.8: Militia will drop items only if allowed.
|
// HEADROCK HAM B2.8: Militia will drop items only if allowed.
|
||||||
if (!(gGameExternalOptions.ubMilitiaDropEquipment == 0 && pSoldier->bTeam == MILITIA_TEAM ) &&
|
if (!(gGameExternalOptions.ubMilitiaDropEquipment == 0 && pSoldier->bTeam == MILITIA_TEAM ) &&
|
||||||
!(gGameExternalOptions.ubMilitiaDropEquipment == 1 && pSoldier->bTeam == MILITIA_TEAM && Menptr[ pSoldier->ubAttackerID ].bTeam == OUR_TEAM ))
|
!(gGameExternalOptions.ubMilitiaDropEquipment == 1 && pSoldier->bTeam == MILITIA_TEAM && Menptr[ pSoldier->ubAttackerID ].bTeam == OUR_TEAM ))
|
||||||
@@ -1035,6 +1037,9 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
|||||||
}
|
}
|
||||||
|
|
||||||
DropKeysInKeyRing( pSoldier, pSoldier->sGridNo, pSoldier->pathing.bLevel, bVisible, FALSE, 0, FALSE );
|
DropKeysInKeyRing( pSoldier, pSoldier->sGridNo, pSoldier->pathing.bLevel, bVisible, FALSE, 0, FALSE );
|
||||||
|
|
||||||
|
// Flugente: even if we forbid militia from dropping their equipment, they will still drop what they took via sector inventory (this functions only drops what they took)
|
||||||
|
pSoldier->DropSectorEquipment();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make team look for items
|
// Make team look for items
|
||||||
|
|||||||
@@ -14722,7 +14722,7 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void )
|
|||||||
( Item[this->inv[bLoop].usItem].nightvisionrangebonus > 0 || Item[this->inv[bLoop].usItem].hearingrangebonus > 0 )
|
( Item[this->inv[bLoop].usItem].nightvisionrangebonus > 0 || Item[this->inv[bLoop].usItem].hearingrangebonus > 0 )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_MILITARYGEARFOUND], this->GetName(), Item[bLoop].szItemName );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_MILITARYGEARFOUND], this->GetName(), Item[this->inv[bLoop].usItem].szItemName );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14744,7 +14744,7 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void )
|
|||||||
( Item[this->inv[bLoop].usItem].nightvisionrangebonus > 0 || Item[this->inv[bLoop].usItem].hearingrangebonus > 0 )
|
( Item[this->inv[bLoop].usItem].nightvisionrangebonus > 0 || Item[this->inv[bLoop].usItem].hearingrangebonus > 0 )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_MILITARYGEARFOUND], this->GetName(), Item[bLoop].szItemName );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_MILITARYGEARFOUND], this->GetName(), Item[this->inv[bLoop].usItem].szItemName );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15657,13 +15657,13 @@ BOOLEAN SOLDIERTYPE::UpdateMultiTurnAction()
|
|||||||
|
|
||||||
// determine the gridno before us and the item we have in our main hand, this is enough for the current actions
|
// determine the gridno before us and the item we have in our main hand, this is enough for the current actions
|
||||||
OBJECTTYPE* pObj = &(this->inv[HANDPOS]);
|
OBJECTTYPE* pObj = &(this->inv[HANDPOS]);
|
||||||
if ( !pObj || !(pObj->exists()) )
|
|
||||||
fActionStillValid = FALSE;
|
|
||||||
|
|
||||||
// error if the gridno we started working on is not the gridno we are currently looking at
|
// error if the gridno we started working on is not the gridno we are currently looking at
|
||||||
if ( usMultiTurnAction == MTA_FORTIFY || usMultiTurnAction == MTA_REMOVE_FORTIFY || usMultiTurnAction == MTA_FILL_SANDBAG )
|
if ( usMultiTurnAction == MTA_FORTIFY || usMultiTurnAction == MTA_REMOVE_FORTIFY || usMultiTurnAction == MTA_FILL_SANDBAG )
|
||||||
{
|
{
|
||||||
if ( this->sMTActionGridNo != NewGridNo( this->sGridNo, DirectionInc( this->ubDirection ) ) )
|
if ( !pObj || !(pObj->exists()) )
|
||||||
|
fActionStillValid = FALSE;
|
||||||
|
else if ( this->sMTActionGridNo != NewGridNo( this->sGridNo, DirectionInc( this->ubDirection ) ) )
|
||||||
fActionStillValid = FALSE;
|
fActionStillValid = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15731,18 +15731,18 @@ BOOLEAN SOLDIERTYPE::UpdateMultiTurnAction()
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we are not in turnbased and no enemies are around, we reduce the number of necessary action points to 0. No need to keep waiting if there's nobody around anyway
|
|
||||||
if ( !( gTacticalStatus.uiFlags & TURNBASED && gTacticalStatus.uiFlags & INCOMBAT ) )
|
|
||||||
bOverTurnAPS = 0;
|
|
||||||
// otherwise this might take longer, so we refresh our animation
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// refresh animations
|
// refresh animations
|
||||||
switch( usMultiTurnAction )
|
switch( usMultiTurnAction )
|
||||||
{
|
{
|
||||||
case MTA_FORTIFY:
|
case MTA_FORTIFY:
|
||||||
case MTA_REMOVE_FORTIFY:
|
case MTA_REMOVE_FORTIFY:
|
||||||
case MTA_FILL_SANDBAG:
|
case MTA_FILL_SANDBAG:
|
||||||
|
{
|
||||||
|
// if we are not in turnbased and no enemies are around, we reduce the number of necessary action points to 0. No need to keep waiting if there's nobody around anyway
|
||||||
|
if ( !( gTacticalStatus.uiFlags & TURNBASED && gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||||
|
bOverTurnAPS = 0;
|
||||||
|
// otherwise this might take longer, so we refresh our animation
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (!is_networked)
|
if (!is_networked)
|
||||||
this->EVENT_InitNewSoldierAnim( CUTTING_FENCE, 0 , FALSE );
|
this->EVENT_InitNewSoldierAnim( CUTTING_FENCE, 0 , FALSE );
|
||||||
@@ -15752,8 +15752,8 @@ BOOLEAN SOLDIERTYPE::UpdateMultiTurnAction()
|
|||||||
// as setting the new animation costs APBPConstants[AP_USEWIRECUTTERS] APs every time, account for that
|
// as setting the new animation costs APBPConstants[AP_USEWIRECUTTERS] APs every time, account for that
|
||||||
this->bActionPoints += APBPConstants[AP_USEWIRECUTTERS];
|
this->bActionPoints += APBPConstants[AP_USEWIRECUTTERS];
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we can afford it, do it now
|
// if we can afford it, do it now
|
||||||
|
|||||||
Reference in New Issue
Block a user