# HG changeset patch # User belphegorr # Date 1342461415 -10800 # Node ID 93cf6b3b89be57a08f8ead31cc4cd2fe1a44538e # Parent 86814ed9feabba93393f41f73b1a5ae116afc3b0 Fixed a visual gear in Mission 5 Animate.lua: added an optional boolean parameter to AnimVisualGear - follow diff -r 86814ed9feab -r 93cf6b3b89be share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/backstab.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/backstab.lua Mon Jul 16 20:38:31 2012 +0300 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/backstab.lua Mon Jul 16 20:56:55 2012 +0300 @@ -681,7 +681,7 @@ table.insert(wave3DeadAnim, {func = AnimTurn, args = {deployedHog, "Left"}}) table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, "That ought to show them!", SAY_SAY, 4000}}) table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, "Guys, do you think there's more of them?", SAY_SHOUT, 7000}}) - table.insert(wave3DeadAnim, {func = AnimVisualGear, args = {deployedHog, unpack(nativePos[wiseNum]), vgtEvilTrace, 0, true}}) + table.insert(wave3DeadAnim, {func = AnimVisualGear, args = {deployedHog, unpack(nativePos[wiseNum]), vgtFeather, 0, true, true}}) table.insert(wave3DeadAnim, {func = AnimWait, args = {deployedHog, 1000}}) table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, "Where are they?!", SAY_THINK, 3000}}) table.insert(wave3DeadAnim, {func = AnimCustomFunction, args = {deployedHog, RestoreCyborg, {}}}) diff -r 86814ed9feab -r 93cf6b3b89be share/hedgewars/Data/Scripts/Animate.lua --- a/share/hedgewars/Data/Scripts/Animate.lua Mon Jul 16 20:38:31 2012 +0300 +++ b/share/hedgewars/Data/Scripts/Animate.lua Mon Jul 16 20:56:55 2012 +0300 @@ -72,9 +72,10 @@ end function AnimSwitchHog(gear) + --SetGearMessage(gear, 0) + --SetState(gear, 0) SwitchHog(gear) FollowGear(gear) - SetGearMessage(gear, 0) return true end @@ -213,8 +214,11 @@ return true end -function AnimVisualGear(gear, x, y, vgType, state, critical) - AddVisualGear(x, y, vgType, state, critical) +function AnimVisualGear(gear, x, y, vgType, state, critical, follow) + local vgear = AddVisualGear(x, y, vgType, state, critical) + if follow == true then + FollowGear(vgear) + end return true end