mnalis / ironseed_fpc

Iron Seed is a science-fiction DOS game from 1994, which was both developed and published by Channel 7. Gameplay is real-time, featuring trading, diplomacy, and strategy. This version has been changed to make it possible to compile it with the freepascal compiler under Linux.
GNU General Public License v3.0
17 stars 0 forks source link

does Security / Masking work correctly? #74

Closed mnalis closed 4 years ago

mnalis commented 4 years ago

According to manual:

         The Mask Ship command will order engineering to mask all emissions from the
         ship in an attempt to make the ship 'invisible'  While the ship is not truly
         cloaked it is certainly difficult to scan and almost impossible to track when
         in this mode.  Enemies will usually drift away when you are in this mode.
mnalis commented 4 years ago

it seems wrong:

procedure movewandering;
begin
 case action of
  WNDACT_NONE:;
  WNDACT_RETREAT: adjustwanderer(round(-(ship.accelmax div 4)*(100-ship.damages[DMG_ENGINES])/100));
  WNDACT_ATTACK: adjustwanderer(round((ship.accelmax div 4)*(100-ship.damages[DMG_ENGINES])/100));
 end;
 case ship.wandering.orders of
  WNDORDER_ATTACK: if action=WNDACT_MASKING then adjustwanderer(30) else adjustwanderer(2);
  WNDORDER_RETREAT: if action=WNDACT_MASKING then adjustwanderer(-50) else adjustwanderer(-70);
  WNDORDER_NONE: adjustwanderer(-30);
 end;
end;

negative values to adjustwanderer() should be increasing distance, and positive values decreasing distance. Here if masking is enabled, they find us much faster which is wrong