From 19c5cdd6bddcc21d57b75d9aa63011c32b380233 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Jun 2018 02:29:39 +1000 Subject: [PATCH] Move dynlight to mapobjects --- qcsrc/common/mapobjects/misc/_mod.inc | 1 + qcsrc/common/mapobjects/misc/_mod.qh | 1 + .../mapobjects/misc/dynlight.qc} | 12 ++++++------ .../mapobjects/misc/dynlight.qh} | 0 qcsrc/server/_mod.inc | 1 - qcsrc/server/_mod.qh | 1 - 6 files changed, 8 insertions(+), 8 deletions(-) rename qcsrc/{server/g_lights.qc => common/mapobjects/misc/dynlight.qc} (95%) rename qcsrc/{server/g_lights.qh => common/mapobjects/misc/dynlight.qh} (100%) diff --git a/qcsrc/common/mapobjects/misc/_mod.inc b/qcsrc/common/mapobjects/misc/_mod.inc index 3698cf822..498f6c521 100644 --- a/qcsrc/common/mapobjects/misc/_mod.inc +++ b/qcsrc/common/mapobjects/misc/_mod.inc @@ -1,5 +1,6 @@ // generated file; do not modify #include +#include #include #include #include diff --git a/qcsrc/common/mapobjects/misc/_mod.qh b/qcsrc/common/mapobjects/misc/_mod.qh index 5b156176e..3415919f8 100644 --- a/qcsrc/common/mapobjects/misc/_mod.qh +++ b/qcsrc/common/mapobjects/misc/_mod.qh @@ -1,5 +1,6 @@ // generated file; do not modify #include +#include #include #include #include diff --git a/qcsrc/server/g_lights.qc b/qcsrc/common/mapobjects/misc/dynlight.qc similarity index 95% rename from qcsrc/server/g_lights.qc rename to qcsrc/common/mapobjects/misc/dynlight.qc index 852f1efc0..7c70b8444 100644 --- a/qcsrc/server/g_lights.qc +++ b/qcsrc/common/mapobjects/misc/dynlight.qc @@ -1,16 +1,15 @@ -#include "g_lights.qh" +#include "dynlight.qh" +#ifdef SVQC #include #include -void train_next(entity this); - const float LOOP = 1; .float speed; -const float DNOSHADOW = 2; -const float DFOLLOW = 4; +//const int DNOSHADOW = 2; +const int DFOLLOW = 4; .float light_lev; .float lefty; .vector color; @@ -69,7 +68,7 @@ void dynlight_find_path(entity this) targ = find(NULL, targetname, this.target); this.target = targ.target; setorigin(this, targ.origin); - setthink(this, train_next); + setthink(this, train_next); // TODO: reliant on the train's pathing functions this.nextthink = time + 0.1; } void dynlight_find_target(entity this) @@ -133,3 +132,4 @@ spawnfunc(dynlight) return; } } +#endif diff --git a/qcsrc/server/g_lights.qh b/qcsrc/common/mapobjects/misc/dynlight.qh similarity index 100% rename from qcsrc/server/g_lights.qh rename to qcsrc/common/mapobjects/misc/dynlight.qh diff --git a/qcsrc/server/_mod.inc b/qcsrc/server/_mod.inc index cffc7f507..ca0dec4bb 100644 --- a/qcsrc/server/_mod.inc +++ b/qcsrc/server/_mod.inc @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/qcsrc/server/_mod.qh b/qcsrc/server/_mod.qh index cb66bc888..c87bb2a03 100644 --- a/qcsrc/server/_mod.qh +++ b/qcsrc/server/_mod.qh @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include -- 2.39.2