diff --git a/reaction/game/g_local.h b/reaction/game/g_local.h
index fce36c15..fd43a6c7 100644
--- a/reaction/game/g_local.h
+++ b/reaction/game/g_local.h
@@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
+// Revision 1.144 2003/08/24 22:45:17 makro
+// Rotating func_trains
+//
// Revision 1.143 2003/08/10 20:13:26 makro
// no message
//
@@ -551,7 +554,6 @@ struct gentity_s {
//Makro - added
char *activatename;
int inactive;
- vec3_t backup_origin;
};
typedef enum {
diff --git a/reaction/game/g_mover.c b/reaction/game/g_mover.c
index 33f88d34..c9d9e38b 100644
--- a/reaction/game/g_mover.c
+++ b/reaction/game/g_mover.c
@@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
+// Revision 1.61 2003/08/24 22:45:17 makro
+// Rotating func_trains
+//
// Revision 1.60 2003/08/10 20:13:26 makro
// no message
//
@@ -2080,81 +2083,39 @@ void Reached_Train(gentity_t * ent)
//G_Printf("^3Train is at (%f %f %f) or (%f %f %f)\n",ent->s.origin[0],ent->s.origin[1],ent->s.origin[2], ent->pos1[0], ent->pos1[1], ent->pos1[2]);
//G_Printf("^2NextTrain Origin(%f, %f, %f) Next Origin (%f, %f, %f)\n", next->nextTrain->s.origin[0], next->nextTrain->s.origin[1], next->nextTrain->s.origin[2], next->s.origin[0], next->s.origin[1], next->s.origin[2]);
- //Makro - restore origin
- VectorCopy(ent->backup_origin, ent->s.origin2);
-
- //Makro - moving train
- if ( !(next->spawnflags & 1) ) {
- VectorCopy(next->s.origin, ent->pos1);
- VectorCopy(next->nextTrain->s.origin, ent->pos2);
-
- // if the path_corner has a speed, use that
- if (next->speed) {
- speed = next->speed;
- } else {
- // otherwise use the train's speed
- speed = ent->speed;
- }
- if (speed < 1) {
- speed = 1;
- }
- // calculate duration
- VectorSubtract(ent->pos2, ent->pos1, move);
- length = VectorLength(move);
-
- ent->s.pos.trDuration = length * 1000 / speed;
- // start it going
- SetMoverState(ent, MOVER_1TO2, level.time);
- ent->s.apos.trType = TR_STATIONARY;
- VectorCopy(ent->s.origin2, ent->backup_origin);
+ // if the path_corner has a speed, use that
+ if (next->speed) {
+ speed = next->speed;
+ } else {
+ // otherwise use the train's speed
+ speed = ent->speed;
+ }
+ if (speed < 1) {
+ speed = 1;
+ }
+ // calculate duration
+ //VectorSubtract(ent->pos2, ent->pos1, move);
+ VectorSubtract(next->nextTrain->s.origin, next->s.origin, move);
+ length = VectorLength(move);
+ ent->s.pos.trDuration = length * 1000 / speed;
//rotating train
- } else {
- float dist;
- vec3_t a, b;
-
- //temp hack !!
- VectorSet(next->s.origin2, 128, 128, 0);
-
- //debug info
- G_Printf(S_COLOR_YELLOW"Rotating train: %s\n", vtos(next->s.origin2));
-
- if (next->speed) {
- speed = next->speed;
- } else {
- // otherwise use the train's speed
- speed = ent->speed;
- }
- if (speed < 1) {
- speed = 1;
- }
-
- VectorSubtract(next->s.origin, next->s.origin2, a);
- VectorSubtract(next->nextTrain->s.origin, next->s.origin2, b);
- dist = acos( DotProduct(a, b) / (VectorLength(a) * VectorLength(b)) ) * 180.0f / M_PI;
- G_Printf(S_COLOR_YELLOW"Rotating train: dist = %f\n", dist);
-
- //VectorClear(ent->movedir);
- VectorSet(ent->movedir, 0, 1, 0);
+ if (next->spawnflags & 1) {
VectorCopy(ent->r.currentAngles, ent->pos1);
- VectorMA(ent->pos1, dist, ent->movedir, ent->pos2);
- VectorCopy(ent->s.origin2, ent->backup_origin);
- VectorCopy(next->s.origin2, ent->s.origin2);
-
- // set origin
- VectorCopy(next->s.origin2, ent->s.pos.trBase);
- ent->s.pos.trType = TR_STATIONARY;
- VectorCopy(next->s.origin, ent->r.currentOrigin);
-
- VectorCopy(ent->pos1, ent->s.apos.trBase);
-
- // calculate time to reach second position from speed
- ent->s.apos.trDuration = dist * 1000 / speed;
-
- // start it going
+ VectorAdd(ent->pos1, next->movedir, ent->pos2);
+ ent->s.apos.trDuration = ent->s.pos.trDuration;
SetMoverState(ent, ROTATOR_1TO2, level.time);
+ } else {
+ VectorCopy(ent->r.currentAngles, ent->pos1);
+ SetMoverState(ent, ROTATOR_POS1, level.time);
}
-
+ //Makro - moving train
+ VectorCopy(next->s.origin, ent->pos1);
+ VectorCopy(next->nextTrain->s.origin, ent->pos2);
+
+ // start it going
+ SetMoverState(ent, MOVER_1TO2, level.time);
+
// looping sound
ent->s.loopSound = next->soundLoop;
@@ -2237,6 +2198,10 @@ void SP_path_corner(gentity_t * self)
G_FreeEntity(self, __LINE__, __FILE__);
return;
}
+ //Makro - added
+ if (self->spawnflags & 1)
+ G_SpawnVector("rotate", "0 90 0", self->movedir);
+
// path corners don't need to be linked in
}
diff --git a/reaction/game/game.plg b/reaction/game/game.plg
index 741beb55..03070ce0 100644
--- a/reaction/game/game.plg
+++ b/reaction/game/game.plg
@@ -6,13 +6,47 @@
--------------------Configuration: game - Win32 Release--------------------
Command Lines
-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6FB.tmp" with contents
+Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP13F.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_chat.c"
+"C:\Games\Quake3\rq3source\reaction\game\ai_cmd.c"
+"C:\Games\Quake3\rq3source\reaction\game\ai_dmnet.c"
+"C:\Games\Quake3\rq3source\reaction\game\ai_dmq3.c"
+"C:\Games\Quake3\rq3source\reaction\game\ai_main.c"
+"C:\Games\Quake3\rq3source\reaction\game\ai_team.c"
+"C:\Games\Quake3\rq3source\reaction\game\ai_vcmd.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_active.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_arenas.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_bot.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_client.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_cmds.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_combat.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_fileio.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_matchmode.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_mem.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_misc.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_missile.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_mover.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_session.c"
"C:\Games\Quake3\rq3source\reaction\game\g_spawn.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_svcmds.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_syscalls.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_target.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_team.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_teamplay.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_trigger.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_unlagged.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_utils.c"
+"C:\Games\Quake3\rq3source\reaction\game\g_weapon.c"
+"C:\Games\Quake3\rq3source\reaction\game\rxn_game.c"
+"C:\Games\Quake3\rq3source\reaction\game\zcam.c"
+"C:\Games\Quake3\rq3source\reaction\game\zcam_target.c"
]
-Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6FB.tmp"
-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6FC.tmp" with contents
+Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP13F.tmp"
+Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP140.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
@@ -56,13 +90,50 @@ 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\RSP6FC.tmp"
+Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP140.tmp"
Output Window
Compiling...
+ai_chat.c
+ai_cmd.c
+ai_dmnet.c
+ai_dmq3.c
+ai_main.c
+ai_team.c
+ai_vcmd.c
+g_active.c
+g_arenas.c
+g_bot.c
+g_client.c
+g_cmds.c
+C:\Games\Quake3\rq3source\reaction\game\g_client.c(1637) : warning C4701: local variable 'classname' may be used without having been initialized
+g_combat.c
+g_fileio.c
+C:\Games\Quake3\rq3source\reaction\game\g_combat.c(2014) : warning C4700: local variable 'asave' used without having been initialized
+g_items.c
+g_main.c
+g_matchmode.c
+g_mem.c
+g_misc.c
+g_missile.c
+g_mover.c
+g_session.c
g_spawn.c
+g_svcmds.c
+g_syscalls.c
+g_target.c
+g_team.c
+g_teamplay.c
+g_trigger.c
+g_unlagged.c
+g_utils.c
+g_weapon.c
+rxn_game.c
+C:\Games\Quake3\rq3source\reaction\game\g_weapon.c(1941) : warning C4701: local variable 'tr' may be used without having been initialized
+zcam.c
+zcam_target.c
Linking...
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP700.tmp" with contents
+Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP144.tmp" with contents
[
/nologo /o"c:\reactionoutput/game.bsc"
\reactionoutput\ai_chat.sbr
@@ -105,14 +176,14 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP700.tmp" with conte
\reactionoutput\rxn_game.sbr
\reactionoutput\zcam.sbr
\reactionoutput\zcam_target.sbr]
-Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP700.tmp"
+Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP144.tmp"
Creating browse info file...
Output Window
Results
-qagamex86.dll - 0 error(s), 0 warning(s)
+qagamex86.dll - 0 error(s), 3 warning(s)