ManaPlus
Functions
TmwAthena::GameRecv Namespace Reference

Functions

void processMapLogin (Net::MessageIn &msg)
 

Function Documentation

◆ processMapLogin()

void TmwAthena::GameRecv::processMapLogin ( Net::MessageIn msg)

Definition at line 42 of file gamerecv.cpp.

43 {
44  unsigned char direction;
45  uint16_t x;
46  uint16_t y;
47  msg.readInt32("tick");
48  msg.readCoordinates(x, y, direction, "position");
49  msg.readInt16("unknown?");
50  logger->log("Protocol: Player start position: (%d, %d),"
51  " Direction: %d", x, y, direction);
52 
53  mLastHost &= 0xffffff;
54 
55  Network *const network = Network::mInstance;
56  if (network != nullptr)
57  network->pauseDispatch();
58 
59  // Switch now or we'll have problems
61  if (localPlayer != nullptr)
63 }
void setState(const StateT state)
Definition: client.h:66
void setTileCoords(const int x, const int y)
void log(const char *const log_text,...)
Definition: logger.cpp:269
Client * client
Definition: client.cpp:118
unsigned int mLastHost
Definition: client.cpp:136
LocalPlayer * localPlayer
Logger * logger
Definition: logger.cpp:89
bool msg(InputEvent &event)
Definition: chat.cpp:39
@ GAME
Definition: state.h:49

References client, State::GAME, localPlayer, Logger::log(), logger, TmwAthena::Network::mInstance, mLastHost, Actions::msg(), Ea::Network::pauseDispatch(), Client::setState(), LocalPlayer::setTileCoords(), x, and y.