Make use of FX_Corpse from Nuclide Base to handle body que corpses.
This commit is contained in:
parent
b5950c5491
commit
e0c66406d9
3 changed files with 4 additions and 12 deletions
|
@ -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 */
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue