Fix sin & cos calls
This commit is contained in:
@ -1603,8 +1603,8 @@ void CCarCtrl::WeaveForOtherCar(CEntity* pOtherEntity, CVehicle* pVehicle, float
|
||||
forward.Normalise();
|
||||
float forwardAngle = GetATanOfXY(forward.x, forward.y);
|
||||
float angleDiff = angleBetweenVehicles - forwardAngle;
|
||||
float lenProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.y * sin(angleDiff));
|
||||
float widthProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.x * cos(angleDiff));
|
||||
float lenProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.y * Sin(angleDiff));
|
||||
float widthProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.x * Cos(angleDiff));
|
||||
float lengthToEvade = (2 * (lenProjection + widthProjection) + WIDTH_COEF_TO_WEAVE_SAFELY * 2 * pVehicle->GetColModel()->boundingBox.max.x) / distance;
|
||||
float diffToLeftAngle = LimitRadianAngle(angleBetweenVehicles - *pAngleToWeaveLeft);
|
||||
diffToLeftAngle = ABS(diffToLeftAngle);
|
||||
|
Reference in New Issue
Block a user