-
Notifications
You must be signed in to change notification settings - Fork 120
Strange code when creating ships #479
Comments
It looks like a hack to update "expired" |
There is a bug in New Horizons that happens when ships are recreated when in a coastal locations (ships are spawned in the background), that causes the player character entry to be deleted (as the player ship is also recreated). For now I think I'm going to disable this code in a New Horizons-specific branch and see how it goes. |
Does SD2/NH use phantoms? if not, that probably should be safe. Honestly, I would move such code into the scripts even if it's needed By the way, you can also "fix" that from NH scripts by removing |
If by phantoms you mean generated characters that are temporary with recycled ids, then yes. The biggest problem is that the main character also has an |
Main character should always have |
Also, recently I discovered an old bug that leads to similar issues e.g. when spawning sailors. Let me know if disabling that code won't help. I'll try to find it, I think I fixed it locally |
When executing
MSG_SHIP_CREATE
the following bit of code is getting run:storm-engine/src/libs/ship/src/ship.cpp
Lines 1937 to 1942 in ee274cc
Which appears to be replacing the entry for the character data with the character index?!?
Anyone has any idea why or how this is ever needed?
The text was updated successfully, but these errors were encountered: