Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/coop-interaction-ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ The partner never triggers or advances these.
| Stage death and checkpoint | `death_hook` (`$00:9D9E`, `$00:9AC7`, `$81:8A5C..8B0B`) | A death with a living partner runs the native death pose, but the partner keeps playing (`solo_death`). A whole-team death resets to P1 at the checkpoint. | No change expected. |
| E-tank elevator carry | `lift_rtl_hook`, `MmxCoopLiftCarry` | The handler carries the projected body; co-op carries the partner by the same distance. | Both ride; not ownership. |
| Sprite priority (`.11` bits 4-5) | `MmxCoopSyncPriority` (frame end) | Stage sections write the priority to the world actor once (Storm Eagle's ship sets priority 3). The living partner copies the world actor's bits every frame. | No change expected. |
| Partner "in play" bit (`.27` bit 7) | `MmxCoopSyncPriority` (frame end) | Spawns store HP\|`$80` and death stores `$80`; the world actor's arrival clears the bit, but a placed partner kept it permanently. Launch Octopus's current generator (`$28`) ignores bodies with it set. A living partner in play now has it cleared each frame. | Both seats. |
| Ground-shock stun (action `$36`, Flame Mammoth's stomp) | `MmxCoopSyncPriority` (frame end) | The boss tests only the projected world actor. When the world actor enters `$36`, a grounded, living partner enters it the same frame. | Both seats. |

## 2. Both players, through a partner retry
Expand Down
7 changes: 7 additions & 0 deletions src/mmx_coop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,13 @@ void MmxCoopSyncPriority(uint8_t *r) {
* Left 0, X's wrapped to 255 and kept him stunned ~288 frames. */
body[2]=0x36;body[3]=0;body[0x85]=world[0x85];
}
/* .27 bit 7 marks a body not yet (or no longer) in play: spawns store
* HP|$80 and death stores $80. The world actor's arrival clears it, but a
* placed partner kept it for good. Contact damage ignores it; Launch
* Octopus's current generator ($28) does not, so it never lifted him. */
if((body[0x27]&128) && (body[0x27]&127) && !(world[0x27]&128) && action!=0x0c &&
!MmxCoopTransitionActive())
body[0x27]&=127;
}
static void eagle_lift_hook(CpuState *cpu,uint32_t pc) {
if(!enabled || !state.initialized || state.menu_owner || state.scene_owner) return;
Expand Down
Loading