]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix indentation of all the if if else I could find out and add explicit brackets...
authorterencehill <piuntn@gmail.com>
Mon, 28 Jan 2019 17:48:32 +0000 (18:48 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 28 Jan 2019 17:48:32 +0000 (18:48 +0100)
19 files changed:
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc
qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc
qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc
qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/gamemodes/gamemode/race/sv_race.qc
qcsrc/common/mapobjects/models.qc
qcsrc/common/minigames/minigame/bd.qc
qcsrc/common/minigames/minigame/ps.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/viewloc.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/server/g_world.qc

index 163b996c3f61a95996b8aa281d90b19580c60da8..73bb3cfe4cccc14def3246101a0149be66fe23e7 100644 (file)
@@ -252,12 +252,13 @@ entity ca_LastPlayerForTeam(entity this)
 {
        entity last_pl = NULL;
        FOREACH_CLIENT(IS_PLAYER(it) && it != this, {
-               if (!IS_DEAD(it))
-               if (SAME_TEAM(this, it))
-               if (!last_pl)
-                       last_pl = it;
-               else
-                       return NULL;
+               if (!IS_DEAD(it) && SAME_TEAM(this, it))
+               {
+                       if (!last_pl)
+                               last_pl = it;
+                       else
+                               return NULL;
+               }
        });
        return last_pl;
 }
index 2696a4e87892d4dca5dbc3b688d91f0b4bf85059..5e6e97dd352c49fc03f9e0f2e2690ba7826e5ee8 100644 (file)
@@ -702,10 +702,12 @@ void ctf_Handle_Pickup(entity flag, entity player, int pickuptype)
        if(flag.team)
                FOREACH_CLIENT(IS_PLAYER(it) && it != player, {
                        if(CTF_SAMETEAM(flag, it))
-                       if(SAME_TEAM(player, it))
-                               Send_Notification(NOTIF_ONE, it, MSG_CHOICE, APP_TEAM_NUM(flag.team, CHOICE_CTF_PICKUP_TEAM), Team_ColorCode(player.team), player.netname);
-                       else
-                               Send_Notification(NOTIF_ONE, it, MSG_CHOICE, ((SAME_TEAM(flag, player)) ? CHOICE_CTF_PICKUP_ENEMY_TEAM : CHOICE_CTF_PICKUP_ENEMY), Team_ColorCode(player.team), player.netname);
+                       {
+                               if(SAME_TEAM(player, it))
+                                       Send_Notification(NOTIF_ONE, it, MSG_CHOICE, APP_TEAM_NUM(flag.team, CHOICE_CTF_PICKUP_TEAM), Team_ColorCode(player.team), player.netname);
+                               else
+                                       Send_Notification(NOTIF_ONE, it, MSG_CHOICE, ((SAME_TEAM(flag, player)) ? CHOICE_CTF_PICKUP_ENEMY_TEAM : CHOICE_CTF_PICKUP_ENEMY), Team_ColorCode(player.team), player.netname);
+                       }
                });
 
        _sound(player, CH_TRIGGER, flag.snd_flag_taken, VOL_BASE, ATTEN_NONE);
index 78ff64e5146b4e2a75cdc5670c8ba3ab01bf5316..50e16d53e076edb0a740aa7b1af934a0266501f3 100644 (file)
@@ -69,10 +69,12 @@ void dompoint_captured(entity this)
                this.enemy = NULL;
 
        if (head.noise != "")
+       {
                if(this.enemy)
                        _sound(this.enemy, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
                else
                        _sound(this, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
+       }
        if (head.noise1 != "")
                play2all(head.noise1);
 
@@ -466,10 +468,7 @@ MUTATOR_HOOKFUNCTION(dom, PlayerSpawn)
        entity player = M_ARGV(0, entity);
 
        if(domination_roundbased)
-       if(!round_handler_IsRoundStarted())
-               player.player_blocked = 1;
-       else
-               player.player_blocked = 0;
+               player.player_blocked = !round_handler_IsRoundStarted();
 }
 
 MUTATOR_HOOKFUNCTION(dom, ClientConnect)
index c9670a150c38d1dac71880355f6ce712b964b5e3..dc8c8b282af22a8f258dee665b49eb490e873b0a 100644 (file)
@@ -334,14 +334,20 @@ bool Invasion_CheckWinner()
        {
                if(red_alive > 0) { winner_team = NUM_TEAM_1; }
                if(blue_alive > 0)
-               if(winner_team) { winner_team = 0; }
-               else { winner_team = NUM_TEAM_2; }
+               {
+                       if(winner_team) { winner_team = 0; }
+                       else { winner_team = NUM_TEAM_2; }
+               }
                if(yellow_alive > 0)
-               if(winner_team) { winner_team = 0; }
-               else { winner_team = NUM_TEAM_3; }
+               {
+                       if(winner_team) { winner_team = 0; }
+                       else { winner_team = NUM_TEAM_3; }
+               }
                if(pink_alive > 0)
-               if(winner_team) { winner_team = 0; }
-               else { winner_team = NUM_TEAM_4; }
+               {
+                       if(winner_team) { winner_team = 0; }
+                       else { winner_team = NUM_TEAM_4; }
+               }
        }
        else
        {
@@ -429,13 +435,15 @@ MUTATOR_HOOKFUNCTION(inv, MonsterDies)
                if(teamplay) { inv_monsters_perteam[frag_target.team] -= 1; }
 
                if(IS_PLAYER(frag_attacker))
-               if(SAME_TEAM(frag_attacker, frag_target)) // in non-teamplay modes, same team = same player, so this works
-                       GameRules_scoring_add(frag_attacker, KILLS, -1);
-               else
                {
-                       GameRules_scoring_add(frag_attacker, KILLS, +1);
-                       if(teamplay)
-                               TeamScore_AddToTeam(frag_attacker.team, ST_INV_KILLS, +1);
+                       if(SAME_TEAM(frag_attacker, frag_target)) // in non-teamplay modes, same team = same player, so this works
+                               GameRules_scoring_add(frag_attacker, KILLS, -1);
+                       else
+                       {
+                               GameRules_scoring_add(frag_attacker, KILLS, +1);
+                               if(teamplay)
+                                       TeamScore_AddToTeam(frag_attacker.team, ST_INV_KILLS, +1);
+                       }
                }
        }
 }
index f8456734caa0f528e93b7b0b6b50cfdbfae3ef75..d33696ad3772a88fca49f0620dbb693eb0f4b792 100644 (file)
@@ -686,10 +686,12 @@ LABEL(not_winning)
                kh_interferemsg_time = 0;
                FOREACH_CLIENT(IS_PLAYER(it), {
                        if(it.team == kh_interferemsg_team)
+                       {
                                if(it.kh_next)
                                        Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_KEYHUNT_MEET);
                                else
                                        Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_KEYHUNT_HELP);
+                       }
                        else
                                Send_Notification(NOTIF_ONE, it, MSG_CENTER, APP_TEAM_NUM(kh_interferemsg_team, CENTER_KEYHUNT_INTERFERE));
                });
