Also reset model when object ID is changed via script

This commit is contained in:
Lwmte 2022-11-20 04:51:09 +02:00
parent ebc4fe7206
commit 577827846f

View file

@ -473,6 +473,7 @@ GAME_OBJECT_ID Moveable::GetObjectID() const
void Moveable::SetObjectID(GAME_OBJECT_ID id) void Moveable::SetObjectID(GAME_OBJECT_ID id)
{ {
m_item->ObjectNumber = id; m_item->ObjectNumber = id;
m_item->ResetModelToDefault();
} }
void SetLevelFuncCallback(TypeOrNil<LevelFunc> const & cb, std::string const & callerName, Moveable & mov, std::string & toModify) void SetLevelFuncCallback(TypeOrNil<LevelFunc> const & cb, std::string const & callerName, Moveable & mov, std::string & toModify)