View Issue Details

IDProjectCategoryView StatusLast Update
0001617FSSCPphysicspublic2009-11-17 22:59
ReporterZacam Assigned ToBackslash  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionopen 
PlatformMorkalebOSXP/XP64OS VersionSP2/SP3
Summary0001617: Problem with Glide and Matching Speed
DescriptionWhen you have _any_ ship selected and you Match Speed (or have it Auto Toggle On) and Toggle Glide, Player Ship accelerates to Max Afterburner speed until Glide is turned off. This does not consume any afterburner energy.

Alternatively, without Match Speed turned on, any movement of the throttle will kick the acceleration on.

Issue begins with XT Build 0215 and continues in 0222, and is present WMCoolmon's Widescreen Stable.

Affects Widescreen 16:9 and Fixed 4:3.
Steps To ReproduceLaunch any BtRL or FS mission (With Glide enabled in TBM or Tables). Select a target (Friendly or Hostile, has to be able to be Matched in speed), Match Speed with it and toggle Glide on, OR select a target and toggle Glide on and move Throttle.
Additional InformationPosted to taylor in PM, who suggested reporting on Mantis if reproduceable outside of XT Builds.

Builds Tested:
3.6.9 (Via Turey,s Installer)
3.6.9 (Via BtRL Demo)
3.6.10 XT: 1007, 1028, 1115, 1119, 1207, 0215, 0217, 0222
3.6.10 C02182008 (WMCoolmon Widescreen Build)
TagsNo tags attached.

Activities

Backslash

2008-02-29 22:55

developer   ~0008921

When you say _any_ ship I assume it's one that has $Glide: YES . If you mean it happens to ships that should not be able to glide, that's a bug. Let me know.

The match speed thing is a known issue. I'm working on it, but I'm really not sure how best to make it actually match speeds yet. Someday, I'd love for it to be able to match vectors!

The 'any movement of the throttle will kick the acceleration on' is intended.

Zacam

2008-03-02 13:33

administrator   ~0008932

I did not actually try targeting ships that did NOT have $Glide: YES enabled.

Testing.

Enabling Glide on the Myrmidon and playing "A Place of Chariots" results in the same behavior regardless of if I have targeted the Loki's (which do NOT have Glide Enabled) or fellow pilots in Myrmidons.

However, targeting Cargo Containers results in glide working normally: IE speed is maintained unless/until throttle control is used.

Backslash

2008-03-04 09:12

developer   ~0008935

Sorry, didn't mean it that way -- the ships you target don't matter if they can glide or not, especially because the AI can't use glide. I was worried you had found a way to start gliding without $Glide: YES .

For now I guess I could make a quick fix: would it be better for it to just ignore the fact you have Match Speed on, when you start gliding?

Zacam

2008-03-05 03:42

administrator   ~0008937

Not knowing the mechanics of the engine as well as I would like, I don't see a problem with that idea. It really should just maintain the matched speed when glide is enabled. If it cannot, then ignoring Matched Speed and setting to current speed would work.

I do hwever also have an issue with it being able to reach AB speed when in glide when Match Speed is off. It is nice to use throttle control to change the glide path, but AB really should only be an obtainable speed when AB is used.

Backslash

2008-03-05 12:13

developer   ~0008938

Last edited: 2008-03-05 12:14

Man, now you've got me thinking. As soon as I'm a bit less busy I want to try tackling a Match Vector mode while gliding. Done right that would be So Cool.

As for gliding, there is the new option +Max Glide Speed: http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Glide: where you can set the limit to whatever you like.
It defaults to the ship's afterburner speed.

So the reason/argument for that went something like this:
Please make gliding vector adjustable with thrusters!
Ok, but that results in possible near-infinite speeds.
So make a speed limit.
But what limit?
Since we can turn on Glide while afterburning and gliding continues at that speed, why not make that the default limit.
:-)

havner

2009-04-13 21:54

reporter   ~0010808

Last edited: 2009-04-13 21:59

About max glide speed:
The ship shouldn't accelerate to that speed moment after hitting glide, it could with afterburner.

On 3.6.10 RC2 I'm flying like 30 with BTRL viper on auto match, hit glide and immediately start to accelerate. This should happen only after using A/B, not automatically.

I image it to work like that:

