hedgewars/uVisualGears.pas
changeset 2045 b0588498bc3a
parent 2044 8548f5be2d72
child 2047 805f7b62cff6
--- a/hedgewars/uVisualGears.pas	Mon May 11 19:42:29 2009 +0000
+++ b/hedgewars/uVisualGears.pas	Mon May 11 21:19:47 2009 +0000
@@ -26,7 +26,6 @@
 {$ENDIF}
 	uFloat;
 {$INCLUDE options.inc}
-const AllInactive: boolean = false;
 
 type PVisualGear = ^TVisualGear;
 	TVGearStepProcedure = procedure (Gear: PVisualGear; Steps: Longword);
@@ -254,15 +253,15 @@
 
 if Gear^.Timer = 0 then
 	begin
-	CurrentHedgehog^.SpeechGear:= nil;
+	PHedgehog(Gear^.Hedgehog)^.SpeechGear:= nil;
 	DeleteVisualGear(Gear)
 	end;
 end;
 
 procedure doStepSpeechBubble(Gear: PVisualGear; Steps: Longword);
 begin
-if (CurrentHedgehog^.SpeechGear <> nil) then DeleteVisualGear(CurrentHedgehog^.SpeechGear);
-CurrentHedgehog^.SpeechGear:= Gear;
+if (PHedgehog(Gear^.Hedgehog)^.SpeechGear <> nil) then DeleteVisualGear(PHedgehog(Gear^.Hedgehog)^.SpeechGear);
+PHedgehog(Gear^.Hedgehog)^.SpeechGear:= Gear;
 
 Gear^.Timer:= max(Length(Gear^.Text)*150,3000);