Open GoogleCodeExporter opened 9 years ago
Actually, making the above changes has the side-effect of transferring all
players to one team on the next round. It'll have to be looked into, but you
get the idea!
Original comment by aangi...@gmail.com
on 16 Nov 2012 at 2:50
What happens if you comment just this line in CvarsHookRestartGame?
//SetConVarInt(cvar, 0);
Team balancing is done at the end of a round, so if mp_restartgame doesn't
trigger a round end event players won't be balanced next round. That might be
why ZR block it and just restart the round itself. I don't know what
mp_restartgame does in detail or which events that are triggered.
If unbalanced teams is the only issue after removing that code, we could
probably try another approach so that teams will be balanced after any
interruption. Perhaps just balance teams when that command is executed. You
could try make a call to RoundEndBalanceTeams from CvarsHookRestartGame instead
of terminating the round, and commenting that line mentioned above so it's not
blocked. Something like this, if it works:
public CvarsHookRestartGame(Handle:cvar, const String:oldvalue[], const
String:newvalue[])
{
new Float:delay = StringToFloat(newvalue);
if (delay <= 0)
{
return;
}
RoundEndBalanceTeams();
}
There's no doubt that ZR is poor at handling unexpected interruptions in the
middle of a round.
Original comment by richard.helgeby@gmail.com
on 20 Nov 2012 at 7:02
> What happens if you comment just this line in CvarsHookRestartGame?
//SetConVarInt(cvar, 0);
I tried this shortly after my last comment and it does indeed work. I think the
round is still ending twice, so your solution with RoundEndBalanceTeams might
fix that as well.
> I don't know what mp_restartgame does in detail or which events that are
triggered.
It skips the round_end event and goes straight to round_start. A real pain for
plugins.
Original comment by aangi...@gmail.com
on 20 Nov 2012 at 8:27
Original issue reported on code.google.com by
aangi...@gmail.com
on 16 Nov 2012 at 12:11