diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index a54c34f6..17879d68 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -1566,7 +1566,7 @@ void Creature::SummonObstacle(Buff* buff, int id, const Position& target_pos) break; } } - RoomObstacle* obstacle = room->CreateObstacle(id, pos.x, pos.y); + RoomObstacle* obstacle = room->CreateObstacle(id, pos.x, pos.y, pos.z); if (obstacle) { obstacle->buff_meta = buff->meta; obstacle->skill_meta = buff->skill_meta; @@ -2058,7 +2058,8 @@ Hero* Creature::InternalSummonHero(Buff* buff, const mt::Hero* hero_meta, glm::v ( std::get<0>(tuple), born_pos.x, - born_pos.y + born_pos.y, + born_pos.z ); if (obstacle) { obstacle->DestoryAt(std::get<1>(tuple)); diff --git a/server/gameserver/obstacle.cc b/server/gameserver/obstacle.cc index beb5d5f3..cad19ec8 100644 --- a/server/gameserver/obstacle.cc +++ b/server/gameserver/obstacle.cc @@ -164,7 +164,8 @@ void Obstacle::OnBulletHit(IBullet* bullet) ( meta->_int_param1, GetPos().x, - GetPos().y + GetPos().y, + GetPos().z ); } } @@ -179,7 +180,8 @@ void Obstacle::OnBulletHit(IBullet* bullet) ( bomb_meta->thing_id(), GetPos().x, - GetPos().y + GetPos().y, + GetPos().z ); } } @@ -231,7 +233,8 @@ void Obstacle::OnExplosionHit(Explosion* e) ( bomb_meta->thing_id(), GetPos().x, - GetPos().y + GetPos().y, + GetPos().z ); } } diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index cc7bcccb..3779de69 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -495,9 +495,9 @@ void Room::DropItemEx(Position born_pos, Position pos, int item_id, int item_cou } } -RoomObstacle* Room::CreateObstacle(int id, float x, float y) +RoomObstacle* Room::CreateObstacle(int id, float x, float y, float z) { - RoomObstacle* entity = InternalCreateObstacle(id, x, y, + RoomObstacle* entity = InternalCreateObstacle(id, x, y, z, [] (Obstacle*) { }); @@ -1759,7 +1759,7 @@ void Room::ShuaPlane() } } -RoomObstacle* Room::InternalCreateObstacle(int id, float x, float y, +RoomObstacle* Room::InternalCreateObstacle(int id, float x, float y, float z, std::function on_precreate) { const mt::MapThing* thing = mt::MapThing::GetById(id); @@ -1770,7 +1770,8 @@ RoomObstacle* Room::InternalCreateObstacle(int id, float x, float y, { Position pos; pos.x = x; - pos.z = y; + pos.y = y; + pos.z = z; entity->SetPos(pos); } entity->Initialize(); @@ -3387,7 +3388,8 @@ void Room::AirRaid(int airraid_id) ( bomb_id, pos.x, - pos.y + pos.y, + pos.z ); obstacle->Active(); } diff --git a/server/gameserver/room.h b/server/gameserver/room.h index 9e023231..aa82b09b 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -199,7 +199,7 @@ public: void NotifyCountdown(const std::string& msg, int time); void NotifySysPiao(const std::string& msg, int color, int duration); int GetOnlinePlayerNum(); - RoomObstacle* CreateObstacle(int id, float x, float y); + RoomObstacle* CreateObstacle(int id, float x, float y, float z); int AllocUniid(); Incubator* GetIncubator() { return incubator_;}; void ShuaMon(const glm::vec3& center, std::vector& airdrop_mon_list, float radius); @@ -230,7 +230,7 @@ private: void AirRaid(int airraid_id); void ShuaPlane(); Team* NewTeam(); - RoomObstacle* InternalCreateObstacle(int id, float x, float y, + RoomObstacle* InternalCreateObstacle(int id, float x, float y, float z, std::function on_precreate); void AddObjectLater(RoomEntity* entity); void OnGameOver(); diff --git a/server/gameserver/roomobstacle.cc b/server/gameserver/roomobstacle.cc index fcd4c764..04f78809 100644 --- a/server/gameserver/roomobstacle.cc +++ b/server/gameserver/roomobstacle.cc @@ -506,7 +506,8 @@ void RoomObstacle::SummonAirDropBox(int box_id) ( box_id, born_pos.x, - born_pos.y + born_pos.y, + born_pos.z ); if (obstacle) { obstacle->PushCollisionObjects(); @@ -692,7 +693,8 @@ void RoomObstacle::InstallPreExplostionSummonTimer() ( obstacle_id, pos.x, - pos.y + pos.y, + pos.z ); if (p) { p->Active();