SirPlease / L4D2-Competitive-Rework

Just refreshing and optimizing the core files a bit, eh?
GNU General Public License v3.0
242 stars 131 forks source link

l4d_tank_rush completion score bug #49

Closed devilesk closed 4 years ago

devilesk commented 4 years ago

l4d_tank_rush.smx has a bug where if survivors die to a 2nd round tank, then the max points for the next map will be set to the max points of the previous map. Maps that have a max_distance defined in mapinfo are not affected by this bug.

For example, if survivors die to a 2nd round tank on Dead Air map 4, then Dead Air map 5 finale will have its max points set to 500 (map 4's max points) instead of 800.

The bug is due to the plugin reseting the second half flag OnMapStart which happens after the round_start event handler

The plugin isn't enabled in any of the current configs, but it is still in the apex and zonemod plugin folders. I came up with a fix for this bug and put it in this gist https://gist.github.com/devilesk/3d85f1d65bd23d28cb8dd0fd50b75f8d It removes tracking the round half with a bSecondRound variable and just calls the InSecondHalfOfRound stock from l4d2util instead. The IsTank function is also removed because l4d2util provides one.

SirPlease commented 4 years ago

I appreciate you reporting this, as you've said this plugin is currently not used in any of the included configs but I'll add the plugin to the optional plugins folder as the plan is to eventually get rid of all the separated folders.