]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Change buff random spawn flag to prevent old items setting it
authorMario <zacjardine@y7mail.com>
Mon, 6 Apr 2015 15:21:22 +0000 (01:21 +1000)
committerMario <zacjardine@y7mail.com>
Mon, 6 Apr 2015 15:21:22 +0000 (01:21 +1000)
qcsrc/server/mutators/mutator_buffs.qc

index 16892ededfc56f35a896e45eac9d64f0aaa93b3f..a0a8f91a5a1ba88d45a3717ca6db8368a7db6c46 100644 (file)
@@ -270,7 +270,7 @@ void buff_Think()
                if(autocvar_g_buffs_randomize)
                        buff_NewType(self, self.buffs);
 
-               if(autocvar_g_buffs_random_location || (self.spawnflags & 1))
+               if(autocvar_g_buffs_random_location || (self.spawnflags & 64))
                        buff_Respawn(self);
        }
 
@@ -318,7 +318,7 @@ void buff_Reset()
        buff_Waypoint_Reset();
        self.buff_activetime_updated = false;
 
-       if(autocvar_g_buffs_random_location || (self.spawnflags & 1))
+       if(autocvar_g_buffs_random_location || (self.spawnflags & 64))
                buff_Respawn(self);
 }
 
@@ -379,7 +379,7 @@ void buff_Init(entity ent)
        setmodel(self, BUFF_MODEL);
        setsize(self, BUFF_MIN, BUFF_MAX);
 
-       if(cvar("g_buffs_random_location") || (self.spawnflags & 1))
+       if(cvar("g_buffs_random_location") || (self.spawnflags & 64))
                buff_Respawn(self);
 
        self = oldself;
@@ -1046,7 +1046,7 @@ void buffs_DelayedInit()
                for(i = 0; i < autocvar_g_buffs_spawn_count; ++i)
                {
                        entity e = spawn();
-                       e.spawnflags |= 1; // always randomize
+                       e.spawnflags |= 64; // always randomize
                        e.velocity = randomvec() * 250; // this gets reset anyway if random location works
                        buff_Init(e);
                }