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) {
FX_GibHuman(pl.origin);
} else {
/* Let's handle corpses on the clientside */
entity corpse = spawn();
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;
NSRenderableEntity corpse = FX_Corpse_Spawn(pl);
corpse.SetFrame(ANIM_DIESIMPLE);
}
/* now let's make the real client invisible */

View File

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

View File

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