[Current Forum ] [Archive 2003 - 2005]
[Register]  [Profile]  [Preferences]  [Search]
[Private messages]  [Memberslist]  [FAQ]  [Login]
Subsim Radio Room Forum Index » » Sub Command » » Depth Charge Doctrine
Author Depth Charge Doctrine
jsteed


Joined: Apr 08, 2002
Posts: 253
Posted: 2002-10-09 20:30   
Depth charges dropped from airplanes do not always work correctly. A few will float in the air. In another thread, Thomasew pointed out the reason for this. I can confirm his observations. The problem arises "occasionally" due to the plane being unable to match the max altitude and speed of the DC. There is a bug in the program which causes this. This error occurs in clusters of 3 or 4.

I believe I have a partial fix to the problem. I say partial because it does not eliminate floating DCs fully. With these changes, approximately 1 in 40 or 50 will still float in the air. Although over half of those enter the water, pass through the seabed and then return to the surface! Also approximately 10% of the DCs will drop through the seabed and not disappear. We can consider these duds. Since they are of class Mine, they will stay on the screen, (truth on).

Here is the fix:
1) Change the max altitude of the DC to 15000.
2) Change the max speed to 600

These changes are needed to reflect the fastest possible speed and altitude of the planes carrying them.

3) Use this doctrine as a replacement for DepthCharge.txt

The biggest change to it is to remove DetonationDepth from it. This led to many floating DCs. I also changed the algorithm that calculates the depth for the DC to explode. I also added a timer to detonate a few, (3-4 out of 50), DCs that otherwise wouldn't.

I will be out of town until Sunday, so I won't be able to answer any questions till then. If there are any problems with this solution, please let me know.

Cheers, jsteed

; Depth Charge

var Depth
var Timer

; Pick Random Depth Setting
IF INIT THEN {
if TerrainAlt > MinAlt then {
Depth = ( 5 - Rnd ( Abs ( TerrainAlt ) ) )
} else {
Depth = ( -50 - RND ( Abs ( MinAlt + 50 ) ) )
} endif
Timer = ( Time + 45 )
} ENDIF

; Blow Up At Selected Depth
IF ( ( OwnAlt <= Depth ) OR ( Timer <= Time ) ) THEN {
DETONATE
} ENDIF


I edited this line, it had a parenthesis in the wrong spot
Depth = ( -50 - RND ( Abs ( MinAlt + 50 ) ) )

[ This Message was edited by: jsteed on 2002-10-10 12:23 ]


  View Profile of jsteed      Edit/Delete This Post   Reply with quote
Lock this Topic Move this Topic Delete this Topic
Powered by phpBB Version 1.4.4
Copyright © 2000 - 2001 The phpBB Group

phpBB Created this page in 0.007603 seconds.