Server is ready to send

This commit is contained in:
2016-03-27 11:04:53 +11:00
parent 4ced27a905
commit cbf8538c24
6 changed files with 26 additions and 6 deletions
+8
View File
@@ -169,6 +169,14 @@ void copyCharacterToPacket(CharacterPacket* const packet, CharacterData* const c
packet->bounds = characterData->GetBounds();
}
void copyCreatureToPacket(CreaturePacket* const packet, CreatureData* const creatureData, int creatureIndex) {
packet->creatureIndex = creatureIndex;
strncpy(packet->avatar, creatureData->GetAvatar().c_str(), PACKET_STRING_SIZE);
packet->origin = creatureData->GetOrigin();
packet->motion = creatureData->GetMotion();
packet->bounds = creatureData->GetBounds();
}
void pumpAndChangeRooms(int characterIndex, int newRoomIndex) {
//get the character object
CharacterData* character = CharacterManager::GetSingleton().Get(characterIndex);