crlib: replace random number generator with wyhash.
Benchmarks shows about 4x increased PRNG perfomance increase comparing to old one. Should slightly reduce per-bot CPU usage.
This commit is contained in:
parent
1263a1a439
commit
726ea72965
13 changed files with 189 additions and 179 deletions
|
|
@ -1152,8 +1152,8 @@ void BotGraph::calculatePathRadius (int index) {
|
|||
for (float circleRadius = 0.0f; circleRadius < 360.0f; circleRadius += 20.0f) {
|
||||
const auto &forward = direction.forward ();
|
||||
|
||||
Vector radiusStart = start + forward * scanDistance;
|
||||
Vector radiusEnd = start + forward * scanDistance;
|
||||
auto radiusStart = start + forward * scanDistance;
|
||||
auto radiusEnd = start + forward * scanDistance;
|
||||
|
||||
game.testHull (radiusStart, radiusEnd, TraceIgnore::Monsters, head_hull, nullptr, &tr);
|
||||
|
||||
|
|
@ -1172,8 +1172,8 @@ void BotGraph::calculatePathRadius (int index) {
|
|||
break;
|
||||
}
|
||||
|
||||
Vector dropStart = start + forward * scanDistance;
|
||||
Vector dropEnd = dropStart - Vector (0.0f, 0.0f, scanDistance + 60.0f);
|
||||
auto dropStart = start + forward * scanDistance;
|
||||
auto dropEnd = dropStart - Vector (0.0f, 0.0f, scanDistance + 60.0f);
|
||||
|
||||
game.testHull (dropStart, dropEnd, TraceIgnore::Monsters, head_hull, nullptr, &tr);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue