This commit is contained in:
aozhiwei 2020-05-29 19:58:58 +08:00
parent 84444872f2
commit 50c77d217e

View File

@ -2337,41 +2337,6 @@ a8::Vec2 Room::GetDefaultBornPoint()
return pos;
}
void Room::AddToEntityHash(Entity* entity)
{
uniid_hash_[entity->entity_uniid] = entity;
}
void Room::AddToHumanHash(Human* hum)
{
human_hash_[hum->entity_uniid] = hum;
}
void Room::AddToAliveHumanHash(Human* hum)
{
alive_human_hash_[hum->entity_uniid] = hum;
}
void Room::AddToMoveableHash(MoveableEntity* entity)
{
moveable_hash_[entity->entity_uniid] = entity;
}
void Room::AddToAccountHash(Player* hum)
{
accountid_hash_[hum->account_id] = hum;
}
void Room::AddToLaterAddHash(RoomEntity* entity)
{
later_add_hash_[entity->entity_uniid] = entity;
}
void Room::AddToRemovedRobotHash(Human* hum)
{
removed_robot_hash_[hum->entity_uniid] = hum;
}
void Room::AddPlayerPostProc(Player* hum)
{
if (room_type_ == RT_NewBrid) {
@ -2422,6 +2387,41 @@ void Room::AddPlayerPostProc(Player* hum)
#endif
}
void Room::AddToEntityHash(Entity* entity)
{
uniid_hash_[entity->entity_uniid] = entity;
}
void Room::AddToHumanHash(Human* hum)
{
human_hash_[hum->entity_uniid] = hum;
}
void Room::AddToAliveHumanHash(Human* hum)
{
alive_human_hash_[hum->entity_uniid] = hum;
}
void Room::AddToMoveableHash(MoveableEntity* entity)
{
moveable_hash_[entity->entity_uniid] = entity;
}
void Room::AddToAccountHash(Player* hum)
{
accountid_hash_[hum->account_id] = hum;
}
void Room::AddToLaterAddHash(RoomEntity* entity)
{
later_add_hash_[entity->entity_uniid] = entity;
}
void Room::AddToRemovedRobotHash(Human* hum)
{
removed_robot_hash_[hum->entity_uniid] = hum;
}
void Room::RemoveFromEntityHash(Entity* entity)
{
uniid_hash_.erase(entity->entity_uniid);