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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 07-01-13, 12:12 PM   #11
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

things will get really interesting once I finish the carriers spawning aircraft patch for the game.

Here's how the game works in regards to carriers and airbases (land):

A timer is checked to see if it's time to spawn airgroup units. If it's time:
game goes through every unit in the game and compares the distance from them to the carrier/airbase to a fixed value. If the distance is within the fixed value the game will spawn an airgroup unit. The airgroup unit is given random starting position and random waypoints.

My patch changes the code in the above so that if the unit is a carrier and the carrier has the unit as a contact then an airgroup unit is spawned. It's starting position is the carrier. It's given a waypoint of the contact's current position and another waypoint as the carrier's current position. This means the unit will head directly to the contact and once done return to the carrier position (when it spawned the aircraft). The unit is free to engage other contacts if it detects them (a la IRAI) before arriving at unit's position or when returning to the carrier.

I could make it really complex and update the airgroup unit's carrier's waypoint with the carrier's current position so that the unit will always return to the carrier's current position but decided it wasn't worth the time and code. Instead I set the altitude to a ridiculously high value so you'll never see it disappear from the game

I've been working on this patch for over 4 months and the end is near
TheDarkWraith is offline   Reply With Quote
 


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 09:38 PM.


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.