Merge alfadur's server commits with timer cycle key commits
authorWuzzy <Wuzzy2@mail.ru>
Sat, 21 Jul 2018 02:06:13 +0200
changeset 13534 395a4c92e523
parent 13533 0c8001e43fd3 (diff)
parent 13531 282218ab1b28 (current diff)
child 13535 4dd9711b0206
Merge alfadur's server commits with timer cycle key commits
--- a/ChangeLog.txt	Fri Jul 20 20:00:52 2018 -0400
+++ b/ChangeLog.txt	Sat Jul 21 02:06:13 2018 +0200
@@ -3,6 +3,8 @@
 ====================== 0.9.25 ======================
 Game:
  + Add new key to show mission panel (default: M)
+ + Add new key to cycle through timer values (default: N)
+ + Add default controls for controller (see README.md)
  + Add chat command “/help”, displays help for chat commands
  + Increase hedgehog limit to 64
  * Functionality of controllers restored
--- a/QTfrontend/binds.cpp	Fri Jul 20 20:00:52 2018 -0400
+++ b/QTfrontend/binds.cpp	Sat Jul 21 02:06:13 2018 +0200
@@ -44,6 +44,7 @@
     {"timer 3",   "3",          QT_TRANSLATE_NOOP("binds", "timer 3 sec"),     NULL, NULL},
     {"timer 4",   "4",          QT_TRANSLATE_NOOP("binds", "timer 4 sec"),     NULL, NULL},
     {"timer 5",   "5",          QT_TRANSLATE_NOOP("binds", "timer 5 sec"),     NULL, NULL},
