icculus / mojozork

A simple Z-Machine implementation in a single C file. Now with online multiplayer! :)
https://www.patreon.com/posts/54997062
zlib License
122 stars 12 forks source link

Object table is confused...? #7

Closed icculus closed 3 years ago

icculus commented 3 years ago

Start a multizork instance with a single player and run these exact commands:

s
e
open window
in
w
take all
move carpet
open trap
down
light lamp
n
kill troll

Sometimes this dies upon entering the troll room with:

!! FATAL Z-MACHINE ERROR (instance='486ghb', err='Lookup on missing object property (obj=4, prop=7)', pc=FEAF, instructions_run=8374) !!

*** Oh no, this game instance had a fatal error, so we're jumping ship! ***

But if you live to fight the troll:

>kill troll
(with the sword)
You don't have the sword.

>i
You are carrying:
  A brass lantern (providing light)
  A sword

So something is clearly wrong, and it's not a second player trampling on the first's state in this case.

icculus commented 3 years ago

This still works in mojozork, so it's something multizork is stepping on. I would guess the duplicated player object.

icculus commented 3 years ago

No longer triggers die() when the troll causes damage to the player, but it still doesn't think I have the sword when I attempt to attack.