mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2025-01-11 06:24:09 +00:00
fix world bounds check for cars
This commit is contained in:
parent
219af60102
commit
4a7b3d6d7b
|
@ -1641,13 +1641,13 @@ CAutomobile::ProcessControl(void)
|
||||||
// TODO: make the numbers defines
|
// TODO: make the numbers defines
|
||||||
|
|
||||||
float heading;
|
float heading;
|
||||||
if(GetPosition().x > 1950.0f-400.0f){
|
if(GetPosition().x > 1950.0f){
|
||||||
if(m_vecMoveSpeed.x > 0.0f)
|
if(m_vecMoveSpeed.x > 0.0f)
|
||||||
m_vecMoveSpeed.x *= -1.0f;
|
m_vecMoveSpeed.x *= -1.0f;
|
||||||
heading = GetForward().Heading();
|
heading = GetForward().Heading();
|
||||||
if(heading > 0.0f) // going west
|
if(heading > 0.0f) // going west
|
||||||
SetHeading(-heading);
|
SetHeading(-heading);
|
||||||
}else if(GetPosition().x < -1950.0f-400.0f){
|
}else if(GetPosition().x < -1950.0f){
|
||||||
if(m_vecMoveSpeed.x < 0.0f)
|
if(m_vecMoveSpeed.x < 0.0f)
|
||||||
m_vecMoveSpeed.x *= -1.0f;
|
m_vecMoveSpeed.x *= -1.0f;
|
||||||
heading = GetForward().Heading();
|
heading = GetForward().Heading();
|
||||||
|
|
Loading…
Reference in a new issue