+    {"timer_u",   "n",          QT_TRANSLATE_NOOP("binds", "change timer"),    NULL, NULL},
     {"+attack",   "space",      QT_TRANSLATE_NOOP("binds", "attack"),          NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Fire your selected weapon or trigger an utility item:")},
     {"put",       "mousel",     QT_TRANSLATE_NOOP("binds", "put"),             NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Pick a weapon or a target location under the cursor:")},
     {"findhh",    "h",          QT_TRANSLATE_NOOP("binds", "autocam / find hedgehog"),QT_TRANSLATE_NOOP("binds (categories)", "Camera"), QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle automatic camera / refocus on active hedgehog:")},
--- a/QTfrontend/binds.h	Fri Jul 20 20:00:52 2018 -0400
+++ b/QTfrontend/binds.h	Sat Jul 21 02:06:13 2018 +0200
@@ -22,9 +22,9 @@
 #include <QString>
 
 #ifdef VIDEOREC
-#define BINDS_NUMBER 50
+#define BINDS_NUMBER 51
 #else
-#define BINDS_NUMBER 49
+#define BINDS_NUMBER 50
 #endif
 
 struct BindAction
--- a/README.md	Fri Jul 20 20:00:52 2018 -0400
+++ b/README.md	Sat Jul 21 02:06:13 2018 +0200
@@ -77,15 +77,16 @@
 
 * 1st D-pad: Walk and aim
 * 2nd D-pad / 1st thumbstick: Move camera/cursor
-* Button 1: Long jump
-* Button 2: High jump
-* Button 3: Attack
-* Button 4: Ammo menu
-* Button 5: Precise
-* Button 6: Select target, or pick weapon (in ammo menu)
-* Button 7: Switch hedgehog
-* Button 8: Find hedgehog / toggle auto camera
-* Button 9: Mission panel
+* Button  1: Long jump
+* Button  2: High jump
+* Button  3: Attack
+* Button  4: Ammo menu
+* Button  5: Precise
+* Button  6: Select target, or pick weapon (in ammo menu)
+* Button  7: Switch hedgehog
+* Button  8: Change timer
+* Button  9: Find hedgehog / toggle auto camera
+* Button 10: Mission panel
 
 For the full list, go to the Hedgewars settings. Also read the weapon tooltips
 for weapon-specific controls.
@@ -96,7 +97,7 @@
 configured controls:
 
 * Precise + Toggle hedgehog tags: Change visible hedgehog tags (team name/hog name/health)
-* Switch + Toggle hedgehog tags: Toggle hedgehog tag translucency
+* Switch  + Toggle hedgehog tags: Toggle hedgehog tag translucency
 * Precise + Toggle team bars + Switch: Toggle HUD
 * Precise + Capture (screenshot key): Save current map + mask into Screenshot directory
 
--- a/hedgewars/uCommandHandlers.pas	Fri Jul 20 20:00:52 2018 -0400
+++ b/hedgewars/uCommandHandlers.pas	Sat Jul 21 02:06:13 2018 +0200
@@ -419,6 +419,32 @@
     end
 end;
 
+// Increment timer or bounciness
+procedure chTimerU(var s: shortstring);
+var t: LongWord;
+    tb: Byte;
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH then
+    exit;
+// We grab the current timer first so we can increment it
+if (CurrentHedgehog^.Gear^.Message and gmPrecise) = 0 then
+    t:= HHGetTimerMsg(CurrentHedgehog^.Gear)
+else
+    // Use bounciness if Precise is pressed
+    t:= HHGetBouncinessMsg(CurrentHedgehog^.Gear);
+if t <> MSGPARAM_INVALID then
+    begin
+    // Calculate new timer
+    Inc(t);
+    if t > 5 then
+        t:= 1;
+    tb:= t mod 255;
+    // Delegate the actual change to /timer
+    ParseCommand('timer ' + Chr(tb + Ord('0')), true);
+    end;
+end;
+
 procedure chSlot(var s: shortstring);
 var slot: LongWord;
     ss: shortstring;
@@ -938,6 +964,7 @@
     RegisterVariable('advmapgen',@chAdvancedMapGenMode, false);
     RegisterVariable('+mission', @chShowMission_p, true);
     RegisterVariable('-mission', @chShowMission_m, true);
+    RegisterVariable('timer_u' , @chTimerU       , true );
 end;
 
 procedure freeModule;
--- a/hedgewars/uConsts.pas	Fri Jul 20 20:00:52 2018 -0400
+++ b/hedgewars/uConsts.pas	Sat Jul 21 02:06:13 2018 +0200
@@ -318,8 +318,15 @@
     AMMO_INFINITE = 100;
     AMMO_FINITE_MAX = 99;
 
+    // Special msgParam value used internally for invalid/non-existing value
+    // Must not be sent over the network!
+    MSGPARAM_INVALID = High(LongWord);
+
     probabilityLevels: array [0..8] of LongWord = (0,20,30,60,100,200,400,600,800);
 
+    defaultBounciness = 1000;
+    bouncinessLevels: array [0..4] of LongWord = (350, 700, defaultBounciness, 2000, 4000);
+
     // explosion flags
     //EXPLAllDamageInRadius = $00000001;  Completely unused for ages
     EXPLAutoSound         = $00000002;
--- a/hedgewars/uGearsHedgehog.pas	Fri Jul 20 20:00:52 2018 -0400
+++ b/hedgewars/uGearsHedgehog.pas	Sat Jul 21 02:06:13 2018 +0200
@@ -31,6 +31,10 @@
 procedure AddPickup(HH: THedgehog; ammo: TAmmoType; cnt, X, Y: LongWord);
 procedure CheckIce(Gear: PGear); inline;
 procedure PlayTaunt(taunt: Longword);
+function HHGetTimer(Gear: PGear): LongWord;
+function HHGetTimerMsg(Gear: PGear): LongWord;
+function HHGetBounciness(Gear: PGear): LongWord;
+function HHGetBouncinessMsg(Gear: PGear): LongWord;
 
 implementation
 uses uConsts, uVariables, uFloat, uAmmos, uSound, uCaptions,
@@ -185,28 +189,25 @@
     if ((Gear^.Message and gmPrecise) <> 0) and ((CurWeapon^.Propz and ammoprop_SetBounce) <> 0) then
         begin
         color:= Gear^.Hedgehog^.Team^.Clan^.Color;
+
         case Gear^.MsgParam of
             1: begin
                AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce1]), color, capgrpAmmostate);
-               CurWeapon^.Bounciness:= 350;
                end;
             2: begin
                AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce2]), color, capgrpAmmostate);
-               CurWeapon^.Bounciness:= 700;
                end;
             3: begin
                AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce3]), color, capgrpAmmostate);
-               CurWeapon^.Bounciness:= 1000;
                end;
             4: begin
                AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce4]), color, capgrpAmmostate);
-               CurWeapon^.Bounciness:= 2000;
                end;
             5: begin
                AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce5]), color, capgrpAmmostate);
-               CurWeapon^.Bounciness:= 4000;
                end
