mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 02:06:50 +00:00
Switched out our kinda juryrigged vector types for glm::vec types since we use that as a 3d math library already but never switched out the types
This commit is contained in:
+9
-9
@@ -71,10 +71,10 @@ Doors::Doors(const Door* door) :
|
||||
client_version_mask = door->client_version_mask;
|
||||
}
|
||||
|
||||
Doors::Doors(const char *dmodel, const xyz_heading& position, uint8 dopentype, uint16 dsize) :
|
||||
Doors::Doors(const char *dmodel, const glm::vec4& position, uint8 dopentype, uint16 dsize) :
|
||||
close_timer(5000),
|
||||
m_Position(position),
|
||||
m_Destination(xyz_heading::Origin())
|
||||
m_Destination(glm::vec4())
|
||||
{
|
||||
db_id = database.GetDoorsCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion());
|
||||
door_id = database.GetDoorsDBCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion());
|
||||
@@ -410,7 +410,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger)
|
||||
{
|
||||
sender->KeyRingAdd(playerkey);
|
||||
}
|
||||
sender->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Destination.m_X, m_Destination.m_Y, m_Destination.m_Z, m_Destination.m_Heading);
|
||||
sender->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w);
|
||||
}
|
||||
else if (( !IsDoorOpen() || opentype == 58 ) && (keyneeded && ((keyneeded == playerkey) || sender->GetGM())))
|
||||
{
|
||||
@@ -420,22 +420,22 @@ void Doors::HandleClick(Client* sender, uint8 trigger)
|
||||
}
|
||||
if(database.GetZoneID(dest_zone) == zone->GetZoneID())
|
||||
{
|
||||
sender->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Destination.m_X, m_Destination.m_Y, m_Destination.m_Z, m_Destination.m_Heading);
|
||||
sender->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w);
|
||||
}
|
||||
else
|
||||
{
|
||||
sender->MovePC(database.GetZoneID(dest_zone), dest_instance_id, m_Destination.m_X, m_Destination.m_Y, m_Destination.m_Z, m_Destination.m_Heading);
|
||||
sender->MovePC(database.GetZoneID(dest_zone), dest_instance_id, m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w);
|
||||
}
|
||||
}
|
||||
if (( !IsDoorOpen() || opentype == 58 ) && (!keyneeded))
|
||||
{
|
||||
if(database.GetZoneID(dest_zone) == zone->GetZoneID())
|
||||
{
|
||||
sender->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Destination.m_X, m_Destination.m_Y, m_Destination.m_Z, m_Destination.m_Heading);
|
||||
sender->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w);
|
||||
}
|
||||
else
|
||||
{
|
||||
sender->MovePC(database.GetZoneID(dest_zone), dest_instance_id, m_Destination.m_X, m_Destination.m_Y, m_Destination.m_Z, m_Destination.m_Heading);
|
||||
sender->MovePC(database.GetZoneID(dest_zone), dest_instance_id, m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -697,11 +697,11 @@ bool ZoneDatabase::LoadDoors(int32 iDoorCount, Door *into, const char *zone_name
|
||||
void Doors::SetLocation(float x, float y, float z)
|
||||
{
|
||||
entity_list.DespawnAllDoors();
|
||||
m_Position = xyz_location(x, y, z);
|
||||
m_Position = glm::vec4(x, y, z, m_Position.w);
|
||||
entity_list.RespawnAllDoors();
|
||||
}
|
||||
|
||||
void Doors::SetPosition(const xyz_heading& position) {
|
||||
void Doors::SetPosition(const glm::vec4& position) {
|
||||
entity_list.DespawnAllDoors();
|
||||
m_Position = position;
|
||||
entity_list.RespawnAllDoors();
|
||||
|
||||
Reference in New Issue
Block a user