Skip to content

Comments

Improvements to stationary unit logic#2094

Open
Starkku wants to merge 2 commits intoPhobos-developers:developfrom
Starkku:feature/stationary-units-improvements
Open

Improvements to stationary unit logic#2094
Starkku wants to merge 2 commits intoPhobos-developers:developfrom
Starkku:feature/stationary-units-improvements

Conversation

@Starkku
Copy link
Contributor

@Starkku Starkku commented Feb 8, 2026

  • Extended logic e.g Speed=0 to work on InfantryTypes.
  • Speed lowered to 0 by multipliers will now prevent some of the logic from being executed (cursor, assigning destination etc. works but not actual movement).

Stationary units

  • Infantry & vehicles with Speed=0 or those that are prevented from moving on their cell by MovementRestrictedTo are now truly stationary will not attempt to move if issued movement commands. Should not be used on trainable/buildable units as they become stuck in factory. Following behaviours apply:
    • Cannot retaliate if target is beyond their weapon range.
    • Cannot acquire units outside their weapon range on Area Guard mission.
    • Hunt mission is reassigned to Guard.
    • Units rendered stationary by speed multipliers instead of intrinsic properties of TechnoType will respond to cursor actions e.g assigning destination but will not move while the multiplier is in effect.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@Starkku Starkku force-pushed the feature/stationary-units-improvements branch 3 times, most recently from 6c9e854 to c32138f Compare February 8, 2026 19:52
@Coronia
Copy link
Contributor

Coronia commented Feb 9, 2026

object info dump showed that these stationary units will sometime enter 'Move' mission for a short moment, then switch back to 'Guard' quickly without actually moving. Not sure if it's a desired behavior

@Refailure
Copy link

1214
After applying an AttachEffect with SpeedMultiplier=0 to the target unit, the target unit can still rotate its hull once before it stops rotating the hull and only rotates the turret. Hover units can always rotate their hull.
1215
And units that have performed the single rotation cannot load passengers.

@Starkku Starkku force-pushed the feature/stationary-units-improvements branch from c32138f to 7edb6a9 Compare February 24, 2026 18:23
- Move ApproachTarget hooks to FootClass and make use of existing weapon range check results
- Unify locomotor behaviour - prevent locomotor processing on AssignDestination if immobilized
- Moved checking speed multipliers for zero speed to per frame processing due to necessity apply behaviour on all locomotors now
- Make TurretResponse code easier to read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants