Commit ea810e9
#134 recorded `Cliff::onDestroy`'s four cascade gates and warned that a Lua or
editor destroy "need not" satisfy them, which would make #127's runtime probe
vacuous. **That warning is withdrawn.** It was stated from inference - "map
generation evidently satisfies all four, because #113 measured the cascade
running" - and inference is what keeps going wrong on this issue.
| gate | cascade needs | `applyCliffs` | `luaCreateEntity` |
| --- | --- | --- | --- |
| entity flag bit 5 of `+0x6e` | clear | `params[0x80] = 0` | `params[0x80] = 0` |
| `this+0x82` | set | ctor writes 1 unconditionally | same ctor |
| `this+0x83` | set | `place_as_crater == nullptr` | same |
| `map->[0x240]` | zero | only `Map::~Map` writes 1 | same |
- Bit 5 is exactly `params[0x80] != 0` at construction. `applyCliffs` builds its
params at `sp+0x20` and zeroes that byte with `str wzr, [x26]`, `x26 = params
+ 0x80` (`0x101623d9c`). `luaCreateEntity` builds its own at `sp+0x228` and
zeroes the same byte on both paths (`0x1019e5ba8`, `0x1019e5c18`) - and that
arm is identifiably the cliff one, storing the `0x14` sentinel into
`params+0x87` before `LuaTable::getDefault<CliffOrientation>`.
- `map->[0x240]` is "the map is being torn down": `Map::~Map` sets it as its
first act, before `ToDeleteList::clear` (`0x10163461c`), and `Map::resume`
bails on it. Dozens of unrelated `onDestroy` handlers read the same byte.
`Cliff+0x78` is the `Map` - `Entity::getGame` is `[[this+0x78]+0x490]`.
- The one path that WOULD differ, `Cliff::destroyWithoutCorrection`, is
unreachable: zero direct callers under a scan of every `BL` AND `B` in
`__text`, and no pointer in any vtable - only four in the STAB tables.
The same widened scan re-confirms #134's other caller claim, which had been made
on `BL` alone and could have missed a tail call: `updateAndFixConnections` still
has exactly one caller, `CliffEditor::buildCliffs`.
Documentation only - no code, no fixtures, no behaviour change.
Claude-Session: https://claude.ai/code/session_01MmitdaFJxN9Wm8LkQu33kc
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 8409b48 commit ea810e9
3 files changed
Lines changed: 97 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
| 981 | + | |
| 982 | + | |
986 | 983 | | |
987 | 984 | | |
988 | 985 | | |
| |||
997 | 994 | | |
998 | 995 | | |
999 | 996 | | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1000 | 1038 | | |
1001 | 1039 | | |
1002 | 1040 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
33 | 55 | | |
34 | 56 | | |
35 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
81 | 99 | | |
82 | 100 | | |
83 | 101 | | |
| |||
0 commit comments