index 58582d290d5c65c36523ad72110626c0b1dcc8f9..e30d958a14261337a9d9f48934e7f0828aad6c87 100644 (file)
@@ -225,10 +225,12 @@ void lms_RemovePlayer(entity player)
        }
 
        if (CS(player).killcount != FRAGS_SPECTATOR && player.lms_spectate_warning < 3)
+       {
                if (GameRules_scoring_add(player, LMS_RANK, 0) > 0 && player.lms_spectate_warning < 2)
                        Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_LMS_NOLIVES, player.netname);
                else
                        Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_LMS_FORFEIT, player.netname);
+       }
 }
 
 MUTATOR_HOOKFUNCTION(lms, ClientDisconnect)
index 854e37e5eb71e81baa8646ebe6ebba139ca52d56..6ac6c7c4bd29d25dc009b154874764e93773839a 100644 (file)
@@ -679,10 +679,11 @@ void ons_ControlPoint_Touch(entity this, entity toucher)
        int attackable;
 
        if(IS_VEHICLE(toucher) && toucher.owner)
-       if(autocvar_g_onslaught_allow_vehicle_touch)
+       {
+               if (!autocvar_g_onslaught_allow_vehicle_touch)
+                       return;
                toucher = toucher.owner;
-       else
-               return;
+       }
 
        if(!IS_PLAYER(toucher)) { return; }
        if(STAT(FROZEN, toucher)) { return; }
@@ -1716,10 +1717,12 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
                for(tmp_entity = ons_worldcplist; tmp_entity; tmp_entity = tmp_entity.ons_worldcpnext)
                {
                        if(SAME_TEAM(tmp_entity, player))
-                       if(random_target)
-                               RandomSelection_AddEnt(tmp_entity, 1, 1);
-                       else if(vlen2(tmp_entity.origin - spawn_loc) <= vlen2(closest_target.origin - spawn_loc) || closest_target == NULL)
-                               closest_target = tmp_entity;
+                       {
+                               if(random_target)
+                                       RandomSelection_AddEnt(tmp_entity, 1, 1);
+                               else if(vlen2(tmp_entity.origin - spawn_loc) <= vlen2(closest_target.origin - spawn_loc) || closest_target == NULL)
+                                       closest_target = tmp_entity;
+                       }
                }
 
                if(random_target) { closest_target = RandomSelection_chosen_ent; }
