shanapu / MyJailbreak

A rewrite of Franugs Special Jailbreak and merge of eccas, ESK0s & zipcores Jailbreak Warden
https://forums.alliedmods.net/showthread.php?t=283212
GNU General Public License v3.0
52 stars 36 forks source link

Swap guard when the warmup ends #313

Open Hexer10 opened 6 years ago

Hexer10 commented 6 years ago

In the current state if there is no one in the ctteam when the warmup ends (and they dont swap using the teamenu), even if the guard queue is not empty no one will be swapped, and we need to restart the round in order to make the ratio work properly.

Hexer10 commented 6 years ago

I'm having issues to check when the warmup ends, csgo does not have any event to hook for the warmup end, I thought to create a timer that as duration has the mp_warmup_time value, but then we would need to know when all the players join and the warmup is raised down... or we could make that if there arent enought guards during the warmup, as soon as someone uses /guard (or aliases), it will be instantly swapped.

Any suggestions or ideas?

shanapu commented 6 years ago

try https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events#round_announce_warmup https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events#round_announce_match_start

the first event wasn't documented in wiki before but is 'used' here: https://github.com/gamemedev/plugin-sourcemod/blob/c175e9e52eff25a73ffebe3bb8d6c04a5e1aa6e4/scripting/gameme.sp#L1109-L1110

Hexer10 commented 6 years ago

I've tried both, the first one is being called when the only warmup starts, and the second event is called when the freeze time ends, unfortunately that's not what we're looking for

EDIT: I've found a workaround, I've used that in the last commit, it would be nice if you could check it out

shanapu commented 6 years ago

Havn't test it, but looks good! Thank you! Finally get a rid of this pregame/warmup hiccup.