SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 08-01-12, 03:40 PM   #1
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Dogfish40 View Post
Great, thanks for that. Exciting patches, can't wait to get home and get this installed.
oh there's so much more to come
TheDarkWraith is offline   Reply With Quote
Old 08-01-12, 04:12 PM   #2
Sartoris
Captain
 
Join Date: May 2011
Posts: 489
Downloads: 106
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
oh there's so much more to come
Very exciting! Do keep us updated!
Sartoris is offline   Reply With Quote
Old 08-01-12, 04:43 PM   #3
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,292
Downloads: 374
Uploads: 0


Default

Hello, TDW, sir!
What about new Sub on bottom fix issue?

EDIT: I ask because you didn't answer my previous question..
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel

Last edited by volodya61; 08-01-12 at 05:15 PM.
volodya61 is offline   Reply With Quote
Old 08-01-12, 07:40 PM   #4
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by volodya61 View Post
Hello, TDW, sir!
What about new Sub on bottom fix issue?

EDIT: I ask because you didn't answer my previous question..
I'm looking into it I see what I have to do now it's just finding the right pointers



Collision routine (and supporting functions) in a nutshell for torpedo:

Iterare over every unit:
-clear flag
-check bouding box of item with bounding box of potential collidee
-if intersection found then:
--iterate over every 3D node in collidee:
---test for intersection of item's bounding box to 3D node bounding box
---if intersection flag it and EXIT
---if no intersection found keep checking 3D nodes
--if flag not set then check next unit
-if flag not set check next unit
-if flag set EXIT

if flag not set: EXIT - no collision

if flag set:
Iterate over every unit:
-Check for collision with magnetic detonator:
--Check magnetic detonator installed and active
--Check magnetic detonator range
--Get pointer to collidee (item torpedo collided into)
--Iterate over each zone (box) of collidee:
---get the closest x,y,z points of the box to the impact point
---calculate distance from impact point to points found above (D sub i)
---get magnetic detonator range and square it MDR2
---compare D sub i to MDR2
---if less than keep checking
--if no collision found exit
-convert magnetic detonator range into real units
-breakdown unit's lattitude and longitude into it's component parts
-get collidee's max depth for it's location
-compare component parts to magnetic detonator range (in real units)
-if magnetic detonator range (in real units) > all component parts range then no collision - EXIT

if not flagged: no collision found - EXIT

if flagged:
- iterate over every zone (box) of the collidee
--get axis values of the zone(box)
--calculate distance from impact point to zone (box)
--square zone (box) axis value
--compare calculated distance to square of zone (box) axis value
--if before or equal then check next zone (box)
--if after:
---take lazy square root of calculated distance
---subtract lazy square root of calculated distance from square of magnetic detonator range and store this value on stack
---flag this zone (box)
---check next zone (box)
when done checking all zones (boxes):
-compare magnetic detonator range to value saved on stack
-see if value saved to stack was flagged or not
--if flagged:
---normalize all the zone (box) coordinates
---save pointer to item collided with to stack
---EXIT
--if not flagged: EXIT

if pointer to item collided with not null:
-get distance from collider to item
-get zone (box) coordinates and subtract collider's bounding box coordinates from it
-normalize the result

To be continued....
TheDarkWraith is offline   Reply With Quote
Old 08-01-12, 11:25 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Finally found the routine that updates all the zones (boxes) damage level, flooding level, and checks to see if damage level >= critical floatation value (when flooding starts)

For a little test I set the damage greater than value for critical floatation level in some zones. I fully expected flooding to start increasing in these zones.....but no, the flooding level was constantly being reset to 0.... Houston, we have a problem!
TheDarkWraith is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:17 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.