Fixed knife + unbreakable breakables/breakables with high health bug

This commit is contained in:
Andrei Drexler 2002-06-11 15:52:21 +00:00
parent 5d2b66bf93
commit b7cdfbe7e7
2 changed files with 17 additions and 7 deletions

View file

@ -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]);
}

View file

@ -6,13 +6,13 @@
--------------------Configuration: game - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
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"
<h3>Output Window</h3>
Compiling...
ai_dmq3.c
g_missile.c
Linking...
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp