--- 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;