B3none / cs2-retakes

CS2 implementation of retakes. Based on the version for CS:GO by Splewis.
GNU General Public License v3.0
192 stars 38 forks source link

Why is mp_roundtime_defuse 1.92 hardcoded? #88

Closed fredmatix closed 7 months ago

fredmatix commented 8 months ago

Hi

On line 948 in the RetakesPlugin.cs you declare the CVAR to be 1.92. When disabling autoplant you have full 2 minutes to run to the other bombspot. Why do you define it in the code, when we already have the ability to declare it in the configfile?

private void HandleAutoPlant() { // Ensure the round time for defuse is always set to 1.92 Server.ExecuteCommand("mp_roundtime_defuse 1.92");

B3none commented 8 months ago

Well spotted, make a PR to make that only happen if autoplant is enabled 👍

fredmatix commented 8 months ago

Okay we tested it without the Line Server.ExecuteCommand("mp_roundtime_defuse 1.92"); So far everything is working, due to the fact, that we set the mp_roundtime_defuse to 0.25 via the configfile of the plugin. I dont think that you need to hardcode the CVAR at all. Or am I missing something? If not I would just leave this particular line away and rely on the configfile fully.

B3none commented 7 months ago

I’ve removed the line you mentioned: https://github.com/B3none/cs2-retakes/commit/ebaf8efc95e4c0d0fb1d2344c6f677179b5ddd8b