UFO/Jetpack antigravity patch

1 reply [Last post]
Sadler
User offline. Last seen 13 years 51 weeks ago. Offline
Joined: 2010-05-01
Posts: 4

This post is a translation of my post in Russian: http://www.hedgewars.org/node/2122.

UFO in the game works like a Birdy gear, you must permanently "wave your wings" pressing UP. Moreover, if you'll fall while you're using the UFO, you will drop your turn and health; if you incidentally touch a wall, your UFO will disappear!

Changes:

  • 70% gravity compensation
  • UFO doesn't disappear when touch ground
  • UFO disappears when DOWN button pressed

As UFO doesn't disappears on ground collision, it may be used for one more interesting thing - if your piloting level let you, you can drop enemy hedgehogs down to the water (push it using the UFO).

Patch:

--- GSHandlers.inc.orig
+++ GSHandlers.inc
@@ -2736,13 +2736,13 @@
 if not bShowAmmoMenu then FollowGear:= HHGear;
 
 if ((Gear^.State and gsttmpFlag) = 0) or (HHGear^.dY < _0) then doStepHedgehogMoving(HHGear);
+if (not HHGear^.dY.isNegative) then HHGear^.dY:= HHGear^.dY - cGravity * _0_7;
 
 if  (Gear^.Health = 0)
     or (HHGear^.Damage <> 0)
     or CheckGearDrowning(HHGear)
     or (TurnTimeLeft = 0)
-    // allow brief ground touches - to be fair on this, might need another counter
-    or (((GameTicks and $1FF) = 0) and (not HHGear^.dY.isNegative) and TestCollisionYwithGear(HHGear, 1))
+    or ((HHGear^.Message and gm_Down) <> 0)
     or ((Gear^.Message and gm_Attack) <> 0) then
     begin
     with HHGear^ do

nemo
nemo's picture
User offline. Last seen 2 weeks 6 days ago. Offline
Joined: 2009-01-28
Posts: 1861

This one will not happen. Completely unbalances it and makes it too easy. If we'd wanted to do this we bloody well would have.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]