]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Roughly link onslaught control points
authorMario <mario.mario@y7mail.com>
Wed, 2 Oct 2013 01:14:55 +0000 (18:14 -0700)
committerMario <mario.mario@y7mail.com>
Wed, 2 Oct 2013 01:14:55 +0000 (18:14 -0700)
qcsrc/server/mutators/gamemode_onslaught.qc

index b5b6594d70d384b89ed595692240acd4edf0b3be..91f9c912b4055bd603a7a71dd4613b17047a1eff 100644 (file)
@@ -1304,6 +1304,12 @@ void onslaught_controlpoint_touch()
        onslaught_updatelinks();
 }
 
+void onslaught_controlpoint_think()
+{
+       self.nextthink = time;
+       CSQCMODEL_AUTOUPDATE();
+}
+
 void onslaught_controlpoint_reset()
 {
        if(self.goalentity && self.goalentity != world)
@@ -1316,8 +1322,9 @@ void onslaught_controlpoint_reset()
        self.isshielded = TRUE;
        self.enemy.solid = SOLID_NOT;
        self.enemy.colormap = self.colormap;
-       self.think = self.enemy.think = func_null;
-       self.nextthink = 0; // don't like func_null :P
+       self.think = onslaught_controlpoint_think;
+       self.enemy.think = func_null;
+       self.nextthink = time; // don't like func_null :P
        setmodel(self, "models/onslaught/controlpoint_pad.md3");
        //setsize(self, '-32 -32 0', '32 32 8');
 
@@ -1327,6 +1334,8 @@ void onslaught_controlpoint_reset()
 
        activator = self;
        SUB_UseTargets(); // to reset the structures, playerspawns etc.
+       
+       CSQCMODEL_AUTOUPDATE();
 }
 
 /*QUAKED spawnfunc_onslaught_controlpoint (0 .5 .8) (-32 -32 0) (32 32 128)
@@ -1397,6 +1406,9 @@ void spawnfunc_onslaught_controlpoint()
        self.enemy.colormap = self.colormap;
 
        waypoint_spawnforitem(self);
+       
+       self.think = onslaught_controlpoint_think;
+       self.nextthink = time;
 
        WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0');
        WaypointSprite_UpdateRule(self.sprite, NUM_TEAM_2, SPRITERULE_TEAMPLAY);
@@ -1404,6 +1416,8 @@ void spawnfunc_onslaught_controlpoint()
        onslaught_updatelinks();
 
        self.reset = onslaught_controlpoint_reset;
+       
+       CSQCMODEL_AUTOINIT();
 }
 
 float onslaught_link_send(entity to, float sendflags)