diff --git a/regamedll/dlls/API/CAPI_Impl.cpp b/regamedll/dlls/API/CAPI_Impl.cpp index e6dbeaed7..d7d30a2e7 100644 --- a/regamedll/dlls/API/CAPI_Impl.cpp +++ b/regamedll/dlls/API/CAPI_Impl.cpp @@ -42,6 +42,14 @@ CGrenade *PlantBomb_api(entvars_t *pevOwner, Vector &vecStart, Vector &vecVeloci return CGrenade::ShootSatchelCharge(pevOwner, vecStart, vecVelocity); } +CGib *SpawnHeadGib_api(entvars_t *pevVictim) { + return CGib::SpawnHeadGib(pevVictim); +} + +void SpawnRandomGibs_api(entvars_t *pevVictim, int cGibs, int human) { + CGib::SpawnRandomGibs(pevVictim, cGibs, human); +} + ReGameFuncs_t g_ReGameApiFuncs = { &CREATE_NAMED_ENTITY, @@ -60,7 +68,10 @@ ReGameFuncs_t g_ReGameApiFuncs = { Cmd_Argc_api, Cmd_Argv_api, - PlantBomb_api + PlantBomb_api, + + SpawnHeadGib_api, + SpawnRandomGibs_api }; GAMEHOOK_REGISTRY(CBasePlayer_Spawn); diff --git a/regamedll/public/regamedll/regamedll_api.h b/regamedll/public/regamedll/regamedll_api.h index 3e4961179..d6b8bc26d 100644 --- a/regamedll/public/regamedll/regamedll_api.h +++ b/regamedll/public/regamedll/regamedll_api.h @@ -642,6 +642,8 @@ struct ReGameFuncs_t { int (*Cmd_Argc)(); const char *(*Cmd_Argv)(int i); class CGrenade *(*PlantBomb)(entvars_t *pevOwner, Vector &vecStart, Vector &vecVelocity); + class CGib *(*SpawnHeadGib)(entvars_t* pevVictim); + void (*SpawnRandomGibs)(entvars_t* pevVictim, int cGibs, int human); }; class IReGameApi {