Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when two ships are touching, sometimes the missile reload sequence fails to ever reload #61

Open
thoraxe opened this issue Mar 17, 2023 · 1 comment
Assignees

Comments

@thoraxe
Copy link
Contributor

thoraxe commented Mar 17, 2023

No description provided.

@RoddieKieley
Copy link
Contributor

Looks like the missile lives on forever and thus a new one cannot be created. Looking at the client we see that the missile is added to the group "missiles" but never removed and only QueueFree()'d upon explosion. While a miss that could be cleaned up other ways if the node is auto removed from the group upon destruction but not sure if that's the case.

However doing that alone is not enough as testing today with 20 server side players showed that if the client fired and held down the 2nd missile would pass through the same ship and likely the missile would live forever as there was never a boom to be heard after it went off screen.

An update server side in the ExpireMissile function like:
// check if reload complete
if (MissileReady == false)
{
// _serilogger.Debug($"PlayerShip.cs: player {uuid} not done with reload - skipping");
// return;
_serilogger.Debug($"PlayerShip.cs: player {uuid} not done with reload - continuing anyway and setting MissileReady!");
MissileReady = true;
}

Avoids this behaviour but probably isn't safe so it may come down to the timing between reload and explosion and how that's handled. A little more digging and testing would likely say for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants