Closed NQNStudios closed 1 year ago
This bug is quite mystifying. As far as I can tell, it goes wrong right here:
But how it can possibly go wrong there, I've yet to figure out.
I put a breakpoint on that line and the debugger didn't stop at it. Maybe that's not where it goes wrong?
Ah the breakpoint worked when I put in on the corresponding line in the v2 function.
More specifically, it goes wrong when the adventurers array is swapped, like we talked about on IRC: https://github.com/calref/cboe/blob/32f24b40d6da3d483f5d05f1212d0e1ae8223497/src/universe/party.cpp#L167
In my debugger when I open the party, I'm actually finding that a breakpoint on that line triggers TWICE. The first time, items are preserved. The second time, they get wiped. Are we expecting it to be called twice?
(Edit: I'm using this debugger Watch expression to monitor the items: univ.party.adven[0]->items[0]
)
Fixed in #328.
On Linux, when I create a new party in-game, save, close the game, open it and load the party, they won't have any items.
The same goes for opening any party in the character editor.