X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fdomination%2Fsv_domination.qc;h=ca782cedbb87f04f3ee45fa1f6ad5eddb7519b80;hb=c0add59c57c00b31e0db86871ad776ffacc9165e;hp=50e16d53e076edb0a740aa7b1af934a0266501f3;hpb=79c07d6f162c78d9a59a873f66a27a387d5722d7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc index 50e16d53e..ca782cedb 100644 --- a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc +++ b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc @@ -1,6 +1,14 @@ #include "sv_domination.qh" +#include +#include +#include +#include +#include #include +#include +#include +#include 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); }