Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function gadget:GameFrame(f)
- for i = 1, teleID.count do
- local tid = teleID.data[i]
- local bid = tele[tid].link
- if bid and tele[tid].deployed then
- --Spring.Echo("activated teleporter!")
- --checking for flyers
- --Spring.Echo(f)
- local xxx,yyy,zzz = Spring.GetUnitPosition(tid)
- local maybeFlyers = Spring.GetUnitsInSphere(xxx,yyy,zzz,200,Spring.GetUnitTeam(tid))
- if(maybeFlyers ~= nil) then
- for index,value in pairs(maybeFlyers) do
- local ud = Spring.GetUnitDefID(value)
- ud = ud and UnitDefs[ud]
- if ((not (ud.floater or ud.canFly or value==tid)) and isUnitAirborne(value)) then
- capUnitSpeed(value,2,1)
- --Spring.Echo("capping unit speed")
- --backup the damn queue
- backUpTheDamnQueue(value)
- end
- end
- end
- end
- end
- for i = 1, teleID.count do
- local tid = teleID.data[i]
- local bid = tele[tid].link
Advertisement
Add Comment
Please, Sign In to add comment