Double sniper rifle damage (AI seems unaware of second shot, when playing). Spread out flakes along X when looping and add a little Y variation. This avoids noticeable patterns. Especially on the rarer close layer or dense flakes like rain (for Y)
authornemo
Sat, 09 Jun 2012 09:53:15 -0400
changeset 7206 ce46b56ae9f5
parent 7204 522f165cd2e7
child 7208 62e36dc45098
Double sniper rifle damage (AI seems unaware of second shot, when playing). Spread out flakes along X when looping and add a little Y variation. This avoids noticeable patterns. Especially on the rarer close layer or dense flakes like rain (for Y)
hedgewars/VGSHandlers.inc
hedgewars/uAIAmmoTests.pas
--- a/hedgewars/VGSHandlers.inc	Sat Jun 09 17:05:16 2012 +0400
+++ b/hedgewars/VGSHandlers.inc	Sat Jun 09 09:53:15 2012 -0400
@@ -90,10 +90,16 @@
             if round(X) > cRightScreenBorder then
                 X:= X - cScreenSpace;
             // if round(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + 25.0; // For if flag is set for flakes rising upwards?
-            if (Gear^.Layer = 2) and (round(Y) - 225 > LAND_HEIGHT) then
-                Y:= Y - (1024 + 300) // TODO - configure in theme (jellies for example could use limited range)
-            else if (Gear^.Layer <> 2) and (round(Y) + 50 > LAND_HEIGHT) then
-                Y:= Y - (1024 + 25);
+        if (Gear^.Layer = 2) and (round(Y) - 225 > LAND_HEIGHT) then
+            begin
+            X:= cLeftScreenBorder + random(cScreenSpace);
+            Y:= Y - (1024 + 250 + random(50)) // TODO - configure in theme (jellies for example could use limited range)
+            end
+        else if (Gear^.Layer <> 2) and (round(Y) + 50 > LAND_HEIGHT) then
+            begin
+            X:= cLeftScreenBorder + random(cScreenSpace);
+            Y:= Y - (1024 + random(25))
+            end;
         Timer:= 0;
         tdX:= 0;
         tdY:= 0
--- a/hedgewars/uAIAmmoTests.pas	Sat Jun 09 17:05:16 2012 +0400
+++ b/hedgewars/uAIAmmoTests.pas	Sat Jun 09 09:53:15 2012 -0400
@@ -652,7 +652,7 @@
 
 dmg:= sqrt(sqr(Targ.X - x)+sqr(Targ.Y-y));
 t:= 1.5 / dmg;
-dmg:= dmg * 0.025; // div 40
+dmg:= dmg * 0.05; // div 40
 Vx:= (Targ.X - x) * t;
 Vy:= (Targ.Y - y) * t;
 ap.Angle:= DxDy2AttackAnglef(Vx, -Vy);