| 394 | } |
| 395 | |
| 396 | std::optional<Point> GetRandomObjectPosition(Displacement standoff) |
| 397 | { |
| 398 | for (int i = 0; i <= 20000; i++) { |
| 399 | Point position = Point { GenerateRnd(80), GenerateRnd(80) } + Displacement { 16, 16 }; |
| 400 | if (CanPlaceRandomObject(position, standoff)) |
| 401 | return position; |
| 402 | } |
| 403 | return {}; |
| 404 | } |
| 405 | |
| 406 | void InitRndLocObj5x5(int min, int max, _object_id objtype) |
| 407 | { |
no test coverage detected