]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc
Create the g_race_targets, g_racecheckpoints and g_kaballs intrusive lists only when...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / domination / sv_domination.qc
index 50e16d53e076edb0a740aa7b1af934a0266501f3..ca782cedbb87f04f3ee45fa1f6ad5eddb7519b80 100644 (file)
@@ -1,6 +1,14 @@
 #include "sv_domination.qh"
 
+#include <server/client.qh>
+#include <server/command/vote.qh>
+#include <server/damage.qh>
+#include <server/gamelog.qh>
+#include <server/items/items.qh>
 #include <server/teamplay.qh>
+#include <server/world.qh>
+#include <common/mapobjects/platforms.qh>
+#include <common/mapobjects/triggers.qh>
 
 bool g_domination;
 
@@ -190,7 +198,7 @@ void dompointtouch(entity this, entity toucher)
 {
        if(!IS_PLAYER(toucher))
                return;
-       if(GetResourceAmount(toucher, RESOURCE_HEALTH) < 1)
+       if(GetResource(toucher, RES_HEALTH) < 1)
                return;
 
        if(round_handler_IsActive() && !round_handler_IsRoundStarted())
@@ -548,7 +556,6 @@ spawnfunc(dom_team)
                precache_sound(this.noise);
        if (this.noise1 != "")
                precache_sound(this.noise1);
-       this.classname = "dom_team";
        _setmodel(this, this.model); // precision not needed
        this.mdl = this.model;
        this.dmg = this.modelindex;
@@ -613,7 +620,6 @@ void dom_spawnteam(string teamname, float teamcolor, string pointmodel, float po
 void dom_spawnpoint(vector org)
 {
        entity e = spawn();
-       e.classname = "dom_controlpoint";
        setthink(e, spawnfunc_dom_controlpoint);
        e.nextthink = time;
        setorigin(e, org);
@@ -665,5 +671,7 @@ void dom_DelayedInit(entity this) // Do this check with a delay so we can wait f
 void dom_Initialize()
 {
        g_domination = true;
+       g_dompoints = IL_NEW();
+
        InitializeEntity(NULL, dom_DelayedInit, INITPRIO_GAMETYPE);
 }