mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-03-27 12:51:13 +00:00
Fixed the code for doors with health and the wait key set to a negative value
This commit is contained in:
parent
804f4161e0
commit
8b371ff4b1
3 changed files with 45 additions and 13 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.113 2002/07/31 19:56:32 makro
|
||||
// Fixed the code for doors with health and the wait key set to a negative value
|
||||
//
|
||||
// Revision 1.112 2002/07/24 02:17:38 jbravo
|
||||
// Added a respawn delay for CTB
|
||||
//
|
||||
|
@ -1856,12 +1859,18 @@ void G_Damage(gentity_t * targ, gentity_t * inflictor, gentity_t * attacker,
|
|||
// Makro - we should change some more stuff in here
|
||||
// shootable doors / buttons don't actually have any health
|
||||
// Makro - they do now !
|
||||
if (targ->s.eType == ET_MOVER && targ->health <= 0) {
|
||||
if (targ->use
|
||||
&& (targ->moverState == MOVER_POS1 || targ->moverState == ROTATOR_POS1 || (targ->spawnflags & 8))) {
|
||||
targ->use(targ, inflictor, attacker);
|
||||
if (targ->s.eType == ET_MOVER) {
|
||||
targ->health -= damage;
|
||||
if (targ->health <= 0) {
|
||||
if (targ->use
|
||||
&& (targ->moverState == MOVER_POS1 || targ->moverState == ROTATOR_POS1 || (targ->spawnflags & 8))) {
|
||||
targ->use(targ, inflictor, attacker);
|
||||
}
|
||||
if (targ->wait < 0) {
|
||||
targ->takedamage = qfalse;
|
||||
}
|
||||
targ->health = targ->health_saved;
|
||||
}
|
||||
targ->health = targ->health_saved;
|
||||
return;
|
||||
}
|
||||
//Elder: from action source
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.49 2002/07/31 19:56:32 makro
|
||||
// Fixed the code for doors with health and the wait key set to a negative value
|
||||
//
|
||||
// Revision 1.48 2002/06/21 15:04:55 makro
|
||||
// Health functionality for movers should be complete now
|
||||
//
|
||||
|
@ -750,7 +753,8 @@ void Reached_BinaryMover(gentity_t * ent)
|
|||
if ((ent->spawnflags & SP_DOORTOGGLE) == SP_DOORTOGGLE) { //||
|
||||
//ent->touch || (ent->takedamage == qtrue) ) {
|
||||
//G_Printf("Sliding Toggle Door used\n");
|
||||
} else {
|
||||
} else if (ent->wait > 0) {
|
||||
// Makro - added wait > 0 check
|
||||
// return to pos1 after a delay
|
||||
ent->think = ReturnToPos1;
|
||||
ent->nextthink = level.time + ent->wait;
|
||||
|
@ -789,7 +793,8 @@ void Reached_BinaryMover(gentity_t * ent)
|
|||
if ((ent->spawnflags & SP_DOORTOGGLE) == SP_DOORTOGGLE) { //||
|
||||
//ent->touch || (ent->takedamage == qtrue) ) {
|
||||
//G_Printf("Rotating Toggle Door used\n");
|
||||
} else {
|
||||
} else if (ent->wait > 0) {
|
||||
// Makro - added wait > 0 check
|
||||
// return to apos1 after a delay
|
||||
ent->think = ReturnToApos1;
|
||||
ent->nextthink = level.time + ent->wait;
|
||||
|
|
|
@ -3,16 +3,25 @@
|
|||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: cgame - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
cgamex86.dll - 0 error(s), 0 warning(s)
|
||||
<h3>
|
||||
--------------------Configuration: game - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2A.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPD.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\g_spawn.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_mover.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2A.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2B.tmp" with contents
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPD.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPE.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 +64,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\RSP2B.tmp"
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPE.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
g_spawn.c
|
||||
g_mover.c
|
||||
Linking...
|
||||
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
|
||||
|
||||
|
@ -66,6 +75,15 @@ Linking...
|
|||
|
||||
<h3>Results</h3>
|
||||
qagamex86.dll - 0 error(s), 0 warning(s)
|
||||
<h3>
|
||||
--------------------Configuration: ui - Win32 Release TA--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
uix86.dll - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue