]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow setting a monster to not auto align itself at spawn
authorMario <mario@smbclan.net>
Wed, 19 Oct 2016 21:21:39 +0000 (07:21 +1000)
committerMario <mario@smbclan.net>
Wed, 19 Oct 2016 21:21:39 +0000 (07:21 +1000)
qcsrc/common/monsters/sv_monsters.qc

index 59c57fbbeb3dd6ceca8ae15f881a7c9cbdc6eb29..f680f118b3dd5acbe8a14093c03556173cf3cc21 100644 (file)
@@ -1346,13 +1346,13 @@ bool Monster_Spawn(entity this, bool check_appear, int mon_id)
        this.oldtarget2                 = this.target2;
        this.pass_distance              = 0;
        this.deadflag                   = DEAD_NO;
-       this.noalign                    = ((mon.spawnflags & MONSTER_TYPE_FLY) || (mon.spawnflags & MONSTER_TYPE_SWIM));
        this.spawn_time                 = time;
        this.gravity                    = 1;
        this.monster_moveto             = '0 0 0';
        this.monster_face               = '0 0 0';
        this.dphitcontentsmask  = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP | DPCONTENTS_MONSTERCLIP;
 
+       if(!this.noalign) { this.noalign = ((mon.spawnflags & MONSTER_TYPE_FLY) || (mon.spawnflags & MONSTER_TYPE_SWIM)); }
        if(!this.scale) { this.scale = 1; }
        if(autocvar_g_monsters_edit) { this.grab = 1; }
        if(autocvar_g_fullbrightplayers) { this.effects |= EF_FULLBRIGHT; }