forked from mirrors/kolyah35-minecraft-pe-0.6.1
i
This commit is contained in:
parent
f93521a879
commit
f1ff828027
4 changed files with 52 additions and 5 deletions
|
|
@ -448,7 +448,7 @@ void ClientSideNetworkHandler::handle(const RakNet::RakNetGUID& source, TakeItem
|
|||
|
||||
LOGI("TakeItemPacket\n");
|
||||
|
||||
ItemInstance* item;
|
||||
ItemInstance* item = new ItemInstance();
|
||||
|
||||
item->count = packet->count;
|
||||
item->id = packet->itemId;
|
||||
|
|
|
|||
|
|
@ -357,8 +357,6 @@ void ServerSideNetworkHandler::onReady_ClientGeneration(const RakNet::RakNetGUID
|
|||
#else
|
||||
LOGW("%s joined the game\n", newPlayer->name.c_str());
|
||||
#endif
|
||||
PluginsManager::get().emit("PlayerJoin", LuaPlayer(source));
|
||||
|
||||
// Send all Entities to the new player
|
||||
for (unsigned int i = 0; i < level->entities.size(); ++i) {
|
||||
Entity* e = level->entities[i];
|
||||
|
|
@ -414,6 +412,8 @@ void ServerSideNetworkHandler::onReady_ClientGeneration(const RakNet::RakNetGUID
|
|||
bitStream.Reset();
|
||||
AddPlayerPacket(newPlayer).write(&bitStream);
|
||||
rakPeer->Send(&bitStream, HIGH_PRIORITY, RELIABLE_ORDERED, 0, source, true);
|
||||
|
||||
PluginsManager::get().emit("PlayerJoin", LuaPlayer(source));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue