]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make spawnflags & 1 act as noalign for buffs (matching old powerups/items)
authorMario <zacjardine@y7mail.com>
Mon, 6 Apr 2015 15:24:56 +0000 (01:24 +1000)
committerMario <zacjardine@y7mail.com>
Mon, 6 Apr 2015 15:24:56 +0000 (01:24 +1000)
qcsrc/server/mutators/mutator_buffs.qc

index a0a8f91a5a1ba88d45a3717ca6db8368a7db6c46..3c1be732241b0f970d971c1fc59e9b021368aca2 100644 (file)
@@ -373,6 +373,9 @@ void buff_Init(entity ent)
        self.buff_active = !self.buff_activetime;
        self.pflags = PFLAGS_FULLDYNAMIC;
 
+       if(self.spawnflags & 1)
+               self.noalign = true;
+
        if(self.noalign)
                self.movetype = MOVETYPE_NONE; // reset by random location
 
@@ -401,7 +404,7 @@ void buff_SpawnReplacement(entity ent, entity old)
 {
        setorigin(ent, old.origin);
        ent.angles = old.angles;
-       ent.noalign = old.noalign;
+       ent.noalign = (old.noalign || (old.spawnflags & 1));
 
        buff_Init(ent);
 }