mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Code edits to gl_npcarmor script
This commit is contained in:
Binary file not shown.
@@ -224,12 +224,13 @@ procedure update_armor_apperance begin
|
||||
end
|
||||
|
||||
procedure canuseweapon_handler begin
|
||||
variable critter, canWield;
|
||||
variable critter, canUse;
|
||||
critter := get_sfall_arg;
|
||||
if (critter != dude_obj and get_sfall_arg_at(3)) then begin
|
||||
canWield := check_weapon_change(critter, get_sfall_arg, true);
|
||||
// override result
|
||||
set_sfall_arg(3, canWield);
|
||||
set_sfall_return(canWield);
|
||||
canUse := check_weapon_change(critter, get_sfall_arg, true);
|
||||
if (canUse == false) then begin
|
||||
set_sfall_arg(3, 0);
|
||||
set_sfall_return(0); // overrides the result of engine function. Any non-zero value allows using the weapon
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user