Extend FX_GibHuman with a dir (euler) and force parameter.

This commit is contained in:
Marco Cawthorne 2022-04-05 20:39:08 -07:00
parent 48731a402a
commit ad18b8ec3d
Signed by: eukara
GPG Key ID: C196CD8BA993248A
3 changed files with 10 additions and 5 deletions

View File

@ -38,13 +38,18 @@ ClientGame_EventParse(float fHeader)
vSparkAngle[2] = readcoord();
FX_Spark(vSparkPos, vSparkAngle);
}break;
case EV_GIBHUMAN:{
case EV_GIBHUMAN:
vector vGibPos;
vGibPos[0] = readcoord();
vGibPos[1] = readcoord();
vGibPos[2] = readcoord();
FX_GibHuman(vGibPos);
}break;
vector vDir;
vDir[0] = readcoord();
vDir[1] = readcoord();
vDir[2] = readcoord();
float flForce = readfloat();
FX_GibHuman(vGibPos, vDir, flForce);
break;
case EV_BLOOD:{
vector vBloodPos;
vector vBloodColor;

View File

@ -260,7 +260,7 @@ TSMultiplayerRules::PlayerDeath(base_player pp)
/* either gib, or make a corpse */
if (pl.health < -50) {
FX_GibHuman(pl.origin);
FX_GibHuman(pl.origin, vectoangles(pl.origin - g_dmg_eAttacker.origin), g_dmg_iDamage * 2.0f);
} else {
/* Let's handle corpses on the clientside */
entity corpse = spawn();

View File

@ -45,7 +45,7 @@ TSSingleplayerRules::PlayerDeath(base_player pp)
}
if (pp.health < -50) {
FX_GibHuman(pp.origin);
FX_GibHuman(pl.origin, vectoangles(pl.origin - g_dmg_eAttacker.origin), g_dmg_iDamage * 2.0f);
}
/* Let's handle corpses on the clientside */