mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed a bug in CheckWeaponAmmoCost (from Mr.Stalin)
It caused NPCs to not switch to other weapons when there is not enough ammo to shoot. Moved CheckWeaponAmmoCost code from Inventory.cpp to Combat.cpp. Now the debug editor starts at the center of the screen. Updated the previous fix in NPC combat control mod.
This commit is contained in:
Binary file not shown.
@@ -109,8 +109,8 @@ procedure invenwield_handler begin
|
||||
event := get_sfall_arg;
|
||||
|
||||
// Fix weapon duplication when equipping in combat
|
||||
if (event and AllowControl(obj_pid(critter))) then begin
|
||||
set_flags(item, get_flags(item) bwand bwnot(FLAG_LEFT_HAND bwor FLAG_RIGHT_HAND));
|
||||
if (event and slot == INVEN_TYPE_RIGHT_HAND and AllowControl(obj_pid(critter))) then begin
|
||||
set_flags(item, get_flags(item) bwand bwnot(FLAG_LEFT_HAND));
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user