]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mode_onslaught.qc
support DP_SND_MORECHANNELS in soundtoat() function too
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mode_onslaught.qc
index b73bdb05fc25c81d336b6dba5fab181d442fc98b..c5cd4ccba417fa108dd3507282674d9cf761765c 100644 (file)
@@ -379,8 +379,8 @@ void onslaught_generator_think()
        self.nextthink = ceil(time + 1);
        if (!gameover)
        {
-               if (cvar("timelimit"))
-               if (time > game_starttime + cvar("timelimit") * 60)
+               if (autocvar_timelimit)
+               if (time > game_starttime + autocvar_timelimit * 60)
                {
                        // self.max_health / 300 gives 5 minutes of overtime.
                        // control points reduce the overtime duration.
@@ -809,7 +809,7 @@ void onslaught_controlpoint_updatesprite(entity e)
 void onslaught_generator_reset()
 {
        self.team = self.team_saved;
-       self.lasthealth = self.max_health = self.health = cvar("g_onslaught_gen_health");
+       self.lasthealth = self.max_health = self.health = autocvar_g_onslaught_gen_health;
        self.takedamage = DAMAGE_AIM;
        self.bot_attack = TRUE;
        self.iscaptured = TRUE;
@@ -874,7 +874,7 @@ void spawnfunc_onslaught_generator()
        self.colormap = 1024 + (self.team - 1) * 17;
        self.solid = SOLID_BBOX;
        self.movetype = MOVETYPE_NONE;
-       self.lasthealth = self.max_health = self.health = cvar("g_onslaught_gen_health");
+       self.lasthealth = self.max_health = self.health = autocvar_g_onslaught_gen_health;
        setmodel(self, "models/onslaught/generator.md3");
        setsize(self, '-52 -52 -14', '52 52 75');
        setorigin(self, self.origin);
@@ -900,7 +900,7 @@ void spawnfunc_onslaught_generator()
        self.nextthink = time + 0.2;
        InitializeEntity(self, onslaught_generator_delayed, INITPRIO_LAST);
 
-       WaypointSprite_SpawnFixed(string_null, e.origin + '0 0 1' * e.maxs_z, self, sprite);
+       WaypointSprite_SpawnFixed(string_null, e.origin + '0 0 1' * e.maxs_z, self, sprite, RADARICON_NONE, '0 0 0');
        WaypointSprite_UpdateRule(self.sprite, COLOR_TEAM2, SPRITERULE_TEAMPLAY);
        WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
        WaypointSprite_UpdateHealth(self.sprite, self.health);
@@ -1127,7 +1127,7 @@ void onslaught_controlpoint_icon_buildthink()
        if (self.health >= self.max_health)
        {
                self.health = self.max_health;
-               self.count = cvar("g_onslaught_cp_regen") * sys_frametime; // slow repair rate from now on
+               self.count = autocvar_g_onslaught_cp_regen * sys_frametime; // slow repair rate from now on
                self.think = onslaught_controlpoint_icon_think;
                sound(self, CHAN_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
                bprint(ColoredTeamName(self.team), " captured ", self.owner.message, " control point\n");
@@ -1177,8 +1177,8 @@ void onslaught_controlpoint_touch()
        self.goalentity = e = spawn();
        e.classname = "onslaught_controlpoint_icon";
        e.owner = self;
-       e.max_health = cvar("g_onslaught_cp_health");
-       e.health = cvar("g_onslaught_cp_buildhealth");
+       e.max_health = autocvar_g_onslaught_cp_health;
+       e.health = autocvar_g_onslaught_cp_buildhealth;
        e.solid = SOLID_BBOX;
        e.movetype = MOVETYPE_NONE;
        setmodel(e, "models/onslaught/controlpoint_icon.md3");
@@ -1191,7 +1191,7 @@ void onslaught_controlpoint_touch()
        e.colormap = 1024 + (e.team - 1) * 17;
        e.think = onslaught_controlpoint_icon_buildthink;
        e.nextthink = time + sys_frametime;
-       e.count = (e.max_health - e.health) * sys_frametime / cvar("g_onslaught_cp_buildtime"); // how long it takes to build
+       e.count = (e.max_health - e.health) * sys_frametime / autocvar_g_onslaught_cp_buildtime; // how long it takes to build
        sound(e, CHAN_TRIGGER, "onslaught/controlpoint_build.wav", VOL_BASE, ATTN_NORM);
        self.team = e.team;
        self.colormap = e.colormap;
@@ -1283,7 +1283,7 @@ void spawnfunc_onslaught_controlpoint()
 
        waypoint_spawnforitem(self);
 
-       WaypointSprite_SpawnFixed(string_null, e.origin + '0 0 1' * e.maxs_z, self, sprite);
+       WaypointSprite_SpawnFixed(string_null, e.origin + '0 0 1' * e.maxs_z, self, sprite, RADARICON_NONE, '0 0 0');
        WaypointSprite_UpdateRule(self.sprite, COLOR_TEAM2, SPRITERULE_TEAMPLAY);
 
        onslaught_updatelinks();