hedgewars/uTeams.pas
changeset 2431 23242609c44b
parent 2376 ece7b87f1334
child 2579 e5e4ebf528b5
equal deleted inserted replaced
2430:b87046cd8ae4 2431:23242609c44b
   206 end;
   206 end;
   207 
   207 
   208 procedure AfterSwitchHedgehog;
   208 procedure AfterSwitchHedgehog;
   209 var g: PGear;
   209 var g: PGear;
   210 begin
   210 begin
       
   211 inc(CurrentTeam^.Clan^.TurnNumber);
       
   212 
   211 SwitchNotHeldAmmo(CurrentHedgehog^);
   213 SwitchNotHeldAmmo(CurrentHedgehog^);
       
   214 
   212 with CurrentHedgehog^ do
   215 with CurrentHedgehog^ do
   213 	begin
   216 	begin
   214 	with Gear^ do
   217 	with Gear^ do
   215 		begin
   218 		begin
   216 		Z:= cCurrHHZ;
   219 		Z:= cCurrHHZ;
   219 		end;
   222 		end;
   220 	RemoveGearFromList(Gear);
   223 	RemoveGearFromList(Gear);
   221 	InsertGearToList(Gear);
   224 	InsertGearToList(Gear);
   222 	FollowGear:= Gear
   225 	FollowGear:= Gear
   223 	end;
   226 	end;
   224 
       
   225 inc(CurrentTeam^.Clan^.TurnNumber);
       
   226 
   227 
   227 ResetKbd;
   228 ResetKbd;
   228 
   229 
   229 cWindSpeed:= rndSign(GetRandom * cMaxWindSpeed);
   230 cWindSpeed:= rndSign(GetRandom * cMaxWindSpeed);
   230 g:= AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1);
   231 g:= AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1);