mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Made the "Rifle sling" feature optional, so we can decide if we like to build an executable with/without the feature
o See: builddefines.h: #define ENABLE_RIFLE_SLING o Note: This feature is NOT the strategy performance killer git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5360 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3594,6 +3594,7 @@ UINT32 GetInvMovementCost(OBJECTTYPE* pObj, UINT32 old_pos, UINT32 new_pos)
|
||||
cost += uiAPCostToSlot[dst_type];
|
||||
cost += weight_modifier;
|
||||
|
||||
#ifdef ENABLE_RIFLE_SLING
|
||||
// Flugente if we move an item from our hands to the sling, and item has a weapon sling, don't charge any APs
|
||||
if ( 1 == src_type && 7 == dst_type )
|
||||
{
|
||||
@@ -3602,6 +3603,7 @@ UINT32 GetInvMovementCost(OBJECTTYPE* pObj, UINT32 old_pos, UINT32 new_pos)
|
||||
// we simply let go of the item, we can do that because the sling will catch it
|
||||
cost = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cost > APBPConstants[AP_INV_MAX_COST])
|
||||
cost = APBPConstants[AP_INV_MAX_COST];
|
||||
|
||||
Reference in New Issue
Block a user