-            end
+            end;
+        CurWeapon^.Bounciness:= bouncinessLevels[Gear^.MsgParam - 1];
         end
     else if (CurWeapon^.Propz and ammoprop_Timerable) <> 0 then
         begin
@@ -216,6 +217,57 @@
         end;
 end;
 
+// Return timer (in ticks) of hogs current ammo or MSGPARAM_INVALID
+// if not timerable
+function HHGetTimer(Gear: PGear): LongWord;
+var CurWeapon: PAmmo;
+begin
+CurWeapon:= GetCurAmmoEntry(Gear^.Hedgehog^);
+with Gear^.Hedgehog^ do
+    if ((CurWeapon^.Propz and ammoprop_Timerable) <> 0) then
+        HHGetTimer:= CurWeapon^.Timer
+    else
+        HHGetTimer:= MSGPARAM_INVALID;
+end;
+
+// Returns timer as a corresponding msgParam for /timer command
+function HHGetTimerMsg(Gear: PGear): LongWord;
+var timer: LongInt;
+begin
+timer:= HHGetTimer(Gear);
+if timer > -1 then
+    HHGetTimerMsg:= timer div 1000
+else
+    HHGetTimerMsg:= MSGPARAM_INVALID
+end;
+
+// Returns the selected bounciness value for the hog gear's current ammo
+// or MSGPARAM_INVALID if current ammo has no settable bounciness
+function HHGetBounciness(Gear: PGear): LongWord;
+var CurWeapon: PAmmo;
+begin
+CurWeapon:= GetCurAmmoEntry(Gear^.Hedgehog^);
+with Gear^.Hedgehog^ do
+    if ((CurWeapon^.Propz and ammoprop_SetBounce) <> 0) then
+        HHGetBounciness:= CurWeapon^.Bounciness
+    else
+        HHGetBounciness:= MSGPARAM_INVALID
+end;
+
+// Returns bounciness as a corresponding msgParam for /timer command
+function HHGetBouncinessMsg(Gear: PGear): LongWord;
+var bounciness, i: LongInt;
+begin
+    bounciness:= HHGetBounciness(Gear);
+    if bounciness > -1 then
+        for i:=0 to High(bouncinessLevels) do
+            if bounciness = bouncinessLevels[i] then
+                begin
+                HHGetBouncinessMsg:= i+1;
+                exit
+                end;
+    HHGetBouncinessMsg:= MSGPARAM_INVALID
+end;
 
 procedure Attack(Gear: PGear);
 var xx, yy, newDx, newDy, lx, ly: hwFloat;
--- a/hedgewars/uInputHandler.pas	Fri Jul 20 20:00:52 2018 -0400
+++ b/hedgewars/uInputHandler.pas	Sat Jul 21 02:06:13 2018 +0200
@@ -380,6 +380,9 @@
 
     RegisterBind(DefaultBinds, 'f12', 'fullscr');
 
+    for i:= 1 to 10 do RegisterBind(DefaultBinds, 'f'+IntToStr(i), 'slot '+char(48+i));
+    for i:= 1 to 5  do RegisterBind(DefaultBinds, IntToStr(i), 'timer '+IntToStr(i));
+    RegisterBind(DefaultBinds, 'n', 'timer_u');
 
     RegisterBind(DefaultBinds, 'mousel', '/put');
     RegisterBind(DefaultBinds, 'mouser', 'ammomenu');
@@ -410,7 +413,7 @@
     RegisterBind(DefaultBinds, 'j0b4', '+precise');
     RegisterBind(DefaultBinds, 'j0b5', 'put');
     RegisterBind(DefaultBinds, 'j0b6', 'switch');
-    // TODO: Add controller-friendly way to change timer
+    RegisterBind(DefaultBinds, 'j0b7', 'timer_u');
 
     // Cursor movement (also essential)
     RegisterBind(DefaultBinds, 'j0h1r', '+cur_r');
@@ -424,11 +427,8 @@
     RegisterBind(DefaultBinds, 'j0a1d', '+cur_u');
 
     // Additional controls
