void HandleChange(ObjectMoveChangeData change) { var ob = m_world.FindObject <MovableObject>(change.ObjectID); if (ob == null) { /* There's a special case where we don't get objectinfo, but we do get * ObjectMove: If the object moves from tile, that just came visible to us, * to a tile that we cannot see. So let's not throw exception, but exit * silently */ // XXX is this still valid? return; } Debug.Assert(ob.IsInitialized); ContainerObject env = null; if (change.DestinationID != ObjectID.NullObjectID) { env = m_world.GetObject <ContainerObject>(change.DestinationID); } ob.MoveTo(env, change.DestinationLocation); }
void HandleChange(ObjectMoveChangeData change) { var ob = m_world.FindObject<MovableObject>(change.ObjectID); if (ob == null) { /* There's a special case where we don't get objectinfo, but we do get * ObjectMove: If the object moves from tile, that just came visible to us, * to a tile that we cannot see. So let's not throw exception, but exit * silently */ // XXX is this still valid? return; } Debug.Assert(ob.IsInitialized); ContainerObject env = null; if (change.DestinationID != ObjectID.NullObjectID) env = m_world.GetObject<ContainerObject>(change.DestinationID); ob.MoveTo(env, change.DestinationLocation); }