All pastes #343060 Raw Edit

Anonymous

public lua v1 · immutable
·published 2007-02-06 19:28 UTC
rendered paste body
#Global Hooks$Simulation:[missiontime = mn.getMissionTime()frametime = ba.getFrametime(true)if missiontime < 1 then   nullvec = ba.createVector(0,0,0)   static = {}   staticloc = {}   staticori = {}   groundvehicle = {}   groundvehiclealt = {}endfor i=1,#mn.Ships do   local cityship = mn.Ships[i]   local cityshipclass = cityship.Class.Name   if cityshipclass == "city" or cityshipclass == "barricade" then      local staticshipname = cityship.Name      if static[staticshipname] == nil then         static[staticshipname] = 1         staticloc[staticshipname] = cityship.Position         staticori[staticshipname] = cityship.Orientation      end      cityship.Position = staticloc[staticshipname]      cityship.Orientation = staticori[staticshipname]      cityship.Physics.Velocity = nullvec   end   if cityshipclass == "bike" then      local groundvehiclename = cityship.Name      if groundvehicle[groundvehiclename] == nil then         groundvehiclealt[groundvehiclename] = cityship.Position["y"]      end      groundvehicleori = cityship.Orientation      groundvehicleori["b"] = 0      groundvehicleori["p"] = 0      cityship.Orientation = groundvehicleori      groundvehiclepos = cityship.Position      groundvehiclepos["y"] = groundvehiclealt[groundvehiclename]      cityship.Position = groundvehiclepos   endend]#End