use constants better

This commit is contained in:
2026-03-21 17:51:05 +00:00
parent f96c71b61b
commit cabe944f1b
19 changed files with 47 additions and 52 deletions
+2 -2
View File
@@ -63,7 +63,7 @@ use crate::constants::{
ITILE_SIZE, PATHFINDER_HIERARCHICAL_THRESHOLD_CHUNKS, PATHFINDER_MAX_NODES,
PATHFINDER_PROVISIONAL_NODE_LIMIT, PIXEL_RATIO, TILE_SIZE,
};
use crate::entities::shared_systems::magic_numbers::{
use crate::entities::shared_systems::constants::{
CONVOY_DOT_THRESHOLD, ES_DIRECTION_THRESHOLD, HEAD_ON_DOT_THRESHOLD, OCCUPANCY_CROWD_THRESHOLD,
PATHFINDER_DIRTY_LOOKAHEAD, PATHFINDER_VALIDATE_STEPS, PATHFINDER_VALIDATION_COOLDOWN,
WALK_SPEED_DIVISOR,
@@ -1073,7 +1073,7 @@ fn directional_chunk_waypoint(
// goal varies per entity (each has a different random wander target).
// Together they produce unique spread values for entities even when
// heading through the same chunk, without needing to pass entity ID.
// MAGIC Small primes spread entity starting positions across waypoint edge tiles.
// Small primes spread entity starting positions across waypoint edge tiles.
// Different values per axis prevent aliasing when positions are on a regular grid.
let entropy = (cur_tile.x.unsigned_abs() as usize)
.wrapping_mul(1619)