Added stomach gibbing

This commit is contained in:
Richard Allen 2002-05-28 01:46:58 +00:00
parent 9651860404
commit fade0026cf
3 changed files with 43 additions and 4 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.60 2002/05/28 01:46:58 jbravo
// Added stomach gibbing
//
// Revision 1.59 2002/05/28 01:17:01 jbravo // Revision 1.59 2002/05/28 01:17:01 jbravo
// More gib fixes. g_RQ3_gib added // 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 CG_JumpKick
@ -2634,6 +2656,11 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
cent->pe.noHead = qtrue; cent->pe.noHead = qtrue;
CG_GibPlayerHeadshot( cent->lerpOrigin ); CG_GibPlayerHeadshot( cent->lerpOrigin );
break; 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: case EV_BREAK_GLASS1:
DEBUGNAME("EV_BREAK_GLASS1"); DEBUGNAME("EV_BREAK_GLASS1");
// Change cgs.media.gibSound to whatever sound you want it to use // Change cgs.media.gibSound to whatever sound you want it to use

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.74 2002/05/28 01:46:58 jbravo
// Added stomach gibbing
//
// Revision 1.73 2002/05/28 01:17:01 jbravo // Revision 1.73 2002/05/28 01:17:01 jbravo
// More gib fixes. g_RQ3_gib added // More gib fixes. g_RQ3_gib added
// //
@ -1068,7 +1071,8 @@ typedef enum {
EV_POWERUP_REGEN, EV_POWERUP_REGEN,
EV_GIB_PLAYER, // gib a previously living player 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_GLASS1, // Blaze: Breakable glass
EV_BREAK_GLASS2, EV_BREAK_GLASS2,
EV_BREAK_GLASS3, EV_BREAK_GLASS3,

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.84 2002/05/28 01:46:58 jbravo
// Added stomach gibbing
//
// Revision 1.83 2002/05/28 01:17:01 jbravo // Revision 1.83 2002/05/28 01:17:01 jbravo
// More gib fixes. g_RQ3_gib added // 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); G_AddEvent (self, EV_GIB_PLAYER_HEADSHOT, 0);
self->client->noHead = qtrue; 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 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 // JBravo: AQ style Sniper and HC gibbing
if (g_RQ3_gib.integer > 0) { if (g_RQ3_gib.integer > 0) {
if (meansOfDeath == MOD_SNIPER && hurt == LOC_HDAM) { if (meansOfDeath == MOD_SNIPER && hurt == LOC_HDAM) {
G_Printf("AQ GIB!\n"); if (g_RQ3_gib.integer < 3) {
if (g_RQ3_gib.integer == 1 || g_RQ3_gib.integer == 2) {
// NiceAss: beheading =D // NiceAss: beheading =D
self->client->ps.eFlags |= EF_HEADLESS; self->client->ps.eFlags |= EF_HEADLESS;
GibEntity_Headshot (self, killer); GibEntity_Headshot (self, killer);
@ -1528,8 +1535,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
} else { } else {
self->client->noHead = qfalse; 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) { if (meansOfDeath == MOD_HANDCANNON && g_RQ3_gib.integer > 1) { // && self->health <= -15) {
G_Printf("AQ GIB!\n");
self->client->noHead = qfalse; self->client->noHead = qfalse;
trap_LinkEntity (self); trap_LinkEntity (self);
GibEntity (self, killer); GibEntity (self, killer);