index 31309f285d2756d02636f11752378c068ea591fc..66b23f6a6879160d00933705e17624553f5a2310 100644 (file)
@@ -259,10 +259,12 @@ MUTATOR_HOOKFUNCTION(rc, MakePlayerObserver)
        entity player = M_ARGV(0, entity);
 
        if(g_race_qualifying)
-       if(GameRules_scoring_add(player, RACE_FASTEST, 0))
-               player.frags = FRAGS_LMS_LOSER;
-       else
-               player.frags = FRAGS_SPECTATOR;
+       {
+               if(GameRules_scoring_add(player, RACE_FASTEST, 0))
+                       player.frags = FRAGS_LMS_LOSER;
+               else
+                       player.frags = FRAGS_SPECTATOR;
+       }
 
        race_PreparePlayer(player);
        player.race_checkpoint = -1;
index 10c3900408e1dd3cd818f9c2715729c5c52060b7..44a13522a4c5b348dcf0bb224c5775b342c72292 100644 (file)
@@ -166,21 +166,24 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
 
 
 #define G_MODEL_INIT(ent,sol) \
-       if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
+       if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
        if(!ent.scale) ent.scale = ent.modelscale; \
        SetBrushEntityModel(ent); \
        ent.use = g_model_setcolormaptoactivator; \
        InitializeEntity(ent, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
-       if(!ent.solid) ent.solid = (sol); else if(ent.solid < 0) ent.solid = SOLID_NOT;
+       if(!ent.solid) ent.solid = (sol); \
+       else if(ent.solid < 0) ent.solid = SOLID_NOT;
 
 #define G_CLIENTMODEL_INIT(ent,sol) \
-       if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
+       if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
        if(!ent.scale) ent.scale = ent.modelscale; \
        SetBrushEntityModel(ent); \
        ent.use = g_clientmodel_use; \
        InitializeEntity(ent, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
-       if(!ent.solid) ent.solid = (sol); else if(ent.solid < 0) ent.solid = SOLID_NOT; \
-       if(!ent.bgmscriptsustain) ent.bgmscriptsustain = 1; else if(ent.bgmscriptsustain < 0) ent.bgmscriptsustain = 0; \
+       if(!ent.solid) ent.solid = (sol); \
+       else if(ent.solid < 0) ent.solid = SOLID_NOT; \
+       if(!ent.bgmscriptsustain) ent.bgmscriptsustain = 1; \
+       else if(ent.bgmscriptsustain < 0) ent.bgmscriptsustain = 0; \
        Net_LinkEntity(ent, true, 0, g_clientmodel_genericsendentity); \
        ent.default_solid = sol;
 
index 91fa9cbda908509116acab6ed4c13adc022682cd..8ab37af13c8d26ad260238805cf2d4a287f431de 100644 (file)
@@ -727,11 +727,13 @@ bool bd_save_level(entity minigame)
                int target_count = 0, boulder_count = 0;
                entity piece = NULL;
                while((piece = findentity(piece,owner,minigame)))
-               if(piece.classname == "minigame_board_piece")
-                       if(piece.bd_tiletype == BD_TILE_BOULDER)
-                               ++boulder_count;
-                       else if(piece.bd_tiletype == BD_TILE_TARGET)
-                               ++target_count;
+                       if(piece.classname == "minigame_board_piece")
+                       {
+                               if(piece.bd_tiletype == BD_TILE_BOULDER)
+                                       ++boulder_count;
+                               else if(piece.bd_tiletype == BD_TILE_TARGET)
+                                       ++target_count;
+                       }
 
                if(boulder_count != target_count)
                {
@@ -1162,10 +1164,12 @@ string bd_turn_to_string(int turnflags)
                return _("Better luck next time!");
 
        if ( turnflags & BD_TURN_WIN )
+       {
                if(random() > 0.5)
                        return _("Tubular! Press \"Next Level\" to continue!");
                else
                        return _("Wicked! Press \"Next Level\" to continue!");
+       }
 
        if( turnflags & BD_TURN_EDIT )
                return _("Press the space bar to change your currently selected tile");
index b5b900b8a18a1d10fbf959368b92f8321f512db4..6850bd834ba40b0f3d4d3cd2af530e2670a6f354 100644 (file)
@@ -39,15 +39,19 @@ bool ps_tile_blacklisted(string tile)
        int number = minigame_tile_number(tile);
        int letter = minigame_tile_letter(tile);
        if(letter < 2)
+       {
                if(number < 2)
                        return true;
                else if(number > PS_NUM_CNT - 3)
                        return true;
+       }
        if(letter > PS_LET_CNT - 3)
+       {
                if(number < 2)
                        return true;
                else if(number > PS_NUM_CNT - 3)
                        return true;
+       }
 
        return false;
 }
index 004fbf92b659a8c5641f20f8eea173770c676771..0fd6c94ac01304520502cc84b1457f375ed0a0f7 100644 (file)
@@ -803,10 +803,12 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
 
                if(time > this.pain_finished && time > this.anim_finished) // TODO: use anim_finished instead!?
                if(!this.state)
-               if(vdist(this.velocity, >, 10))
-                       setanim(this, ((do_run) ? this.anim_run : this.anim_walk), true, false, false);
-               else
-                       setanim(this, this.anim_idle, true, false, false);
+               {
+                       if(vdist(this.velocity, >, 10))
+                               setanim(this, ((do_run) ? this.anim_run : this.anim_walk), true, false, false);
+                       else
+                               setanim(this, this.anim_idle, true, false, false);
+               }
        }
        else
        {
@@ -1112,10 +1114,12 @@ void Monster_Move_2D(entity this, float mspeed, bool allow_jumpoff)
        movelib_move_simple_gravity(this, v_forward, mspeed, 1);
 
        if(time > this.pain_finished && time > this.attack_finished_single[0])
-       if(vdist(this.velocity, >, 10))
-               setanim(this, this.anim_walk, true, false, false);
-       else
-               setanim(this, this.anim_idle, true, false, false);
+       {
+               if(vdist(this.velocity, >, 10))
+                       setanim(this, this.anim_walk, true, false, false);
+               else
+                       setanim(this, this.anim_idle, true, false, false);
+       }
 }
 
 void Monster_Anim(entity this)
index 95216fe548c1c9c6bfe9c5a2c53cff1ea0cd39d5..73c24576ce0f53aa23865cefabd940d449366184 100644 (file)
@@ -494,10 +494,12 @@ MUTATOR_HOOKFUNCTION(buffs, Damage_Calculate)
 
        if(STAT(BUFFS, frag_attacker) & BUFF_BASH.m_itemid)
        if(frag_force)
-       if(frag_attacker == frag_target)
-               frag_force *= autocvar_g_buffs_bash_force_self;
-       else
-               frag_force *= autocvar_g_buffs_bash_force;
+       {
+               if(frag_attacker == frag_target)
+                       frag_force *= autocvar_g_buffs_bash_force_self;
+               else
+                       frag_force *= autocvar_g_buffs_bash_force;
+       }
 
        if(STAT(BUFFS, frag_attacker) & BUFF_DISABILITY.m_itemid)
        if(frag_target != frag_attacker)
index 37fb5f0d524d78bc7b8180d049213ab407fd72da..b3ddc61cfa2ac3d37085d1abd07c5512a5d3c940 100644 (file)
@@ -961,10 +961,11 @@ bool turret_firecheck(entity this)
        {
                // To close?
                if (this.tur_dist_aimpos < this.target_range_min)
+               {
                        if(turret_validate_target(this, this.tur_impactent, this.target_validate_flags) > 0)
                                return true; // Target of opertunity?
-                       else
-                               return false;
+                       return false;
+               }
        }
 
        // Try to avoid FF?
index be8d468fa78dca4048312bc69df8fc4c52fe6c6f..e8dd2faa35dcb9d62aae4e4fbb77c4d0a7e87d5a 100644 (file)
@@ -643,10 +643,12 @@ void vehicles_painframe(entity this)
                        this.velocity += randomvec() * 30;
 
                if(this.vehicle_flags & VHF_DMGROLL)
+               {
                        if(this.vehicle_flags & VHF_DMGHEADROLL)
                                this.tur_head.angles += randomvec();
                        else
                                this.angles += randomvec();
+               }
        }
 }
 
