mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Bugfix: AP deduct is different then shown (by Moa)
- no more jump with backpack (keys 'j' and 'J'). This is more consistent. Sometimes the soldier got stuck in the fence as some functions did not allow jumping and others did. - Pickup items from ground will now cost AP. - Backpack, Scubba fins and swimming background AP modificattion is now shown in path and is considered when calculating new path. No pathing through fences when wearing backpack. More likely to create path through water when wearing scubba fins. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6543 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2135,10 +2135,14 @@ void SoldierGetItemFromWorld( SOLDIERTYPE *pSoldier, INT32 iItemIndex, INT32 sGr
|
||||
INT32 iItemIndexToDelete;
|
||||
BOOLEAN fShouldSayCoolQuote = FALSE;
|
||||
BOOLEAN fDidSayCoolQuote = FALSE;
|
||||
BOOLEAN fSaidBoobyTrapQuote = FALSE;
|
||||
BOOLEAN fSaidBoobyTrapQuote = FALSE;
|
||||
UINT16 sAPCost;//Moa: added for deduct points
|
||||
BOOLEAN fItemTaken = FALSE;//Moa: added for deduct points
|
||||
#ifdef JA2UB
|
||||
UINT16 usItem=0;
|
||||
#endif
|
||||
|
||||
sAPCost = GetAPsToPickupItem( pSoldier, sGridNo );
|
||||
// OK. CHECK IF WE ARE DOING ALL IN THIS POOL....
|
||||
if ( iItemIndex == ITEM_PICKUP_ACTION_ALL || iItemIndex == ITEM_PICKUP_SELECTION )
|
||||
{
|
||||
@@ -2245,6 +2249,10 @@ void SoldierGetItemFromWorld( SOLDIERTYPE *pSoldier, INT32 iItemIndex, INT32 sGr
|
||||
// continue, to try and place ay others...
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
fItemTaken = TRUE;
|
||||
}
|
||||
/*
|
||||
// handle theft.. will return true if theft has failed ( if soldier was caught )
|
||||
if( pSoldier->bTeam == OUR_TEAM )
|
||||
@@ -2395,12 +2403,22 @@ void SoldierGetItemFromWorld( SOLDIERTYPE *pSoldier, INT32 iItemIndex, INT32 sGr
|
||||
gfDontChargeAPsToPickup = TRUE;
|
||||
HandleAutoPlaceFail( pSoldier, iItemIndex, sGridNo );
|
||||
}
|
||||
else
|
||||
{
|
||||
fItemTaken = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fItemTaken)
|
||||
{
|
||||
//deduct Points
|
||||
DeductPoints( pSoldier, sAPCost, 0 );
|
||||
}
|
||||
|
||||
// OK, check if potentially a good candidate for cool quote
|
||||
if ( fShouldSayCoolQuote && pSoldier->bTeam == gbPlayerNum )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user