diff --git a/reaction/cgame/cg_event.c b/reaction/cgame/cg_event.c index 94a3f16f..34dc3e92 100644 --- a/reaction/cgame/cg_event.c +++ b/reaction/cgame/cg_event.c @@ -75,7 +75,7 @@ static void CG_Obituary( entityState_t *ent ) { target = ent->otherEntityNum; attacker = ent->otherEntityNum2; mod = ent->eventParm; - + if ( target < 0 || target >= MAX_CLIENTS ) { CG_Error( "CG_Obituary: target out of range" ); } @@ -204,7 +204,8 @@ static void CG_Obituary( entityState_t *ent ) { break; } } - + //Blaze: This allows for the falling damage message to pass through if someone attacked them + if (attacker != ENTITYNUM_WORLD) message = NULL; if (message) { CG_Printf( "%s %s.\n", targetName, message); return; @@ -244,7 +245,6 @@ static void CG_Obituary( entityState_t *ent ) { Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); } } - if ( attacker != ENTITYNUM_WORLD ) { switch (mod) { case MOD_GRAPPLE: @@ -446,7 +446,7 @@ static void CG_Obituary_Head( entityState_t *ent ) { target = ent->otherEntityNum; attacker = ent->otherEntityNum2; mod = ent->eventParm; - + CG_Printf("(%s) (%s) (%d) (%d)\n",targetName, attackerName,target,attacker); if ( target < 0 || target >= MAX_CLIENTS ) { CG_Error( "CG_Obituary: target out of range" ); } @@ -513,7 +513,7 @@ static void CG_Obituary_Head( entityState_t *ent ) { break; } } - + if (attacker != ENTITYNUM_WORLD) message = NULL; if (message) { CG_Printf( "%s %s.\n", targetName, message); return; @@ -612,6 +612,9 @@ static void CG_Obituary_Head( entityState_t *ent ) { 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; @@ -652,7 +655,7 @@ static void CG_Obituary_Chest( entityState_t *ent ) { target = ent->otherEntityNum; attacker = ent->otherEntityNum2; mod = ent->eventParm; - + CG_Printf("(%s) (%s) (%d) (%d)\n",targetName, attackerName,target,attacker); if ( target < 0 || target >= MAX_CLIENTS ) { CG_Error( "CG_Obituary: target out of range" ); } @@ -718,7 +721,7 @@ static void CG_Obituary_Chest( entityState_t *ent ) { break; } } - + if (attacker != ENTITYNUM_WORLD) message = NULL; if (message) { CG_Printf( "%s %s.\n", targetName, message); return; @@ -789,6 +792,9 @@ static void CG_Obituary_Chest( entityState_t *ent ) { 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; @@ -828,7 +834,7 @@ static void CG_Obituary_Stomach( entityState_t *ent ) { target = ent->otherEntityNum; attacker = ent->otherEntityNum2; mod = ent->eventParm; - + CG_Printf("(%s) (%s) (%d) (%d)\n",targetName, attackerName,target,attacker); if ( target < 0 || target >= MAX_CLIENTS ) { CG_Error( "CG_Obituary: target out of range" ); } @@ -894,7 +900,7 @@ static void CG_Obituary_Stomach( entityState_t *ent ) { break; } } - + if (attacker != ENTITYNUM_WORLD) message = NULL; if (message) { CG_Printf( "%s %s.\n", targetName, message); return; @@ -976,6 +982,9 @@ static void CG_Obituary_Stomach( entityState_t *ent ) { 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; @@ -1015,7 +1024,6 @@ static void CG_Obituary_Legs( entityState_t *ent ) { target = ent->otherEntityNum; attacker = ent->otherEntityNum2; mod = ent->eventParm; - if ( target < 0 || target >= MAX_CLIENTS ) { CG_Error( "CG_Obituary: target out of range" ); } @@ -1034,7 +1042,6 @@ static void CG_Obituary_Legs( entityState_t *ent ) { } Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2); strcat( targetName, S_COLOR_WHITE ); - message2 = ""; // check for single client messages @@ -1081,7 +1088,7 @@ static void CG_Obituary_Legs( entityState_t *ent ) { break; } } - + if (attacker != ENTITYNUM_WORLD) message = NULL; if (message) { CG_Printf( "%s %s.\n", targetName, message); return; @@ -1164,6 +1171,9 @@ static void CG_Obituary_Legs( entityState_t *ent ) { 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; diff --git a/reaction/game/g_active.c b/reaction/game/g_active.c index c39a5cdc..c041fb91 100644 --- a/reaction/game/g_active.c +++ b/reaction/game/g_active.c @@ -697,7 +697,14 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) { //Elder: added so we can trigger AQ2 pain blends ent->client->ps.damageEvent++; ent->client->ps.damageCount += damage; - G_Damage (ent, NULL, NULL, NULL, NULL, damage, 0, MOD_FALLING); + if (ent->client->lasthurt_mod != 0) + { + G_Damage (ent, &g_entities[ent->client->lasthurt_client], &g_entities[ent->client->lasthurt_client], NULL, NULL, damage, 0, MOD_FALLING); + } + else + { + G_Damage (ent, NULL, NULL, NULL, NULL, damage, 0, MOD_FALLING); + } break; @@ -716,7 +723,14 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) { //Elder: added so we can trigger AQ2 pain blends ent->client->ps.damageEvent++; ent->client->ps.damageCount += damage; - G_Damage (ent, NULL, NULL, NULL, NULL, damage, 0, MOD_FALLING); + if (ent->client->lasthurt_mod != 0) + { + G_Damage (ent, &g_entities[ent->client->lasthurt_client], &g_entities[ent->client->lasthurt_client], NULL, NULL, damage, 0, MOD_FALLING); + } + else + { + G_Damage (ent, NULL, NULL, NULL, NULL, damage, 0, MOD_FALLING); + } break; diff --git a/reaction/game/g_combat.c b/reaction/game/g_combat.c index 6abbc5da..739cd24d 100644 --- a/reaction/game/g_combat.c +++ b/reaction/game/g_combat.c @@ -541,7 +541,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int int i; char *killerName, *obit; - //Blaze: Stop bleeding when dead if ( self->client ) { @@ -1308,11 +1307,10 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, int impactRotation; gentity_t *tent; - + #ifdef MISSIONPACK vec3_t bouncedir, impactpoint; #endif - if (!targ->takedamage) { return; } @@ -1341,6 +1339,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, if ( !inflictor ) { inflictor = &g_entities[ENTITYNUM_WORLD]; } + if ( !attacker ) { attacker = &g_entities[ENTITYNUM_WORLD]; } diff --git a/reaction/game/g_weapon.c b/reaction/game/g_weapon.c index bf5073ef..a05161ab 100644 --- a/reaction/game/g_weapon.c +++ b/reaction/game/g_weapon.c @@ -120,6 +120,7 @@ qboolean JumpKick( gentity_t *ent ) tent->s.otherEntityNum2 = ent->s.number; tent->s.eventParm = DirToByte( tr.plane.normal ); tent->s.weapon = 0; + if (traceEnt->client->uniqueWeapons > 0) { diff --git a/reaction/game/game.plg b/reaction/game/game.plg index a5836435..67e27e0f 100644 --- a/reaction/game/game.plg +++ b/reaction/game/game.plg @@ -6,42 +6,13 @@ --------------------Configuration: game - Win32 Debug--------------------