Skip to content

Fix the bug where Speed=0 prevents two cases#2188

Open
DeathFishAtEase wants to merge 4 commits intoPhobos-developers:developfrom
DeathFishAtEase:TryToFixSpeed0
Open

Fix the bug where Speed=0 prevents two cases#2188
DeathFishAtEase wants to merge 4 commits intoPhobos-developers:developfrom
DeathFishAtEase:TryToFixSpeed0

Conversation

@DeathFishAtEase
Copy link
Copy Markdown
Collaborator

Two cases:

  1. the movement of units with Locomotor=Jumpjet;
  2. the movement caused by external factors such as a locomotor warhead.

@DeathFishAtEase DeathFishAtEase self-assigned this May 2, 2026
@DeathFishAtEase DeathFishAtEase added ❓Phobos bug Something isn't working properly ⚙️T1 T1 maintainer review is sufficient Bugfix This is a bugfix that does not need documentation beyond mention in changelog labels May 2, 2026
@DeathFishAtEase DeathFishAtEase changed the title Fix the bug where Speed=0 prevents two cases Fix the bug where Speed=0 prevents two cases May 2, 2026
@phoboscn-bot
Copy link
Copy Markdown

To Chinese users:
This pull request has been mentioned on Phobos CN. There might be relevant details there:

致中文用户:
此拉取请求已在 Phobos CN 上被提及。那里可能有相关详细信息:

https://www.phoboscn.top/t/topic/395/5

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 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.

@TaranDahl
Copy link
Copy Markdown
Contributor

I think this is more of an issue with Locomotor WH. The design of Locomotor WH is shit from the very start. It makes units replace their Locomotor and move on their own to the attacker to simulate a "pulling" effect, which causes problems once the unit refuses to move.
But I think no one is willing to deal with this shitty design. So just let this shit be.

@DeathFishAtEase
Copy link
Copy Markdown
Collaborator Author

Tested by: https://www.phoboscn.top/t/topic/395/8
image

@DeathFishAtEase
Copy link
Copy Markdown
Collaborator Author

DeathFishAtEase commented May 2, 2026

The design of Locomotor WH is shit from the very start.

Neither the design nor the implementation; sometimes setting a destination cannot override the original destination of the target unit.

Even in the test of this early stage of repair, I encountered the above situation. In this fix, because inserting the check for IsAttackedByLocomotor into the original function was not easy, I once drastically modified some hooks. During that process, I encountered a situation where the IsAttackedByLocomotor check passed, allowing the unit to move, but as a result, the unit went to its own destination set by other factors instead of going to the attacker's side. Additionally, due to many problems, I finally gave up that thankless repair method and chose the current one that is simpler and theoretically more universal.

@TaranDahl TaranDahl added the Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions. label May 2, 2026
Copy link
Copy Markdown
Contributor

@Coronia Coronia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure Speed=0 preventing aircraft lifting up is intended: 7333a45

@DeathFishAtEase
Copy link
Copy Markdown
Collaborator Author

DeathFishAtEase commented May 2, 2026

pretty sure Speed=0 preventing aircraft lifting up is intended: 7333a45

This does not prohibit aircraft from taking off; the judgment only applies to VehicleTypes with Speed=0, and it may still prevent VehicleTypes with Locomotor=Fly from taking off.
For vehicles with Locomotor=Jumpjet, a usage scenario is mentioned in this topic(/395).
By the way: if we really want to impose restrictions on Locomotor=Jumpjet, it should determine based on JumpjetClimb/JumpjetAccel rather than Speed.

In addition, through testing on the latest commit of the develop branch, it has been confirmed that currently CreateUnit creating Jumpjet vehicles such as [ZEP] does not prohibit their vertical movement; for example, when BalloonHover=false is set, they will still fall to the ground.

@DeathFishAtEase
Copy link
Copy Markdown
Collaborator Author

Note

Since 7333a45 is later than the last DevBuild version (#48) before Pre-Release v0.5, the change to the flag required to apply the stillness effect to Locomotor=Jumpjet vehicles is not recorded in the document as a migration item.

@Coronia Coronia requested a review from Starkku May 2, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix This is a bugfix that does not need documentation beyond mention in changelog ❓Phobos bug Something isn't working properly ⚙️T1 T1 maintainer review is sufficient Tested Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants