# HG changeset patch # User nemo # Date 1418183794 18000 # Node ID b8c73bacb31e0fd63fdcc16143243754c3ce0b0d # Parent 3b8290381fcb0eb94caa0869e3908825a321d668 Fix in-flight colouring of land spray, make it use tint when added to land too (lua might find that handy), tweak climbhome cake delay slightly diff -r 3b8290381fcb -r b8c73bacb31e hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Mon Dec 08 21:57:06 2014 +0100 +++ b/hedgewars/uGearsHandlersMess.pas Tue Dec 09 22:56:34 2014 -0500 @@ -882,7 +882,10 @@ end else Land[ly, lx]:= lf; if gun then - LandPixels[ry, rx]:= (ExplosionBorderColor and (not AMask)) or (p^[px] and AMask) + LandPixels[ry, rx]:= (Gear^.Tint shr 24 shl RShift) or + (Gear^.Tint shr 16 and $FF shl GShift) or + (Gear^.Tint shr 8 and $FF shl BShift) or + (p^[px] and AMask) else LandPixels[ry, rx]:= addBgColor(LandPixels[ry, rx], p^[px]); end else allpx:= false diff -r 3b8290381fcb -r b8c73bacb31e hedgewars/uGearsList.pas --- a/hedgewars/uGearsList.pas Mon Dec 08 21:57:06 2014 +0100 +++ b/hedgewars/uGearsList.pas Tue Dec 09 22:56:34 2014 -0500 @@ -291,8 +291,13 @@ dy.isNegative:= false; dy.QWordValue:= QWord($3AD3) * GetRandom(7000) * 8; if GetRandom(2) = 0 then - dx := -dx - end; + dx := -dx; + Tint:= $FFFFFFFF + end + else + Tint:= (ExplosionBorderColor shr RShift and $FF shl 24) or + (ExplosionBorderColor shr GShift and $FF shl 16) or + (ExplosionBorderColor shr BShift and $FF shl 8) or $FF; State:= State or gstInvisible; // use health field to store current frameticks if vobFrameTicks > 0 then @@ -301,10 +306,7 @@ Health:= 0; // use timer to store currently displayed frame index if gear^.Timer = 0 then Timer:= random(vobFramesCount); - Damage:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) * 8; - Tint:= ((ExplosionBorderColor and RMask) shl RShift) or - ((ExplosionBorderColor and GMask) shl GShift) or - ((ExplosionBorderColor and BMask) shl BShift) or $FF; + Damage:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) * 8 end end; gtGrave: begin diff -r 3b8290381fcb -r b8c73bacb31e share/hedgewars/Data/Maps/ClimbHome/map.lua --- a/share/hedgewars/Data/Maps/ClimbHome/map.lua Mon Dec 08 21:57:06 2014 +0100 +++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua Tue Dec 09 22:56:34 2014 -0500 @@ -229,7 +229,7 @@ Cake = nil end - if Cake ~= nil and GetHealth(Cake) < 999990 and gearIsInCircle(CurrentHedgehog,cx,cy,450) then + if Cake ~= nil and GetHealth(Cake) < 999980 and gearIsInCircle(CurrentHedgehog,cx,cy,450) then FireBoom(cx,cy,200) -- todo animate DeleteGear(Cake) Cake = nil