NickMcConnell / FAangband

First Age Angband
http://nickmcconnell.github.io/FAangband/
85 stars 15 forks source link

Handle monster groups when a ghost is skipped over in chunk_copy() #423

Closed backwardsEric closed 5 months ago

backwardsEric commented 5 months ago

Avoids a assertion failure copying over the monster groups when both chunks have a ghost.

An alternate implementation of this, which would assume less about the internals of monster_remove_from_groups(), would copy over the ghost to skip (but still not overwrite dest->ghost) and then call delete_monster_idx() for the ghost to skip at the end of chunk_copy(). That would require modifying delete_monster_idx() to take a chunk argument, and that modifcation to delete_monster_idx() should be done in Vanilla to avoid unnecessary differences between FAAngband's code and Vanilla's.

NickMcConnell commented 5 months ago

Hmm, I'll have a think about that

NickMcConnell commented 5 months ago

Yes, on the whole I think the correct thing to do is add a chunk argument to delete_monster_idx(), delete_monster(), and probably monster_index_move().

NickMcConnell commented 5 months ago

The changes to monster deletion are in ac430bd (via Vanilla), but I haven't done the chunk_copy() changes.

backwardsEric commented 5 months ago

Okay, I will close this and submit the changes to chunk_copy() using the new form of delete_monster_idx() as a separate pull request once I've done generated enough levels to verify that it is working as expected.

NickMcConnell commented 5 months ago

Thanks