mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix gameobject rotations. Closes https://github.com/ElunaLuaEngine/Eluna/issues/207
This commit is contained in:
@@ -1705,7 +1705,8 @@ namespace LuaGlobalFunctions
|
|||||||
GameObject* object = new GameObject;
|
GameObject* object = new GameObject;
|
||||||
uint32 guidLow = map->GenerateLowGuid<HighGuid::GameObject>();
|
uint32 guidLow = map->GenerateLowGuid<HighGuid::GameObject>();
|
||||||
|
|
||||||
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;
|
delete object;
|
||||||
Eluna::Push(L);
|
Eluna::Push(L);
|
||||||
|
|||||||
@@ -682,7 +682,8 @@ namespace LuaWorldObject
|
|||||||
#ifndef TRINITY
|
#ifndef TRINITY
|
||||||
Eluna::Push(L, obj->SummonGameObject(entry, x, y, z, o, respawnDelay));
|
Eluna::Push(L, obj->SummonGameObject(entry, x, y, z, o, respawnDelay));
|
||||||
#else
|
#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
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user