1 (edited by scosu 2008-10-04 09:46:38)

Topic: perhaps problems with votings?

Hi

i just had a look over your voting system. I saw two things that could make problems, don't know exactly:
1. The wrong player could be kicked. If the player who should be kicked leaves the game and a new player joines the game, the new player gets often the same id. So at the end of the vote the new player is kicked.
2. At nearly every vote not all people give a vote. If you need total_players/2+1 positive votes there are not very often positive votes.

And there is just another thing: Perhaps you could set the voted map in front of a map-queue and end the round, so that there is a result before changing the map?
possible solution:? http://www.teeworlds.com/forum/viewtopic.php?pid=22608

I don't know these things exactly because i didn't wrote the code, i only want to help before a release.

Another question: Why do you use so many constants? Like the vote time?

A very nice code cleanup. You find things faster with those more files smile.

2

Re: perhaps problems with votings?

scosu wrote:

1. The wrong player could be kicked. If the player who should be kicked leaves the game and a new player joines the game, the new player gets often the same id. So at the end of the vote the new player is kicked.

Nice.

scosu wrote:

2. At nearly every vote not all people give a vote. If you need total_players/2+1 positive votes there are not very often positive votes.

I'm not sure what you're saying here. I haven't looked at the code myself, but once the vote starts, by default everybodys vote is "no", and then you can toggle your vote to "yes" or "no" until the vote ends. If there is not very often positive votes, then that would be, because people didn't want to vote yes.

scosu wrote:

Another question: Why do you use so many constants? Like the vote time?.

Again, I haven't looked at this specific bit of code, but there are magic numbers everywhere. Extreme amounts of them.