I've spent another couple of days in experimentation, trying to better understand how ships are handled as they sink. I've refined things with some better control over matters than when I last left things many months ago.
For the smaller vessels controlled by ShipGeneric.class, which include 'lesser' craft such as fishing junks, landing craft, etc., instead of the former sinking within less than a second now they take mostly 10-30 seconds to go down. Looks MUCH better.
For the larger ships handled by BigshipGeneric.class, I have the sinking times made shorter for the smaller ones, this being scaled linearly by size. I use the turning radius value as the discriminator here, the larger values generally applying to larger vessels.
For all ships I have them partially sink in shallow water--when sufficiently near the shore for their size. Formerly the testing distance for assessing water depth was limited to 355m from the nearest shoreline. This happens to be the limit within which a mobile (non-stationary) ship can approach a shoreline. I've doubled the testing distance to 710m, which allows such ships to reliably sink partially when within the outer half of this new distance threshold. That is, a carrier can get to within 355m of the shore and no closer. From this distance out to 710m it will not sink fully. Smaller ships require to be nearer to shore in order to have some part remain above the waves.
In this screenie I show 4 carriers at differing distance from the shore. The inner two are within the 710m limit, and have already settled on the bottom. The outer two sank fully not long after this. I show also four camouflaged trawlers. The farthest is barely protruding. A fifth such vessel, in line with these and farther still from the shore, has fully sunk.
Another fix. Formerly the pitch and roll applied to sinking ships was always in the same sense, that being forward and to starboard, respectively. I've added a randomizer to get some sinking by the stern and/or rolling to port. For the four carriers here, in increasing distance from the shore, the pitch/roll are:
- bow/starboard
- stern/port
- stern/port
- bow/starboard.
Every time the same mission is played this can vary. Already there was a randomness to the pitch and roll angle, which of course has been retained.
