Code cleanup in the Tiberian Dawn Lua scripts.
Uppercase global variables. Declare local variables. Remove unused variable.
This commit is contained in:
committed by
Gustas
parent
ca45e02265
commit
b8e261ff2f
@@ -16,7 +16,6 @@ GDIReinforcementsPart2 = { "e2", "e2", "e2", "e2", "e2" }
|
||||
TownAttackWave1 = { "bggy", "bggy" }
|
||||
TownAttackWave2 = { "ltnk", "ltnk" }
|
||||
TownAttackWave3 = { "e1", "e1", "e1", "e3", "e3", "e3" }
|
||||
TownAttackWpts = { waypoint1, waypoint2 }
|
||||
|
||||
Civvie1Wpts = { CivvieWpts1, CivvieWpts2 }
|
||||
Civvie2Wpts = { CivvieWpts3, CivvieWpts1, CivvieWpts4, CivvieWpts5, CivvieWpts6, CivvieWpts7, CivvieWpts8, CivvieWpts9, CivvieWpts10, CivvieWpts11 }
|
||||
@@ -41,7 +40,6 @@ end
|
||||
|
||||
TownAttackAction = function(actor)
|
||||
Trigger.OnIdle(actor, TownAttackersIdleAction)
|
||||
FollowWaypoints(actor, TownAttackWpts)
|
||||
end
|
||||
|
||||
AttackTown = function()
|
||||
@@ -80,16 +78,16 @@ WorldLoaded = function()
|
||||
EliminateNod = GDI.AddPrimaryObjective("Eliminate all Nod forces in the area.")
|
||||
|
||||
Trigger.OnExitedFootprint(TownAttackTrigger, function(a, id)
|
||||
if not townAttackTrigger and a.Owner == GDI then
|
||||
townAttackTrigger = true
|
||||
if not TownAttackTriggered and a.Owner == GDI then
|
||||
TownAttackTriggered = true
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
AttackTown()
|
||||
end
|
||||
end)
|
||||
|
||||
Trigger.OnEnteredFootprint(GDIReinforcementsTrigger, function(a, id)
|
||||
if not gdiReinforcementsTrigger and a.Owner == GDI then
|
||||
gdiReinforcementsTrigger = true
|
||||
if not GDIReinforcementsTriggered and a.Owner == GDI then
|
||||
GDIReinforcementsTriggered = true
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
SendGDIReinforcements()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user