From 99c1b55792c29c17ab274b1a95ee1dd44a71255c Mon Sep 17 00:00:00 2001 From: Lyberta Date: Mon, 21 Aug 2017 03:54:10 +0300 Subject: [PATCH] Moved player templates code in server directory. --- qcsrc/common/mutators/mutator/_mod.inc | 1 - qcsrc/common/mutators/mutator/_mod.qh | 1 - qcsrc/common/mutators/mutator/playertemplates/_mod.inc | 4 ---- qcsrc/common/mutators/mutator/playertemplates/_mod.qh | 4 ---- qcsrc/server/_mod.inc | 1 + qcsrc/server/_mod.qh | 1 + .../sv_playertemplates.qc => server/playertemplates.qc} | 2 ++ .../sv_playertemplates.qh => server/playertemplates.qh} | 2 ++ 8 files changed, 6 insertions(+), 10 deletions(-) delete mode 100644 qcsrc/common/mutators/mutator/playertemplates/_mod.inc delete mode 100644 qcsrc/common/mutators/mutator/playertemplates/_mod.qh rename qcsrc/{common/mutators/mutator/playertemplates/sv_playertemplates.qc => server/playertemplates.qc} (99%) rename qcsrc/{common/mutators/mutator/playertemplates/sv_playertemplates.qh => server/playertemplates.qh} (97%) diff --git a/qcsrc/common/mutators/mutator/_mod.inc b/qcsrc/common/mutators/mutator/_mod.inc index dc47cc70d6..0d6326fef0 100644 --- a/qcsrc/common/mutators/mutator/_mod.inc +++ b/qcsrc/common/mutators/mutator/_mod.inc @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/qcsrc/common/mutators/mutator/_mod.qh b/qcsrc/common/mutators/mutator/_mod.qh index f5fbe79fe6..917dc6557c 100644 --- a/qcsrc/common/mutators/mutator/_mod.qh +++ b/qcsrc/common/mutators/mutator/_mod.qh @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/qcsrc/common/mutators/mutator/playertemplates/_mod.inc b/qcsrc/common/mutators/mutator/playertemplates/_mod.inc deleted file mode 100644 index 91771cfa56..0000000000 --- a/qcsrc/common/mutators/mutator/playertemplates/_mod.inc +++ /dev/null @@ -1,4 +0,0 @@ -// generated file; do not modify -#ifdef SVQC - #include -#endif diff --git a/qcsrc/common/mutators/mutator/playertemplates/_mod.qh b/qcsrc/common/mutators/mutator/playertemplates/_mod.qh deleted file mode 100644 index b4b3c5a8db..0000000000 --- a/qcsrc/common/mutators/mutator/playertemplates/_mod.qh +++ /dev/null @@ -1,4 +0,0 @@ -// generated file; do not modify -#ifdef SVQC - #include -#endif diff --git a/qcsrc/server/_mod.inc b/qcsrc/server/_mod.inc index 87a8d56892..204d81e5c5 100644 --- a/qcsrc/server/_mod.inc +++ b/qcsrc/server/_mod.inc @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/server/_mod.qh b/qcsrc/server/_mod.qh index 2967c110ce..9092faafc0 100644 --- a/qcsrc/server/_mod.qh +++ b/qcsrc/server/_mod.qh @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc b/qcsrc/server/playertemplates.qc similarity index 99% rename from qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc rename to qcsrc/server/playertemplates.qc index 027c1f26bb..e2de131e74 100644 --- a/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc +++ b/qcsrc/server/playertemplates.qc @@ -282,6 +282,8 @@ float PlayerTemplate_GivePlayerItem(entity player, string template, } } +// =========================== Hook handlers ================================= + void PlayerTemplate_PlayerSpawn(entity player, string template) { if (template == "default") diff --git a/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qh b/qcsrc/server/playertemplates.qh similarity index 97% rename from qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qh rename to qcsrc/server/playertemplates.qh index 5d93700acc..619c1b79fc 100644 --- a/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qh +++ b/qcsrc/server/playertemplates.qh @@ -48,6 +48,8 @@ string PlayerTemplate_GetStringValue(string template, string variable); float PlayerTemplate_GivePlayerItem(entity player, string template, string variable); +// =========================== Hook handlers ================================= + /// \brief Setups the player during spawn according to the given template. /// \param[in] player Player to setup. /// \param[in] template Name of the template. -- 2.39.5