stackcollision / GardenConquest

A new conquest game mode for Space Engineers
6 stars 7 forks source link

/gc fleet stop turned on inertial dampeners but did not turn on thrusters #123

Open drNovikov opened 8 years ago

drNovikov commented 8 years ago

I decided to investigate other player's report on misbehaving /gc fleet stop and tried to see how it works myself.

Just tested this on my B.O.B. while sitting in its cockpit. /gc fleet stop turned on inertial dampeners but did not turn on thrusters, which, of course, did not effectively stop the ship.

I'd suggest turning on thrusters and disabling all overrides (same with gyroscopes), like I do in my "Emergency Stop" script here: http://steamcommunity.com/sharedfiles/filedetails/?id=515022499

drNovikov commented 8 years ago

Tested /gc fleet stop on my PC, and it seemed to work (unlike the server). Stopped the ship instantly.

drNovikov commented 8 years ago

Logged on again, the issue is reproduceable. Ship did not stop with thrusters off, while on my local PC it stopped instantly (seemed to flicker the thrusters for a split second, but not enough to decelerate the ship).

zrisher commented 8 years ago

The code that does this is right here: https://github.com/stackcollision/GardenConquest/blob/0a22c8cb4027c5c051d8c719b70869879b68ca62/Data/Scripts/GardenConquest/Messaging/RequestProcessor.cs#L145

It sounds like gridToStop.Physics.ClearSpeed(); is failing to propagate the stop to the clients. We should probably look for a way to fix this, but yes if we force thrusters on (and the grid is powered), that should stop this problem, since thruster sync seems to work pretty well.

It also sounds like we need to set an override on gyrscopes to stop things from rotating.

drNovikov commented 8 years ago

If it fails to propagate the message to the clients, does this mean the server and the clients have different speeds and positions of the ship?

drNovikov commented 8 years ago

Submitted a pull request that:

  1. Enables thrusters.
  2. Enables gyroscopes.
  3. Sets gyroscopes power to 100%.
  4. Disables gyroscope overrides.

Tested it on my local PC, works as expected.

zrisher commented 8 years ago

If it fails to propagate the message to the clients, does this mean the server and the clients have different speeds and positions of the ship?

Very likely yes.

Submitted a pull request

Thank you!!!!

123

drNovikov commented 8 years ago

If very likely yes, than it's potentially destructive!