-    RegisterBind(DefaultBinds, 'j0b7', 'findhh');
-    RegisterBind(DefaultBinds, 'j0b8', '+mission');
-
-    for i:= 1 to 10 do RegisterBind(DefaultBinds, 'f'+IntToStr(i), 'slot '+char(48+i));
-    for i:= 1 to 5  do RegisterBind(DefaultBinds, IntToStr(i), 'timer '+IntToStr(i));
+    RegisterBind(DefaultBinds, 'j0b8', 'findhh');
+    RegisterBind(DefaultBinds, 'j0b9', '+mission');
 
     loadBinds('dbind', cPathz[ptConfig] + '/settings.ini');
 end;
--- a/hedgewars/uVariables.pas	Fri Jul 20 20:00:52 2018 -0400
+++ b/hedgewars/uVariables.pas	Sat Jul 21 02:06:13 2018 +0200
@@ -838,7 +838,7 @@
                 Pos: 0;
                 AmmoType: amNothing;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: cHiddenSlotIndex;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -866,7 +866,7 @@
                 Pos: 0;
                 AmmoType: amGrenade;
                 AttackVoice: sndCover;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 1;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -894,7 +894,7 @@
                 Pos: 0;
                 AmmoType: amClusterBomb;
                 AttackVoice: sndCover;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 1;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -920,7 +920,7 @@
                 Pos: 0;
                 AmmoType: amBazooka;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 0;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -948,7 +948,7 @@
                 Pos: 0;
                 AmmoType: amBee;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 0;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -974,7 +974,7 @@
                 Pos: 0;
                 AmmoType: amShotgun;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 2;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1002,7 +1002,7 @@
                 Pos: 0;
                 AmmoType: amPickHammer;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 6;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1029,7 +1029,7 @@
                 Pos: 0;
                 AmmoType: amSkip;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 9;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1059,7 +1059,7 @@
                     Pos: 0;
                     AmmoType: amRope;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 7;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1087,7 +1087,7 @@
                 Pos: 0;
                 AmmoType: amMine;
                 AttackVoice: sndLaugh;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 4;
             TimeAfterTurn: 5000;
             minAngle: 0;
@@ -1111,7 +1111,7 @@
                 Pos: 0;
                 AmmoType: amDEagle;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 2;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1138,7 +1138,7 @@
                 Pos: 0;
                 AmmoType: amDynamite;
                 AttackVoice: sndLaugh;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 4;
             TimeAfterTurn: 5000;
             minAngle: 0;
@@ -1164,7 +1164,7 @@
                 Pos: 0;
                 AmmoType: amFirePunch;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 3;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1188,7 +1188,7 @@
                 Pos: 0;
                 AmmoType: amWhip;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 3;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1213,7 +1213,7 @@
                 Pos: 0;
                 AmmoType: amBaseballBat;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 3;
             TimeAfterTurn: 5000;
             minAngle: 0;
@@ -1244,7 +1244,7 @@
                 Pos: 0;
                 AmmoType: amParachute;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 7;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1272,7 +1272,7 @@
                 Pos: 0;
                 AmmoType: amAirAttack;
                 AttackVoice: sndIncoming;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 5;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1300,7 +1300,7 @@
                 Pos: 0;
                 AmmoType: amMineStrike;
                 AttackVoice: sndIncoming;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 5;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1326,7 +1326,7 @@
                 Pos: 0;
                 AmmoType: amBlowTorch;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 6;
             TimeAfterTurn: 3000;
             minAngle: 804;
