vehicleSpawned
Definition
-- @/lua/ge/main.lua:690
function vehicleSpawned(vid)
profilerPushEvent('vehicleSpawned')
local v = getObjectByID(vid)
if not v then return end
-- update the gravity of the vehicle
if core_environment then
v:queueLuaCommand("obj:setGravity("..core_environment.getGravity()..")")
end
invalidateVehicleCache()
-- Do data initialization in "onPreVehicleSpawned" hooks for "onVehicleSpawned" hooks
extensions.hook('onPreVehicleSpawned', vid, v)
extensions.hook('onVehicleSpawned', vid, v)
profilerPopEvent('vehicleSpawned')
end
Callers
@/lua/ge/extensions/core/vehicle/manager.lua
vehicleSpawned(objID) -- callback to main function