hedgewars/uTeams.pas
changeset 167 805fa9a27e9e
parent 165 9b9144948668
child 176 533d03041dcd
equal deleted inserted replaced
166:2920ab2bf329 167:805fa9a27e9e
    54      TTeam = record
    54      TTeam = record
    55              Next: PTeam;
    55              Next: PTeam;
    56              Color: Cardinal;
    56              Color: Cardinal;
    57              TeamName: string[MAXNAMELEN];
    57              TeamName: string[MAXNAMELEN];
    58              ExtDriven: boolean;
    58              ExtDriven: boolean;
    59              Aliases: array[0..cKeyMaxIndex] of shortstring;
    59              Binds: TBinds;
    60              Hedgehogs: array[0..cMaxHHIndex] of THedgehog;
    60              Hedgehogs: array[0..cMaxHHIndex] of THedgehog;
    61              Ammos: array[0..cMaxHHIndex] of THHAmmo;
    61              Ammos: array[0..cMaxHHIndex] of THHAmmo;
    62              CurrHedgehog: integer;
    62              CurrHedgehog: integer;
    63              NameTag: PSDL_Surface;
    63              NameTag: PSDL_Surface;
    64              CrossHairRect,
    64              CrossHairRect,
   160 ResetKbd;
   160 ResetKbd;
   161 cWindSpeed:= (GetRandom * 2 - 1) * cMaxWindSpeed;
   161 cWindSpeed:= (GetRandom * 2 - 1) * cMaxWindSpeed;
   162 AddGear(0, 0, gtATSmoothWindCh, 0, 0, 0, 1).Tag:= round(72 * cWindSpeed / cMaxWindSpeed);
   162 AddGear(0, 0, gtATSmoothWindCh, 0, 0, 0, 1).Tag:= round(72 * cWindSpeed / cMaxWindSpeed);
   163 {$IFDEF DEBUGFILE}AddFileLog('Wind = '+FloatToStr(cWindSpeed));{$ENDIF}
   163 {$IFDEF DEBUGFILE}AddFileLog('Wind = '+FloatToStr(cWindSpeed));{$ENDIF}
   164 ApplyAmmoChanges(CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog]);
   164 ApplyAmmoChanges(CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog]);
       
   165 if CurrentTeam.ExtDriven then SetDefaultBinds
       
   166                          else SetBinds(CurrentTeam.Binds);
   165 TurnTimeLeft:= cHedgehogTurnTime
   167 TurnTimeLeft:= cHedgehogTurnTime
   166 end;
   168 end;
   167 
   169 
   168 function AddTeam: PTeam;
   170 function AddTeam: PTeam;
   169 begin
   171 begin