mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-08 03:28:03 +03:00
Fix spawn distance
This commit is contained in:
parent
51f661a454
commit
cc9a413cc3
1 changed files with 3 additions and 3 deletions
|
@ -186,12 +186,12 @@ namespace Environment
|
|||
|
||||
newParticlesCount++;
|
||||
|
||||
auto radius = (GetRandomDraw() & (WALL_SIZE * 4 - 1));
|
||||
auto angle = (GetRandomDraw() & (8190));
|
||||
auto radius = (GetRandomDraw() & (WALL_SIZE * 8 - 1)) - WALL_SIZE * 4;
|
||||
short angle = (GetRandomDraw() & 0xFFFF);
|
||||
|
||||
auto xPos = Camera.pos.x + ((int)(phd_cos(angle) * radius));
|
||||
auto yPos = Camera.pos.y - (WALL_SIZE + GetRandomDraw() & (WALL_SIZE * 2 - 1));
|
||||
auto zPos = Camera.pos.z + ((int)(phd_sin(angle) * radius));
|
||||
auto yPos = Camera.pos.y - (WALL_SIZE * 2 + GetRandomDraw() & (WALL_SIZE * 2 - 1));
|
||||
|
||||
|
||||
if (IsRoomOutside(xPos, yPos, zPos) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue