All pastes #912499 Raw Edit

Someone

public text v1 · immutable
·published 2008-02-21 12:45 UTC
rendered paste body
// script.txt generation

  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 + MyPlayerNum - 1{skip the host}));
    end; // of case sentence
  Script.AddOrChangeKeyValue('GAME/MyPlayerNum',IntToStr(MyPlayerNum));
  Script.AddOrChangeKeyValue('GAME/NumPlayers',IntToStr(BattleState.Battle.Clients.Count));
  Script.AddOrChangeKeyValue('GAME/NumTeams',IntToStr(NumberOfTeams));
  Script.AddOrChangeKeyValue('GAME/NumAllyTeams',IntToStr(NumberOfAllyTeams));