Score fixes

This commit is contained in:
Scott Brooks 2001-10-28 01:17:03 +00:00
parent 669f29d4ee
commit 78749c26ce
5 changed files with 47 additions and 88 deletions

View file

@ -75,7 +75,7 @@ static void CG_Obituary( entityState_t *ent ) {
target = ent->otherEntityNum; target = ent->otherEntityNum;
attacker = ent->otherEntityNum2; attacker = ent->otherEntityNum2;
mod = ent->eventParm; mod = ent->eventParm;
if ( target < 0 || target >= MAX_CLIENTS ) { if ( target < 0 || target >= MAX_CLIENTS ) {
CG_Error( "CG_Obituary: target out of range" ); CG_Error( "CG_Obituary: target out of range" );
} }
@ -204,7 +204,8 @@ static void CG_Obituary( entityState_t *ent ) {
break; break;
} }
} }
//Blaze: This allows for the falling damage message to pass through if someone attacked them
if (attacker != ENTITYNUM_WORLD) message = NULL;
if (message) { if (message) {
CG_Printf( "%s %s.\n", targetName, message); CG_Printf( "%s %s.\n", targetName, message);
return; return;
@ -244,7 +245,6 @@ static void CG_Obituary( entityState_t *ent ) {
Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) ); Q_strncpyz( cg.killerName, attackerName, sizeof( cg.killerName ) );
} }
} }
if ( attacker != ENTITYNUM_WORLD ) { if ( attacker != ENTITYNUM_WORLD ) {
switch (mod) { switch (mod) {
case MOD_GRAPPLE: case MOD_GRAPPLE:
@ -446,7 +446,7 @@ static void CG_Obituary_Head( entityState_t *ent ) {
target = ent->otherEntityNum; target = ent->otherEntityNum;
attacker = ent->otherEntityNum2; attacker = ent->otherEntityNum2;
mod = ent->eventParm; mod = ent->eventParm;
CG_Printf("(%s) (%s) (%d) (%d)\n",targetName, attackerName,target,attacker);
if ( target < 0 || target >= MAX_CLIENTS ) { if ( target < 0 || target >= MAX_CLIENTS ) {
CG_Error( "CG_Obituary: target out of range" ); CG_Error( "CG_Obituary: target out of range" );
} }
@ -513,7 +513,7 @@ static void CG_Obituary_Head( entityState_t *ent ) {
break; break;
} }
} }
if (attacker != ENTITYNUM_WORLD) message = NULL;
if (message) { if (message) {
CG_Printf( "%s %s.\n", targetName, message); CG_Printf( "%s %s.\n", targetName, message);
return; return;
@ -612,6 +612,9 @@ static void CG_Obituary_Head( entityState_t *ent ) {
message = "tried to invade"; message = "tried to invade";
message2 = "'s personal space"; message2 = "'s personal space";
break; break;
case MOD_FALLING:
message = "was taught how to fly by";
break;
default: default:
message = "was killed by"; message = "was killed by";
break; break;
@ -652,7 +655,7 @@ static void CG_Obituary_Chest( entityState_t *ent ) {
target = ent->otherEntityNum; target = ent->otherEntityNum;
attacker = ent->otherEntityNum2; attacker = ent->otherEntityNum2;
mod = ent->eventParm; mod = ent->eventParm;
CG_Printf("(%s) (%s) (%d) (%d)\n",targetName, attackerName,target,attacker);
if ( target < 0 || target >= MAX_CLIENTS ) { if ( target < 0 || target >= MAX_CLIENTS ) {
CG_Error( "CG_Obituary: target out of range" ); CG_Error( "CG_Obituary: target out of range" );
} }
@ -718,7 +721,7 @@ static void CG_Obituary_Chest( entityState_t *ent ) {
break; break;
} }
} }
if (attacker != ENTITYNUM_WORLD) message = NULL;
if (message) { if (message) {
CG_Printf( "%s %s.\n", targetName, message); CG_Printf( "%s %s.\n", targetName, message);
return; return;
@ -789,6 +792,9 @@ static void CG_Obituary_Chest( entityState_t *ent ) {
message = "tried to invade"; message = "tried to invade";
message2 = "'s personal space"; message2 = "'s personal space";
break; break;
case MOD_FALLING:
message = "was taught how to fly by";
break;
default: default:
message = "was killed by"; message = "was killed by";
break; break;
@ -828,7 +834,7 @@ static void CG_Obituary_Stomach( entityState_t *ent ) {
target = ent->otherEntityNum; target = ent->otherEntityNum;
attacker = ent->otherEntityNum2; attacker = ent->otherEntityNum2;
mod = ent->eventParm; mod = ent->eventParm;
CG_Printf("(%s) (%s) (%d) (%d)\n",targetName, attackerName,target,attacker);
if ( target < 0 || target >= MAX_CLIENTS ) { if ( target < 0 || target >= MAX_CLIENTS ) {
CG_Error( "CG_Obituary: target out of range" ); CG_Error( "CG_Obituary: target out of range" );
} }
@ -894,7 +900,7 @@ static void CG_Obituary_Stomach( entityState_t *ent ) {
break; break;
} }
} }
if (attacker != ENTITYNUM_WORLD) message = NULL;
if (message) { if (message) {
CG_Printf( "%s %s.\n", targetName, message); CG_Printf( "%s %s.\n", targetName, message);
return; return;
@ -976,6 +982,9 @@ static void CG_Obituary_Stomach( entityState_t *ent ) {
message = "tried to invade"; message = "tried to invade";
message2 = "'s personal space"; message2 = "'s personal space";
break; break;
case MOD_FALLING:
message = "was taught how to fly by";
break;
default: default:
message = "was killed by"; message = "was killed by";
break; break;
@ -1015,7 +1024,6 @@ static void CG_Obituary_Legs( entityState_t *ent ) {
target = ent->otherEntityNum; target = ent->otherEntityNum;
attacker = ent->otherEntityNum2; attacker = ent->otherEntityNum2;
mod = ent->eventParm; mod = ent->eventParm;
if ( target < 0 || target >= MAX_CLIENTS ) { if ( target < 0 || target >= MAX_CLIENTS ) {
CG_Error( "CG_Obituary: target out of range" ); 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); Q_strncpyz( targetName, Info_ValueForKey( targetInfo, "n" ), sizeof(targetName) - 2);
strcat( targetName, S_COLOR_WHITE ); strcat( targetName, S_COLOR_WHITE );
message2 = ""; message2 = "";
// check for single client messages // check for single client messages
@ -1081,7 +1088,7 @@ static void CG_Obituary_Legs( entityState_t *ent ) {
break; break;
} }
} }
if (attacker != ENTITYNUM_WORLD) message = NULL;
if (message) { if (message) {
CG_Printf( "%s %s.\n", targetName, message); CG_Printf( "%s %s.\n", targetName, message);
return; return;
@ -1164,6 +1171,9 @@ static void CG_Obituary_Legs( entityState_t *ent ) {
message = "tried to invade"; message = "tried to invade";
message2 = "'s personal space"; message2 = "'s personal space";
break; break;
case MOD_FALLING:
message = "was taught how to fly by";
break;
default: default:
message = "was killed by"; message = "was killed by";
break; break;

View file

@ -697,7 +697,14 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) {
//Elder: added so we can trigger AQ2 pain blends //Elder: added so we can trigger AQ2 pain blends
ent->client->ps.damageEvent++; ent->client->ps.damageEvent++;
ent->client->ps.damageCount += damage; 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; break;
@ -716,7 +723,14 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) {
//Elder: added so we can trigger AQ2 pain blends //Elder: added so we can trigger AQ2 pain blends
ent->client->ps.damageEvent++; ent->client->ps.damageEvent++;
ent->client->ps.damageCount += damage; 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; break;

View file

@ -541,7 +541,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
int i; int i;
char *killerName, *obit; char *killerName, *obit;
//Blaze: Stop bleeding when dead //Blaze: Stop bleeding when dead
if ( self->client ) if ( self->client )
{ {
@ -1308,11 +1307,10 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
int impactRotation; int impactRotation;
gentity_t *tent; gentity_t *tent;
#ifdef MISSIONPACK #ifdef MISSIONPACK
vec3_t bouncedir, impactpoint; vec3_t bouncedir, impactpoint;
#endif #endif
if (!targ->takedamage) { if (!targ->takedamage) {
return; return;
} }
@ -1341,6 +1339,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
if ( !inflictor ) { if ( !inflictor ) {
inflictor = &g_entities[ENTITYNUM_WORLD]; inflictor = &g_entities[ENTITYNUM_WORLD];
} }
if ( !attacker ) { if ( !attacker ) {
attacker = &g_entities[ENTITYNUM_WORLD]; attacker = &g_entities[ENTITYNUM_WORLD];
} }

View file

@ -120,6 +120,7 @@ qboolean JumpKick( gentity_t *ent )
tent->s.otherEntityNum2 = ent->s.number; tent->s.otherEntityNum2 = ent->s.number;
tent->s.eventParm = DirToByte( tr.plane.normal ); tent->s.eventParm = DirToByte( tr.plane.normal );
tent->s.weapon = 0; tent->s.weapon = 0;
if (traceEnt->client->uniqueWeapons > 0) if (traceEnt->client->uniqueWeapons > 0)
{ {

View file

@ -6,42 +6,13 @@
--------------------Configuration: game - Win32 Debug-------------------- --------------------Configuration: game - Win32 Debug--------------------
</h3> </h3>
<h3>Command Lines</h3> <h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP1A2.tmp" with contents Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP132.tmp" with contents
[ [
/nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "BUILDING_REF_GL" /D "DEBUG" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "BUILDING_REF_GL" /D "DEBUG" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c
"c:\reaction\game\ai_chat.c"
"c:\reaction\game\ai_cmd.c"
"c:\reaction\game\ai_dmnet.c"
"c:\reaction\game\ai_dmq3.c"
"c:\reaction\game\ai_main.c"
"c:\reaction\game\ai_team.c"
"c:\reaction\game\ai_vcmd.c"
"c:\reaction\game\g_active.c" "c:\reaction\game\g_active.c"
"c:\reaction\game\g_arenas.c"
"c:\reaction\game\g_bot.c"
"c:\reaction\game\g_client.c"
"c:\reaction\game\g_cmds.c"
"c:\reaction\game\g_combat.c"
"c:\reaction\game\g_fileio.c"
"c:\reaction\game\g_items.c"
"c:\reaction\game\g_main.c"
"c:\reaction\game\g_mem.c"
"c:\reaction\game\g_misc.c"
"c:\reaction\game\g_missile.c"
"c:\reaction\game\g_mover.c"
"c:\reaction\game\g_session.c"
"c:\reaction\game\g_spawn.c"
"c:\reaction\game\g_svcmds.c"
"c:\reaction\game\g_syscalls.c"
"c:\reaction\game\g_target.c"
"c:\reaction\game\g_team.c"
"c:\reaction\game\g_trigger.c"
"c:\reaction\game\g_utils.c"
"c:\reaction\game\g_weapon.c"
"c:\reaction\game\rxn_game.c"
] ]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP1A2.tmp" Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP132.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP1A3.tmp" with contents Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP133.tmp" with contents
[ [
kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:yes /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /debug /machine:I386 /def:".\game.def" /out:"..\Debug/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib" kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:yes /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /debug /machine:I386 /def:".\game.def" /out:"..\Debug/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib"
\reactionoutput\ai_chat.obj \reactionoutput\ai_chat.obj
@ -80,53 +51,17 @@ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows
\reactionoutput\q_shared.obj \reactionoutput\q_shared.obj
\reactionoutput\rxn_game.obj \reactionoutput\rxn_game.obj
] ]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP1A3.tmp" Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP133.tmp"
<h3>Output Window</h3> <h3>Output Window</h3>
Compiling... Compiling...
ai_chat.c
ai_cmd.c
ai_dmnet.c
ai_dmq3.c
ai_main.c
ai_team.c
ai_vcmd.c
g_active.c g_active.c
g_arenas.c c:\reaction\game\g_active.c(726) : warning C4047: '!=' : 'int ' differs in levels of indirection from 'void *'
g_bot.c
g_client.c
g_cmds.c
c:\reaction\game\g_client.c(906) : warning C4700: local variable 'cheatVar' used without having been initialized
g_combat.c
g_fileio.c
g_items.c
c:\reaction\game\g_items.c(1574) : warning C4101: 'rq3_item' : unreferenced local variable
c:\reaction\game\g_items.c(1575) : warning C4101: 'rq3_temp' : unreferenced local variable
g_main.c
g_mem.c
g_misc.c
g_missile.c
g_mover.c
g_session.c
g_spawn.c
g_svcmds.c
g_syscalls.c
g_target.c
g_team.c
g_trigger.c
g_utils.c
g_weapon.c
c:\reaction\game\g_weapon.c(1386) : warning C4101: 'i' : unreferenced local variable
rxn_game.c
Linking... Linking...
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
g_client.obj : error LNK2001: unresolved external symbol _G_SendCheatVars
..\Debug/qagamex86.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
<h3>Results</h3> <h3>Results</h3>
qagamex86.dll - 2 error(s), 4 warning(s) qagamex86.dll - 0 error(s), 1 warning(s)
</pre> </pre>
</body> </body>
</html> </html>