EntityList::CreateDoor converted to xyz_heading

This commit is contained in:
Arthur Ice
2014-11-30 21:04:39 -08:00
parent 7ac9a5c5a6
commit 4f03ebb3af
3 changed files with 16 additions and 14 deletions
+12 -11
View File
@@ -3848,19 +3848,20 @@ uint16 EntityList::CreateGroundObjectFromModel(const char *model, float x,
return 0; // fell through everything, this is bad/incomplete from perl
}
uint16 EntityList::CreateDoor(const char *model, float x, float y, float z,
float heading, uint8 opentype, uint16 size)
uint16 EntityList::CreateDoor(const char *model, const xyz_heading& position, uint8 opentype, uint16 size)
{
if (model) {
Doors *door = new Doors(model, xyz_heading(x, y, z, heading), opentype, size);
RemoveAllDoors();
zone->LoadZoneDoors(zone->GetShortName(), zone->GetInstanceVersion());
entity_list.AddDoor(door);
entity_list.RespawnAllDoors();
if (!model)
return 0; // fell through everything, this is bad/incomplete from perl
Doors *door = new Doors(model, position, opentype, size);
RemoveAllDoors();
zone->LoadZoneDoors(zone->GetShortName(), zone->GetInstanceVersion());
entity_list.AddDoor(door);
entity_list.RespawnAllDoors();
if (door)
return door->GetEntityID();
if (door)
return door->GetEntityID();
}
return 0; // fell through everything, this is bad/incomplete from perl
}