mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-12 20:14:10 +00:00
Restore original logic of CPed::WanderRange
This commit is contained in:
parent
04de93796b
commit
12717917cc
4 changed files with 21 additions and 15 deletions
|
@ -18,6 +18,13 @@ CRange3D::DebugShowRange(float, int)
|
|||
CVector
|
||||
CRange3D::GetRandomPointInRange()
|
||||
{
|
||||
return CVector(CGeneral::GetRandomNumberInRange(min.x, max.x), CGeneral::GetRandomNumberInRange(min.y, max.y),
|
||||
CGeneral::GetRandomNumberInRange(min.z, max.z));
|
||||
int distX = Abs(max.x - min.x);
|
||||
int distY = Abs(max.y - min.y);
|
||||
int distZ = Abs(max.z - min.z);
|
||||
|
||||
float outX = CGeneral::GetRandomNumber() % distX + min.x;
|
||||
float outY = CGeneral::GetRandomNumber() % distY + min.y;
|
||||
float outZ = CGeneral::GetRandomNumber() % distZ + min.z;
|
||||
|
||||
return CVector(outX, outY, outZ);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue