--- a/hedgewars/GSHandlers.inc Wed Dec 22 03:56:12 2010 +0100
+++ b/hedgewars/GSHandlers.inc Wed Dec 22 04:09:56 2010 +0100
@@ -320,7 +320,7 @@
if isFalling then
begin
Gear^.dY := Gear^.dY + cGravity;
- if (GameFlags and gfMoreWind) <> 0 then Gear^.dX := Gear^.dX + cWindSpeed * _16 / max(12,sqr(Gear^.Radius))
+ if (GameFlags and gfMoreWind) <> 0 then Gear^.dX := Gear^.dX + cWindSpeed / Gear^.Density
end;
Gear^.X := Gear^.X + Gear^.dX;
--- a/hedgewars/uGears.pas Wed Dec 22 03:56:12 2010 +0100
+++ b/hedgewars/uGears.pas Wed Dec 22 04:09:56 2010 +0100
@@ -220,6 +220,7 @@
gear^.Radius:= 5;
gear^.Elasticity:= _0_8;
gear^.Friction:= _0_8;
+ gear^.Density:= _1_5;
gear^.RenderTimer:= true;
if gear^.Timer = 0 then gear^.Timer:= 3000
end;
@@ -230,9 +231,13 @@
gear^.Radius:= 6;
gear^.Elasticity:= _0_8;
gear^.Friction:= _0_995;
+ gear^.Density:= _2;
gear^.RenderTimer:= true;
if gear^.Timer = 0 then gear^.Timer:= 3000
end;
+ gtMelonPiece: begin
+ gear^.Density:= _2;
+ end;
gtHedgehog: begin
gear^.AdvBounce:= 1;
gear^.Radius:= cHHRadius;
@@ -246,11 +251,13 @@
end;
gtShell: begin
gear^.Radius:= 4;
+ gear^.Density:= _1;
end;
gtSnowball: begin
gear^.Radius:= 4;
gear^.Elasticity:= _1;
gear^.Friction:= _1;
+ gear^.Density:= _0_5;
end;
gtGrave: begin
gear^.ImpactSound:= sndGraveImpact;
@@ -288,6 +295,7 @@
gear^.Radius:= 2;
gear^.Elasticity:= _0_55;
gear^.Friction:= _0_995;
+ gear^.Density:= _0_9;
if cMinesTime < 0 then
gear^.Timer:= getrandom(51)*100
else
@@ -299,6 +307,7 @@
gear^.Radius:= 2;
gear^.Elasticity:= _0_55;
gear^.Friction:= _0_995;
+ gear^.Density:= _0_9;
gear^.Timer:= 500;
end;
gtCase: begin
@@ -313,6 +322,7 @@
gear^.Radius:= 16;
gear^.Elasticity:= _0_4;
gear^.Friction:= _0_995;
+ gear^.Density:= _16;
gear^.Health:= cBarrelHealth
end;
gtDEagleShot: begin
@@ -327,10 +337,12 @@
gear^.Radius:= 3;
gear^.Elasticity:= _0_55;
gear^.Friction:= _0_03;
+ gear^.Density:= _0_8;
gear^.Timer:= 5000;
end;
gtCluster: begin
gear^.Radius:= 2;
+ gear^.Density:= _0_8;
gear^.RenderTimer:= true
end;
gtShover: gear^.Radius:= 20;
@@ -350,6 +362,7 @@
end;
gtAirBomb: begin
gear^.Radius:= 5;
+ gear^.Density:= _1_5;
end;
gtBlowTorch: begin
gear^.Radius:= cHHRadius + cBlowTorchC;
@@ -368,7 +381,8 @@
gtMortar: begin
gear^.Radius:= 4;
gear^.Elasticity:= _0_2;
- gear^.Friction:= _0_08
+ gear^.Friction:= _0_08;
+ gear^.Density:= _1;
end;
gtWhip: gear^.Radius:= 20;
gtHammer: gear^.Radius:= 20;
@@ -391,12 +405,14 @@
gear^.Radius:= 4;
gear^.Elasticity:= _0_5;
gear^.Friction:= _0_96;
+ gear^.Density:= _1_5;
gear^.RenderTimer:= true;
gear^.Timer:= 5000
end;
gtDrill: begin
gear^.Timer:= 5000;
- gear^.Radius:= 4
+ gear^.Radius:= 4;
+ gear^.Density:= _1;
end;
gtBall: begin
gear^.ImpactSound:= sndGrenadeImpact;
@@ -407,6 +423,7 @@
gear^.Timer:= 5000;
gear^.Elasticity:= _0_7;
gear^.Friction:= _0_995;
+ gear^.Density:= _1_5;
end;
gtBallgun: begin
gear^.Timer:= 5001;
@@ -422,6 +439,7 @@
end;
gtMolotov: begin
gear^.Radius:= 6;
+ gear^.Density:= _2;
end;
gtBirdy: begin
gear^.Radius:= 16; // todo: check
@@ -433,6 +451,7 @@
gear^.Radius:= 4;
gear^.Elasticity:= _0_6;
gear^.Friction:= _0_96;
+ gear^.Density:= _1;
if gear^.Timer = 0 then gear^.Timer:= 3000
end;
gtPortal: begin
@@ -446,7 +465,8 @@
gear^.Health:= 100;
end;
gtPiano: begin
- gear^.Radius:= 32
+ gear^.Radius:= 32;
+ gear^.Density:= _50;
end;
gtSineGunShot: begin
gear^.Radius:= 5;
@@ -472,6 +492,7 @@
gtNapalmBomb: begin
gear^.Timer:= 1000;
gear^.Radius:= 5;
+ gear^.Density:= _1_5;
end;
end;
--- a/hedgewars/uTypes.pas Wed Dec 22 03:56:12 2010 +0100
+++ b/hedgewars/uTypes.pas Wed Dec 22 04:09:56 2010 +0100
@@ -196,6 +196,7 @@
Timer : LongWord;
Elasticity: hwFloat;
Friction : hwFloat;
+ Density : hwFloat;
Message, MsgParam : Longword;
Hedgehog: PHedgehog;
Health, Damage, Karma: LongInt;