Remove sheepluva's simple 45 deg bouncing from r2472, add various flame sizes for Tiy
authornemo
Thu, 15 Oct 2009 17:14:29 +0000
changeset 2455 cc54dd148cc2
parent 2454 c8b1fb10003c
child 2456 7067544bb15d
Remove sheepluva's simple 45 deg bouncing from r2472, add various flame sizes for Tiy
hedgewars/GSHandlers.inc
hedgewars/uGears.pas
--- a/hedgewars/GSHandlers.inc	Thu Oct 15 15:54:48 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Thu Oct 15 17:14:29 2009 +0000
@@ -109,19 +109,15 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepFallingGear(Gear: PGear);
-var isFalling, isCollV, isCollH: boolean;
-tmp: QWord;
+var isFalling: boolean;
 begin
 Gear^.State:= Gear^.State and not gstCollision;
-isCollV:= false; 
-isCollH:= false;
 
 if Gear^.dY.isNegative then
 	begin
 	isFalling:= true;
 	if TestCollisionYwithGear(Gear, -1) then
 		begin
-		isCollV:= true;
 		Gear^.dX:=   Gear^.dX * Gear^.Friction;
 		Gear^.dY:= - Gear^.dY * Gear^.Elasticity;
 		Gear^.State:= Gear^.State or gstCollision
@@ -129,7 +125,6 @@
 	end else
 	if TestCollisionYwithGear(Gear, 1) then
 		begin
-		isCollV:= true;
 		isFalling:= false;
 		Gear^.dX:=   Gear^.dX * Gear^.Friction;
 		Gear^.dY:= - Gear^.dY * Gear^.Elasticity;
@@ -138,19 +133,9 @@
 
 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then
 	begin
-	isCollH:= true;
 	Gear^.dX:= - Gear^.dX * Gear^.Elasticity;
 	Gear^.dY:=   Gear^.dY * Gear^.Elasticity;
 	Gear^.State:= Gear^.State or gstCollision
-	end else
-	if TestCollisionXwithGear(Gear, -hwSign(Gear^.dX)) then
-		isCollH:= true;
-
-if isCollV and isCollH then
-	begin
-	tmp:= Gear^.dX.QWordValue;
-	Gear^.dX.QWordValue:= Gear^.dY.QWordValue;
-	Gear^.dY.QWordValue:= tmp;
 	end;
 
 if isFalling then Gear^.dY:= Gear^.dY + cGravity;
--- a/hedgewars/uGears.pas	Thu Oct 15 15:54:48 2009 +0000
+++ b/hedgewars/uGears.pas	Thu Oct 15 17:14:29 2009 +0000
@@ -1467,7 +1467,7 @@
         gtDynamite: DrawSprite2(sprDynamite, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, Gear^.Tag and 1, Gear^.Tag shr 1);
      gtClusterBomb: DrawRotated(sprClusterBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
          gtCluster: DrawSprite(sprClusterParticle, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy, 0);
-           gtFlame: DrawSprite(sprFlame, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy, (GameTicks div 128 + LongWord(Gear^.Tag)) mod 8);
+           gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 1 / (Gear^.Tag mod 3 + 2), hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks div 128 + LongWord(Gear^.Tag)) mod 8, 1, 8);
        gtParachute: DrawSprite(sprParachute, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 48 + WorldDy, 0);
        gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, hwRound(Gear^.X) - SpritesData[sprAirplane].Width div 2 + WorldDx, hwRound(Gear^.Y) - SpritesData[sprAirplane].Height div 2 + WorldDy, 0)
                                      else DrawSprite(sprAirplane, hwRound(Gear^.X) - SpritesData[sprAirplane].Width div 2 + WorldDx, hwRound(Gear^.Y) - SpritesData[sprAirplane].Height div 2 + WorldDy, 1);