# HG changeset patch # User sheepluva # Date 1269964872 0 # Node ID 724e094a89124fe0500cfee5f907c64100e9548f # Parent 8483c794858bf6f7d8dbdefa48a42b9dce5e6965 fix fpc 2.2.4 type related warning with unclear origin diff -r 8483c794858b -r 724e094a8912 hedgewars/GSHandlers.inc --- 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; //////////////////////////////////////////////////////////////////////////////// diff -r 8483c794858b -r 724e094a8912 hedgewars/uGears.pas --- 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;