Doors with health (again !), bot-only trigger_pushes

This commit is contained in:
Andrei Drexler 2002-05-16 06:57:54 +00:00
parent 004c622ee6
commit d143ae8072
4 changed files with 36 additions and 11 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.76 2002/05/16 06:57:54 makro
// Doors with health (again !), bot-only trigger_pushes
//
// Revision 1.75 2002/05/15 17:13:22 makro // Revision 1.75 2002/05/15 17:13:22 makro
// Restored Q3A code for movers with health // Restored Q3A code for movers with health
// //
@ -1904,12 +1907,18 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
return; return;
}*/ }*/
// Makro - pasted back from the original code // Makro - we should change some more stuff in here
// shootable doors / buttons don't actually have any health // shootable doors / buttons don't actually have any health
if ( targ->s.eType == ET_MOVER ) { if ( targ->s.eType == ET_MOVER && targ->health < 0) {
if ( targ->use && targ->moverState == MOVER_POS1 ) { if ( targ->use && (targ->moverState == MOVER_POS1 || targ->moverState == ROTATOR_POS1) ) {
targ->use( targ, inflictor, attacker ); targ->use( targ, inflictor, attacker );
} }
//use the targets of the team master
if (targ->teammaster && targ->teammaster != targ) {
G_UseTargets(targ->teammaster, attacker);
}
//use own targets
G_UseTargets(targ, attacker);
return; return;
} }

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.31 2002/05/16 06:57:54 makro
// Doors with health (again !), bot-only trigger_pushes
//
// Revision 1.30 2002/05/15 12:46:32 makro // Revision 1.30 2002/05/15 12:46:32 makro
// Small func_static change.Give ammo should now give grenades/knives // Small func_static change.Give ammo should now give grenades/knives
// //
@ -1250,8 +1253,10 @@ void Think_SpawnNewDoorTrigger( gentity_t *ent ) {
int i, best; int i, best;
// set all of the slaves as shootable // set all of the slaves as shootable
// Makro - why ?
for ( other = ent ; other ; other = other->teamchain ) { for ( other = ent ; other ; other = other->teamchain ) {
other->takedamage = qtrue; //other->takedamage = qtrue;
other->takedamage = ent->takedamage;
} }
// find the bounds of everything on the team // find the bounds of everything on the team

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.13 2002/05/16 06:57:54 makro
// Doors with health (again !), bot-only trigger_pushes
//
// Revision 1.12 2002/05/11 22:01:41 makro // Revision 1.12 2002/05/11 22:01:41 makro
// Trigger_hurt // Trigger_hurt
// //
@ -161,6 +164,13 @@ void trigger_push_touch (gentity_t *self, gentity_t *other, trace_t *trace ) {
return; return;
} }
//Makro - bot only triggers
if ( self->spawnflags & 1 ) {
if ( !(other->r.svFlags & SVF_BOT) ) {
return;
}
}
BG_TouchJumpPad( &other->client->ps, &self->s ); BG_TouchJumpPad( &other->client->ps, &self->s );
} }
@ -207,7 +217,7 @@ void AimAtTarget( gentity_t *self ) {
} }
/*QUAKED trigger_push (.5 .5 .5) ? /*QUAKED trigger_push (.5 .5 .5) ? BOT_ONLY
Must point at a target_position, which will be the apex of the leap. Must point at a target_position, which will be the apex of the leap.
This will be client side predicted, unlike target_push This will be client side predicted, unlike target_push
*/ */
@ -266,8 +276,9 @@ void SP_target_push( gentity_t *self ) {
G_SetMovedir (self->s.angles, self->s.origin2); G_SetMovedir (self->s.angles, self->s.origin2);
VectorScale (self->s.origin2, self->speed, self->s.origin2); VectorScale (self->s.origin2, self->speed, self->s.origin2);
if (G_SpawnString( "noise", "sound/misc/silence.wav", &sound )) {; if (G_SpawnString( "noise", "sound/misc/silence.wav", &sound )) {
G_Printf("^2Sound was %s\n",sound); //Makro - debug message, no longer needed
//G_Printf("^2Sound was %s\n",sound);
self->noise_index = G_SoundIndex( sound ); self->noise_index = G_SoundIndex( sound );
} }

View file

@ -6,13 +6,13 @@
--------------------Configuration: game - Win32 Release-------------------- --------------------Configuration: game - Win32 Release--------------------
</h3> </h3>
<h3>Command Lines</h3> <h3>Command Lines</h3>
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP54D.tmp" with contents Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP73.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 /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_combat.c" "C:\Games\Quake3\rq3source\reaction\game\g_combat.c"
] ]
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP54D.tmp" Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP73.tmp"
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP54E.tmp" with contents Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP74.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" 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 \reactionoutput\ai_chat.obj
@ -55,7 +55,7 @@ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows
\reactionoutput\zcam.obj \reactionoutput\zcam.obj
\reactionoutput\zcam_target.obj \reactionoutput\zcam_target.obj
] ]
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP54E.tmp" Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP74.tmp"
<h3>Output Window</h3> <h3>Output Window</h3>
Compiling... Compiling...
g_combat.c g_combat.c