--- a/hedgewars/uGearsRender.pas Wed Sep 14 22:27:22 2011 +0200
+++ b/hedgewars/uGearsRender.pas Wed Sep 14 22:39:39 2011 +0200
@@ -227,13 +227,6 @@
Tint($FF, $FF, $FF, $FF)
end;
- if (CurAmmoGear <> nil) and
- (CurrentHedgehog^.Gear <> nil) and
- (CurrentHedgehog^.Gear = Gear) and
- (CurAmmoGear^.Kind = gtTardis) then Tint($FF, $FF, $FF, CurAmmoGear^.Timer div 20)
- // probably will need a new flag for this
- else if (Gear^.State and gstTmpFlag <> 0) then Tint($FF, $FF, $FF, $FF-Gear^.Timer);
-
if ((Gear^.State and gstWinner) <> 0) and
((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then
begin
@@ -893,7 +886,10 @@
gtGrenade: DrawRotated(sprBomb, x, y, 0, Gear^.DirAngle);
gtSnowball: DrawRotated(sprSnowball, x, y, 0, Gear^.DirAngle);
gtGasBomb: DrawRotated(sprCheese, x, y, 0, Gear^.DirAngle);
- gtMolotov: DrawRotated(sprMolotov, x, y, 0, Gear^.DirAngle);
+
+ gtMolotov: if (Gear^.State and gstDrowning) = 0 then
+ DrawRotatedF(sprMolotov, x, y, (RealTicks div 125) mod 8, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX))
+ else DrawSprite(sprMolotov, x, y, 8);
gtRCPlane: begin
if (Gear^.Tag = -1) then
@@ -1078,16 +1074,36 @@
//DrawTexture(x, y, SpritesData[sprVampiric].Texture, 0.1);
Tint($FF, $FF, $FF, $FF);
end
- else if not isInLag then
+ else //if not isInLag then
begin
+ if isInLag and (Gear^.FlightTime < 256) then inc(Gear^.FlightTime, 8)
+ else if not isInLag and (Gear^.FlightTime > 0) then dec(Gear^.FlightTime, 8);
+ if Gear^.FlightTime > 0 then Tint($FF, $FF, $FF, $FF-min(255,Gear^.FlightTime));
if vobVelocity = 0 then
DrawSprite(sprFlake, x, y, Gear^.Timer)
else
- DrawRotatedF(sprFlake, x, y, Gear^.Timer, 1, Gear^.DirAngle)
+ DrawRotatedF(sprFlake, x, y, Gear^.Timer, 1, Gear^.DirAngle);
//DrawSprite(sprFlake, x-SpritesData[sprFlake].Width div 2, y-SpritesData[sprFlake].Height div 2, Gear^.Timer)
//DrawRotatedF(sprFlake, x-SpritesData[sprFlake].Width div 2, y-SpritesData[sprFlake].Height div 2, Gear^.Timer, 1, Gear^.DirAngle);
+ if Gear^.FlightTime > 0 then Tint($FF, $FF, $FF, $FF);
end;
gtStructure: DrawSprite(sprTarget, x - 16, y - 16, 0);
+ gtTardis: if Gear^.Pos <> 4 then
+ begin
+ if Gear^.Pos = 2 then Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF)
+ else Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or max($00, round(Gear^.Power * (1-abs(0.5 - (GameTicks mod 2000) / 2000)))));
+ DrawSprite(sprTardis, x-24, y-63,0);
+ if Gear^.Pos = 2 then Tint($FF, $FF, $FF, $FF)
+ else Tint($FF,$FF,$FF,max($00, round(Gear^.Power * (1-abs(0.5 - (GameTicks mod 2000) / 2000)))));
+ DrawSprite(sprTardis, x-24, y-63,1);
+ if Gear^.Pos <> 2 then Tint($FF, $FF, $FF, $FF)
+(*
+ Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or max($00, round(Gear^.Power * abs(1 - (RealTicks mod 500) / 250))));
+ DrawTexture(x-6, y-70, SpritesData[sprVampiric].Texture, 0.25);
+ Tint($FF, $FF, $FF, $FF)
+*)
+ end;
+
end;
if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(x + 8, y + 8, Gear^.Tex);