fix fpc 2.2.4 type related warning with unclear origin
authorsheepluva
Tue, 30 Mar 2010 16:01:12 +0000
changeset 3180 724e094a8912
parent 3179 8483c794858b
child 3181 5c350b6c38f4
fix fpc 2.2.4 type related warning with unclear origin
hedgewars/GSHandlers.inc
hedgewars/uGears.pas
--- a/hedgewars/GSHandlers.inc	Tue Mar 30 15:46:33 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Tue Mar 30 16:01:12 2010 +0000
@@ -242,7 +242,7 @@
 if (Gear^.nImpactSounds > 0) then
     if ((Gear^.Damage <> 0) or ((Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving))) and
        ((Gear^.dX.QWordValue > _0_1.QWordValue) or (Gear^.dY.QWordValue > _0_1.QWordValue)) then
-        PlaySound(TSound(ord(Gear^.ImpactSound) + GetRandom(Gear^.nImpactSounds)));
+        PlaySound(TSound(ord(Gear^.ImpactSound) + LongInt(GetRandom(Gear^.nImpactSounds))));
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/hedgewars/uGears.pas	Tue Mar 30 15:46:33 2010 +0000
+++ b/hedgewars/uGears.pas	Tue Mar 30 16:01:12 2010 +0000
@@ -58,7 +58,7 @@
             FlightTime: Longword;
             uid: Longword;
             ImpactSound: TSound; // first sound, others have to be after it in the sounds def.
-            nImpactSounds: ShortInt; // count of ImpactSounds
+            nImpactSounds: Word; // count of ImpactSounds
             SoundChannel: LongInt
         end;