void CMessageHoundCharge::deserialize(Net::CBuffer& buffer) { buffer.read( &_isActive, sizeof(_isActive) ); // Solo si la habilidad esta activa se mandan el resto // de los atributos if(_isActive) { buffer.read( &_filterMask, sizeof(_filterMask) ); buffer.read( &_force, sizeof(_force) ); } }
void CMessageInt::deserialize(Net::CBuffer &data) { CMessage::deserialize(data); data.read(&_int, sizeof(_int)); } // deserialize
void CMessageBool::deserialize(Net::CBuffer &data) { CMessage::deserialize(data); data.read(&_bool, sizeof(_bool)); } // deserialize
void CMessageSetOwner::deserialize(Net::CBuffer& buffer) { TEntityID id; // Por problemas con enumerados utilizamos directamente // el read en vez del deserialize buffer.read( &id, sizeof(id) ); _entity = Logic::CServer::getSingletonPtr()->getMap()->getEntityByID(id); }
void CMessageTF::deserialize(Net::CBuffer &data) { CMessage::deserialize(data); for(int i = 0; i < 4; ++i) for(int j = 0; j < 4; ++j) data.read(&_transform[i][j], sizeof(_transform[i][j])); } // deserialize
void CMessageAudio::deserialize(Net::CBuffer &data) { unsigned int size; data.read(&size, sizeof(size)); char* aux = new char[size]; data.read(aux, size); _path.assign(aux,size); delete[] aux; unsigned int size1; data.read(&size1, sizeof(size1)); char* aux1 = new char[size1]; data.read(aux1, size1); _id.assign(aux1,size1); delete[] aux1; data.read(&_position.x, sizeof(_position.x)); data.read(&_position.y, sizeof(_position.y)); data.read(&_position.z, sizeof(_position.z)); data.read(&_notIfPlay, sizeof(_notIfPlay)); data.read(&_isPlayer, sizeof(_isPlayer)); }
void CMessageControl::deserialize(Net::CBuffer& buffer) { buffer.deserialize(_seq); buffer.read(&_controlType, sizeof(_controlType)); }