Page 2 of 2

Posted: Sat Aug 15, 2009 9:42 am
by Imago
The code:
http://alleg.pastebin.com/m65b629d5

Line 314 - Launch from base in cc_06 GT regular Fig /w uber fuel tank
Line 573 - Began boosting
Line 746 - Stopped boosting
Line 758 - Reduced throttle
Line 864 - All stop
Line 866 - Uber acceleration GA completes (5.0 modifier)
Line 885 - Increased throttle (100%)
Line 919 - Began boosting
Line 975 - Stopped boosting
Line 1128 - Reduced throttle
Line 1148 - All stop

The lines:
http://alleg.pastebin.com/m695112a1

This confirms acceleration GA is buggy and that the problem is indeed in ExecuteShipMove.

Compellor was able to compile my changes and denied that they work.

So far I've been unable to find a "Fix" So I've posted my data in hopes that someone can help me :unsure:

Posted: Sat Aug 15, 2009 11:27 am
by madpeople
Imago wrote:QUOTE (Imago @ Aug 12 2009, 06:43 AM) if ((m_stateM & coastButtonIGC) && !afterF) - coastbutton WTF? ANYWAYS i usually hold down the boost key so i'm going to the else...
I would hazzard a guess that coast button = vector lock

What does the accel GA actually affect?

is float thrust = m_myHullType.GetThrust();
The thrust the ship can apply after GAs have been applied? - Is the accel GA a GA that effects the value of thrust returned by m_myHullType.GetThrust() ?

and

m_pHullData->thrust

The original value of thrust of the ship before any GAs?

I'm basically asking what variable the accel GA changes in that code?


edit:
I'm mainly interested in this line

Code: Select all

negDesiredSpeed = maxSpeed * (-1.0f - thrustRatio)
Thrust ratio is the ratio of booster thrust / ship thrust.

If the ship's thrust is

negDesiredSpeed = 100 * (-1 - 2)
negDesiredSpeed = 100 * (-3)
negDesiredSpeed = -300

Now, say if our ship's thrust is increased, by say a accel GA to say 40, and the booster's thrust is still 40, thrust ratio will be 40/40 = 1, if max speed is 100 and we are boosting, we will get

negDesiredSpeed = 100 * (-1 - 1)
negDesiredSpeed = 100 * (-2)
negDesiredSpeed = -200

and we have a lower target top speed for boosting

madpeople thinks that the accel GA isn't being applied to the boosters's thrust

so changing
float abThrust = afterburner->GetMaxThrust();
to include the accel GA might do it

... but then that's basically the same as imago's code, but doing it a different way (I'm doing (booster thrust + GA)/(ship thrust + GA), he is doing (booster thrust)/(ship thrust)

...

madpeople thinks printing out two copies of it, and dry running it, once withiout the GA, once with to see where things go wonkey might help.

Posted: Sat Aug 15, 2009 12:12 pm
by Imago
lol please

Posted: Sat Aug 15, 2009 1:11 pm
by madpeople
oh deflate your ego and stop thinking you're the only one around here who can fix things, try posting useful things instead.

edit from IRC:
[15:00] <Rock[]> [15:40] <Rock[]> the suggestion from madp seems to work
[15:00] <Rock[]> [15:41] <Rock[]> float abThrust = afterburner->GetMaxThrust() * this->GetSide()->GetGlobalAttributeSet().GetAttribute(c_gaThrust);

Posted: Sat Aug 15, 2009 2:31 pm
by MrChaos
Dear Imago

You're doing it again and yes :iluv:

MrChaos :lol:

Posted: Sat Aug 15, 2009 2:58 pm
by Imago
doing what again? ask for help? i know i need to stop doing that :lol:

Posted: Sat Aug 15, 2009 3:44 pm
by Imago
Revision: 474
Author: Imago
Date: 10:44:13 AM, Saturday, August 15, 2009
Message:
Fixes acceleration GA bug (madpeople/Rock/Imago)
----
Modified : /branch/FAZR5Contrib/src/Igc/afterburnerIGC.h
Modified : /branch/FAZR5Contrib/src/Igc/igc.h
Modified : /branch/FAZR5Contrib/src/Igc/shipIGC.cpp
Modified : /branch/FAZR5Contrib/src/WinTrek/consoledata.cpp
Modified : /branch/FAZR5Contrib/src/WinTrek/load.cpp



Thanks madpeple & Rock for your help with this one! :iluv:

A HUGE thanks to MrChaos, this wouldn't have been possible w/o him :glare:
:P

Posted: Sat Aug 15, 2009 4:06 pm
by madpeople
:roll:

I notice you've still got some of your solution which didn't work in there, along with some debug output looking at the difference between my solution and yours (mainly involving the var desiredVelocityDifference ), I take it that will all get cleaned up before it's released? - we don't need the release calculating debug stuff.

Posted: Mon Aug 17, 2009 3:46 am
by MrChaos
Imago wrote:QUOTE (Imago @ Aug 15 2009, 10:44 AM) Revision: 474
Author: Imago
Date: 10:44:13 AM, Saturday, August 15, 2009
Message:
Fixes acceleration GA bug (madpeople/Rock/Imago)
----
Modified : /branch/FAZR5Contrib/src/Igc/afterburnerIGC.h
Modified : /branch/FAZR5Contrib/src/Igc/igc.h
Modified : /branch/FAZR5Contrib/src/Igc/shipIGC.cpp
Modified : /branch/FAZR5Contrib/src/WinTrek/consoledata.cpp
Modified : /branch/FAZR5Contrib/src/WinTrek/load.cpp



Thanks madpeple & Rock for your help with this one! :iluv:

A HUGE thanks to MrChaos, this wouldn't have been possible w/o him :glare:
:P
:bananadance: