- Fix grenade sound
authorunc0rr
Thu, 07 Aug 2008 07:21:18 +0000
changeset 1158 d03d12ef8971
parent 1157 c2e02c52dcad
child 1159 49c88f620e51
- Fix grenade sound - Higher screen size restrictions
QTfrontend/ui_hwform.cpp
hedgewars.kdevelop
hedgewars/GSHandlers.inc
--- a/QTfrontend/ui_hwform.cpp	Wed Aug 06 12:48:45 2008 +0000
+++ b/QTfrontend/ui_hwform.cpp	Thu Aug 07 07:21:18 2008 +0000
@@ -31,7 +31,7 @@
 
 	HWForm->setObjectName(QString::fromUtf8("HWForm"));
 	HWForm->resize(QSize(640, 480).expandedTo(HWForm->minimumSizeHint()));
-	HWForm->setMinimumSize(QSize(620, 430));
+	HWForm->setMinimumSize(QSize(720, 430));
 	HWForm->setWindowTitle(QMainWindow::tr("Hedgewars"));
 	centralWidget = new QWidget(HWForm);
 	centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
--- a/hedgewars.kdevelop	Wed Aug 06 12:48:45 2008 +0000
+++ b/hedgewars.kdevelop	Thu Aug 07 07:21:18 2008 +0000
@@ -19,20 +19,20 @@
     <projectname>hedgewars</projectname>
     <projectdirectory>.</projectdirectory>
     <absoluteprojectpath>false</absoluteprojectpath>
-    <description></description>
+    <description/>
     <versioncontrol>kdevsubversion</versioncontrol>
-    <defaultencoding></defaultencoding>
+    <defaultencoding/>
   </general>
   <kdevcustomproject>
     <run>
       <directoryradio>executable</directoryradio>
       <customdirectory>/</customdirectory>
       <mainprogram>bin/hedgewars</mainprogram>
-      <programargs></programargs>
+      <programargs/>
       <terminal>false</terminal>
       <autocompile>true</autocompile>
       <envvars/>
-      <globaldebugarguments></globaldebugarguments>
+      <globaldebugarguments/>
       <globalcwd>/usr/home/unC0Rr/Sources/Hedgewars/Hedgewars-FF/trunk</globalcwd>
       <useglobalprogram>false</useglobalprogram>
       <autoinstall>false</autoinstall>
@@ -55,16 +55,16 @@
     </general>
     <build>
       <buildtool>make</buildtool>
-      <builddir></builddir>
+      <builddir/>
     </build>
     <make>
       <abortonerror>true</abortonerror>
       <numberofjobs>4</numberofjobs>
       <prio>0</prio>
       <dontact>false</dontact>
-      <makebin></makebin>
-      <defaulttarget></defaulttarget>
-      <makeoptions></makeoptions>
+      <makebin/>
+      <defaulttarget/>
+      <makeoptions/>
       <selectedenvironment>default</selectedenvironment>
       <environments>
         <default/>
@@ -72,9 +72,9 @@
     </make>
     <other>
       <prio>0</prio>
-      <otherbin></otherbin>
-      <defaulttarget></defaulttarget>
-      <otheroptions></otheroptions>
+      <otherbin/>
+      <defaulttarget/>
+      <otheroptions/>
       <selectedenvironment>default</selectedenvironment>
       <environments>
         <default/>
@@ -83,12 +83,12 @@
   </kdevcustomproject>
   <kdevdebugger>
     <general>
-      <dbgshell></dbgshell>
+      <dbgshell/>
       <programargs/>
-      <gdbpath></gdbpath>
-      <configGdbScript></configGdbScript>
-      <runShellScript></runShellScript>
-      <runGdbScript></runGdbScript>
+      <gdbpath/>
+      <configGdbScript/>
+      <runShellScript/>
+      <runGdbScript/>
       <breakonloadinglibs>true</breakonloadinglibs>
       <separatetty>false</separatetty>
       <floatingtoolbar>false</floatingtoolbar>
@@ -194,7 +194,7 @@
       <includeTypedefs>false</includeTypedefs>
     </codecompletion>
     <creategettersetter>
-      <prefixGet></prefixGet>
+      <prefixGet/>
       <prefixSet>set</prefixSet>
       <prefixVariable>m_,_</prefixVariable>
       <parameterName>theValue</parameterName>
--- a/hedgewars/GSHandlers.inc	Wed Aug 06 12:48:45 2008 +0000
+++ b/hedgewars/GSHandlers.inc	Thu Aug 07 07:21:18 2008 +0000
@@ -145,7 +145,10 @@
 	exit
 	end;
 CalcRotationDirAngle(Gear);
-if (Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving) then PlaySound(sndGrenadeImpact, false)
+if (Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving) then
+	if (hwAbs(Gear^.dX) > _0_1) or
+	   (hwAbs(Gear^.dY) > _0_1) then
+		PlaySound(sndGrenadeImpact, false)
 end;
 
 procedure doStepCluster(Gear: PGear);