# HG changeset patch # User Wuzzy # Date 1555771567 -7200 # Node ID 358d81e29a884204c2736e7a221aa6017e5da7e0 # Parent 72291f0df5392b41c7072b6f7e6d53db532ed5bd Space Invasion: Fix minor visual glitches of shield diff -r 72291f0df539 -r 358d81e29a88 share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua Sat Apr 20 16:02:48 2019 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua Sat Apr 20 16:46:07 2019 +0200 @@ -966,12 +966,12 @@ PlaySound(sndDenied) elseif (SI.beam == false) and (SI.shieldHealth > 80) then SI.beam = true - SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), 40, 255, 1, 10, 0, 300, 1, SI.colorShield) + SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), 40, 255, 1, 10, 0, nil, 1, SI.colorShield-0x000000FF - -math.min(SI.shieldHealth)) AddCaption( string.format(loc("Shield ON: %d power remaining"), SI.shieldHealth - 80), SI.colorShield, capgrpAmmostate) PlaySound(sndInvulnerable) else SI.beam = false - SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), 0, 0, 1, 10, 0, 0, 0, SI.colorShield) + SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), nil, nil, nil, nil, nil, nil, nil, 0x0) AddCaption( string.format(loc("Shield OFF: %d power remaining"), SI.shieldHealth - 80), SI.colorShield, capgrpAmmostate) end end @@ -1687,7 +1687,7 @@ end - SI.pShield = AddVisualGear(0,0,vgtCircle,0,true) + SI.pShield = AddVisualGear(0,0,vgtCircle,200,true) end @@ -2284,10 +2284,10 @@ if (CurrentHedgehog ~= nil) then if SI.beam == true then - SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), nil, nil, nil, nil, nil, 200, nil, SI.colorShield-0x000000FF - -SI.shieldHealth ) + SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), nil, nil, nil, nil, nil, nil, nil, SI.colorShield-0x000000FF - -math.min(SI.shieldHealth, 255)) DrawTag(SI.TAG_SHIELD) else - SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), nil, nil, nil, nil, nil, 0) + SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), nil, nil, nil, nil, nil, nil, nil, 0x0) end end