setFreeze
Definition
-- @/lua/vehicle/controller.lua:274
local function setFreeze(mode)
M.isFrozen = mode == 1
if M.mainController then
M.mainController.setFreeze(mode)
end
end
Callers
@/lua/ge/extensions/gameplay/drag/utils.lua
racer.vehObj:queueLuaCommand('ai.setSpeedMode("' .. aiMode .. '")')
racer.vehObj:queueLuaCommand('controller.setFreeze(0)')
racer.vehObj:queueLuaCommand([[
else
controller.setFreeze(1)
end
else
controller.setFreeze(0)
end
@/lua/ge/extensions/campaign/exploration.lua
if vehicle then
vehicle:queueLuaCommand('controller.setFreeze(1)')
end
if vehicle then
vehicle:queueLuaCommand('controller.setFreeze(1)')
end
if vehicle then
vehicle:queueLuaCommand('controller.setFreeze(0)')
end
if vehicle then
vehicle:queueLuaCommand('controller.setFreeze(0)')
end
if vehicle then
vehicle:queueLuaCommand('controller.setFreeze(0)')
end
@/lua/ge/extensions/freeroam/dragRace.lua
if playerPrestageReady == false then
opponentVehicle:queueLuaCommand('controller.setFreeze(1)')
log("D","setupPrestage", "setSpeed = 0" )
-- player is ready, lets move the ai vehicle forward so it can start the staging process
opponentVehicle:queueLuaCommand('controller.setFreeze(0)')
log("D","setupPrestage", "setSpeed = 5" )
lights.stageLights.stageLightL.obj:setHidden(false)
opponentVehicle:queueLuaCommand('controller.setFreeze(0)')
opponentVehicle:queueLuaCommand('ai.setAggression(0)')
log("D","setupStart", "AIAIAIAIAIAI")
opponentVehicle:queueLuaCommand('controller.setFreeze(1)')
opponentVehicle:queueLuaCommand('ai.setAggression(2)')
resetDisplays()
opponentVehicle:queueLuaCommand('controller.setFreeze(0)')
startOpponent()
time = 0
opponentVehicle:queueLuaCommand('controller.setFreeze(0)')
startOpponent()
opponentVehicle:queueLuaCommand('ai.setSpeed(0)')
opponentVehicle:queueLuaCommand('controller.setFreeze(1)')
stopOpponent()
setupStart()
opponentVehicle:queueLuaCommand('controller.setFreeze(0)')
startOpponent()
--dump(opponentVehicle.name)
opponentVehicle:queueLuaCommand('controller.setFreeze(0)')
--opponentVehicle:setField('canSave', '', 'false')
@/lua/ge/extensions/scenario/scenarios.lua
if bo then
bo:queueLuaCommand('controller.setFreeze('..tostring(state) ..')')
end
local carName = helper.getVehicleByName(vName)
carName:queueLuaCommand('controller.setFreeze(1)')
end
local carName = helper.getVehicleByName(vName)
carName:queueLuaCommand('controller.setFreeze(1)')
end
@/lua/ge/extensions/scenario/quickRace.lua
if playerVehicle then
playerVehicle:queueLuaCommand('controller.setFreeze(0)')
else
@/lua/vehicle/controller.lua
if M.mainController then
M.mainController.setFreeze(mode)
end
freeze = function(mode)
log("W", "controller", "scenario.freeze(mode) is deprecated. Please switch to controller.setFreeze(mode)")
setFreeze(mode)
log("W", "controller", "scenario.freeze(mode) is deprecated. Please switch to controller.setFreeze(mode)")
setFreeze(mode)
end
@/lua/ge/extensions/scenario/busdriver.lua
if playerVehicle then
playerVehicle:queueLuaCommand('controller.setFreeze(1)')
end
if playerVehicle then
playerVehicle:queueLuaCommand('controller.setFreeze(0)')
end
if playerVehicle then
playerVehicle:queueLuaCommand('controller.setFreeze(1)')
else
if playerVehicle then
playerVehicle:queueLuaCommand('controller.setFreeze(0)')
end
@/lua/ge/extensions/gameplay/police.lua
if not veh then
obj:queueLuaCommand('controller.setFreeze(0)')
return
@/lua/vehicle/controller/playerController.lua
local function setFreeze(mode)
isFrozen = mode == 1
@/lua/ge/extensions/flowgraph/nodes/vehicle/freeze.lua
if veh then
--veh:queueLuaCommand('controller.setFreeze('..(self.pinIn.freeze.value and '1' or '0')..')')
core_vehicleBridge.executeAction(veh,'setFreeze', self.pinIn.freeze.value)
@/lua/vehicle/extensions/gameplayInterfaceModules/interactController.lua
local function setFreeze(params)
local dataTypeCheck, dataTypeError = checkTableDataTypes(params, {"boolean"})
local freeze = params[1]
controller.setFreeze(freeze and 1 or 0)
end
@/lua/vehicle/controller/vehicleController/vehicleController.lua
local function setFreeze(mode)
isFrozen = mode == 1
if data.frzn ~= nil then
setFreeze(data.frzn and 1 or 0)
end
@/lua/ge/extensions/gameplay/race/race.lua
getObjectByID(id):queueLuaCommand('controller.setFreeze(false)')
getObjectByID(id):queueLuaCommand('ai.driveUsingPath('..str..')') -- this should ignore one-way roads
@/lua/ge/extensions/gameplay/traffic/vehicle.lua
if self.role.flags.freeze then
getObjectByID(self.id):queueLuaCommand('controller.setFreeze(0)')
self.role.flags.freeze = false
@/lua/ge/extensions/gameplay/traffic/roles/suspect.lua
self.veh:setAiMode('flee')
getObjectByID(self.veh.id):queueLuaCommand('controller.setFreeze(0)')
getObjectByID(self.veh.id):queueLuaCommand('ai.setAggressionMode("off")')
arrest = function ()
getObjectByID(self.veh.id):queueLuaCommand('controller.setFreeze(1)')
self.flags.freeze = 1
clear = function ()
getObjectByID(self.veh.id):queueLuaCommand('controller.setFreeze(0)')
self.flags.freeze = nil
@/lua/vehicle/extensions/scenario/functionFreezer.lua
-- enables or disables the freezing (the ignore) of functions listed in functionNames
local function setFreeze(mode)
if mode == 1 then -- freeze everything
-- then we actually call our custom freezing code
setFreeze(mode)
end
local function onExtensionUnloaded()
setFreeze(0)
controller.setFreeze = originalFreezeFunction
local function onVehicleScenarioData(data)
setFreeze(0) -- revert all functions' code before starting from scratch, just in case
functionNames = {}
@/lua/vehicle/extensions/perfectLaunch.lua
local function go()
controller.mainController.setFreeze(0)
state = "go"
end
controller.mainController.setFreeze(1)
input.event("throttle", 0, 1)
controller.mainController.setFreeze(0)
straightLine.stop()