Quote:
Originally Posted by sumguy14
mbalex, what do you mean people are getting team kills for switching teams when the round ends?
Why would they get -50 for switching teams? ZR doesn't force them to suicide?
And furthermore, how does delaying it half a second fix it? I'm workin' on this atm so I need specifics to fix it.
|
1. the last man got zombified
2. you check if there are people left in either teams.. if no, you eventually get to the following...
3. you call balance teams, which could change the last man and the attacker of the last man to the same team.
4. you finish your function and let the rest of the system do its thing.
5. hlstats is under this rests, figures out you just made a teamkill and sends that information to the hlstats collector.. and you get -50 points (the default) for killing a teammate.
i changed the team balance so that it's actually creating a timer, which is called after 0.5 sec later. this timer then just balances the team. now hlstats doesn't see the last kill as a teamkill and you dont get the penalty.
you might be able to just make a posthook instead of a prehook and run the team balance there.
i guess a posthook would work too for switching a zombified/killer player to another team and therefore avoiding the teamkiller quakesound bug, while still allowing the system to do its thing.
UPDATE: Can you pls allow the deactivation of all score updates? Our admins on the server still see some poeple with +/- 2000 kills. I think this is a problem of srcds, and the best thing is to avoid it by not setting/getting the scores at all. An alternative would be if you count the kills/deaths in your own arrays, and therefore only set the scores(kill/death), that would allow the score to be redrawn correctly if it changes. Instead of having scores like 20, 2000 and then 2001 it would be like 20, 2000, 22.
bye mb