@@ -1354,7 +1354,7 @@
                     Pos: 0;
                     AmmoType: amGirder;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 6;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1383,7 +1383,7 @@
                 Pos: 0;
                 AmmoType: amTeleport;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 7;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1411,7 +1411,7 @@
                     Pos: 0;
                     AmmoType: amSwitch;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 9;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1435,7 +1435,7 @@
                 Pos: 0;
                 AmmoType: amMortar;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 0;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1463,7 +1463,7 @@
                 Pos: 0;
                 AmmoType: amKamikaze;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 3;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1490,7 +1490,7 @@
                 Pos: 0;
                 AmmoType: amCake;
                 AttackVoice: sndLaugh;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 4;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1516,7 +1516,7 @@
                 Pos: 0;
                 AmmoType: amSeduction;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 3;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1543,7 +1543,7 @@
                 Pos: 0;
                 AmmoType: amWatermelon;
                 AttackVoice: sndMelon;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 1;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1569,7 +1569,7 @@
                 Pos: 0;
                 AmmoType: amHellishBomb;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 1;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1597,7 +1597,7 @@
                 Pos: 0;
                 AmmoType: amNapalm;
                 AttackVoice: sndIncoming;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 5;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1623,7 +1623,7 @@
                 Pos: 0;
                 AmmoType: amDrill;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 0;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1649,7 +1649,7 @@
                 Pos: 0;
                 AmmoType: amBallgun;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 4;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1676,7 +1676,7 @@
                 Pos: 0;
                 AmmoType: amRCPlane;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 4;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1705,7 +1705,7 @@
                     Pos: 0;
                     AmmoType: amLowGravity;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 9;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1734,7 +1734,7 @@
                     Pos: 0;
                     AmmoType: amExtraDamage;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 9;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1763,7 +1763,7 @@
                     Pos: 0;
                     AmmoType: amInvulnerable;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 8;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1792,7 +1792,7 @@
                     Pos: 0;
                     AmmoType: amExtraTime;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 9;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1822,7 +1822,7 @@
                     Pos: 0;
                     AmmoType: amLaserSight;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 8;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1851,7 +1851,7 @@
                     Pos: 0;
                     AmmoType: amVampiric;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 8;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -1878,7 +1878,7 @@
                 Pos: 0;
                 AmmoType: amSniperRifle;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 2;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1908,7 +1908,7 @@
                 Pos: 0;
                 AmmoType: amJetpack;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 7;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1934,7 +1934,7 @@
                 Pos: 0;
                 AmmoType: amMolotov;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 1;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1961,7 +1961,7 @@
                 Pos: 0;
                 AmmoType: amBirdy;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 7;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -1989,7 +1989,7 @@
                 Pos: 0;
                 AmmoType: amPortalGun;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 7;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -2019,7 +2019,7 @@
                 Pos: 0;
                 AmmoType: amPiano;
                 AttackVoice: sndIncoming;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 5;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -2047,7 +2047,7 @@
                 Pos: 0;
                 AmmoType: amGasBomb;
                 AttackVoice: sndCover;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 1;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -2072,7 +2072,7 @@
                 Pos: 0;
                 AmmoType: amSineGun;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 2;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -2098,7 +2098,7 @@
                 Pos: 0;
                 AmmoType: amFlamethrower;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 2;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -2124,7 +2124,7 @@
                 Pos: 0;
                 AmmoType: amSMine;
                 AttackVoice: sndLaugh;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 4;
             TimeAfterTurn: 5000;
             minAngle: 0;
@@ -2148,7 +2148,7 @@
                 Pos: 0;
                 AmmoType: amHammer;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 3;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -2174,7 +2174,7 @@
                 Pos: 0;
                 AmmoType: amResurrector;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 8;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -2203,7 +2203,7 @@
                 Pos: 0;
                 AmmoType: amDrillStrike;
                 AttackVoice: sndIncoming;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 5;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -2230,7 +2230,7 @@
                 Pos: 0;
                 AmmoType: amSnowball;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 0;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -2258,7 +2258,7 @@
                 Pos: 0;
                 AmmoType: amTardis;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 8;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -2286,7 +2286,7 @@
                 Pos: 0;
                 AmmoType: amStructure;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 6;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -2313,7 +2313,7 @@
                 Pos: 0;
                 AmmoType: amLandGun;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 6;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -2338,7 +2338,7 @@
                 Pos: 0;
                 AmmoType: amIceGun;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 2;
             TimeAfterTurn: 0;
             minAngle: 0;
@@ -2363,7 +2363,7 @@
                 Pos: 0;
                 AmmoType: amKnife;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 6;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -2390,7 +2390,7 @@
                     Pos: 0;
                     AmmoType: amRubber;
                     AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 6;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -2415,7 +2415,7 @@
                 Pos: 0;
                 AmmoType: amAirMine;
                 AttackVoice: sndLaugh;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 5;
             TimeAfterTurn: 5000;
             minAngle: 0;
@@ -2441,7 +2441,7 @@
                 Pos: 0;
                 AmmoType: amDuck;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 0;
             TimeAfterTurn: 3000;
             minAngle: 0;
@@ -2464,7 +2464,7 @@
                 Pos: 0;
                 AmmoType: amMinigun;
                 AttackVoice: sndNone;
-                Bounciness: 1000);
+                Bounciness: defaultBounciness);
             Slot: 2;
             TimeAfterTurn: 3000;
             minAngle: cMaxAngle div 6;