Fixed crashes and errors when loading into world.

This commit is contained in:
hondacrx
2022-06-21 14:56:22 -04:00
parent be8e18450e
commit 63cbd18350
12 changed files with 79 additions and 31 deletions
+2 -2
View File
@@ -2981,9 +2981,9 @@ namespace Game.Entities
public bool IsPermanentWorldObject() { return m_isWorldObject; }
public ITransport GetTransport() { return m_transport; }
public T GetTransport<T>() where T : ITransport
public T GetTransport<T>() where T : class, ITransport
{
return (T)m_transport;
return m_transport as T;
}
public float GetTransOffsetX() { return m_movementInfo.transport.pos.GetPositionX(); }
public float GetTransOffsetY() { return m_movementInfo.transport.pos.GetPositionY(); }