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

[0.3.6] Tv System (using packets) client crash

OrochiElf

New Member
Joined
Mar 8, 2013
Messages
21
Reaction score
0
Hello guys, i did an Tv System using the packets of server to client like a pxg, the system is 98%, but, when the player caster comes close of player spectator, the client of spectator crash (debug), saying than "the player should not be in this position"

likes a screenshot
2Ie81nk.jpg

An friend, said to me for delete the spectator of knowed creatures list, this is correct?

#OFF sorry my bad english, i know, is very bad, but i'm brazilian and i'm still learning kkk​
 
My crystal ball says:

"Dont have error in this code"

(post your code, nobody is vident here)
 
sorry bro, so, i'm using this code for load the screen of player caster​

Code:
void ProtocolGame::sendMapDescription(const Position& pos)
{
   NetworkMessage_ptr msg = getOutputBuffer();
   if(!msg)
     return;

   msg->AddByte(0x64);
   msg->AddPosition(pos);
   GetMapDescription(pos.x - 8, pos.y - 6, pos.z, 18, 14, msg);
}

and cloning the packets of player caster, like a Cast System, u know? using a protocolgame list. the crash only happens when the player caster comes close of spectator, because the client of this spectator already knows the himself creature id.

An example of how i'm cloning the packets of client caster.​
Code:
void sendCreatureDisappear(const Creature* creature, uint32_t stackpos)
{
   if(client)
   {
     client->sendRemoveCreature(creature, creature->getPosition(), stackpos);
     for(AutoList<ProtocolGame>::iterator it = tvSpectators.begin(); it != tvSpectators.end(); ++it)
       it->second->sendRemoveCreature(creature, creature->getPosition(), stackpos);
   }
}

sorry by my bad english :x
 
I paid dearly for this system the boy who made it to min Tony put a npc in place was the only way he thinks to fix it but I have another problem as this is very close to the viewer and to be changing pokemon without stopping falls the serve Xd
 
Last edited:
Back
Top