kgersen / Allegiance

Allegiance - RTS + FPS Space Combat game
http://www.freeallegiance.org/
MIT License
18 stars 26 forks source link

Exiting alephs while boosting sometimes gives extra fuel #18

Open kgersen opened 8 years ago

kgersen commented 8 years ago

When exiting an aleph while just running out of fuel at virtually the same time, a ship will exit the aleph with full fuel while no fuel tank is expended from the ship's cargo.

It has to be timed right: you must run out of fuel and begin the fuel reload sequence JUST as you hit the aleph.

This is an exploit and should be fixed :)

Imported from trac ticket #19, created by Tigereye on 01-05-2010 at 10:32, last modified: 11-25-2012 at 01:41

kgersen commented 8 years ago

'''juckto''' Related exploit: If you're boosting towards the aleph, let go of boost and press reload just as you go through, you will continue boosting on the other side while your fuel reloads - 5 seconds free burn time, and a lot easier to do.

Trac comment by fuzzylunkin1 on 01-05-2010 at 10:33

kgersen commented 8 years ago

Possible solution: Check the fuel level right before the ship enters the aleph, then set it right as it exits. When it sets it, possibly force a check of the fuel level for the ship's boosters, and if there isn't any, shut them down.

I've not looked at the code for this yet, so I don't know how easily the second part would be. The first would be fairly simple. I'm not sure that it would solve the problem, though, but it's worth a shot.

Trac comment by Andon on 07-12-2010 at 08:13

kgersen commented 8 years ago

I think I can fix this...

Trac comment by pkk on 08-13-2010 at 11:09

kgersen commented 8 years ago

r967

Trac comment by Xynth on 08-13-2010 at 17:37

kgersen commented 8 years ago

During my local testing I was unable to trigger the exploit, but during testing on beta server I were able to do it.

So [967] didn't fix the problem and maybe it's a problem between server/client communication. It needs more investigation.

Trac comment by pkk on 08-13-2010 at 22:16

kgersen commented 8 years ago

Would this work?

Trac comment by TurkeyXIII on 10-08-2011 at 10:15

kgersen commented 8 years ago

I removed my changes from trunk with r1041.

Trac comment by pkk on 11-22-2011 at 20:47

kgersen commented 8 years ago

Have tested it for 15 minutes and were unable to trigger the bug.

Needs more testing.

Trac comment by pkk on 01-16-2012 at 22:31

kgersen commented 8 years ago

Fixed with [1046]

Trac comment by pkk on 01-17-2012 at 23:10

kgersen commented 8 years ago

Still reproducible with 1051.

Trac comment by TurkeyXIII on 02-26-2012 at 11:09

kgersen commented 8 years ago

Changing that line in trekigc.cpp to trekClient.GetShip()->GetMountedPart(ET_Afterburner, 0)->Deactivate(); fixes it, but has the side-effect of decreasing the power of an active booster even if it has fuel. Not noticeable with booster 1 or lt booster 1, but might be a thing on cores with boosters that take a long time to warm up.

Trac comment by TurkeyXIII on 02-26-2012 at 11:47

LordBlacksun commented 7 years ago

Needs testing from current bulid