[Parity][map][S1][F] 运行时自动地图不读 automap.txt:每帧用通行网格合成"地板 cel 0 + 墙 cel 9"的假图层(三座预置城镇的自动地图同样缺失) #622
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
来源审计项:
map#1— [S1][F] 运行时自动地图不读 automap.txt:每帧用通行网格合成"地板 cel 0 + 墙 cel 9"的假图层(三座预置城镇的自动地图同样缺失)位置:
src/client/map/map-worker.ts:250-253(MapWorkerEngine.getLevelView):调用buildLevelViewFromSession(this.session, areaId, this.ctx, { tileAtlas, revealMode }),没有传automapOptions。src/common/world/d2map.ts:1178-1179:只有传了automapOptions时才生成scene.automap。src/client/map/level-view.ts:488:scene.automap为空,所以LevelView.automap也为空。src/client/automap/automap-view.ts:611:...(view.automap !== undefined ? { automap: view.automap } : {})。src/client/scene/world-renderer.ts:1153-1158:这里也不补automap。src/client/ui/minimap.ts:892:const automapLayer = level.automap ?? this.getOrSynthesizeAutomapLayer(level)。src/client/ui/minimap.ts:1384-1446(getOrSynthesizeAutomapLayer),合成规则:cellNo: 9。cellNo: 0。cellNo: 309。cellNo: 306。levelTypeId: 1,fSaved: 0。cellBlocked):只按格子中心子格cx*5+2采样。代码:
原版: 自动地图 cel 由 automap.txt 按
LevelName / TileName / Style / StartSequence..EndSequence查表得到。每种墙片、门、楼梯、小站都有专用 cel。automap.txt#781 Town / fl / 0 / 54..54 / Waypoint / Cel1=307。automap.txt#83-#901 Wilderness,wr/wl/wtll 对应 Cel1 = 11 / 18 / 10 / 20 / 21 / 35 / 21 / 24。4 Lava / fl / style 31 / seq 20-23 / Type1=WL_BttmEdge,是 Act4 熔岩的一种边缘图块,不是通用"墙"。V-data。well#111/#113/#115……。Seal#392-#396 的 AutoMap 值。DrlgPreset.cpp:1794-1799。Lut Gholein / Pandemonium Fortress / Harrogath 走pfTownAutomap(nLevelId, nPickedFile, …)预置城镇自动地图;其余预置关卡(dwAutoMap≠0)在 1803-1822 对所有房间调用pfAutomap。buildLevelAutomap(src/common/world/d2map.ts:639),但只在离线 baker 中被调用(src/baker/packers/pack-act-assets.ts:1183-1196,传automapTable / levelTypeId / layerId / objectsTable …,缺表直接抛错)。客户端运行时从未使用。影响(正常游玩可见):
fSaved=0,一律用 MaxiMap/MaxiMapS(minimap.ts:978)。建议:
MapWorkerEngine.getLevelView构建时传automapOptions:automap.txt、levels.txt 的LevelType/Layer、objects.txt,以及预置城镇的pfTownAutomap数据。LevelView.automap/MinimapLevel.automap改成必填字段。reportMissingArt,删除getOrSynthesizeAutomapLayer。已有 issue: —(#549 只修了"随区域切换",不涉及图层来源)