From 725a67ffea47fcfd7b1ef1435b43a971170b9cd5 Mon Sep 17 00:00:00 2001 From: Bryce Hutchings Date: Wed, 5 Jun 2002 09:42:30 +0000 Subject: [PATCH] removed old death messages --- reaction/cgame/cg_event.c | 1152 +------------------------------------ 1 file changed, 3 insertions(+), 1149 deletions(-) diff --git a/reaction/cgame/cg_event.c b/reaction/cgame/cg_event.c index 31664557..4a1402e5 100644 --- a/reaction/cgame/cg_event.c +++ b/reaction/cgame/cg_event.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.62 2002/06/05 09:42:30 niceass +// removed old death messages +// // Revision 1.61 2002/05/30 18:22:20 jbravo // Misc fixes // @@ -165,1155 +168,6 @@ const char *CG_PlaceString( int rank ) { return str; } -/* -============= -CG_Obituary -============= -*/ -// JBravo: moved to game and done right ;) -/* -static void CG_Obituary( entityState_t *ent ) { - int mod, target, attacker; - int n; //Elder: for random messages - char *message, *message2; - const char *targetInfo; - const char *attackerInfo; - char targetName[32], attackerName[32]; - gender_t gender; - clientInfo_t *ci; - - target = ent->otherEntityNum; - attacker = ent->otherEntityNum2; - mod = ent->eventParm; - - if (target < 0 || target >= MAX_CLIENTS) { - CG_Error("CG_Obituary: target out of range"); - } - ci = &cgs.clientinfo[target]; - - if (attacker < 0 || attacker >= MAX_CLIENTS) { - attacker = ENTITYNUM_WORLD; - attackerInfo = NULL; - } else { - attackerInfo = CG_ConfigString( CS_PLAYERS + attacker ); - } - - targetInfo = CG_ConfigString( CS_PLAYERS + target ); - if ( !targetInfo ) { - return; - } - Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2); - strcat( targetName, S_COLOR_WHITE ); - - message2 = ""; - - // check for single client messages - gender = ci->gender; - switch( mod ) { - case MOD_SUICIDE: - message = "suicides"; - break; - case MOD_FALLING: - //message = "'s thoughts weren't happy enough"; - //Elder: changed - if ( gender == GENDER_FEMALE ) - message = "plummets to her death"; - else if ( gender == GENDER_NEUTER ) - message = "plummets to its death"; - else - message = "plummets to his death"; - break; - case MOD_CRUSH: - message = "was flattened"; - break; - case MOD_WATER: - message = "sank like a rock"; - break; - case MOD_SLIME: - message = "melted"; - break; - case MOD_LAVA: - message = "does a back flip into the lava"; - break; - case MOD_TARGET_LASER: - message = "saw the light"; - break; - case MOD_TRIGGER_HURT: - message = "was in the wrong place"; - break; - case MOD_BLEEDING: - message = "bleeds to death"; - break; - default: - message = NULL; - break; - } - - if (attacker == target) { - gender = ci->gender; - switch (mod) { -#ifdef MISSIONPACK - case MOD_KAMIKAZE: - message = "goes out with a bang"; - break; -#endif - case MOD_GRENADE_SPLASH: - if ( gender == GENDER_FEMALE ) - message = "didn't throw her grenade far enough"; - else if (gender == GENDER_NEUTER) - message = "didn't throw its grenade far enough"; - else - message = "didn't throw his grenade far enough"; - break; - case MOD_ROCKET_SPLASH: - if ( gender == GENDER_FEMALE ) - message = "blew herself up"; - else if ( gender == GENDER_NEUTER ) - message = "blew itself up"; - else - message = "blew himself up"; - break; - case MOD_PLASMA_SPLASH: - if ( gender == GENDER_FEMALE ) - message = "melted herself"; - else if ( gender == GENDER_NEUTER ) - message = "melted itself"; - else - message = "melted himself"; - break; - case MOD_BFG_SPLASH: - message = "should have used a smaller gun"; - break; -#ifdef MISSIONPACK - case MOD_PROXIMITY_MINE: - if( gender == GENDER_FEMALE ) { - message = "found her prox mine"; - } else if ( gender == GENDER_NEUTER ) { - message = "found it's prox mine"; - } else { - message = "found his prox mine"; - } - break; -#endif - default: - if ( gender == GENDER_FEMALE ) - message = "killed herself"; - else if ( gender == GENDER_NEUTER ) - message = "killed itself"; - else - message = "killed himself"; - break; - } - } - - //Blaze: This allows for the falling damage message to pass through if someone attacked them - if (!(attacker == ENTITYNUM_WORLD || attacker == target)) message = NULL; - if (message) { - CG_Printf("%s %s.\n", targetName, message); - return; - } - - // check for kill messages from the current clientNum - if ( attacker == cg.snap->ps.clientNum ) { - char *s; - - if ( cgs.gametype < GT_TEAM ) { - s = va("You fragged %s\n%s place with %i", targetName, - CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), - cg.snap->ps.persistant[PERS_SCORE] ); - } else { - s = va("You fragged %s", targetName ); - } -#ifdef MISSIONPACK - if (!(cg_singlePlayerActive.integer && cg_cameraOrbit.integer)) { - CG_CenterPrint( s, SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH ); - } -#else -// JBravo: attempting to stop these messages for spectators - if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR) - CG_CenterPrint( s, SCREEN_HEIGHT * 0.25, (BIGCHAR_WIDTH+SMALLCHAR_WIDTH)*.5 ); -#endif - - // print the text message as well - } - - // check for double client messages - if ( !attackerInfo ) { - attacker = ENTITYNUM_WORLD; - strcpy( attackerName, "noname" ); - } else { - Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2); - strcat( attackerName, S_COLOR_WHITE ); - // check for kill messages about the current clientNum - if ( target == cg.snap->ps.clientNum ) { - Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); - } - } - if ( attacker != ENTITYNUM_WORLD ) { - switch (mod) { - case MOD_GRAPPLE: - message = "was caught by"; - break; - case MOD_GAUNTLET: - message = "was pummeled by"; - break; - case MOD_MACHINEGUN: - message = "was machinegunned by"; - break; - case MOD_SHOTGUN: - message = "was gunned down by"; - break; - case MOD_GRENADE: - message = "ate"; - message2 = "'s grenade"; - break; - case MOD_GRENADE_SPLASH: - message = "was shredded by"; - message2 = "'s shrapnel"; - break; - case MOD_ROCKET: - message = "ate"; - message2 = "'s rocket"; - break; - case MOD_ROCKET_SPLASH: - message = "almost dodged"; - message2 = "'s rocket"; - break; - case MOD_PLASMA: - message = "was melted by"; - message2 = "'s plasmagun"; - break; - case MOD_PLASMA_SPLASH: - message = "was melted by"; - message2 = "'s plasmagun"; - break; - case MOD_RAILGUN: - message = "was railed by"; - break; - case MOD_LIGHTNING: - message = "was electrocuted by"; - break; - case MOD_BFG: - case MOD_BFG_SPLASH: - message = "was blasted by"; - message2 = "'s BFG"; - break; -#ifdef MISSIONPACK - case MOD_NAIL: - message = "was nailed by"; - break; - case MOD_CHAINGUN: - message = "got lead poisoning from"; - message2 = "'s Chaingun"; - break; - case MOD_PROXIMITY_MINE: - message = "was too close to"; - message2 = "'s Prox Mine"; - break; - case MOD_KAMIKAZE: - message = "falls to"; - message2 = "'s Kamikaze blast"; - break; - case MOD_JUICED: - message = "was juiced by"; - break; -#endif - //Elder: added - case MOD_FALLING: - message = "was taught how to fly by"; - break; - case MOD_PISTOL: - message = "was shot by"; - message2 = "'s Mark 23 Pistol"; - break; - case MOD_M4: - message = "was shot by"; - message2 = "'s M4 Assault Rifle"; - break; - case MOD_MP5: - message = "was shot by"; - message2 = "'s MP5/10 Submachinegun"; - break; - case MOD_AKIMBO: - message = "was shot by"; - message2 = "'s pair of Mark 23 Pistols"; - break; - case MOD_M3: - n = rand() % 2 + 1; - if (n == 1) { - message = "accepts"; - message2 = "'s M3 Super 90 Assault Shotgun in hole-y matrimony"; - } else { - message = "is full of buckshot from"; - message2 = "'s M3 Super 90 Assault Shotgun"; - } - break; - case MOD_HANDCANNON: - n = rand() % 2 + 1; - if (n == 1) { - message = "ate"; - message2 = "'s sawed-off 12 gauge"; - } else { - message = "is full of buckshot from"; - message2 = "'s sawed off shotgun"; - } - break; - case MOD_SNIPER: - message = "was sniped by"; - break; - case MOD_KICK: - n = rand() % 3 + 1; - if (n == 1) { - if (gender == GENDER_NEUTER) - message = "got its ass kicked by"; - else if (gender == GENDER_FEMALE) - message = "got her ass kicked by"; - else - message = "got his ass kicked by"; - } else if (n == 2) { - message = "couldn't remove"; - if (gender == GENDER_NEUTER) - message2 = "'s boot from its ass"; - else if (gender == GENDER_FEMALE) - message2 = "'s boot from her ass"; - else - message2 = "'s boot from his ass"; - } else { - if (gender == GENDER_NEUTER) - message = "had a Bruce Lee put on it by"; - else if (gender == GENDER_FEMALE) - message = "had a Bruce Lee put on her by"; - else - message = "had a Bruce Lee put on him by"; - message2 = ", with a quickness"; - } - break; - case MOD_KNIFE: - message = "was slashed apart by"; - message2 = "'s Combat Knife"; - break; - case MOD_KNIFE_THROWN: - message = " was hit by"; - message2 = "'s flying Combat Knife"; - break; - case MOD_TELEFRAG: - message = "tried to invade"; - message2 = "'s personal space"; - break; - default: - message = "was killed by"; - break; - } - -// JBravo: live players dont get fraglines. - if (message) { - if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker || - cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || - cg_RQ3_team_round_going.integer == 0) - CG_Printf( "%s %s %s%s\n", - targetName, message, attackerName, message2); - return; - } - } - - // we don't know what it was - CG_Printf( "(CG_Obituary)%s died and the mod is %i. Tell this to JB\n", targetName, mod ); -} -*/ - -/* -============= -Added by Elder -Slim version of main obit - -CG_Obituary_Head -============= -*/ -/* -static void CG_Obituary_Head( entityState_t *ent ) { - int mod, target, attacker; - char *message, *message2; - const char *targetInfo, *attackerInfo; - char targetName[32], attackerName[32]; - gender_t gender = GENDER_MALE; - clientInfo_t *ci; - - target = ent->otherEntityNum; - attacker = ent->otherEntityNum2; - mod = ent->eventParm; - - if (target < 0 || target >= MAX_CLIENTS) { - CG_Error("CG_Obituary: target out of range"); - } - ci = &cgs.clientinfo[target]; - - if (attacker < 0 || attacker >= MAX_CLIENTS) { - attacker = ENTITYNUM_WORLD; - attackerInfo = NULL; - } else { - attackerInfo = CG_ConfigString(CS_PLAYERS + attacker); - } - - targetInfo = CG_ConfigString(CS_PLAYERS + target); - if (!targetInfo) { - return; - } - Q_strncpyz(targetName, Info_ValueForKey(targetInfo, "n"), sizeof(targetName) - 2); - strcat(targetName, S_COLOR_WHITE); - - message2 = ""; - - // check for single client messages - - switch(mod) { - case MOD_SUICIDE: - message = "suicides"; - break; - case MOD_FALLING: - message = "'s thoughts weren't happy enough"; - break; - case MOD_CRUSH: - message = "was squished"; - break; - case MOD_WATER: - message = "sank like a rock"; - break; - case MOD_SLIME: - message = "melted"; - break; - case MOD_LAVA: - message = "does a back flip into the lava"; - break; - case MOD_TARGET_LASER: - message = "saw the light"; - break; - case MOD_TRIGGER_HURT: - message = "was in the wrong place"; - break; - case MOD_BLEEDING: - message = "bled to death"; - break; - default: - message = NULL; - break; - } - - if (attacker == target) { - gender = ci->gender; - switch (mod) { - case MOD_GRENADE_SPLASH: - break; - default: - //Elder: shouldn't be here - break; - } - } - - if (!(attacker == ENTITYNUM_WORLD || attacker == target)) message = NULL; - if (message) { - CG_Printf( "%s %s.\n", targetName, message); - return; - } - - // check for kill messages from the current clientNum - if (attacker == cg.snap->ps.clientNum) { - char *s; - - if (cgs.gametype < GT_TEAM) { - s = va("You fragged %s\n%s place with %i", targetName, - CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), - cg.snap->ps.persistant[PERS_SCORE] ); - } else { - s = va("You fragged %s", targetName ); - } - // print the text message as well -// JBravo: attempting to stop these messages for spectators - if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR) - CG_CenterPrint( s, SCREEN_HEIGHT * 0.25, (BIGCHAR_WIDTH+SMALLCHAR_WIDTH)*.5 ); - } - - // check for double client messages - if ( !attackerInfo ) { - attacker = ENTITYNUM_WORLD; - strcpy( attackerName, "noname" ); - } else { - Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2); - strcat( attackerName, S_COLOR_WHITE ); - // check for kill messages about the current clientNum - if ( target == cg.snap->ps.clientNum ) { - Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); - } - } - - if (attacker != ENTITYNUM_WORLD) { - switch (mod) { - case MOD_PISTOL: - if (gender == GENDER_FEMALE) - message = "has a hole in her head from"; - else if (gender == GENDER_NEUTER) - message = "has a hole in its head from"; - else - message = "has a hole in his head from"; - message2 = "'s Mark23 Pistol"; - break; - case MOD_M4: - message = "had a makeover by"; - message2 = "'s M4 Assault rifle"; - break; - case MOD_MP5: - message = "'s brains are on the wall thanks to"; - message2 = "'s 10mm MP5/10 round"; - break; - case MOD_AKIMBO: - message = "was trepanned by"; - message2 = "'s akimbo Mark 23 pistols"; - break; - case MOD_SNIPER: -// JBravo: fixing these fraglines for players that dont have a sniper -// if (cg.refdef.fov_x < 90) { - if (cgs.clientinfo[target].curWeapon == WP_SSG3000) { - if (gender == GENDER_NEUTER) - message = "saw the sniper bullet go through its scope thanks to"; - else if (gender == GENDER_FEMALE) - message = "saw the sniper bullet go through her scope thanks to"; - else - message = "saw the sniper bullet go through his scope thanks to"; - } else { - message = "caught a sniper bullet between the eyes from"; - } - break; - case MOD_KNIFE: - if (gender == GENDER_NEUTER) - message = "had its throat slit by"; - else if (gender == GENDER_FEMALE) - message = "had her throat slit by"; - else - message = "had his throat slit by"; - break; - case MOD_KNIFE_THROWN: - message = "caught"; - if (gender == GENDER_NEUTER) - message2 = "'s flying knife with its forehead"; - else if (gender == GENDER_FEMALE) - message2 = "'s flying knife with her forehead"; - else - message2 = "'s flying knife with his forehead"; - break; - case MOD_HANDCANNON: - case MOD_M3: - case MOD_KICK: - case MOD_GRENADE: - case MOD_GRENADE_SPLASH: - //Elder: shouldn't be here - break; - case MOD_TELEFRAG: - message = "tried to invade"; - message2 = "'s personal space"; - break; - case MOD_FALLING: - message = "was taught how to fly by"; - break; - default: - message = "was killed by"; - break; - } - -// JBravo: live players dont get fraglines. - if (message) { - if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker || - cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || - cg_RQ3_team_round_going.integer == 0) - CG_Printf( "%s %s %s%s\n", - targetName, message, attackerName, message2); - return; - } - } - - // we don't know what it was - CG_Printf( "(CG_Obituary_Head)%s died and the mod is %i. Tell this to JB\n", targetName, mod ); -} -*/ - -/* -============= -Added by Elder -Slim version of main obit - -CG_Obituary_Chest -============= -*/ -/* -static void CG_Obituary_Chest( entityState_t *ent ) { - int mod, target, attacker; - char *message, *message2; - const char *targetInfo, *attackerInfo; - char targetName[32], attackerName[32]; - gender_t gender; - clientInfo_t *ci; - - target = ent->otherEntityNum; - attacker = ent->otherEntityNum2; - mod = ent->eventParm; - - if ( target < 0 || target >= MAX_CLIENTS ) { - CG_Error( "CG_Obituary: target out of range" ); - } - ci = &cgs.clientinfo[target]; - - if ( attacker < 0 || attacker >= MAX_CLIENTS ) { - attacker = ENTITYNUM_WORLD; - attackerInfo = NULL; - } else { - attackerInfo = CG_ConfigString( CS_PLAYERS + attacker ); - } - - targetInfo = CG_ConfigString( CS_PLAYERS + target ); - if ( !targetInfo ) { - return; - } - Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2); - strcat( targetName, S_COLOR_WHITE ); - - message2 = ""; - - // check for single client messages - - switch( mod ) { - case MOD_SUICIDE: - message = "suicides"; - break; - case MOD_FALLING: - message = "'s thoughts weren't happy enough"; - break; - case MOD_CRUSH: - message = "was squished"; - break; - case MOD_WATER: - message = "sank like a rock"; - break; - case MOD_SLIME: - message = "melted"; - break; - case MOD_LAVA: - message = "does a back flip into the lava"; - break; - case MOD_TARGET_LASER: - message = "saw the light"; - break; - case MOD_TRIGGER_HURT: - message = "was in the wrong place"; - break; - case MOD_BLEEDING: - message = "bled to death"; - break; - default: - message = NULL; - break; - } - - if (attacker == target) { - gender = ci->gender; - switch (mod) { - case MOD_GRENADE_SPLASH: - default: - //Elder: shouldn't be here - break; - } - } - - if (!(attacker == ENTITYNUM_WORLD || attacker ==target)) message = NULL; - if (message) { - CG_Printf( "%s %s.\n", targetName, message); - return; - } - - // check for kill messages from the current clientNum - if ( attacker == cg.snap->ps.clientNum ) { - char *s; - - if ( cgs.gametype < GT_TEAM ) { - s = va("You fragged %s\n%s place with %i", targetName, - CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), - cg.snap->ps.persistant[PERS_SCORE] ); - } else { - s = va("You fragged %s", targetName ); - } - // print the text message as well -// JBravo: attempting to stop these messages for spectators - if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR) - CG_CenterPrint( s, SCREEN_HEIGHT * 0.25, (BIGCHAR_WIDTH+SMALLCHAR_WIDTH)*.5 ); - } - - // check for double client messages - if ( !attackerInfo ) { - attacker = ENTITYNUM_WORLD; - strcpy( attackerName, "noname" ); - } else { - Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2); - strcat( attackerName, S_COLOR_WHITE ); - // check for kill messages about the current clientNum - if ( target == cg.snap->ps.clientNum ) { - Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); - } - } - - if ( attacker != ENTITYNUM_WORLD ) { - switch (mod) { - case MOD_PISTOL: - message = "loses a vital chest organ thanks to"; - message2 = "'s Mark 23 pistol"; - break; - case MOD_M4: - message = "feels some heart burn thanks to"; - message2 = "'s M4 Assault Rifle"; - break; - case MOD_MP5: - message = "feels some chest pain via"; - message2 = "'s MP5/10 Submachinegun"; - break; - case MOD_AKIMBO: - message = "was John Woo'd by"; - break; - case MOD_SNIPER: - message = "was picked off by"; - break; - case MOD_KNIFE: - message = "had open heart surgery, compliments of"; - break; - case MOD_KNIFE_THROWN: - message = "'s ribs don't help against"; - message2 = "'s flying knife"; - break; - case MOD_HANDCANNON: - case MOD_M3: - case MOD_KICK: - case MOD_GRENADE: - case MOD_GRENADE_SPLASH: - //Elder: shouldn't be here - break; - case MOD_TELEFRAG: - message = "tried to invade"; - message2 = "'s personal space"; - break; - case MOD_FALLING: - message = "was taught how to fly by"; - break; - default: - message = "was killed by"; - break; - } - -// JBravo: live players dont get fraglines. - if (message) { - if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker || - cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || - cg_RQ3_team_round_going.integer == 0) - CG_Printf( "%s %s %s%s\n", - targetName, message, attackerName, message2); - return; - } - } - - // we don't know what it was - CG_Printf( "(CG_Obituary_Chest)%s died and the mod is %i. Tell this to JB\n", targetName, mod ); -} -*/ -/* -============= -Added by Elder -Slim version of main obit - -CG_Obituary_Stomach -============= -*/ -/* -static void CG_Obituary_Stomach( entityState_t *ent ) { - int mod, target, attacker; - char *message, *message2; - const char *targetInfo, *attackerInfo; - char targetName[32], attackerName[32]; - //Makro - wasn't initialized, caused a warning in MSVC - gender_t gender = GENDER_MALE; - clientInfo_t *ci; - - target = ent->otherEntityNum; - attacker = ent->otherEntityNum2; - mod = ent->eventParm; - - if ( target < 0 || target >= MAX_CLIENTS ) { - CG_Error( "CG_Obituary: target out of range" ); - } - ci = &cgs.clientinfo[target]; - - if ( attacker < 0 || attacker >= MAX_CLIENTS ) { - attacker = ENTITYNUM_WORLD; - attackerInfo = NULL; - } else { - attackerInfo = CG_ConfigString( CS_PLAYERS + attacker ); - } - - targetInfo = CG_ConfigString( CS_PLAYERS + target ); - if ( !targetInfo ) { - return; - } - Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2); - strcat( targetName, S_COLOR_WHITE ); - - message2 = ""; - - // check for single client messages - - switch( mod ) { - case MOD_SUICIDE: - message = "suicides"; - break; - case MOD_FALLING: - message = "'s thoughts weren't happy enough"; - break; - case MOD_CRUSH: - message = "was squished"; - break; - case MOD_WATER: - message = "sank like a rock"; - break; - case MOD_SLIME: - message = "melted"; - break; - case MOD_LAVA: - message = "does a back flip into the lava"; - break; - case MOD_TARGET_LASER: - message = "saw the light"; - break; - case MOD_TRIGGER_HURT: - message = "was in the wrong place"; - break; - case MOD_BLEEDING: - message = "bled to death"; - break; - default: - message = NULL; - break; - } - - if (attacker == target) { - gender = ci->gender; - switch (mod) { - case MOD_GRENADE_SPLASH: - default: - //Elder: shouldn't be here - break; - } - } - if (!(attacker == ENTITYNUM_WORLD || attacker ==target)) message = NULL; - if (message) { - CG_Printf( "%s %s.\n", targetName, message); - return; - } - - // check for kill messages from the current clientNum - if ( attacker == cg.snap->ps.clientNum ) { - char *s; - - if ( cgs.gametype < GT_TEAM ) { - s = va("You fragged %s\n%s place with %i", targetName, - CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), - cg.snap->ps.persistant[PERS_SCORE] ); - } else { - s = va("You fragged %s", targetName ); - } - // print the text message as well -// JBravo: attempting to stop these messages for spectators - if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR) - CG_CenterPrint( s, SCREEN_HEIGHT * 0.25, (BIGCHAR_WIDTH+SMALLCHAR_WIDTH)*.5 ); - } - - // check for double client messages - if ( !attackerInfo ) { - attacker = ENTITYNUM_WORLD; - strcpy( attackerName, "noname" ); - } else { - Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2); - strcat( attackerName, S_COLOR_WHITE ); - // check for kill messages about the current clientNum - if ( target == cg.snap->ps.clientNum ) { - Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); - } - } - - if ( attacker != ENTITYNUM_WORLD ) { - switch (mod) { - case MOD_PISTOL: - if (gender == GENDER_NEUTER) - message = "loses its lunch to"; - else if (gender == GENDER_FEMALE) - message = "loses her lunch to"; - else - message = "loses his lunch to"; - message2 = "'s .45 caliber pistol round"; - break; - case MOD_M4: - message = "has an upset stomach thanks to"; - message2 = "'s M4 Assault Rifle"; - break; - case MOD_MP5: - message = "needs some Pepto Bismol after"; - message2 = "'s 10mm MP5 round"; - break; - case MOD_AKIMBO: - message = "needs some new kidneys thanks to"; - message2 = "'s akimbo Mark 23 pistols"; - break; - case MOD_SNIPER: - message = "was sniped in the stomach by"; - break; - case MOD_KNIFE: - message = "was gutted by"; - break; - case MOD_KNIFE_THROWN: - if (gender == GENDER_NEUTER) - message = "sees the contents of its own stomach thanks to"; - else if (gender == GENDER_FEMALE) - message = "sees the contents of her own stomach thanks to"; - else - message = "sees the contents of his own stomach thanks to"; - message2 = "'s flying knife"; - break; - case MOD_HANDCANNON: - case MOD_M3: - case MOD_KICK: - case MOD_GRENADE: - case MOD_GRENADE_SPLASH: - //Elder: shouldn't be here - break; - case MOD_TELEFRAG: - message = "tried to invade"; - message2 = "'s personal space"; - break; - case MOD_FALLING: - message = "was taught how to fly by"; - break; - default: - message = "was killed by"; - break; - } - -// JBravo: live players dont get fraglines. - if (message) { - if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker || - cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || - cg_RQ3_team_round_going.integer == 0) - CG_Printf( "%s %s %s%s\n", - targetName, message, attackerName, message2); - return; - } - } - - // we don't know what it was - CG_Printf( "(CG_Obituary_Stomach)%s died and the mod is %i. Tell this to JB\n", targetName, mod ); -} -*/ -/* -============= -Added by Elder -Slim version of main obit - -CG_Obituary_Legs -============= -*/ -/* -static void CG_Obituary_Legs( entityState_t *ent ) { - int mod; - int target, attacker; - char *message; - char *message2; - const char *targetInfo; - const char *attackerInfo; - char targetName[32]; - char attackerName[32]; - //Makro - wasn't initialized, caused a warning in MSVC - gender_t gender = GENDER_MALE; - clientInfo_t *ci; - - target = ent->otherEntityNum; - attacker = ent->otherEntityNum2; - mod = ent->eventParm; - if ( target < 0 || target >= MAX_CLIENTS ) { - CG_Error( "CG_Obituary: target out of range" ); - } - ci = &cgs.clientinfo[target]; - - if ( attacker < 0 || attacker >= MAX_CLIENTS ) { - attacker = ENTITYNUM_WORLD; - attackerInfo = NULL; - } else { - attackerInfo = CG_ConfigString( CS_PLAYERS + attacker ); - } - - targetInfo = CG_ConfigString( CS_PLAYERS + target ); - if ( !targetInfo ) { - return; - } - Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2); - strcat( targetName, S_COLOR_WHITE ); - message2 = ""; - - // check for single client messages - - switch( mod ) { - case MOD_SUICIDE: - message = "suicides"; - break; - case MOD_FALLING: - message = "'s thoughts weren't happy enough"; - break; - case MOD_CRUSH: - message = "was squished"; - break; - case MOD_WATER: - message = "sank like a rock"; - break; - case MOD_SLIME: - message = "melted"; - break; - case MOD_LAVA: - message = "does a back flip into the lava"; - break; - case MOD_TARGET_LASER: - message = "saw the light"; - break; - case MOD_TRIGGER_HURT: - message = "was in the wrong place"; - break; - case MOD_BLEEDING: - message = "bled to death"; - break; - default: - message = NULL; - break; - } - - if (attacker == target) { - gender = ci->gender; - switch (mod) { - case MOD_GRENADE_SPLASH: - default: - //Elder: shouldn't be here - break; - } - } - - if (!(attacker == ENTITYNUM_WORLD || attacker == target)) message = NULL; - if (message) { - CG_Printf( "%s %s.\n", targetName, message); - return; - } - - // check for kill messages from the current clientNum - if ( attacker == cg.snap->ps.clientNum ) { - char *s; - - if ( cgs.gametype < GT_TEAM ) { - s = va("You fragged %s\n%s place with %i", targetName, - CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), - cg.snap->ps.persistant[PERS_SCORE] ); - } else { - s = va("You fragged %s", targetName ); - } - // print the text message as well -// JBravo: attempting to stop these messages for spectators - if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR) - CG_CenterPrint( s, SCREEN_HEIGHT * 0.25, (BIGCHAR_WIDTH+SMALLCHAR_WIDTH)*.5 ); - } - - // check for double client messages - if ( !attackerInfo ) { - attacker = ENTITYNUM_WORLD; - strcpy( attackerName, "noname" ); - } else { - Q_strncpyz( attackerName, Info_ValueForKey( attackerInfo, "n" ), sizeof(attackerName) - 2); - strcat( attackerName, S_COLOR_WHITE ); - // check for kill messages about the current clientNum - if ( target == cg.snap->ps.clientNum ) { - Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); - } - } - - if ( attacker != ENTITYNUM_WORLD ) { - switch (mod) { - case MOD_PISTOL: - message = "is legless because of"; - message2 = "'s .45 caliber pistol round"; - break; - case MOD_M4: - message = "is now shorter thanks to"; - message2 = "'s M4 Assault Rifle"; - break; - case MOD_MP5: - if (gender == GENDER_NEUTER) - message = "had its legs blown off thanks to"; - else if (gender == GENDER_FEMALE) - message = "had her legs blown off thanks to"; - else - message = "had his legs blown off thanks to"; - message2 = "'s MP5/10 Submachinegun"; - break; - case MOD_AKIMBO: - message = "was shot in the legs by"; - message2 = "'s akimbo Mark 23 pistols"; - break; - case MOD_SNIPER: - message = "was shot in the legs by"; - break; - case MOD_KNIFE: - message = "was stabbed repeatedly in the legs by"; - break; - case MOD_KNIFE_THROWN: - if (gender == GENDER_NEUTER) - message = "had its legs cut off thanks to"; - else if (gender == GENDER_FEMALE) - message = "had her legs cut off thanks to"; - else - message = "had his legs cut off thanks to"; - - message2 = "'s flying knife"; - break; - case MOD_HANDCANNON: - case MOD_M3: - case MOD_KICK: - case MOD_GRENADE: - case MOD_GRENADE_SPLASH: - //Elder: shouldn't be here - break; - case MOD_TELEFRAG: - message = "tried to invade"; - message2 = "'s personal space"; - break; - case MOD_FALLING: - message = "was taught how to fly by"; - break; - default: - message = "was killed by"; - break; - } - -// JBravo: live players dont get fraglines. - if (message) { - if (cg.snap->ps.clientNum == target || cg.snap->ps.clientNum == attacker || - cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || - cg_RQ3_team_round_going.integer == 0) - CG_Printf( "%s %s %s%s\n", - targetName, message, attackerName, message2); - return; - } - } - - // we don't know what it was - CG_Printf( "(CG_Obituary_Legs)%s died and the mod is %i. Tell this to JB\n", targetName, mod ); -} - -//========================================================================== -*/ /* =============== CG_UseItem