diff --git a/GlobalMethods.h b/GlobalMethods.h index 12f52e1..cb2d835 100644 --- a/GlobalMethods.h +++ b/GlobalMethods.h @@ -1705,7 +1705,8 @@ namespace LuaGlobalFunctions GameObject* object = new GameObject; uint32 guidLow = map->GenerateLowGuid(); - if (!object->Create(guidLow, objectInfo->entry, map, phase, Position(x, y, z, o), G3D::Quat(), 0, GO_STATE_READY)) + G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(o, 0.f, 0.f); + if (!object->Create(guidLow, objectInfo->entry, map, phase, Position(x, y, z, o), rot, 0, GO_STATE_READY)) { delete object; Eluna::Push(L); diff --git a/WorldObjectMethods.h b/WorldObjectMethods.h index de3c826..dd9d9eb 100644 --- a/WorldObjectMethods.h +++ b/WorldObjectMethods.h @@ -682,7 +682,8 @@ namespace LuaWorldObject #ifndef TRINITY Eluna::Push(L, obj->SummonGameObject(entry, x, y, z, o, respawnDelay)); #else - Eluna::Push(L, obj->SummonGameObject(entry, Position(x, y, z, o), G3D::Quat(), respawnDelay)); + G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(o, 0.f, 0.f); + Eluna::Push(L, obj->SummonGameObject(entry, Position(x, y, z, o), rot, respawnDelay)); #endif return 1; }