mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-08 03:28:03 +03:00
Force predictive room update if UpdateRoom param is true for SetPosition
This commit is contained in:
parent
c393dec7b1
commit
e1165360f0
1 changed files with 2 additions and 1 deletions
|
@ -604,7 +604,8 @@ void Moveable::SetPos(Vec3 const& pos, sol::optional<bool> updateRoom)
|
|||
// In case direct portal room update didn't happen, and distance between old and new
|
||||
// points is significant, do a predictive room update.
|
||||
|
||||
if (!roomUpdated && Vector3::Distance(oldPos, m_item->Pose.Position.ToVector3()) > BLOCK(1))
|
||||
if (!roomUpdated &&
|
||||
(willUpdate || Vector3::Distance(oldPos, m_item->Pose.Position.ToVector3()) > BLOCK(1)))
|
||||
{
|
||||
int potentialNewRoom = FindRoomNumber(m_item->Pose.Position, m_item->RoomNumber);
|
||||
if (potentialNewRoom != m_item->RoomNumber)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue