Merge remote-tracking branch 'origin/Mario/train_fix'
authorSamual Lenks <samual@xonotic.org>
Wed, 26 Feb 2014 20:46:01 +0000 (15:46 -0500)
committerSamual Lenks <samual@xonotic.org>
Wed, 26 Feb 2014 20:46:01 +0000 (15:46 -0500)
# By Mario
# Via Mario
* origin/Mario/train_fix:
  Set view_ofs after initializing the brush, so mins is the correct value

qcsrc/server/t_plats.qc

index 3955442..beccc71 100644 (file)
@@ -414,6 +414,10 @@ void spawnfunc_func_train()
        if (!self.speed)
                self.speed = 100;
 
+       if (!InitMovingBrushTrigger())
+               return;
+       self.effects |= EF_LOWPRECISION;
+       
        if (self.spawnflags & 2)
        {
                self.platmovetype_turn = TRUE;
@@ -422,10 +426,6 @@ void spawnfunc_func_train()
        else
                self.view_ofs = self.mins;
 
-       if (!InitMovingBrushTrigger())
-               return;
-       self.effects |= EF_LOWPRECISION;
-
        // wait for targets to spawn
        InitializeEntity(self, func_train_find, INITPRIO_SETLOCATION);