@@ -730,11 +732,12 @@ void vehicles_damage(entity this, entity inflictor, entity attacker, float damag
        if(GetResourceAmount(this, RESOURCE_HEALTH) <= 0)
        {
                if(this.owner)
+               {
                        if(this.vehicle_flags & VHF_DEATHEJECT)
                                vehicles_exit(this, VHEF_EJECT);
                        else
                                vehicles_exit(this, VHEF_RELEASE);
-
+               }
 
                antilag_clear(this, this);
 
index e1be43af0d41f9826993c9b9a7e1dceb247b9e16..55e37c4d9271d0c2699aeff577d8262aedf4e21f 100644 (file)
@@ -77,10 +77,12 @@ void viewloc_SetTags(entity this)
                this.viewloc = NULL;
 
        if(this.viewloc.entnum != this.tag_networkviewloc)
-       if(this.tag_networkviewloc == 0)
-               this.viewloc = NULL;
-       else
-               this.viewloc = findfloat(NULL, entnum, this.tag_networkviewloc);
+       {
+               if(this.tag_networkviewloc == 0)
+                       this.viewloc = NULL;
+               else
+                       this.viewloc = findfloat(NULL, entnum, this.tag_networkviewloc);
+       }
 }
 
 vector CursorToWorldCoord(vector mpos)
index 784276ef46d8b63f2b1ce4f6c0ad4bee6c3ce4a1..e1fa34ccdfa1fc41b56a3dcba2824897182de82d 100644 (file)
@@ -533,10 +533,12 @@ void W_Seeker_Fire_Tag(Weapon thiswep, entity actor, .entity weaponentity)
 METHOD(Seeker, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
 {
     if(WEP_CVAR(seeker, type) == 1)
+    {
         if(W_Seeker_Tagged_Info(actor, weaponentity, actor.enemy) != NULL)
             PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR(seeker, missile_speed_max), 0, WEP_CVAR(seeker, missile_lifetime), false);
         else
             PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false);
+    }
     else
         PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false);
 }
