# HG changeset patch # User sheepluva # Date 1316099989 -7200 # Node ID 1791f776b726ea6b23d9e41b94cf493d7c456adf # Parent d31eba29e706c04460c743d17e374db6b68a2ffb fix and optimize kamikaze's png diff -r d31eba29e706 -r 1791f776b726 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Thu Sep 15 10:11:38 2011 +0200 +++ b/hedgewars/GSHandlers.inc Thu Sep 15 17:19:49 2011 +0200 @@ -2785,8 +2785,11 @@ i: LongWord; HHGear: PGear; sparkles: PVisualGear; + hasWishes: boolean; begin AllInactive := false; + hasWishes:= ((Gear^.Message and (gmPrecise or gmSwitch)) = (gmPrecise or gmSwitch)); + if hasWishes then Gear^.AdvBounce:= 1; HHGear := Gear^.Hedgehog^.Gear; HHGear^.State := HHGear^.State or gstNoDamage; @@ -2794,7 +2797,7 @@ Gear^.X := HHGear^.X; Gear^.Y := HHGear^.Y; - if (GameTicks mod 2 = 0) and ((Gear^.Message and (gmPrecise or gmSwitch)) = (gmPrecise or gmSwitch)) then + if (GameTicks mod 2 = 0) and hasWishes then begin sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1); if sparkles <> nil then sparkles^.Tint:= ((random(210)+45) shl 24) or ((random(210)+45) shl 16) or ((random(210)+45) shl 8) or $FF; @@ -2819,7 +2822,13 @@ inc(upd); if upd > 3 then begin - if Gear^.Health < 1500 then Gear^.Pos := 2; + if Gear^.Health < 1500 then + begin + if Gear^.AdvBounce <> 0 then + Gear^.Pos := 3 + else + Gear^.Pos := 2; + end; AmmoShove(Gear, 30, 40); diff -r d31eba29e706 -r 1791f776b726 hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Thu Sep 15 10:11:38 2011 +0200 +++ b/hedgewars/uVariables.pas Thu Sep 15 17:19:49 2011 +0200 @@ -402,7 +402,7 @@ (FileName: 'TurnsLeft'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTurnsLeft (FileName: 'amKamikaze'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 256; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprKamikaze + Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprKamikaze (FileName: 'amWhip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWhip (FileName: 'Kowtow'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; diff -r d31eba29e706 -r 1791f776b726 share/hedgewars/Data/Graphics/Hedgehog/amKamikaze.png Binary file share/hedgewars/Data/Graphics/Hedgehog/amKamikaze.png has changed