mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-22 20:31:11 +00:00
Added stomach gibbing
This commit is contained in:
parent
9651860404
commit
fade0026cf
3 changed files with 43 additions and 4 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.60 2002/05/28 01:46:58 jbravo
|
||||
// Added stomach gibbing
|
||||
//
|
||||
// Revision 1.59 2002/05/28 01:17:01 jbravo
|
||||
// More gib fixes. g_RQ3_gib added
|
||||
//
|
||||
|
@ -1493,6 +1496,25 @@ void CG_GibPlayerHeadshot (vec3_t playerOrigin) {
|
|||
}
|
||||
}
|
||||
|
||||
void CG_GibPlayerStomachshot (vec3_t playerOrigin) {
|
||||
vec3_t origin, velocity;
|
||||
|
||||
if (!cg_blood.integer) {
|
||||
return;
|
||||
}
|
||||
|
||||
VectorCopy (playerOrigin, origin);
|
||||
origin[2]+=25;
|
||||
velocity[0] = crandom()*GIB_VELOCITY;
|
||||
velocity[1] = crandom()*GIB_VELOCITY;
|
||||
velocity[2] = GIB_JUMP + crandom()*GIB_VELOCITY;
|
||||
if (rand() & 1) {
|
||||
CG_LaunchGib (origin, velocity, cgs.media.gibAbdomen);
|
||||
} else {
|
||||
CG_LaunchGib (origin, velocity, cgs.media.gibIntestine);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==============
|
||||
CG_JumpKick
|
||||
|
@ -2634,6 +2656,11 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
cent->pe.noHead = qtrue;
|
||||
CG_GibPlayerHeadshot( cent->lerpOrigin );
|
||||
break;
|
||||
case EV_GIB_PLAYER_STOMACH:
|
||||
DEBUGNAME("EV_GIB_PLAYER_STOMACH");
|
||||
trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.gibSound );
|
||||
CG_GibPlayerStomachshot( cent->lerpOrigin );
|
||||
break;
|
||||
case EV_BREAK_GLASS1:
|
||||
DEBUGNAME("EV_BREAK_GLASS1");
|
||||
// Change cgs.media.gibSound to whatever sound you want it to use
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.74 2002/05/28 01:46:58 jbravo
|
||||
// Added stomach gibbing
|
||||
//
|
||||
// Revision 1.73 2002/05/28 01:17:01 jbravo
|
||||
// More gib fixes. g_RQ3_gib added
|
||||
//
|
||||
|
@ -1068,7 +1071,8 @@ typedef enum {
|
|||
EV_POWERUP_REGEN,
|
||||
|
||||
EV_GIB_PLAYER, // gib a previously living player
|
||||
EV_GIB_PLAYER_HEADSHOT, // JBravo: for sniperheadshots
|
||||
EV_GIB_PLAYER_HEADSHOT, // JBravo: for sniper head shots
|
||||
EV_GIB_PLAYER_STOMACH, // JBravo: for sniper stomach shots
|
||||
EV_BREAK_GLASS1, // Blaze: Breakable glass
|
||||
EV_BREAK_GLASS2,
|
||||
EV_BREAK_GLASS3,
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.84 2002/05/28 01:46:58 jbravo
|
||||
// Added stomach gibbing
|
||||
//
|
||||
// Revision 1.83 2002/05/28 01:17:01 jbravo
|
||||
// More gib fixes. g_RQ3_gib added
|
||||
//
|
||||
|
@ -509,6 +512,11 @@ void GibEntity_Headshot (gentity_t *self, int killer) {
|
|||
G_AddEvent (self, EV_GIB_PLAYER_HEADSHOT, 0);
|
||||
self->client->noHead = qtrue;
|
||||
}
|
||||
|
||||
// JBravo: stomach gibbing
|
||||
void GibEntity_Stomach (gentity_t *self, int killer) {
|
||||
G_AddEvent (self, EV_GIB_PLAYER_STOMACH, 0);
|
||||
}
|
||||
/*
|
||||
==================
|
||||
body_die
|
||||
|
@ -1518,8 +1526,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
|||
// JBravo: AQ style Sniper and HC gibbing
|
||||
if (g_RQ3_gib.integer > 0) {
|
||||
if (meansOfDeath == MOD_SNIPER && hurt == LOC_HDAM) {
|
||||
G_Printf("AQ GIB!\n");
|
||||
if (g_RQ3_gib.integer == 1 || g_RQ3_gib.integer == 2) {
|
||||
if (g_RQ3_gib.integer < 3) {
|
||||
// NiceAss: beheading =D
|
||||
self->client->ps.eFlags |= EF_HEADLESS;
|
||||
GibEntity_Headshot (self, killer);
|
||||
|
@ -1528,8 +1535,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
|||
} else {
|
||||
self->client->noHead = qfalse;
|
||||
}
|
||||
if (meansOfDeath == MOD_SNIPER && hurt == LOC_SDAM)
|
||||
GibEntity_Stomach (self, killer);
|
||||
if (meansOfDeath == MOD_HANDCANNON && g_RQ3_gib.integer > 1) { // && self->health <= -15) {
|
||||
G_Printf("AQ GIB!\n");
|
||||
self->client->noHead = qfalse;
|
||||
trap_LinkEntity (self);
|
||||
GibEntity (self, killer);
|
||||
|
|
Loading…
Reference in a new issue