From b7cdfbe7e7b523c78b4f6414aeae4dd86f339b3e Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Tue, 11 Jun 2002 15:52:21 +0000 Subject: [PATCH] Fixed knife + unbreakable breakables/breakables with high health bug --- reaction/game/g_missile.c | 12 +++++++++++- reaction/game/game.plg | 12 ++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/reaction/game/g_missile.c b/reaction/game/g_missile.c index 704e9130..edd72134 100644 --- a/reaction/game/g_missile.c +++ b/reaction/game/g_missile.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.27 2002/06/11 15:52:21 makro +// Fixed knife + unbreakable breakables/breakables with high health bug +// // Revision 1.26 2002/04/29 06:16:27 niceass // small change to pressure system // @@ -494,7 +497,8 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace ) { G_EvaluateTrajectoryDelta(&ent->s.pos, level.time, knifeVelocity); - if (other->s.eType == ET_BREAKABLE) { + //Makro - added check for unbreakable breakables/breakables with high health + if (other->s.eType == ET_BREAKABLE && !other->unbreakable && other->health <= THROW_DAMAGE) { VectorCopy(trace->endpos, origin); G_Damage (other, ent, &g_entities[ent->r.ownerNum], velocity, origin, THROW_DAMAGE, 0, MOD_KNIFE_THROWN); @@ -537,6 +541,12 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace ) { //VectorCopy(xr_drop->s.origin, temp); VectorAdd(xr_drop->s.origin, knifeOffset, xr_drop->s.origin); + //Makro - "hurt" the breakable if needed + if (other->s.eType == ET_BREAKABLE ) { + VectorCopy(trace->endpos, origin); + G_Damage (other, ent, &g_entities[ent->r.ownerNum], velocity, origin, THROW_DAMAGE, 0, MOD_KNIFE_THROWN); + } + if ( other->s.eType == ET_PRESSURE ) G_CreatePressure(xr_drop->s.origin, trace->plane.normal, &g_entities[trace->entityNum]); } diff --git a/reaction/game/game.plg b/reaction/game/game.plg index 5544df9b..e64018b9 100644 --- a/reaction/game/game.plg +++ b/reaction/game/game.plg @@ -6,13 +6,13 @@ --------------------Configuration: game - Win32 Release--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2CD.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2EC.tmp" with contents [ /nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c -"C:\Games\Quake3\rq3source\reaction\game\ai_dmq3.c" +"C:\Games\Quake3\rq3source\reaction\game\g_missile.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2CD.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2CE.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2EC.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2ED.tmp" with contents [ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /machine:I386 /def:".\game.def" /out:"..\Release/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib" \reactionoutput\ai_chat.obj @@ -55,10 +55,10 @@ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows \reactionoutput\zcam.obj \reactionoutput\zcam_target.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2CE.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2ED.tmp"

Output Window

Compiling... -ai_dmq3.c +g_missile.c Linking... Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp