From: Mario Date: Fri, 25 Dec 2015 07:03:35 +0000 (+1000) Subject: Kill some uses of TRUE and FALSE X-Git-Tag: xonotic-v0.8.2~1384 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c819b19b5807d467ab4d6f1d8aefcd38e218a461;p=xonotic%2Fxonotic-data.pk3dir.git Kill some uses of TRUE and FALSE --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 3d6af6f2c..df9a7a6f2 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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)) { diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 92abc8cd9..fc5d46c68 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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) diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qc b/qcsrc/common/mutators/mutator/instagib/instagib.qc index bc6ca5be3..2db406807 100644 --- a/qcsrc/common/mutators/mutator/instagib/instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qc @@ -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) diff --git a/qcsrc/common/turrets/all.qh b/qcsrc/common/turrets/all.qh index fc7940043..29e1fb5a6 100644 --- a/qcsrc/common/turrets/all.qh +++ b/qcsrc/common/turrets/all.qh @@ -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); diff --git a/qcsrc/common/turrets/turret/hellion_weapon.qc b/qcsrc/common/turrets/turret/hellion_weapon.qc index 77aeb7c7e..5b7f42f45 100644 --- a/qcsrc/common/turrets/turret/hellion_weapon.qc +++ b/qcsrc/common/turrets/turret/hellion_weapon.qc @@ -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; diff --git a/qcsrc/common/turrets/turret/hk_weapon.qc b/qcsrc/common/turrets/turret/hk_weapon.qc index b083c6830..b24623097 100644 --- a/qcsrc/common/turrets/turret/hk_weapon.qc +++ b/qcsrc/common/turrets/turret/hk_weapon.qc @@ -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; diff --git a/qcsrc/common/turrets/turret/mlrs_weapon.qc b/qcsrc/common/turrets/turret/mlrs_weapon.qc index abd7b0fc4..864c37cda 100644 --- a/qcsrc/common/turrets/turret/mlrs_weapon.qc +++ b/qcsrc/common/turrets/turret/mlrs_weapon.qc @@ -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); diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 0c72e878e..bb4fc2335 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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 {