mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-22 01:21:12 +00:00
Added "inactive" field for entities
New "target_activate" entity
This commit is contained in:
parent
11f1eef328
commit
0e72a8b949
5 changed files with 72 additions and 86 deletions
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.133 2003/01/05 22:36:50 makro
|
||||
// Added "inactive" field for entities
|
||||
// New "target_activate" entity
|
||||
//
|
||||
// Revision 1.132 2002/12/09 00:58:49 makro
|
||||
// Items are now disabled from the weapon/item menus in teamplay
|
||||
// games if they are banned from the server
|
||||
|
@ -511,6 +515,8 @@ struct gentity_s {
|
|||
float distance; // VALKYRIE: for rotating door
|
||||
//Blaze: Holds the target set by a button
|
||||
char *pathtarget;
|
||||
//Makro - added
|
||||
int inactive;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.54 2003/01/05 22:36:50 makro
|
||||
// Added "inactive" field for entities
|
||||
// New "target_activate" entity
|
||||
//
|
||||
// Revision 1.53 2002/12/09 00:58:49 makro
|
||||
// Items are now disabled from the weapon/item menus in teamplay
|
||||
// games if they are banned from the server
|
||||
|
@ -873,6 +877,11 @@ void Use_BinaryMover(gentity_t * ent, gentity_t * other, gentity_t * activator)
|
|||
return;
|
||||
}
|
||||
|
||||
//Makro - do nothing if the mover is not active
|
||||
if (ent->inactive) {
|
||||
return;
|
||||
}
|
||||
|
||||
ent->activator = activator;
|
||||
|
||||
if (ent->moverState == MOVER_POS1) {
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.41 2003/01/05 22:36:50 makro
|
||||
// Added "inactive" field for entities
|
||||
// New "target_activate" entity
|
||||
//
|
||||
// Revision 1.40 2002/09/01 21:15:08 makro
|
||||
// Sky portal tweaks
|
||||
//
|
||||
|
@ -218,6 +222,7 @@ 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
|
||||
{NULL}
|
||||
};
|
||||
|
||||
|
@ -263,6 +268,8 @@ void SP_target_score(gentity_t * ent);
|
|||
void SP_target_teleporter(gentity_t * ent);
|
||||
void SP_target_relay(gentity_t * ent);
|
||||
void SP_target_kill(gentity_t * ent);
|
||||
//Makro - added
|
||||
void SP_target_activate(gentity_t * ent);
|
||||
void SP_target_position(gentity_t * ent);
|
||||
void SP_target_location(gentity_t * ent);
|
||||
void SP_target_push(gentity_t * ent);
|
||||
|
@ -349,6 +356,8 @@ spawn_t spawns[] = {
|
|||
{"target_teleporter", SP_target_teleporter},
|
||||
{"target_relay", SP_target_relay},
|
||||
{"target_kill", SP_target_kill},
|
||||
//Makro - added
|
||||
{"target_activate", SP_target_activate},
|
||||
{"target_position", SP_target_position},
|
||||
{"target_location", SP_target_location},
|
||||
{"target_push", SP_target_push},
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.9 2003/01/05 22:36:50 makro
|
||||
// Added "inactive" field for entities
|
||||
// New "target_activate" entity
|
||||
//
|
||||
// Revision 1.8 2002/06/16 20:06:14 jbravo
|
||||
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
|
||||
//
|
||||
|
@ -432,6 +436,43 @@ void SP_target_kill(gentity_t * self)
|
|||
self->use = target_kill_use;
|
||||
}
|
||||
|
||||
//==========================================================
|
||||
|
||||
/*QUAKED target_activate (.5 .5 .5) (-8 -8 -8) (8 8 8)
|
||||
Activates/de-activates entities
|
||||
Added by Makro
|
||||
*/
|
||||
void target_activate_use(gentity_t * self, gentity_t * other, gentity_t * activator)
|
||||
{
|
||||
gentity_t *loop = NULL;
|
||||
int action = 0;
|
||||
|
||||
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)) {
|
||||
switch (action) {
|
||||
case 1:
|
||||
loop->inactive = 0;
|
||||
break;
|
||||
case 2:
|
||||
loop->inactive = 1;
|
||||
break;
|
||||
default:
|
||||
loop->inactive = !loop->inactive;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SP_target_activate(gentity_t * self)
|
||||
{
|
||||
self->use = target_activate_use;
|
||||
}
|
||||
|
||||
/*QUAKED target_position (0 0.5 0) (-4 -4 -4) (4 4 4)
|
||||
Used as a positional target for in-game calculation, like jumppad targets.
|
||||
*/
|
||||
|
|
|
@ -6,50 +6,6 @@
|
|||
--------------------Configuration: cgame - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP3.tmp" with contents
|
||||
[
|
||||
/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"Release/cgame.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
|
||||
"C:\Games\Quake3\rq3source\reaction\game\bg_pmove.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\cgame\cg_weapons.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP3.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4.tmp" with contents
|
||||
[
|
||||
/nologo /base:"0x30000000" /subsystem:windows /dll /incremental:no /pdb:"Release/cgamex86.pdb" /map:"Release/cgamex86.map" /machine:I386 /def:".\cgame.def" /out:"../Release/cgamex86.dll" /implib:"Release/cgamex86.lib"
|
||||
.\Release\bg_misc.obj
|
||||
.\Release\bg_pmove.obj
|
||||
.\Release\bg_slidemove.obj
|
||||
.\Release\cg_atmospheric.obj
|
||||
.\Release\cg_consolecmds.obj
|
||||
.\Release\cg_draw.obj
|
||||
.\Release\cg_drawtools.obj
|
||||
.\Release\cg_effects.obj
|
||||
.\Release\cg_ents.obj
|
||||
.\Release\cg_event.obj
|
||||
.\Release\cg_info.obj
|
||||
.\Release\cg_localents.obj
|
||||
.\Release\cg_main.obj
|
||||
.\Release\cg_marks.obj
|
||||
.\Release\cg_players.obj
|
||||
.\Release\cg_playerstate.obj
|
||||
.\Release\cg_predict.obj
|
||||
.\Release\cg_scoreboard.obj
|
||||
.\Release\cg_servercmds.obj
|
||||
.\Release\cg_snapshot.obj
|
||||
.\Release\cg_syscalls.obj
|
||||
.\Release\cg_view.obj
|
||||
.\Release\cg_weapons.obj
|
||||
.\Release\q_math.obj
|
||||
.\Release\q_shared.obj
|
||||
.\Release\ui_shared.obj
|
||||
]
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
bg_pmove.c
|
||||
cg_weapons.c
|
||||
Linking...
|
||||
Creating library Release/cgamex86.lib and object Release/cgamex86.exp
|
||||
|
||||
|
||||
|
||||
|
@ -59,17 +15,13 @@ cgamex86.dll - 0 error(s), 0 warning(s)
|
|||
--------------------Configuration: game - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP8.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2D.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\bg_pmove.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_items.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_main.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_mover.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_teamplay.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_spawn.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP8.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP9.tmp" with contents
|
||||
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
|
||||
[
|
||||
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
|
||||
|
@ -112,14 +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\RSP9.tmp"
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP2E.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
bg_pmove.c
|
||||
g_items.c
|
||||
g_main.c
|
||||
g_mover.c
|
||||
g_teamplay.c
|
||||
g_spawn.c
|
||||
Linking...
|
||||
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
|
||||
|
||||
|
@ -131,38 +79,11 @@ qagamex86.dll - 0 error(s), 0 warning(s)
|
|||
--------------------Configuration: ui - Win32 Release TA--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPD.tmp" with contents
|
||||
[
|
||||
/nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c"
|
||||
]
|
||||
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
|
||||
[
|
||||
/nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"../Release/uix86.dll" /implib:"Release_TA/uix86.lib"
|
||||
.\Release_TA\bg_misc.obj
|
||||
.\Release_TA\q_math.obj
|
||||
.\Release_TA\q_shared.obj
|
||||
.\Release_TA\ui_atoms.obj
|
||||
.\Release_TA\ui_gameinfo.obj
|
||||
.\Release_TA\ui_main.obj
|
||||
.\Release_TA\ui_players.obj
|
||||
.\Release_TA\ui_shared.obj
|
||||
.\Release_TA\ui_syscalls.obj
|
||||
.\Release_TA\ui_util.obj
|
||||
]
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPE.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
ui_main.c
|
||||
C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c(4824) : warning C4101: 'game' : unreferenced local variable
|
||||
Linking...
|
||||
Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
uix86.dll - 0 error(s), 1 warning(s)
|
||||
uix86.dll - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue