GamingCoookie / dv-multiplayer-continued

A multiplayer modification for the game Derail Valley
Other
16 stars 5 forks source link

Fix errors when syncing jobs preventing clients from joining #33

Closed Insprill closed 1 year ago

Insprill commented 1 year ago

Fixes two NullRefrenceExceptions when syncing jobs.

The first was from JobSaveManager's jobBooklets field being null when invoking #LoadJobChain. It's now set to a list of booklets from the player's inventory, as it is in #LoadJobSaveGameData.

The second occurred when getting a Job from chainJobs. Now, if the Job is null, it's skipped.

In my testing, these changes don't cause any issues, but I'm not familiar with this system inside and out so please do a sanity check.