mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Edited description of CheckWeaponAmmoCost and HOOK_AMMOCOST
This commit is contained in:
+1
-1
@@ -628,7 +628,7 @@ ExplosionsEmitLight=0
|
||||
;Set to 0 for backward compatibility with pre-3.4 scripts
|
||||
arraysBehavior=1
|
||||
|
||||
;Set to 1 to add proper checks if there is enough ammo to use weapons that use multiple ammo per shot
|
||||
;Set to 1 to add proper checks to see if there is enough ammo to attack with weapons that use multiple ammo per shot
|
||||
CheckWeaponAmmoCost=0
|
||||
|
||||
;Controls the speed of combat panel animations (lower - faster; valid range: 0..65535)
|
||||
|
||||
@@ -327,7 +327,7 @@ Runs when retrieving the damage rating of the player's used weapon. (Which may b
|
||||
|
||||
int arg0 - The default min damage
|
||||
int arg1 - The default max damage
|
||||
Item arg2 - The weapon used. (0 if unarmed)
|
||||
Item arg2 - The weapon used (0 if unarmed)
|
||||
Critter arg3 - The critter doing the attacking
|
||||
int arg4 - The type of attack
|
||||
int arg5 - non-zero if this is an attack using a melee weapon
|
||||
@@ -343,13 +343,16 @@ Runs when calculating ammo cost for a weapon. Doesn't affect damage, only how mu
|
||||
By default, weapon will shoot when at least 1 round is left, regardless of ammo cost calculations.
|
||||
To add proper check for ammo before shooting and proper calculation of number of burst rounds (hook type 1 and 2 in arg4), set Misc.CheckWeaponAmmoCost=1 in ddraw.ini
|
||||
|
||||
Item arg0 - weapon
|
||||
int arg1 - Number of bullets in burst (1 for single shots)
|
||||
int arg2 - Ammo cost calculated by original function (this is basically 2 for Super Cattle Prod and Mega Power Fist)
|
||||
int arg3 - Type of hook (0 - when subtracting ammo after single shot attack, 1 - when checking for "out of ammo" before attack, 2 - when calculating number of burst rounds, 3 - when subtracting ammo after burst attack)
|
||||
Item arg0 - The weapon
|
||||
int arg1 - Number of bullets in burst or 1 for single shots
|
||||
int arg2 - The amount of ammo that will be consumed, calculated by the original ammo cost function (this is basically 2 for Super Cattle Prod and Mega Power Fist)
|
||||
int arg3 - Type of hook:
|
||||
0 - when subtracting ammo after single shot attack
|
||||
1 - when checking for "out of ammo" before attack
|
||||
2 - when calculating number of burst rounds
|
||||
3 - when subtracting ammo after burst attack
|
||||
|
||||
int ret0 - new ammo cost value (set to 0 for unlimited ammo)
|
||||
NOTE: for hook type 2, you should return the new cost value based on the original ammo cost instead of the number of bullets
|
||||
int ret0 - The new amount of ammo to be consumed, or ammo cost of each round for hook type 2 (set to 0 for unlimited ammo)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user