- 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:
Flugente
2013-06-20 17:41:23 +00:00
parent 3ade79cf63
commit 821893ce68
2 changed files with 71 additions and 66 deletions
+23 -23
View File
@@ -14722,7 +14722,7 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void )
( 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;
}
}
@@ -14744,7 +14744,7 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void )
( 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;
}
}
@@ -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
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
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;
}
@@ -15731,29 +15731,29 @@ BOOLEAN SOLDIERTYPE::UpdateMultiTurnAction()
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
switch( usMultiTurnAction )
{
// refresh animations
switch( usMultiTurnAction )
case MTA_FORTIFY:
case MTA_REMOVE_FORTIFY:
case MTA_FILL_SANDBAG:
{
case MTA_FORTIFY:
case MTA_REMOVE_FORTIFY:
case MTA_FILL_SANDBAG:
{
if (!is_networked)
this->EVENT_InitNewSoldierAnim( CUTTING_FENCE, 0 , 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
this->ChangeSoldierState( CUTTING_FENCE, 0, 0 );
{
if (!is_networked)
this->EVENT_InitNewSoldierAnim( CUTTING_FENCE, 0 , FALSE );
else
this->ChangeSoldierState( CUTTING_FENCE, 0, 0 );
// as setting the new animation costs APBPConstants[AP_USEWIRECUTTERS] APs every time, account for that
this->bActionPoints += APBPConstants[AP_USEWIRECUTTERS];
// as setting the new animation costs APBPConstants[AP_USEWIRECUTTERS] APs every time, account for that
this->bActionPoints += APBPConstants[AP_USEWIRECUTTERS];
}
break;
}
break;
}
// if we can afford it, do it now