hedgewars/uGears.pas
changeset 2045 b0588498bc3a
parent 2042 905c554d62e6
child 2053 9a8a4add3eff
equal deleted inserted replaced
2044:8548f5be2d72 2045:b0588498bc3a
   589 			else begin
   589 			else begin
   590             ResetUtilities;
   590             ResetUtilities;
   591 			ParseCommand('/nextturn', true);
   591 			ParseCommand('/nextturn', true);
   592 			SwitchHedgehog;
   592 			SwitchHedgehog;
   593 
   593 
   594 			inc(step);
   594 			inc(step); // FIXME wtf is that, it overflows step, and does nothing
   595 
   595 
   596 			AfterSwitchHedgehog;
   596 			AfterSwitchHedgehog;
   597 			bBetweenTurns:= false
   597 			bBetweenTurns:= false
   598 			end;
   598 			end;
   599 			step:= Low(step)
   599 			step:= Low(step)
   647     if (CurrentTeam <> nil) then
   647     if (CurrentTeam <> nil) then
   648        with CurrentTeam^ do
   648        with CurrentTeam^ do
   649           for i:= 0 to cMaxHHIndex do
   649           for i:= 0 to cMaxHHIndex do
   650               with Hedgehogs[i] do
   650               with Hedgehogs[i] do
   651                   begin
   651                   begin
   652                   if (SpeechGear <> nil) then DeleteVisualGear(SpeechGear);  // remove to restore persisting beyond end of turn. Tiy says was too much of a gameplay issue
   652                   if (SpeechGear <> nil) then
       
   653                      begin
       
   654                      DeleteVisualGear(SpeechGear);  // remove to restore persisting beyond end of turn. Tiy says was too much of a gameplay issue
       
   655                      SpeechGear:= nil
       
   656                      end;
       
   657 
   653                   if (Gear <> nil) then
   658                   if (Gear <> nil) then
   654                      if (GameFlags and gfInvulnerable) = 0 then
   659                      if (GameFlags and gfInvulnerable) = 0 then
   655                         Gear^.Invulnerable:= false;
   660                         Gear^.Invulnerable:= false;
   656                   end;
   661                   end;
   657 end;
   662 end;
       
   663 
   658 procedure ApplyDamage(Gear: PGear; Damage: Longword);
   664 procedure ApplyDamage(Gear: PGear; Damage: Longword);
   659 var s: shortstring;
   665 var s: shortstring;
   660     vampDmg: Longword;
   666     vampDmg: Longword;
   661 begin
   667 begin
   662 	inc(Gear^.Damage, Damage);
   668 	inc(Gear^.Damage, Damage);