执行任务的工程车辆等敌对车辆似乎也会影响
稍后保存游戏中的另一个示例
save_SuperHuman 1.zip
车辆似乎也被卡住了
找到卡住的车辆
它在大型传单上方,另存为
save_SuperHuman 1.zip
我正在调试卡住的车辆(工程车 31)。
它在存档时的任务是:
W 7613175674 bool OpenApoc::CityView::handleMouseDown(OpenApoc::Event *): CLICKED VEHICLE Construction Vehicle 31 at {42.7708,63.5,7.5}
W 7613244067 bool OpenApoc::CityView::handleMouseDown(OpenApoc::Event *): Mission GotoLocation {43,63,2}
W 7613263414 bool OpenApoc::CityView::handleMouseDown(OpenApoc::Event *): Mission RecoverVehicle
W 7613286861 bool OpenApoc::CityView::handleMouseDown(OpenApoc::Event *): Mission GotoBuilding BUILDING_WAREHOUSE_THREE
然而,目标 (43,63,2) 被 adjustTargetToClosestFlying 重写为 (43,63,7)。
在那之后,车辆在尝试前往 (43, 63, 7) 和随机附近目标之间摇摆不定,每次调用 setPathTo:
After setPathTo: Vehicle [Construction Vehicle 31] path: (41,63,7) -> (41,63,7) -> (42,63,7) -> (43,63,7)
After setPathTo: Vehicle [Construction Vehicle 31] path: (43,63,7) -> (43,63,7) -> (42,64,6) -> (41,63,5) -> (41,62,4)
After setPathTo: Vehicle [Construction Vehicle 31] path: (41,62,4) -> (41,62,4) -> (41,62,5) -> (41,62,6) -> (42,63,7) -> (43,63,7)
After setPathTo: Vehicle [Construction Vehicle 31] path: (43,63,7) -> (43,63,7) -> (43,62,7) -> (42,61,6)
After setPathTo: Vehicle [Construction Vehicle 31] path: (42,61,6) -> (42,61,6) -> (43,62,7) -> (43,63,7)
After setPathTo: Vehicle [Construction Vehicle 31] path: (43,63,7) -> (43,63,7) -> (44,64,6) -> (45,65,5) -> (45,65,4)
...
感谢您调查此@ashenomo <3
如果您能找到解决方案,我将不胜感激
理想情况下,我们希望车辆识别出它卡在一个循环中,并生成一个新的任务到一个合适的、清晰的、最终目的地,因为我怀疑是因为没有检查随机目标是一个合适的目的地,所以强制循环
我注意到当车辆卡在这些环路中时,它们通常位于着陆管砖或巨型传单工厂中
不知道为什么 Mega-Flyer Factories 特别会导致这样的问题,除非某处的瓷砖类型不好???
看起来这是“侧步”逻辑,当目的地被另一辆车占用时触发。 目标暂时更改为附近的空瓷砖。 一旦车辆到达该板块,它会再次尝试前往原始目标。
然而,在这种情况下,不知何故导致侧跨的车辆是 CV31,即它认为它即将与自己发生碰撞。 代码
我添加的其他日志显示了这一点:
W 14531114914 void OpenApoc::VehicleMission::setPathTo(OpenApoc::GameState &, OpenApoc::Vehicle &, Vec3<int>, int, bool, bool): ** setPathTo for [Construction Vehicle 31] to (43,63,2), maxIter:450, cV:Y, giveUp:N, currentPath n:0
W 14531141711 void OpenApoc::VehicleMission::setPathTo(OpenApoc::GameState &, OpenApoc::Vehicle &, Vec3<int>, int, bool, bool): *** adjustTargetToClosestFlying: [Construction Vehicle 31] (43, 63, 2), piNe: N
W 14531234219 static bool OpenApoc::VehicleMission::adjustTargetToClosestFlying(OpenApoc::GameState &, OpenApoc::Vehicle &, Vec3<int> &, bool, bool, bool &): Target (43,63,7) contains vehicle [Construction Vehicle 31]. This will trigger a target adjustment.
添加额外的检查以确保车辆不会试图避开自己听起来是个好主意。
也就是说,我不确定为什么侧步不能解决这个问题..
还有一些调试说明:
W 417133364405 bool OpenApoc::CityView::handleMouseDown(OpenApoc::Event *): Mission GotoLocation {43,63,2}
W 417133397242 bool OpenApoc::CityView::handleMouseDown(OpenApoc::Event *): Mission RecoverVehicle
W 417133421554 bool OpenApoc::CityView::handleMouseDown(OpenApoc::Event *): Mission GotoBuilding BUILDING_WAREHOUSE_THREE
pickNearest
对于这个 GotoLocation 任务是错误的 - 所以它不会在车辆到达确切位置之前完成。 这是不可能的。看看这个早期的存档游戏:
我假设它与被破坏的瓷砖有关,因为它似乎只有在一些建筑物被突袭摧毁时才会发生
当放置在超高速时,城市景观似乎非常慢
到无法播放的地步请找到保存附件
Blazer Turbo Bike 49(靠近被毁坏的Hades Block)正试图到达(86,78,2),这是一个被毁坏的路砖。 但与卡住的施工车辆类似,我看到 setPathTo 在此车辆的每个滴答声中都被调用,这可能会导致减速。
这是修复的 PR(仅手动验证):
https://github.com/OpenApoc/OpenApoc/pull/563
最有用的评论
这是修复的 PR(仅手动验证):
https://github.com/OpenApoc/OpenApoc/pull/563