Make use of FX_Corpse from Nuclide Base to handle body que corpses.

This commit is contained in:
Marco Cawthorne 2021-12-13 11:48:33 -08:00
parent b5950c5491
commit e0c66406d9
Signed by: eukara
GPG key ID: C196CD8BA993248A
3 changed files with 4 additions and 12 deletions

View file

@ -73,18 +73,8 @@ HLMultiplayerRules::PlayerDeath(base_player pl)
if (pl.health < -50) { if (pl.health < -50) {
FX_GibHuman(pl.origin); FX_GibHuman(pl.origin);
} else { } else {
/* Let's handle corpses on the clientside */ NSRenderableEntity corpse = FX_Corpse_Spawn(pl);
entity corpse = spawn(); corpse.SetFrame(ANIM_DIESIMPLE);
setorigin(corpse, pl.origin + [0,0,32]);
setmodel(corpse, pl.model);
setsize(corpse, VEC_HULL_MIN, VEC_HULL_MAX);
corpse.movetype = MOVETYPE_TOSS;
corpse.solid = SOLID_TRIGGER;
corpse.modelindex = pl.modelindex;
corpse.frame = ANIM_DIESIMPLE;
corpse.angles = pl.angles;
corpse.velocity = pl.velocity;
corpse.colormap = pl.colormap;
} }
/* now let's make the real client invisible */ /* now let's make the real client invisible */

View file

@ -35,4 +35,5 @@ Game_Worldspawn(void)
precache_model("models/w_weaponbox.mdl"); precache_model("models/w_weaponbox.mdl");
Weapons_Init(); Weapons_Init();
Player_Precache(); Player_Precache();
FX_Corpse_Init();
} }

View file

@ -15,6 +15,7 @@ fx_breakmodel.qc
fx_explosion.qc fx_explosion.qc
fx_gibhuman.qc fx_gibhuman.qc
../../../base/src/shared/fx_spark.qc ../../../base/src/shared/fx_spark.qc
../../../base/src/shared/fx_corpse.qc
fx_impact.qc fx_impact.qc
items.h items.h