Theme
Combat events
Shots and impacts from the projectile hook.
| Export | Summary |
|---|---|
ShHitHookInstall | Install the hook. |
ShHitHookReady | See ShHitHookInstall. |
ShSetProjectileVelocityMultiplier | Bullet physics: scale the muzzle velocity the engine stores into each round it fires, tracer and authoritative round alike. |
ShSetProjectileDropMultiplier | The gravity half of the same idea, 0.0..10.0 (1.0 = vanilla). |
ShGetProjectileVelocityMultiplier | See ShSetProjectileDropMultiplier. |
ShGetProjectileDropMultiplier | See ShSetProjectileDropMultiplier. |
ShGetProjectileVelocityHookCount | How many trajectory steps the alternate sites have scaled. |
ShGetProjectileTrailHookCount | How many tracers the trail patch has scaled this session - the live proof the patch is running. |
ShBallisticsHookInstall | Install the trajectory patch on its own; 1 once it is in (or already was). |
ShOnHit | Register a receiver, up to eight. |
ShOffHit | Remove one receiver, or all of them when fn is NULL. |
ShHitCount | A ring, for callers that would rather poll. |
ShGetHits | See ShHitCount. |
ShOnFire | Register a receiver for shots, up to eight. |
ShOffFire | See ShOnFire. |
ShShotCount | See ShOnFire. |
ShGetShots | See ShOnFire. |
ShHitHookInstall
c
SH_API int ShHitHookInstall(void);Install the hook. Needed before any hit is reported.
scripthook.h, line 1194
ShHitHookReady
c
SH_API int ShHitHookReady(void);Documented together with ShHitHookInstall just above.
scripthook.h, line 1195
ShSetProjectileVelocityMultiplier
c
SH_API int ShSetProjectileVelocityMultiplier(float multiplier);Bullet physics: scale the muzzle velocity the engine stores into each round it fires, tracer and authoritative round alike. 1.0 is the game's own number; clamped to 0.10..10.0 and applied to shots fired after the call. Takes effect once ShBallisticsHookInstall has installed the trajectory patch.
scripthook.h, line 1202
ShSetProjectileDropMultiplier
c
SH_API int ShSetProjectileDropMultiplier(float multiplier);The gravity half of the same idea, 0.0..10.0 (1.0 = vanilla).
scripthook.h, line 1204
ShGetProjectileVelocityMultiplier
c
SH_API float ShGetProjectileVelocityMultiplier(void);Documented together with ShSetProjectileDropMultiplier just above.
scripthook.h, line 1205
ShGetProjectileDropMultiplier
c
SH_API float ShGetProjectileDropMultiplier(void);Documented together with ShSetProjectileDropMultiplier just above.
scripthook.h, line 1206
ShGetProjectileVelocityHookCount
c
SH_API uint32_t ShGetProjectileVelocityHookCount(void);How many trajectory steps the alternate sites have scaled. The shipped feature patches the trail, so this stays 0.
scripthook.h, line 1209
ShGetProjectileTrailHookCount
c
SH_API uint32_t ShGetProjectileTrailHookCount(void);How many tracers the trail patch has scaled this session - the live proof the patch is running.
scripthook.h, line 1212
ShBallisticsHookInstall
c
SH_API int ShBallisticsHookInstall(void);Install the trajectory patch on its own; 1 once it is in (or already was). Independent of the hit hook above.
scripthook.h, line 1215
ShOnHit
c
SH_API int ShOnHit(ShHitFn fn, void *user, int flags);Register a receiver, up to eight.
scripthook.h, line 1225
ShOffHit
c
SH_API int ShOffHit(ShHitFn fn);Remove one receiver, or all of them when fn is NULL.
scripthook.h, line 1227
ShHitCount
c
SH_API uint32_t ShHitCount(void);A ring, for callers that would rather poll.
scripthook.h, line 1230
ShGetHits
c
SH_API int ShGetHits(ShHit *out, int max);Documented together with ShHitCount just above.
scripthook.h, line 1231
ShOnFire
c
SH_API int ShOnFire(ShFireFn fn, void *user, int flags);Register a receiver for shots, up to eight.
scripthook.h, line 1251
ShOffFire
c
SH_API int ShOffFire(ShFireFn fn);Documented together with ShOnFire just above.
scripthook.h, line 1252
ShShotCount
c
SH_API uint32_t ShShotCount(void);Documented together with ShOnFire just above.
scripthook.h, line 1253
ShGetShots
c
SH_API int ShGetShots(ShShot *out, int max);Documented together with ShOnFire just above.
scripthook.h, line 1254