]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/ent_cs.qc
Merge branch 'master' into bones_was_here/q3compat
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / ent_cs.qc
index 2675d3201867c3397c4ecdba7db65cc7d3f23553..9b96feb3b28c5eab623df4e13b2dd7e55245f060 100644 (file)
@@ -1,15 +1,21 @@
 #include "ent_cs.qh"
-#include <common/gamemodes/_mod.qh>
-#include <common/resources.qh>
-#ifdef SVQC
-#include <server/resources.qh>
+
+#if defined(CSQC)
+       #include <common/gamemodes/_mod.qh>
+       #include <common/resources.qh>
+#elif defined(MENUQC)
+#elif defined(SVQC)
+       #include <common/gamemodes/_mod.qh>
+       #include <common/resources.qh>
+       #include <server/resources.qh>
 #endif
 
 REGISTRY(EntCSProps, BITS(16) - 1)
-#define EntCSProps_from(i) _EntCSProps_from(i, NULL)
 REGISTER_REGISTRY(EntCSProps)
 REGISTRY_SORT(EntCSProps)
 REGISTRY_CHECK(EntCSProps)
+
+REGISTRY_DEFINE_GET(EntCSProps, NULL)
 STATIC_INIT(EntCSProps_renumber) { FOREACH(EntCSProps, true, it.m_id = i); }
 
 // these entcs_props ids need to be referenced directly
@@ -169,7 +175,7 @@ ENTCS_PROP(SOLID, true, sv_solid, solid, ENTCS_SET_NORMAL,
                do {
                        if (IS_PLAYER(player))
                        {
-                               if (radar_showennemies) break;
+                               if (radar_showenemies) break;
                                if (SAME_TEAM(to, player)) break;
                                if (!(IS_PLAYER(to) || to.caplayer) && time > game_starttime) break;
                        }
@@ -268,7 +274,7 @@ ENTCS_PROP(SOLID, true, sv_solid, solid, ENTCS_SET_NORMAL,
                {
                        if (!this)
                                // initial = temp
-                               e = new_pure(entcs_receiver);
+                               e = new_pure(ENT_CLIENT_ENTCS);
                        else
                                // initial = linked
                                e = this;
@@ -304,7 +310,6 @@ ENTCS_PROP(SOLID, true, sv_solid, solid, ENTCS_SET_NORMAL,
                if (isnew)
                {
                        make_pure(this);
-                       this.classname = "entcs_receiver";
                        this.entremove = Ent_RemoveEntCS;
                }
                return ReadEntcs(this);