• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Bug in Wait List tfs 1.3 downgraded 8.6

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,188
Solutions
34
Reaction score
200
I put maxPlayers = 80 in config.lua
but when server have 60 players, all new player get wait list. So dont work this config in config.lua.

edit: I realized that over time the wait list increases and the number of allowed online players decreases, for example now there are 18 players on the wait list and the number of online players has been reduced to 50

edit II: i think error is on function that "clean" wait list, because player get ex number 15 in wait list, and when it finishes loading, he logs into the game (and I also don't think there are really 15 people in the queue)

1589767499607.png

edit III: confirmed, i put maxPlayerOnline == 1, so i logged 2 Gm's, and try to log with a player (he get a place 2 on the list). Now i logout with 2 Gm's, and dont have nobody online, and player stay in place 2 in the list.
waitlist.cpp


found this topic with same error:
 
Last edited:
Solution
Just took a quick look at it and I'm surprised that anybody even accepted the changes rainsalt made in 2017 to waitlist.
But it is a great example why disabling warnings in definitions.h are extremely bad thing.
C++:
void cleanupList(WaitList& list)
{
    int64_t time = OTSYS_TIME();

    auto it = list.begin(), end = list.end();
    while (it != end) {
        if ((it->timeout - time) <= 0) {
            it = list.erase(it);
        } else {
            ++it;
        }
    }
}
Because timeout variable is unsigned the waitlist will never progress(probability that this function will be called when the subtraction will result in 0 is practically 0%).
The only way to progress the waitlist is when the guy in first slot enter the game.
Just took a quick look at it and I'm surprised that anybody even accepted the changes rainsalt made in 2017 to waitlist.
But it is a great example why disabling warnings in definitions.h are extremely bad thing.
C++:
void cleanupList(WaitList& list)
{
    int64_t time = OTSYS_TIME();

    auto it = list.begin(), end = list.end();
    while (it != end) {
        if ((it->timeout - time) <= 0) {
            it = list.erase(it);
        } else {
            ++it;
        }
    }
}
Because timeout variable is unsigned the waitlist will never progress(probability that this function will be called when the subtraction will result in 0 is practically 0%).
The only way to progress the waitlist is when the guy in first slot enter the game.
 
Solution
Just took a quick look at it and I'm surprised that anybody even accepted the changes rainsalt made in 2017 to waitlist.
But it is a great example why disabling warnings in definitions.h are extremely bad thing.
C++:
void cleanupList(WaitList& list)
{
    int64_t time = OTSYS_TIME();

    auto it = list.begin(), end = list.end();
    while (it != end) {
        if ((it->timeout - time) <= 0) {
            it = list.erase(it);
        } else {
            ++it;
        }
    }
}
Because timeout variable is unsigned the waitlist will never progress(probability that this function will be called when the subtraction will result in 0 is practically 0%).
The only way to progress the waitlist is when the guy in first slot enter the game.
so possibly this bug is in the default tfs?
thought it existed only in the tfs downgraded for 8.6x
 
Just took a quick look at it and I'm surprised that anybody even accepted the changes rainsalt made in 2017 to waitlist.
But it is a great example why disabling warnings in definitions.h are extremely bad thing.
C++:
void cleanupList(WaitList& list)
{
    int64_t time = OTSYS_TIME();

    auto it = list.begin(), end = list.end();
    while (it != end) {
        if ((it->timeout - time) <= 0) {
            it = list.erase(it);
        } else {
            ++it;
        }
    }
}
Because timeout variable is unsigned the waitlist will never progress(probability that this function will be called when the subtraction will result in 0 is practically 0%).
The only way to progress the waitlist is when the guy in first slot enter the game.

Yep Ranisalt AKA @Lordfire made the changes, this bug still there i try to fix but i dont have the expertice :/

my threat stay unsolved, if someone can fix this, i give 10 USD paypal.
Post automatically merged:

OMG @fabian766 i see your banner an see The Forgotten Client Project(work in progress) in github look nice 😱 and TFS Optimized. looks great!
so possibly this bug is in the default tfs?
thought it existed only in the tfs downgraded for 8.6x

Yep is in master Branch TFS, not only tfs downgraded for 8.6x
 
Last edited:
Yep Ranisalt AKA @Lordfire made the changes, this bug still there i try to fix but i dont have the expertice :/

my threat stay unsolved, if someone can fix this, i give 10 USD paypal.
Post automatically merged:

OMG @fabian766 i see your banner an see The Forgotten Client Project(work in progress) in github look nice 😱 and TFS Optimized. looks great!


Yep is in master Branch TFS, not only tfs downgraded for 8.6x
this guy is a genius, I don't know why his tfs is not disclosed.
Post automatically merged:

Yep Ranisalt AKA @Lordfire made the changes, this bug still there i try to fix but i dont have the expertice :/

my threat stay unsolved, if someone can fix this, i give 10 USD paypal.
Post automatically merged:

OMG @fabian766 i see your banner an see The Forgotten Client Project(work in progress) in github look nice 😱 and TFS Optimized. looks great!


Yep is in master Branch TFS, not only tfs downgraded for 8.6x
think you can donate for him, look a fix:
i'll test and will donate too
 
Last edited:
Last edited:
this guy is a genius, I don't know why his tfs is not disclosed.
Maybe because I don't look for recognition? Especially not in this community where everyone is experts(atleast in theory seeing what they write on forum xD) and they can't even fix something so simple as this problem with waitlist in 3 years.

Thanks @fabian766 get 10 USD 🥳 👍
Thanks, but you didn't have to.
 
Maybe because I don't look for recognition? Especially not in this community where everyone is experts(atleast in theory seeing what they write on forum xD) and they can't even fix something so simple as this problem with waitlist in 3 years.


Thanks, but you didn't have to.
I prefer to believe that they didn't know about this bug, because if they did, it doesn't make sense to last 3 years, something that you solved in 5 ~ 10 minutes.
Now that they have the solution, in 1 or 2 years they should pass the solution to the default tfs.
THX a lot man!!
 
Back
Top