Scripts/Commands: gameobjects spawned via .gameobject add command will now spawn with the orientation of the spawning player instead of always using the default QuaternionData values

closes #101
This commit is contained in:
Ovahlord committed 2020-06-01 15:18:18 +02:00
1 parent f1bd380b20
commit 655bcaeecd
1 file changed
+2 -1
+2 -1
View File
@@ -167,7 +167,8 @@ public:
guidLow = map->GenerateLowGuid<HighGuid::GameObject>();
}
if (!object->Create(guidLow, objectInfo->entry, map, *player, QuaternionData(), 255, GO_STATE_READY))
QuaternionData rotation = QuaternionData::fromEulerAnglesZYX(player->GetOrientation(), 0.f, 0.f);
if (!object->Create(guidLow, objectInfo->entry, map, *player, rotation, 255, GO_STATE_READY))
{
delete object;
return false;