• 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!

C++ +9 players in some stack debug

Joined
Aug 15, 2014
Messages
143
Reaction score
24
In my server when the players stack in the same sqm when the number 10 go on in stepin the last one takes debug.
When someone in stack of +9 players logout all clientes in stack takes debug too.

Can someone explain to me why this happens and how I can avoid?
Thanks guys.


I do a video explain the bug (sorry br language):
 
if is very urgent try this

View attachment 75908

Lua:
if (!player->canSeeCreature(creature))
   return;


I recommend that you 𝔀𝓪𝓲𝓽 𝓯𝓸𝓻 𝓢𝓪𝓻𝓪𝓱'𝓼 𝓼𝓸𝓵𝓾𝓽𝓲𝓸𝓷 xd. i'm not good at c++

Test gm ghost mode moving near of player✅
i need to try with the monster ghost mode
there's a new commit?
 
there's a new commit?
this is a resume of sarah's commits made by error 502
𝓕𝓘𝓧 𝓑𝓨 𝓢𝓪𝓻𝓪𝓱 𝓦𝓮𝓼𝓴𝓮𝓻 -- 𝓜𝓲𝓵𝓵𝓱𝓲𝓸𝓻𝓮𝓑𝓣
𝔁𝓭



@ForgottenNot
View attachment 75895
after that, emil reported a bug caused by ghosted GM's and creatures
with that commit fix, i found that if player stand in same spot as gm that has ghostmode active, the player gets debug after gm steps away, also seem to happen when monster moves while they are invisible. someone can confirm?
then error 502 tried this fix for it, but it need testings (specifically on invisible creatures)
View attachment 75908

Lua:
if (!player->canSeeCreature(creature))
   return;
so we're in a point that we don't know yet if this is going to solve invisible creatures issue. I'm looking forward to this thread, unfortunatelly can't contribute right now with testings (I don't want to use it as an excuse, but I'm a little short on time). Thanks everyone involved for keeping an eye on this ^^
 
if is very urgent try this

View attachment 75908

Lua:
if (!player->canSeeCreature(creature))
   return;


I recommend that you 𝔀𝓪𝓲𝓽 𝓯𝓸𝓻 𝓢𝓪𝓻𝓪𝓱'𝓼 𝓼𝓸𝓵𝓾𝓽𝓲𝓸𝓷 xd. i'm not good at c++

Test gm ghost mode moving near of player✅
i need to try with the monster ghost mode
I already solved the GM problem, I had simply eliminated something that I shouldn't have, I already added the IF that I had before.
 

+

which one should we use? or i should add both commits¿?

edit: i read it again and now i get it. thanks!

2 edit: don't know which of the commits where giving me errors in protocolgame.cpp, here:
Code:
        } else if (canSee(oldPos) && canSee(creature->getPosition())) {
        if (teleport || (oldPos.z == 7 && newPos.z >= 8) || oldStackPos >= MAX_STACKPOS_THINGS) {
            sendRemoveTileThing(oldPos, oldStackPos);
            sendAddCreature(creature, newPos, newStackPos, false);

so i did this:
Lua:
sendAddCreature(creature, newPos, newStackPos, false);
to
Code:
[CODE=lua]sendAddCreature(creature, newPos, newStackPos);

would be this ok? is there another fix ?

edit: i have tested the code and the behavior when a player is stepping out of the stack looks weird, it looks like the player is being pushed out, there is no movement in looktype or like a gamemaster walking with ctrl + arrow in old tfs

this walking issue occurs when there are 6 or more people stacked

EDIT AFTER TESTING WITH THE COMMITS:
I have tested this fix + this one MillhioreBT/forgottenserver-downgrade@881ba57
i figured out that when there 6 or more people stacked when the last one want or other player want to move out from stack there is a graphical issue, and the players walks very weird
here you can see a video
OTCv8 - Paladini 2023-07-11 09-10-00 (https://vimeo.com/844233136?share=copy)

also don't know the reason but i had to change this
sendAddCreature(creature, newPos, newStackPos, false);
to thissendAddCreature(creature, newPos, newStackPos);

because i was having compilation errors
 
Last edited:
up!
any solution for the problemthat has appeared after the two commits that fixes the crash?
try that on cipsoft client aswell if it bugs or not. If cipsoft client bugs too the bug is caused on client-side
I don't think I can help more than this but it's something you can do atm ^^
 
try that on cipsoft client aswell if it bugs or not. If cipsoft client bugs too the bug is caused on client-side
I don't think I can help more than this but it's something you can do atm ^^
The crash is not there anymore but there is a walking problem while you get a step out of the stack
OTCv8 - Paladini 2023-07-11 09-10-00 (https://vimeo.com/844233136?share=copy) // here you could see that while you are getting out of the stack the player walk in an strange way the first two sqm
 
I'm using Nekiro TFS1.5 for 8.60 and I had the same issue.
I fixed it, it's not bealty and not show the walking effect when exit the stack and it ins't the better performance possible for network, but not crashs the client anymore.

The problem here is that the client 8.60 aways crash if get an stack value greater than 10.

The original file crashs the client when:
1: If you see an stack of 10+ creatures.
2: Walk in/out a stack of 10+ creatures.
3: Kill the stack at once.
4: See creatures after stack 10 turning around.

I simple limited the protocolgame to not send anything when the stack is more than 10.
I tested my server with 12 players stack, 12 monsters stacks and a stack mixed of monster and players.
If you found any other bug, PLEASE TELL ME!

Know bug (that I not fixed yet):
The stack order not changes when a new player enter. The expected behavior is the player from stack 9 becomes invisible and the new player get the stack value of 1.
Here the file:

I also added the original file and them edited to the new file. You can view the changes at commits on GitHub:
 
I'm using Nekiro TFS1.5 for 8.60 and I had the same issue.
I fixed it, it's not bealty and not show the walking effect when exit the stack and it ins't the better performance possible for network, but not crashs the client anymore.

The problem here is that the client 8.60 aways crash if get an stack value greater than 10.

The original file crashs the client when:
1: If you see an stack of 10+ creatures.
2: Walk in/out a stack of 10+ creatures.
3: Kill the stack at once.
4: See creatures after stack 10 turning around.

I simple limited the protocolgame to not send anything when the stack is more than 10.
I tested my server with 12 players stack, 12 monsters stacks and a stack mixed of monster and players.
If you found any other bug, PLEASE TELL ME!

Know bug (that I not fixed yet):
The stack order not changes when a new player enter. The expected behavior is the player from stack 9 becomes invisible and the new player get the stack value of 1.
Here the file:

I also added the original file and them edited to the new file. You can view the changes at commits on GitHub:
going to test thank you
 
Back
Top