CLIENT: extract to local vars + doxygen
parent
041f5f1f2f
commit
77db0c4adc
|
@ -7,5 +7,6 @@
|
|||
#include "IClientProtocolHandler.h"
|
||||
|
||||
CLIENTPROTOHANDLERIMPL(EntityRemove) {
|
||||
client->entityRemove(message->id());
|
||||
const frontend::ClientEntityId id = message->id();
|
||||
client->entityRemove(id);
|
||||
}
|
||||
|
|
|
@ -7,13 +7,12 @@
|
|||
#include "IClientProtocolHandler.h"
|
||||
|
||||
/**
|
||||
* Updates your own client
|
||||
* Updates @c frontend::ClientEntity instances identified by the given @c frontend::ClientEntityId
|
||||
*/
|
||||
CLIENTPROTOHANDLERIMPL(EntityUpdate) {
|
||||
const network::messages::Vec3 *pos = message->pos();
|
||||
if (pos == nullptr) {
|
||||
return;
|
||||
}
|
||||
const glm::vec3 entityPos(pos->x(), pos->y(), pos->z());
|
||||
client->entityUpdate(message->id(), entityPos, message->rotation());
|
||||
const frontend::ClientEntityId id = message->id();
|
||||
const network::messages::Vec3 *_pos = message->pos();
|
||||
const glm::vec3 pos(_pos->x(), _pos->y(), _pos->z());
|
||||
const float orientation = message->rotation();
|
||||
client->entityUpdate(id, pos, orientation);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue