Changeset 558 for trunk/GameServer.pas


Ignore:
Timestamp:
Apr 25, 2024, 6:31:34 PM (3 weeks ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GameServer.pas

    r550 r558  
    602602          ($7F01FFFF or fPrefStartPos or fStartPos) or ($F shl 27);
    603603        if RealMap[Loc1] and (fTerrain or fSpecial) = fSwamp or fSpecial2 then
    604           RealMap[Loc1] := RealMap[Loc1] and not(fTerrain or fSpecial) or
     604          RealMap[Loc1] := RealMap[Loc1] and not (fTerrain or fSpecial) or
    605605            (fSwamp or fSpecial1);
    606606        if (RealMap[Loc1] and fDeadLands <> 0) and
    607607          (RealMap[Loc1] and fTerrain <> fArctic) then
    608           RealMap[Loc1] := RealMap[Loc1] and not(fTerrain or fSpecial)
     608          RealMap[Loc1] := RealMap[Loc1] and not (fTerrain or fSpecial)
    609609            or fDesert;
    610610      end;
     
    16471647            V21_to_Loc(Loc, Radius);
    16481648            for V21 := 1 to 26 do
    1649               if Tiles and (1 shl V21) and not(1 shl CityOwnTile) <> 0 then
     1649              if Tiles and (1 shl V21) and not (1 shl CityOwnTile) <> 0 then
    16501650              begin
    16511651                Loc1 := Radius[V21];
     
    16581658                  (Treaty[Occupant[Loc1]] < trPeace) then
    16591659                begin
    1660                   Tiles := Tiles and not(1 shl V21);
     1660                  Tiles := Tiles and not (1 shl V21);
    16611661                  UsedByCity[Loc1] := -1;
    16621662                  Flags := Flags or chSiege;
     
    17931793      begin // nation made extinct
    17941794        Happened := Happened or phExtinct;
    1795         GAlive := GAlive and not(1 shl pTurn);
     1795        GAlive := GAlive and not (1 shl pTurn);
    17961796        Stat[stPop, pTurn, GTurn] := 0;
    17971797        Stat[stMil, pTurn, GTurn] := 0;
     
    18731873          end;
    18741874      end;
    1875       if WinOnAlone and (GAlive and not(1 shl pTurn or 1) = 0) then
     1875      if WinOnAlone and (GAlive and not (1 shl pTurn or 1) = 0) then
    18761876        GWinner := 1 shl pTurn; // break if only one nation left
    18771877
     
    21752175          GiveCivilReport(P, MoveInfo.Defender);
    21762176          for I := 0 to nAdv - 1 do
    2177             if not(I in FutureTech) and (RW[P].Tech[I] < tsSeen) and
     2177            if not (I in FutureTech) and (RW[P].Tech[I] < tsSeen) and
    21782178              (RW[MoveInfo.Defender].Tech[I] >= tsApplicable) then
    21792179            begin
     
    21852185        if Mode = moPlaying then
    21862186          LogCheckBorders(P, nCity - 1, MoveInfo.Defender);
    2187 {$IFOPT O-} if Mode < moPlaying then
    2188           InvalidTreatyMap := not(1 shl P); {$ENDIF}
     2187{$IFOPT O-}
     2188        if Mode < moPlaying then
     2189          InvalidTreatyMap := not (1 shl P);
     2190{$ENDIF}
    21892191        // territory should not be considered for the rest of the command
    21902192        // execution, because during loading a game it's incorrect before
     
    41134115        if (Subject >= RW[Player].nUn) or (RW[Player].Un[Subject].Loc < 0) then
    41144116          Result := eInvalid
    4115         else if not(RW[Player].Model[RW[Player].Un[Subject].mix].Kind
     4117        else if not (RW[Player].Model[RW[Player].Un[Subject].mix].Kind
    41164118          in [mkSettler, mkSlaves]) and
    41174119          (RW[Player].Un[Subject].Flags and unConscripts = 0) then
     
    44254427        begin
    44264428          if (OldImp < 0) or (OldImp >= nImp) or
    4427             not(Imp[OldImp].Kind in [ikCommon, ikNatLocal, ikNatGlobal]) then
     4429            not (Imp[OldImp].Kind in [ikCommon, ikNatLocal, ikNatGlobal]) then
    44284430            Result := eInvalid
    44294431          else
    44304432            with RW[Player].City[Subject] do
    44314433              if (Built[OldImp] = 0) or (Project and cpImp = 0) or
    4432                 not(Imp[Project and cpIndex].Kind in [ikCommon, ikNatLocal,
     4434                not (Imp[Project and cpIndex].Kind in [ikCommon, ikNatLocal,
    44334435                ikNatGlobal]) then
    44344436                Result := eInvalid
Note: See TracChangeset for help on using the changeset viewer.