]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove unnecessary .variable for spawnturret function
authorLegendaryGuard <rootuser999@gmail.com>
Sat, 25 Jun 2022 19:10:41 +0000 (21:10 +0200)
committerLegendaryGuard <rootuser999@gmail.com>
Sat, 25 Jun 2022 19:10:41 +0000 (21:10 +0200)
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/sv_turrets.qh

index c88727aa81d7255923cba86c7563d1f5eaf98045..6c5b1a9d046a41f33a71108c40a51b7e87bc7483 100644 (file)
@@ -1419,7 +1419,6 @@ bool turret_initialize(entity this, Turret tur)
 entity spawnturret (entity e, string turret, Turret tur, entity spawnedby, entity own, vector orig, bool respwn, bool invincible, bool removeifinvalid, int moveflag, bool optional)
 {
        e.spawnflags = TSF_SUSPENDED;
-       e.optionalsetup = optional;
 
        if(!respwn) { e.spawnflags |= TSL_NO_RESPAWN; }
        if(invincible) { e.damage_flags |= TFL_DMG_NO; }
@@ -1464,16 +1463,15 @@ entity spawnturret (entity e, string turret, Turret tur, entity spawnedby, entit
 
        e.realowner = spawnedby;
 
-       if(moveflag)
-               e.turret_flags = TUR_FLAG_MOVE;
-
        if(IS_PLAYER(spawnedby))
        {
                if(teamplay)
                        e.team = spawnedby.team; // colors handled in spawn code
 
                // TODO: Create a "following player" feature when turret has moveflag
-               //if(autocvar_g_monsters_owners && e.move_movetype == MOVETYPE_WALK)
+               // if(moveflag) 
+               //      e.turret_flags = TUR_FLAG_MOVE; 
+               // if(autocvar_g_monsters_owners && e.move_movetype == MOVETYPE_WALK)
                //      e.monster_follow = own; // using .owner makes the monster non-solid for its master
                
                e.angles_y = spawnedby.angles_y;
@@ -1485,7 +1483,7 @@ entity spawnturret (entity e, string turret, Turret tur, entity spawnedby, entit
 
        //LOG_INFOF("^1tur.netname^3: %s", tur.netname);
 
-       if (e.optionalsetup)
+       if (optional)
                e.tur_head.effects = (EF_DIMLIGHT | EF_FULLBRIGHT);
 
        return e;
index 1bd0b43aaebe9e33a6a28de930d2d96881ace830..f7a426351fa56cc90a3c7d2fc4d51aa1f8c3f227 100644 (file)
@@ -26,7 +26,6 @@ TR_PROPS_COMMON(X, , )
 .float shot_volly_refire; // refire after completed volly
 */
 
-.bool optionalsetup; // optional setup
 .float ticrate; // interal ai think rate
 .entity tur_head; // top part of the turret
 .entity tur_defend; // defend this entity