Figured I'd have a look though the "CCCdirectsail.c" file and found this:
Code:
float GetIslandSize(string island) // ccc Jan07 returns the aprox radius of an islands coastline
{
switch(island)
{
case "Redmond": return 2000.0; break;
case "IslaMuelle": return 2000.0; break;
case "Oxbay": return 2000.0; break;
case "Conceicao": return 2000.0; break;
case "Hispaniola": return 7000.0; break;
case "Cuba": return 8000.0; break;
case "IslaDeMuerte": return 100.0; break; // KK
return 1000.0; // default size for average island
}
}
That doesn't use the radii as defined on the WorldMap at all.
Looks like that is used to abort DirectSail if you're too close to an island:
Code:
float coastzone = GetIslandSize(pchar.location)+1000;
// if ( abs(stf(pchar.Ship.Pos.x)) < coastzone && abs(stf(pchar.Ship.Pos.z)) < coastzone ) // orig code
float coastdistance = GetDistance2D(0.0, 0.0, stf(pchar.Ship.Pos.x), stf(pchar.Ship.Pos.z)); // LDH 06Jan09
if (coastdistance < coastzone) // LDH 06Jan09
{
DSTrace("Directsail encounter aborted, too close to coast of " + FindIslandName(pchar.location) + ", " + makeint(coastdistance) + " of " + makeint(coastzone));
return;
}
Other than that, no radii seem to be used in the "accurate navigation" mode.
This was mainly used for the old "Cell Navigation" which is still there in the code, but bypassed by an if-toggle.
So I suppose the solution is probably somewhere in
GetMapIslandzone in that same file.
If you use the regular [0] key to disable DirectSail, does it all misbehave as well or does it actually become OK then?
This here is where the worldmap coordinates get set based on your 3D Sailing Mode position, for example:
Code:
string GetMapIslandzone(string Island)
// Screwface Jan07, converts your Seaview coords to mapcoords and checks if you are near some island
// Only called if ACCURATE_NAVIGATION is true
// LDH optimizations - 13Mar09
{
ref Pchar = GetMaincharacter();
DSTrace("== Directsail checked island zone at " + GetStringTime(stf(Pchar.CurrentTime)));
if (!CheckAttribute(worldmap, "islands."+Island)) // LDH so we don't try getting island after mooring - 05Jan09
{
DSTrace("** GetMapIslandzone tried to process " + Island);
return "";
}
float psX = MakeFloat(pchar.Ship.Pos.x);
float psZ = MakeFloat(pchar.Ship.Pos.z);
float ix = MakeFloat(worldMap.islands.(Island).position.rx);
float iz = MakeFloat(worldMap.islands.(Island).position.rz);
//REAL CONVERTION OF YOUR SEAVIEW COORDS IN WORLD MAP COORDS
worldMap.playerShipX = (psX/WDM_MAP_TO_SEA_SCALE) + ix;
worldMap.playerShipZ = (psZ/WDM_MAP_TO_SEA_SCALE) + iz;
I think for that to be accurate, it does require the coordinates of the islands on the WorldMap to correspond with the 3D models for Sailing Mode.
To make this extra confusing, this scale is CHANGED between Open Sea Mod ON/OFF (e.g. Arcade and Realistic Game Mode).
But doesn't that logically have to be a
fixed scale factor based on the size of the 3D world and the WorldMap?
And should that scale factor not have been changed when
@Armada redid the worldmap?