dataviruset / sm-hosties

The ultimate jailbreak plugin for SourceMod
https://forums.alliedmods.net/forumdisplay.php?f=155
GNU General Public License v3.0
29 stars 27 forks source link

Prevent T's From LR'ing during warmup. #62

Closed DrKittens closed 7 years ago

DrKittens commented 7 years ago

Prevents a T starting an LR in warmup. If a T starts an LR in warmup it continues into the first round as there is no code in place to reset this which has obvious negative/unforseen effects. (like a T been in 2 different LR's at the same time..) This is a quick/lazy fix that prevents them opening the menu to start the LR.

PR is registering every line with different indentation as a new line, the only new lines are 2910-2911 and an extra "else" at 2963-2966

This isnt resolved by merely adding an extra ClosePotentialLRMenus(); at the end of LastRequest_RoundStart. Original code written by JJ a long time ago, just submitting this as a PR after asking so when i rebase private stuff against this there are less conflicts..

data-bomb commented 7 years ago

There is already code to reset all active LRs manually via admin command. But I don't understand the entry condition. Are typical servers using a warmup timer on CSGO? Has this PR been tested on CSS? Also, a PR should not be changing any indentation.

Sent from my iPhone

On Nov 14, 2016, at 11:06, DrKittens [Masked] wrote:

Preview: Prevents a T starting an LR in warmup. If a T starts an LR in This email is forwarded from a MASKED EMAIL you created using Blur. IF THIS IS SPAM, CLICK HERE TO BLOCK.

Want to shop safely and privately online? Get Blur Premium.

Prevents a T starting an LR in warmup. If a T starts an LR in warmup it continues into the first round as there is no code in place to reset this which has obvious negative/unforseen effects. This is a quick/lazy fix that prevents them opening the menu to start the LR.

PR is registering every line where i changed indentation as a new line, the only new lines are 2910-2911 and an extra "else" at 2963-2966

You can view, comment on, or merge this pull request online at:

https://github.com/dataviruset/sm-hosties/pull/62

Commit Summary

Prevent LR'ing during warmup. Delete lastrequest.sp Prevent LR'ing During Warmup Add files via upload File Changes

M addons/sourcemod/scripting/hosties/lastrequest.sp (58) Patch Links:

https://github.com/dataviruset/sm-hosties/pull/62.patch https://github.com/dataviruset/sm-hosties/pull/62.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

DrKittens commented 7 years ago

Untested in CSS, good question about that actually. Cant answer whether its typical of servers to have a warmup timer in CSGO.

In the event where an admin is not on to use an admin command this is an issue, the indentation that changes is due to a new if/else bracket been added, it would look ugly not to do it, i could add the check later i guess? Didn't really look for a style guide for this project.

Feel free to deny it as it is an inelegant solution for an edge case ;p Call it a bug report then ;)

/e: A better PR would be one that cancels all the LR's on round_start & round_end /e2: Made the "better pr" still probably overkill as LR's get killed in roundend which makes this roundstart thing redundant/bad code. Best fix would be a boolean to determine if warmup happened, and if it did then run the LR cleanup on roundstart once.

Or just moving ClearArray(gH_DArray_LR_Partners); ClearArray(gH_DArray_Beacons);

to roundstart instead of roundend.

Im sleepy and im not that familiar with this plugin/its functionality and i apologize for coming in like a wrecking ball ;p