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:
1 parent
f1bd380b20
commit
655bcaeecd
1 file changed
+2
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user