Summary

Hooks

Starts tracking a player a Combine camera has spotted, unless they are noclipping.
Sends a request for assistance from a player to every Combine unit with a biosignal.
Marks a Combine player's biosignal as lost and alerts the other units.
Called every half second; checks the camera targets for movement violations and networks the cameras.
Called to paint the HUD foreground; draws the Combine biosignal overlay.
Called to paint the top of the screen; shows Combine players the socio-status and HUD objectives.
Called after the map entities are created; prepares every Combine camera on the map.
Called when an entity is created; prepares new Combine cameras.
Called when a player is ragdolled; reports Combine units with a biosignal that are knocked out.
Called after a player spawns; restores their biosignal and sends Combine their HUD objectives.
Hooks a Combine camera up to the biosignal system.
Turns a Combine player's biosignal on or off.
Updates the biosignal markers shown on the local player's HUD.

Hooks

cwCTO:CombineCameraFoundPlayer(combineCamera, player)

server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:55

Starts tracking a player a Combine camera has spotted, unless they are noclipping.

Parameters

  • combineCamera Entity The camera that found the player
  • player Player The player found

cwCTO:DispatchRequestSignal(player, text)

server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:319

Sends a request for assistance from a player to every Combine unit with a biosignal.

Plays the "all teams respond, code 3" radio call and sends the CombineRequestSignal Cable message, which marks the player's position on the units' HUD for 60 seconds.

Parameters

  • player Player The player requesting help
  • text String The request text

cwCTO:DoPostBiosignalLoss(player)

server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:150

Marks a Combine player's biosignal as lost and alerts the other units.

Sets the IsBiosignalGone shared var, adds a line to the Combine display and plays the Overwatch lost-biosignal radio call with the digits of the unit's name to every other Combine player with a biosignal.

Parameters

  • player Player The unit that lost its biosignal

Implements hook HalfSecond

Called every half second; checks the camera targets for movement violations and networks the cameras.

An alert camera drops players more than 450 units away or out of sight, and flags running, jumping, crouching or fallen players that are not Combine with a biosignal; a flagged player makes the camera angry. The camera data, 0 for idle cameras, is sent to every Combine player with a biosignal with the UpdateBiosignalCameraData Cable message; nothing is sent while the map has no cameras.

cwCTO:HUDPaintForeground()

client gamemodes/cwhl2rp/plugins/cto/plugin/cl_hooks.lua:107

Implements hook HUDPaintForeground

Called to paint the HUD foreground; draws the Combine biosignal overlay.

For Combine players, draws unit biosignal markers, requests for assistance, Combine cameras with the violations they see and, within 2048 units (three times that while zoomed), possible movement violations of other players. Markers near the centre of the screen show more detail.

Implements hook HUDPaintTopScreen

Called to paint the top of the screen; shows Combine players the socio-status and HUD objectives.

Called after the map entities are created; prepares every Combine camera on the map.

cwCTO:OnEntityCreated(entity)

server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:371

Called when an entity is created; prepares new Combine cameras.

Parameters

  • entity Entity The new entity

cwCTO:PlayerRagdolled(player, state, ragdoll)

server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:347

Implements hook PlayerRagdolled

Called when a player is ragdolled; reports Combine units with a biosignal that are knocked out.

Parameters

  • player Player The ragdolled player
  • state Number The ragdoll state, a RAGDOLL_* value
  • ragdoll Map The player's ragdoll data

cwCTO:PostPlayerSpawn(player, lightSpawn, changeClass, firstSpawn)

server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:285

Implements hook PostPlayerSpawn

Called after a player spawns; restores their biosignal and sends Combine their HUD objectives.

On the first spawn after the map loads, also enables the Combine cameras that do not start inactive and marks the cameras as fixed.

Parameters

  • player Player The player that spawned
  • lightSpawn Boolean Whether this was a light spawn
  • changeClass Boolean Whether the player changed class
  • firstSpawn Boolean Whether this is the character's first spawn

cwCTO:SafelyPrepareCamera(combineCamera)

server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:24

Hooks a Combine camera up to the biosignal system.

Routes the camera's OnFoundPlayer output to cwCTO:CombineCameraFoundPlayer through a hidden __cwctohook entity, created on first use, and starts tracking the camera in cwCTO.cameraData. Once cameras are fixed, cameras not created by the map are marked so they are saved with the map.

Parameters

  • combineCamera Entity The npc_combine_camera

cwCTO:SetPlayerBiosignal(player, bEnable)

server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:221

Turns a Combine player's biosignal on or off.

Turning it on clears IsBiosignalGone and announces the found biosignal and its location to all units; turning it off runs cwCTO:DoPostBiosignalLoss.

if cwCTO:SetPlayerBiosignal(player, false) == cwCTO.ERROR_ALREADY_DISABLED then
  cw.player:Notify(player, L('CTO_BiosignalAlreadyOff'))
end

Parameters

  • player Player The player
  • bEnable Boolean Whether to turn the biosignal on

Returns

  • Number cwCTO.ERROR_NONE on success, otherwise ERROR_NOT_COMBINE, ERROR_ALREADY_ENABLED or ERROR_ALREADY_DISABLED

cwCTO:UpdateBiosignalLocations()

client gamemodes/cwhl2rp/plugins/cto/plugin/cl_hooks.lua:64

Updates the biosignal markers shown on the local player's HUD.

Drops expired requests (after 60 seconds) and markers of units that no longer count, marks the remaining markers as lost and then refreshes the marker above every other living Combine unit with a biosignal, unless the local player's own biosignal is gone. Lost markers expire after 120 seconds. Called by Schema:AddCombineDisplayLine for every uncoloured display line.

Defined in