View Single Post
BoosterGold
Member
Join Date: Nov 2016
Old 02-19-2018 , 19:43   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #179

I noticed that on certain maps like de_cache or de_mirage, having to break vents or windows would give info to the defenders about where attackers were being spawned. This seemed like an unfair disadvantage, so I added the following to Event_RoundPostStart in retakes.sp:

PHP Code:
        int ent = -1;
        while ((
ent FindEntityByClassname(ent"func_breakable")) != -1) {
            
AcceptEntityInput(ent"kill");
        }
        while ((
ent FindEntityByClassname(ent"prop_dynamic")) != -1) {
            
AcceptEntityInput(ent"fadeandkill");
        } 
This code takes every func_breakable and removes it, and fades away all prop_dynamics on the map. On Cache, this removes the breakable vents to B and the breakable glass between the site and Sunroom (actually, all of the cosmetic breakable glass too, but this shouldn't matter). On Mirage, this removes the breakable panels from ladder -> window and CT -> window, as well as the breakable wooden window from Market to B Site.

I haven't YET noticed any issues on other maps with killing all of the func_breakables and prop_dynamics from the start, but if anything arises perhaps it will have to be made more complicated to make sure it's not breaking stuff it shouldn't be.

Credits to splewis for this, as I originally borrowed his code from his practice plugin to make this happen.
BoosterGold is offline