]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Kill some uses of TRUE and FALSE
authorMario <mario@smbclan.net>
Fri, 25 Dec 2015 07:03:35 +0000 (17:03 +1000)
committerMario <mario@smbclan.net>
Fri, 25 Dec 2015 07:03:35 +0000 (17:03 +1000)
qcsrc/client/view.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/instagib/instagib.qc
qcsrc/common/turrets/all.qh
qcsrc/common/turrets/turret/hellion_weapon.qc
qcsrc/common/turrets/turret/hk_weapon.qc
qcsrc/common/turrets/turret/mlrs_weapon.qc
qcsrc/server/cl_client.qc

index 3d6af6f2caf164d8fe0e41950bbe8426186b15e3..df9a7a6f26da4a2a1bf688cce3280007c0fc9de3 100644 (file)
@@ -1461,17 +1461,12 @@ void CSQC_UpdateView(float w, float h)
 
                if(ons_roundlost)
                {
-                       entity e;
-                       for(e = world; (e = find(e, classname, "onslaught_generator")); )
-                       {
-                               if(e.health <= 0)
-                               {
-                                       gen = e;
-                                       break;
-                               }
-                       }
+                       FOREACH_ENTITY_CLASS("onslaught_generator", it.health <= 0, LAMBDA(
+                               gen = it;
+                               break;
+                       ));
                        if(!gen)
-                               ons_roundlost = FALSE; // don't enforce the 3rd person camera if there is no dead generator to show
+                               ons_roundlost = false; // don't enforce the 3rd person camera if there is no dead generator to show
                }
                if(WantEventchase() || (!autocvar_cl_orthoview && ons_roundlost))
                {
index 92abc8cd916255f083802e0511599b400f3a7a2d..fc5d46c68f99f58e9878a381d78feeec2d95a2bf 100644 (file)
@@ -1134,7 +1134,7 @@ void Monster_Move_2D(float mspeed, float allow_jumpoff)
                return;
        }
 
-       float reverse = FALSE;
+       float reverse = false;
        vector a, b;
 
        makevectors(self.angles);
@@ -1145,11 +1145,11 @@ void Monster_Move_2D(float mspeed, float allow_jumpoff)
 
        if(trace_fraction != 1.0)
        {
-               reverse = TRUE;
+               reverse = true;
 
                if(trace_ent)
                if(IS_PLAYER(trace_ent) && !(trace_ent.items & IT_STRENGTH))
-                       reverse = FALSE;
+                       reverse = false;
        }
 
        // TODO: fix this... tracing is broken if the floor is thin
@@ -1159,7 +1159,7 @@ void Monster_Move_2D(float mspeed, float allow_jumpoff)
                a = b - '0 0 32';
                traceline(b, a, MOVE_WORLDONLY, self);
                if(trace_fraction == 1.0)
-                       reverse = TRUE;
+                       reverse = true;
        } */
 
        if(reverse)
index bc6ca5be39add6c715a5be00872abde92b6e231a..2db40680777ab2d22bc936f7badc7d49629af60b 100644 (file)
@@ -405,7 +405,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDies)
        if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
                frag_damage = 1000; // always gib if it was a vaporizer death
 
-       return FALSE;
+       return false;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)
index fc79400434e4fd58fd4fbfdf85b9a30bc7a990e2..29e1fb5a66aed5db580e1fa606a93b1c701f715c 100644 (file)
@@ -27,12 +27,12 @@ GENERIC_COMMAND(dumpturrets, "Dump all turrets into turrets_dump.txt")
             if(filename == "")
             {
                 filename = "turrets_dump.cfg";
-                tur_config_alsoprint = FALSE;
+                tur_config_alsoprint = false;
             }
             else if(filename == "-")
             {
                 filename = "turrets_dump.cfg";
-                tur_config_alsoprint = TRUE;
+                tur_config_alsoprint = true;
             }
             tur_config_file = fopen(filename, FILE_WRITE);
 
index 77aeb7c7e1d670297dc0ebf2ed2b591fc99c698d..5b7f42f45ede3488c9d025dfc268fe706e28a63f 100644 (file)
@@ -40,7 +40,7 @@ METHOD(HellionAttack, wr_think, void(entity thiswep, entity actor, .entity weapo
                 actor.tur_shotorg = gettaginfo(actor.tur_head, gettagindex(actor.tur_head, "tag_fire2"));
         }
 
-        entity missile = turret_projectile(SND(ROCKET_FIRE), 6, 10, DEATH_TURRET_HELLION.m_id, PROJECTILE_ROCKET, FALSE, FALSE);
+        entity missile = turret_projectile(SND(ROCKET_FIRE), 6, 10, DEATH_TURRET_HELLION.m_id, PROJECTILE_ROCKET, false, false);
         te_explosion (missile.origin);
         missile.think          = turret_hellion_missile_think;
         missile.nextthink      = time;
index b083c6830eda791bcaa7de0f43cd3a44c4cfa08c..b24623097876c1bdd6f7b6befb20cf4b8f6c2310 100644 (file)
@@ -37,7 +37,7 @@ METHOD(HunterKillerAttack, wr_think, void(entity thiswep, entity actor, .entity
             actor.tur_head = actor;
             weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
         }
-        entity missile = turret_projectile(SND(ROCKET_FIRE), 6, 10, DEATH_TURRET_HK.m_id, PROJECTILE_ROCKET, FALSE, FALSE);
+        entity missile = turret_projectile(SND(ROCKET_FIRE), 6, 10, DEATH_TURRET_HK.m_id, PROJECTILE_ROCKET, false, false);
         te_explosion (missile.origin);
 
         missile.think = turret_hk_missile_think;
index abd7b0fc4e77ba60598b903f77744ec6da3050b4..864c37cda2784804a5aeeed472e23c950be2868e 100644 (file)
@@ -30,7 +30,7 @@ METHOD(MLRSTurretAttack, wr_think, void(entity thiswep, entity actor, .entity we
             weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, 0, w_ready);
         }
         turret_tag_fire_update();
-        entity missile = turret_projectile(SND(ROCKET_FIRE), 6, 10, DEATH_TURRET_MLRS.m_id, PROJECTILE_ROCKET, TRUE, TRUE);
+        entity missile = turret_projectile(SND(ROCKET_FIRE), 6, 10, DEATH_TURRET_MLRS.m_id, PROJECTILE_ROCKET, true, true);
         missile.nextthink = time + max(actor.tur_impacttime,(actor.shot_radius * 2) / actor.shot_speed);
         missile.missile_flags = MIF_SPLASH;
         te_explosion (missile.origin);
index 0c72e878e3606d652daad79cbd6598ada3b8a29a..bb4fc2335877f3834e38ca1b865dbafda00f7df1 100644 (file)
@@ -2054,7 +2054,7 @@ void PlayerUseKey()
                if(!gameover)
                {
                        entity head, closest_target = world;
-                       head = WarpZone_FindRadius(self.origin, autocvar_g_vehicles_enter_radius, TRUE);
+                       head = WarpZone_FindRadius(self.origin, autocvar_g_vehicles_enter_radius, true);
 
                        while(head) // find the closest acceptable target to enter
                        {