All pastes #912501 Raw Edit

Mine

public text v1 · immutable
·published 2008-02-21 12:47 UTC
rendered paste body
  Script.TryToRemoveUDPSourcePort;
  if not (BattleState.Status = Hosting) then
    case BattleState.Battle.NATType of
    0: ; // use default (system assigned) port
    1: Script.AddOrChangeKeyValue('GAME/SourcePort',IntToStr(NATTraversal.MyPrivateUDPSourcePort));
    2: Script.AddOrChangeKeyValue('GAME/SourcePort',IntToStr(FIRST_UDP_SOURCEPORT + BattleState.Battle.Clients.IndexOf(Status.Me) - 1{skip the host}));
    end; // of case sentence