View Single Post
Old 02-21-17, 03:45 PM   #6
areo16
Sonar Guy
 
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
Default

Quote:
Originally Posted by Stiebler View Post
@Areo16:

The specific intercept that I use is in the code beginning at SH3Collisions.act+02e70. Register ebx points to the active unit.

This is particularly useful, in that:
a) only scripted units (including the player's unit) pass through this code. Randomly-generated units and land units have their own code. This saves a lot of computation.
b) The SH3Collisions.act code is mostly activated only when other units are sufficiently close to the U-boat that a collision (eg with a bomb or shell) might occur.

Thus scripted aircraft can only make my new code active when they are close to the U-boat, but before the U-boat is seen, and before a radar-warning given. Then, in poor visibility, the hit-points at float[ebx+00B8] are set to zero and [ebx+00D0] is also set to zero, which kills further movement of the aircraft.

But note how useful this is: if there are many scripted aircraft flying nearby, only those sufficiently close to the U-boat will be eliminated. The others will continue to fly their scripted routes even in bad weather, so they remain still a threat to the U-boat when visibility becomes better.

I have also revised my plan stated above to provide multiple scripts at 7-day intervals for periods of months in area north-west of Spain. As just stated, most of the scripted aircraft will survive poor visibility anyway, because the U-boat is not near. Moreover - I forgot earlier - most U-boat patrols will be of at least six weeks' duration. Therefore it is only necessary to provide scripts, not for every seven days, but for every six weeks - and at 2-3 month intervals when the air cover was present, but weaker, in the same area.

Stiebler.

Thank you for this offset. This will help for many things.
areo16 is offline   Reply With Quote