From b94dbab6478f5292e64bb7b680834e1d3ca94280 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Mon, 6 Jan 2003 00:23:29 +0000 Subject: [PATCH] no message --- reaction/game/g_local.h | 4 ++++ reaction/game/g_spawn.c | 6 +++++- reaction/game/g_target.c | 20 +++++++++++++++----- reaction/game/game.plg | 30 ++++++------------------------ 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/reaction/game/g_local.h b/reaction/game/g_local.h index 398b374b..30f908b1 100644 --- a/reaction/game/g_local.h +++ b/reaction/game/g_local.h @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.134 2003/01/06 00:23:29 makro +// no message +// // Revision 1.133 2003/01/05 22:36:50 makro // Added "inactive" field for entities // New "target_activate" entity @@ -516,6 +519,7 @@ struct gentity_s { //Blaze: Holds the target set by a button char *pathtarget; //Makro - added + char *activatename; int inactive; }; diff --git a/reaction/game/g_spawn.c b/reaction/game/g_spawn.c index 95aecfc3..c0ebdef5 100644 --- a/reaction/game/g_spawn.c +++ b/reaction/game/g_spawn.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.42 2003/01/06 00:23:29 makro +// no message +// // Revision 1.41 2003/01/05 22:36:50 makro // Added "inactive" field for entities // New "target_activate" entity @@ -222,7 +225,8 @@ field_t fields[] = { {"targetShaderNewName", FOFS(targetShaderNewName), F_LSTRING}, {"distance", FOFS(distance), F_FLOAT}, // VALKYRIE: for rotating doors {"pathtarget", FOFS(pathtarget), F_LSTRING}, // Makro - for func_trains - {"inactive", FOFS(inactive), F_INT}, // Makro - for func_trains + {"inactive", FOFS(inactive), F_INT}, // Makro - added + {"activatename", FOFS(activatename), F_LSTRING}, {NULL} }; diff --git a/reaction/game/g_target.c b/reaction/game/g_target.c index cf74ea77..d32f6a1f 100644 --- a/reaction/game/g_target.c +++ b/reaction/game/g_target.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.10 2003/01/06 00:23:29 makro +// no message +// // Revision 1.9 2003/01/05 22:36:50 makro // Added "inactive" field for entities // New "target_activate" entity @@ -447,13 +450,15 @@ void target_activate_use(gentity_t * self, gentity_t * other, gentity_t * activa gentity_t *loop = NULL; int action = 0; - if (!Q_stricmp(self->pathtarget, "on")) { - action = 1; - } else if (!Q_stricmp(self->pathtarget, "off")) { - action = 2; + if (self->pathtarget) { + if (!Q_stricmp(self->pathtarget, "on")) { + action = 1; + } else if (!Q_stricmp(self->pathtarget, "off")) { + action = 2; + } } - for (loop = G_Find(NULL, FOFS(targetname), self->target); loop; G_Find(loop, FOFS(targetname), self->target)) { + for (loop = G_Find(NULL, FOFS(activatename), self->target); loop; loop = G_Find(loop, FOFS(activatename), self->target)) { switch (action) { case 1: loop->inactive = 0; @@ -470,6 +475,11 @@ void target_activate_use(gentity_t * self, gentity_t * other, gentity_t * activa void SP_target_activate(gentity_t * self) { + if (!self->target) { + G_Printf(S_COLOR_YELLOW "WARNING: target_activate with no target at %s^7\n", vtos(self->s.origin)); + G_FreeEntity(self); + return; + } self->use = target_activate_use; } diff --git a/reaction/game/game.plg b/reaction/game/game.plg index 2a8e8680..4b9c71c1 100644 --- a/reaction/game/game.plg +++ b/reaction/game/game.plg @@ -3,25 +3,16 @@
 

Build Log

---------------------Configuration: cgame - Win32 Release-------------------- -

-

Command Lines

- - - -

Results

-cgamex86.dll - 0 error(s), 0 warning(s) -

--------------------Configuration: game - Win32 Release--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2D.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP81.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_target.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2D.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2E.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP81.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP82.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 @@ -64,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\RSP2E.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP82.tmp"

Output Window

Compiling... -g_spawn.c +g_target.c Linking... Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp @@ -75,15 +66,6 @@ Linking...

Results

qagamex86.dll - 0 error(s), 0 warning(s) -

---------------------Configuration: ui - Win32 Release TA-------------------- -

-

Command Lines

- - - -

Results

-uix86.dll - 0 error(s), 0 warning(s)