[#12588] Bugfix: 修复低帧率下 TargetDummy 受击退速度异常的问题
变更摘要
修复了
Time.delta被重复应用(TargetDummy类与Velcomp组件)导致的速度计算错误。从速度限制计算中移除了多余的Time.delta乘法。
状态 Closed · 目标 master ← dpsdummy-fix-low-fps
文件 1 · 代码变化 +1 / -1
类型 Bugfix
主要变更
修复
Time.delta在速度计算中被重复应用的问题移除
limit()计算中的Time.delta参数
影响范围
TargetDummy behavior
Physics calculation
可能影响
修复低帧率下 TargetDummy 受击退时的速度异常
物理表现更准确
以上影响分析根据 PR 描述及代码修改推断,不代表维护者正式结论。
重点文件
core/src/mindustry/world/blocks/defense/TargetDummy.java
修改 · +1 / -1
移除
updateTile方法中Tmp.v1.limit()内的* Time.delta防止
Time.delta被重复应用导致速度计算错误
作者说明
Delta 曾被重复应用(TargetDummy 类 + Velcomp)
Before
<img width="1410" height="717" alt="image" src="https://github.com/user-attachments/assets/4d9d92ef-5600-400c-9360-d956cdf57a9d" />
After
https://github.com/user-attachments/assets/6d290e2d-2164-4c6c-ad7a-7d6a6ab87b42
如果你提交的 Pull Request 不涉及翻译或服务器列表,请阅读下方的要求列表并勾选每一项:
我已阅读 贡献指南。
我已确保我的代码可以编译(如适用)。
我已确保此 PR 中的任何新功能在游戏内正常运行(如适用)。
GitHub 原文
Delta was being applied twice (TargetDummy class + Velcomp)
Before
<img width="1410" height="717" alt="image" src="https://github.com/user-attachments/assets/4d9d92ef-5600-400c-9360-d956cdf57a9d" />
After
https://github.com/user-attachments/assets/6d290e2d-2164-4c6c-ad7a-7d6a6ab87b42
If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:
I have read the contribution guidelines.
I have ensured that my code compiles, if applicable.
I have ensured that any new features in this PR function correctly in-game, if applicable.
由 MDT GitHub 同步机器人自动同步。中文翻译、摘要及代码影响分析由 AI 生成,仅供参考。