Skip to content

修复坐骑在飞艇绳梯格上被重复计算体重导致飞艇坠毁的问题 - #1236

Merged
WhiteCloud0123 merged 1 commit into
mainfrom
dev
Oct 13, 2026
Merged

WhiteCloud0123 merged 1 commit into
mainfrom
dev

Conversation

@WhiteCloud0123

@WhiteCloud0123 WhiteCloud0123 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Vehicle mass calculations now count each passenger or monster only once, even when they occupy multiple boardable parts. This prevents the same rider’s weight from being added repeatedly and provides a more accurate vehicle mass when multiple parts are occupied.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 微风自动审查

本次 PR 共修改 1 个文件,新增 7 行,删除 2 行。

变更范围: C++ 核心代码

自动风险提示:

  • ⚠️ 修改了 C++ 核心代码但没有同步修改 tests/,建议确认现有测试是否已经覆盖本次行为变化。
  • ⚠️ 触及存档、地图、载具、角色、物品或库存核心路径,属于较高回归风险区域。

建议测试内容:

  • 快速检查: 检查补丁空白、变更 JSON/Python/XML/Visual Studio 项目文件、未解决合并标记,以及内置穆尔卡武器工坊关键路径。
  • Windows Tiles x64 MSVC: 编译翻译,执行完整 Release x64 MSVC 构建和 windist 打包,并验证 Windows 构件中的内置武器工坊。
  • Windows 数据加载烟雾测试: 运行打包后的 cataclysm-tiles.exe --jsonverify,确认可执行文件能够真正启动并完成核心游戏数据加载;Windows 构件会先上传,烟雾测试失败时仍可下载人工排查。
  • Android Gradle 快速检查: 使用 JDK 11 解析 Gradle 配置和依赖,提前发现 Android 构建环境或脚本问题。
  • Android arm64: 编译翻译和 arm64 Release APK,并保留 APK 构件供设备实测。

这是规则型自动审查,会依据本次 PR 的实际变更范围生成风险提示和测试建议,不假定 PR 的来源或用途,也不替代人工代码审查。每次推送后会自动更新这条摘要。

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c8df4fa6-6fb9-48f4-9386-68b012a6a00d
📥 Commits

Reviewing files that changed from the base of the PR and between 8343c2f and 8a063ae.

📒 Files selected for processing (1)
  • src/vehicle.cpp

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

vehicle::calc_mass_center now counts each passenger’s or monster’s weight once, even when the creature is associated with multiple boardable parts.

Changes: Vehicle mass calculation

Layer / File(s) Summary
Deduplicate rider weights
src/vehicle.cpp
The mass calculation tracks rider pointers and adds passenger or monster weight only when the pointer has not already been counted.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: andyscarlet233

Merge Risk: ⚪ Minimal · up to 8a063

The rider-weight change has no established issue requiring a merge hold based on the available review evidence.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 标题准确描述了主要变更:修复坐骑在飞艇绳梯格上被重复计算体重并导致飞艇坠毁的问题。
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Cppcheck (2.22.0)
src/vehicle.cpp

Cppcheck timed out; analysis of this file is incomplete

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@WhiteCloud0123
WhiteCloud0123 merged commit e44471d into main Oct 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant