hedgewars/uTeams.pas
changeset 13272 5984e8c6cbeb
parent 13174 061d55939e47
child 13412 236cc4cf2448
equal deleted inserted replaced
13271:4b9c5cf49c9f 13272:5984e8c6cbeb
   269 procedure AfterSwitchHedgehog;
   269 procedure AfterSwitchHedgehog;
   270 var i, t: LongInt;
   270 var i, t: LongInt;
   271     CurWeapon: PAmmo;
   271     CurWeapon: PAmmo;
   272     w: real;
   272     w: real;
   273     vg: PVisualGear;
   273     vg: PVisualGear;
       
   274     g: PGear;
   274     s: ansistring;
   275     s: ansistring;
   275 begin
   276 begin
   276 if PlacingHogs then
   277 if PlacingHogs then
   277     begin
   278     begin
   278     PlacingHogs:= false;
   279     PlacingHogs:= false;
   330 ApplyAmmoChanges(CurrentHedgehog^);
   331 ApplyAmmoChanges(CurrentHedgehog^);
   331 
   332 
   332 if (not CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel = 0) then
   333 if (not CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel = 0) then
   333     SetBinds(CurrentTeam^.Binds);
   334     SetBinds(CurrentTeam^.Binds);
   334 
   335 
   335 bShowFinger:= true;
       
   336 
       
   337 if PlacingHogs then
   336 if PlacingHogs then
   338     begin
   337     begin
   339     if CurrentHedgehog^.Unplaced then
   338     if CurrentHedgehog^.Unplaced then
   340         TurnTimeLeft:= 15000
   339         TurnTimeLeft:= 15000
   341     else TurnTimeLeft:= 0
   340     else TurnTimeLeft:= 0
   342     end
   341     end
   343 else if ((GameFlags and gfTagTeam) <> 0) and (not NextClan) then
       
   344     begin
       
   345     if TagTurnTimeLeft <> 0 then
       
   346         TurnTimeLeft:= TagTurnTimeLeft;
       
   347     TagTurnTimeLeft:= 0;
       
   348     end
       
   349 else
   342 else
   350     begin
   343     begin
   351     TurnTimeLeft:= cHedgehogTurnTime;
   344     if ((GameFlags and gfTagTeam) <> 0) and (not NextClan) then
   352     TagTurnTimeLeft:= 0;
   345         begin
   353     NextClan:= false;
   346         if TagTurnTimeLeft <> 0 then
       
   347             TurnTimeLeft:= TagTurnTimeLeft;
       
   348         TagTurnTimeLeft:= 0;
       
   349         end
       
   350     else
       
   351         begin
       
   352         TurnTimeLeft:= cHedgehogTurnTime;
       
   353         TagTurnTimeLeft:= 0;
       
   354         NextClan:= false;
       
   355         end;
       
   356 
       
   357     if (GameFlags and gfSwitchHog) <> 0 then
       
   358         begin
       
   359         g:= AddGear(hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y), gtSwitcher, 0, _0, _0, 0);
       
   360         CurAmmoGear:= g;
       
   361         lastGearByUID:= g;
       
   362         end
       
   363     else
       
   364         bShowFinger:= true;
   354     end;
   365     end;
   355 IsGetAwayTime:= false;
   366 IsGetAwayTime:= false;
   356 
   367 
   357 if (TurnTimeLeft > 0) and (CurrentHedgehog^.BotLevel = 0) then
   368 if (TurnTimeLeft > 0) and (CurrentHedgehog^.BotLevel = 0) then
   358     begin
   369     begin