mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added new HOOK_BUILDSFXWEAPON
* Hook for gsnd_build_weapon_sfx_name * Fixed long name ACM crash in AutoSearchSFX * Updated documents
This commit is contained in:
@@ -76,6 +76,8 @@
|
||||
#define HOOK_ROLLCHECK (46)
|
||||
#define HOOK_BESTWEAPON (47)
|
||||
#define HOOK_CANUSEWEAPON (48)
|
||||
// RESERVED 49..60
|
||||
#define HOOK_BUILDSFXWEAPON (61)
|
||||
|
||||
// Valid arguments to list_begin
|
||||
#define LIST_CRITTERS (0)
|
||||
|
||||
@@ -878,3 +878,23 @@ int arg3 - original result of engine function: 1 - can use, 0 - cannot use
|
||||
|
||||
int ret0 - overrides the result of engine function. Any non-zero value allows using the weapon
|
||||
```
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
#### `HOOK_BUILDSFXWEAPON (hs_buildsfxweapon.int)`
|
||||
|
||||
Runs before each weapon sound effect is played or added to the animation queue to determine the name of the sound effect file based on the weapon, target, and action being performed.
|
||||
|
||||
```
|
||||
int arg0 - weapon sound effect type:
|
||||
0 - ready/reload
|
||||
1 - attack
|
||||
2 - out of ammo
|
||||
3 - flying (for projectiles from weapons)
|
||||
4 - hit
|
||||
Item arg1 - the weapon being used
|
||||
int arg2 - attack type (see ATKTYPE_* constants)
|
||||
Obj arg3 - the target of the attack (can be 0)
|
||||
|
||||
String ret0 - the filename of the new sound effect to use, without extension (relative to the sound\sfx\ directory)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user