Fix another 64-bit specific crash with ID_NO_OBJECT

This commit is contained in:
Lwmte 2023-07-09 19:38:31 +02:00
parent d41927c8fd
commit 7095c42875
6 changed files with 29 additions and 8 deletions

View file

@ -110,6 +110,8 @@ static std::unique_ptr<Moveable> Create(
{
auto* item = &g_Level.Items[num];
ptr->SetObjectID(objID);
if (std::holds_alternative<short>(room))
{
ptr->SetPos(pos, false);
@ -121,7 +123,6 @@ static std::unique_ptr<Moveable> Create(
}
ptr->SetRot(USE_IF_HAVE(Rotation, rot, Rotation{}));
ptr->SetObjectID(objID);
ptr->Init();
ptr->SetAnimNumber(USE_IF_HAVE(int, animNumber, 0));