You stay at the speed you had when initiating glide. Then with A/B (here come vectors) your speed is modified as you use them. So if you fly 30, you rotate to some other direction, hit A/B, your speed is modified by the vector your A/B gave you but when you turn A/B off your speed vector should stay as it was in the last moment of flying with A/B.

If vectors are out of question now the previous 3.6.9 behaviour should be back. The current one is very bad for the following reasons:

1. You can cheat with constantly flying on A/B speed (this is really an issue in TBP/BTRL)
2. You can't glide easily while flying in formation (which is annoying).

2009-05-19 13:26

 

speedmatch_glide_off.patch (1,399 bytes)   
Index: code/playerman/playercontrol.cpp
===================================================================
--- code/playerman/playercontrol.cpp	(revision 5165)
+++ code/playerman/playercontrol.cpp	(working copy)
@@ -1218,13 +1218,16 @@
 					tspeed = tspeed * (0.5f + dist/200.0f);
 				}
 
-				//pmax_speed = Ship_info[Ships[Player_obj->instance].ship_info_index].max_speed;
-				pmax_speed = Ships[Player_obj->instance].current_max_speed;
-				ci->forward_cruise_percent = (tspeed / pmax_speed) * 100.0f;
-				override_analog_throttle = 1;
-	//			if ( ci->forward_cruise_percent > 100.0f )
-	//				HUD_printf ("Cannot travel that fast.  Setting throttle to full.");
-				// mprintf(("forward -- %7.3f\n", ci->forward_cruise_percent));
+				//SUSHI: If gliding, don't do anything for speed matching
+				if (!(Objects[Player->objnum].phys_info.flags & PF_GLIDING)) {
+					//pmax_speed = Ship_info[Ships[Player_obj->instance].ship_info_index].max_speed;
+					pmax_speed = Ships[Player_obj->instance].current_max_speed;
+					ci->forward_cruise_percent = (tspeed / pmax_speed) * 100.0f;
+					override_analog_throttle = 1;
+					//if ( ci->forward_cruise_percent > 100.0f )
+						//HUD_printf ("Cannot travel that fast.  Setting throttle to full.");
+					// mprintf(("forward -- %7.3f\n", ci->forward_cruise_percent));
+				}
 
 			} else
 				Player->flags &= ~PLAYER_FLAGS_MATCH_TARGET;
speedmatch_glide_off.patch (1,399 bytes)   

Sushi_CW

2009-05-19 13:26

developer   ~0010910

I've actually fixed this in my "SushiGlide" changes by disabling speed matching in glide mode. (I hadn't known there was an open ticket for it). This works well enough to prevent the ship from going crazy if you hit glide mode while speed matching.

The attached patch (speedmatch_glide_off) is part of SushiGlide, but it could be applied independently without any problems.

More on the SushiGlide stuff (which also addresses the "cheat" problem) mentioned:
http://www.hard-light.net/forums/index.php/topic,62485.0.html

Zacam

2009-06-24 02:26

administrator   ~0010987

Last edited: 2009-10-05 05:26

Confirmed as "fixed" since 5340 commit of Sushi's Glide mechanics.

Still fixed.

Sushi_CW

2009-11-17 22:59

developer   ~0011295

This has apparently been resolved for a while, marking it as such.

Issue History

Date Modified Username Field Change
2008-02-28 08:57 Zacam New Issue
2008-02-29 22:48 Backslash Status new => assigned
2008-02-29 22:48 Backslash Assigned To => Backslash
2008-02-29 22:55 Backslash Note Added: 0008921
2008-03-02 13:33 Zacam Note Added: 0008932
2008-03-04 09:12 Backslash Note Added: 0008935
2008-03-05 03:42 Zacam Note Added: 0008937
2008-03-05 12:13 Backslash Note Added: 0008938
2008-03-05 12:14 Backslash Note Edited: 0008938
2009-04-13 21:54 havner Note Added: 0010808
2009-04-13 21:58 havner Note Edited: 0010808
2009-04-13 21:59 havner Note Edited: 0010808
2009-05-19 13:26 Sushi_CW File Added: speedmatch_glide_off.patch
2009-05-19 13:26 Sushi_CW Note Added: 0010910
2009-06-24 02:26 Zacam Note Added: 0010987
2009-10-05 05:26 Zacam Note Edited: 0010987
2009-11-17 22:59 Sushi_CW Note Added: 0011295
2009-11-17 22:59 Sushi_CW Status assigned => resolved