slingshot icon indicating copy to clipboard operation
slingshot copied to clipboard

Fix disappearing planets in network games (they turned into BHs)

Open HAL20000 opened this issue 5 years ago • 2 comments

This fixes a bug in network games: Some plantes would (visually randomly) disappear in the client game. Inspection showed, that the client instance would create Black Holes for any planet of the host instance which has a sprite number (Planet.n) larger than MAX_PLANETS, however, this is not sensible. By replacing this with the number of sprites (8 in the current implementation), the bug is fixed. Since the numebr of sprites might change, a corresponding constant was introduced into as Settings.NUM_PLANET_SPRITES.

HAL20000 avatar May 08 '19 22:05 HAL20000

Hi!

Sorry for the delay. I did a bit of work on merging your changes and Florian Schüller's this morning, but it seems that I broke network games. I'll try to debug that later on this week. Here's the merge branch if you're curious: https://github.com/ryanakca/slingshot/tree/merge-schuellerf-HAL20000

Thanks for your contribution to Slingshot!

ryanakca avatar Jun 10 '19 13:06 ryanakca

Hi!

I have had a quick look on the merge branch and I think it might be problematic that Florian Schüller's changeswhen trying to fixing the problems in network mode collide with my changes on fixing it. You might want to consider reverting his commit a1da39ed467a4a16e043ac3407c57d7bc57d884f before merging my changes. In any case, I will take a more detailed look inte the merge in a few days perhaps.

Cheers, HAL20000

On 2019-06-10 13:16, Ryan Kavanagh wrote:

Hi!

Sorry for the delay. I did a bit of work on merging your changes and Florian Schüller's this morning, but it seems that I broke network games. I'll try to debug that later on this week. Here's the merge branch if you're curious: https://github.com/ryanakca/slingshot/tree/merge-schuellerf-HAL20000

Thanks for your contribution to Slingshot!

HAL20000 avatar Jun 13 '19 15:06 HAL20000