index 2e9a60ab85157e68c9c946ea7857a318cd65579d..81b34e45d8d2e39f08aae4947363c632b454d203 100644 (file)
@@ -57,10 +57,12 @@ NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, bool isNew)
        particles_alphamin = particles_alphamax = particles_fade = charge;
 
        if(!MUTATOR_CALLHOOK(Particles_VortexBeam, shotorg, endpos))
-       if(autocvar_cl_particles_oldvortexbeam && (STAT(ALLOW_OLDVORTEXBEAM) || isdemo()))
-               WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
-       else
-               WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
+       {
+               if(autocvar_cl_particles_oldvortexbeam && (STAT(ALLOW_OLDVORTEXBEAM) || isdemo()))
+                       WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
+               else
+                       WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
+       }
        return true;
 }
 #endif
index 522f4f041cc49af4810c0f53fb2070f30c4e75e4..4c620c62fd0c55728b5726abba53b04d2d47aef8 100644 (file)
@@ -615,10 +615,12 @@ void InitGameplayMode()
                world.fog = string_null;
        }
        if(MapInfo_Map_fog != "")
+       {
                if(MapInfo_Map_fog == "none")
                        world.fog = string_null;
                else
                        world.fog = strzone(MapInfo_Map_fog);
+       }
        clientstuff = strzone(MapInfo_Map_clientstuff);
 
        MapInfo_ClearTemps();
@@ -1644,22 +1646,29 @@ void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true
 float GetWinningCode(float fraglimitreached, float equality)
 {
        if(autocvar_g_campaign == 1)
+       {
                if(fraglimitreached)
                        return WINNING_YES;
                else
                        return WINNING_NO;
-
+       }
        else
+       {
                if(equality)
+               {
                        if(fraglimitreached)
                                return WINNING_STARTSUDDENDEATHOVERTIME;
                        else
                                return WINNING_NEVER;
+               }
                else
+               {
                        if(fraglimitreached)
                                return WINNING_YES;
                        else
                                return WINNING_NO;
+               }
+       }
 }
 
 // set the .winning flag for exactly those players with a given field value
@@ -1729,19 +1738,20 @@ float WinningCondition_Scores(float limit, float leadlimit)
                        leaderfrags = WinningConditionHelper_topscore;
 
                        if (limit)
-                       if (leaderfrags == limit - 1)
-                               Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_1);
-                       else if (leaderfrags == limit - 2)
-                               Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_2);
-                       else if (leaderfrags == limit - 3)
-                               Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_3);
+                       {
+                               if (leaderfrags == limit - 1)
+                                       Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_1);
+                               else if (leaderfrags == limit - 2)
+                                       Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_2);
+                               else if (leaderfrags == limit - 3)
+                                       Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_3);
+                       }
                }
        }
 
        limitreached = false;
-       if(limit)
-               if(WinningConditionHelper_topscore >= limit)
-                       limitreached = true;
+       if (limit && WinningConditionHelper_topscore >= limit)
+               limitreached = true;
        if(leadlimit)
        {
                float leadlimitreached;