From 4a7b3d6d7b3d0c3b548d2e87be834e003509a267 Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 9 Jan 2021 00:13:29 +0100 Subject: fix world bounds check for cars --- src/vehicles/Automobile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vehicles/Automobile.cpp') diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index accaace2..6db4313d 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -1641,13 +1641,13 @@ CAutomobile::ProcessControl(void) // TODO: make the numbers defines float heading; - if(GetPosition().x > 1950.0f-400.0f){ + if(GetPosition().x > 1950.0f){ if(m_vecMoveSpeed.x > 0.0f) m_vecMoveSpeed.x *= -1.0f; heading = GetForward().Heading(); if(heading > 0.0f) // going west SetHeading(-heading); - }else if(GetPosition().x < -1950.0f-400.0f){ + }else if(GetPosition().x < -1950.0f){ if(m_vecMoveSpeed.x < 0.0f) m_vecMoveSpeed.x *= -1.0f; heading = GetForward().Heading(); -- cgit v1.2.3