Patrols everywhere they should be, and concrete that has to be poured
Three fixes, all from watching it run. Cars stuck against buildings. routeTo dropped the node a route starts from, which is fine for a unit standing on it and wrong for anything re-routing from mid-segment: its first leg became a straight line to a node two hops away, across buildings and open country. Routes now include their start node so a unit rejoins the road before setting off. No patrols anywhere. They only existed as a reaction to the player's own tracks, so hostile territory was empty until you had personally made a road notorious. Enemy ground now carries standing patrols by how dangerous it is — none behind your lines, five on the frontier — spawned onto their roads so the territory has them the moment you arrive. This surfaced a second bug: dispatched units were culled at 546m from the player while dispatch origins reached 600m, so a patrol or engineer could be deleted on its first step and simply never turn up. Anything with an assignment is now kept regardless of range; its expiry still bounds it. Barricades appearing instantly. Crossing a heat threshold placed concrete on the road with nobody involved. Construction is now staged: an engineer is dispatched for the barricade, another for the tower, and heatProps is driven by finished builds rather than by heat levels. It still refuses to close a slab around a car parked in the gap. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -122,7 +122,10 @@ export function createUnitView(scene: THREE.Scene) {
|
||||
let towerCount = 0;
|
||||
for (const site of units.checkpoints.values()) {
|
||||
if (towerCount >= towers.count) break;
|
||||
const built = site.built;
|
||||
// A tower only stands once its own stage is done. While the barricade
|
||||
// is going up there is nothing here but activity.
|
||||
const built = site.done.includes('tower');
|
||||
if (!built && site.stage !== 'tower') continue;
|
||||
const height = built ? 1 : Math.max(0.15, site.progress);
|
||||
position.set(site.x, (6 * height) / 2, site.z);
|
||||
scratch.compose(position, quaternion.identity(), scale.set(1, height, 1));
|
||||
|
||||
Reference in New Issue
Block a user