fnc_handleMarkers.sqf

Summary
fnc_handleMarkers.sqf
Functions
OCAP_recorder_fnc_handleMarkersUsed for tracking all markers in the vanilla Arma 3 system.
Variables
OCAP_recorder_trackedMarkersPersistent global variable on server that defines unique marker names currently being tracked.
OCAP_listener_markersContains handle for OCAP_handleMarker CBA event handler.
CBA Events
OCAP_handleMarkerHandles marker creation, modification, and deletion events.
Event Handlers
MarkerCreatedTracks marker creations.
MarkerUpdatedTracks marker updates (moves).
MarkerDeletedTracks marker deletions.

Functions

OCAP_recorder_fnc_handleMarkers

Description

Used for tracking all markers in the vanilla Arma 3 system.

This function creates a server-side CBA listener as well as local Event Handlers on the server and all clients.  It facilitates marker creation, modification, and deletion that occurs across any machine or on the server.

Delays are integrated into the system to allow for multi-line scripted marker creations during a mission to reflect correctly in the created marker during playback.  These delays are accounted for so that playback reflects the true creation time.

Due to the nature of locality and single-view playback, markers of the same name which exist in different states on different clients may display odd behavior during playback.

Marker exclusions as configured in OCAP_settings_excludeMarkerFromRecord are handled client-side to avoid unnecessary network traffic.

This will also wait until the mission proceeds past the briefing screen, then gather all existing markers and send them to the server for entry onto the Editor/Briefing Markers layer during playback.

Applied during mission event handler application in OCAP_recorder_fnc_addEventMission.

Parameters

None

Returns

Nothing

Examples

call FUNC(handleMarkers);

Public

No

Author

IndigoFox, Fank

Variables

OCAP_recorder_trackedMarkers

Persistent global variable on server that defines unique marker names currently being tracked.  Entries are added at marker create events and removed at marker delete events to avoid duplicate processing.

OCAP_listener_markers

Contains handle for OCAP_handleMarker CBA event handler.

CBA Events

OCAP_handleMarker

Handles marker creation, modification, and deletion events.

Event Handlers

MarkerCreated

Description

Tracks marker creations.  Present on server and all clients.  Ignores remotely-owned markers.

References OCAP_settings_excludeMarkerFromRecord on each local machine to determine if a marker should be recorded.

If so, sends marker data to OCAP_handleMarker on the server for processing.

MarkerUpdated

Description

Tracks marker updates (moves).  Present on server and all clients.  Ignores remotely-owned markers.

References OCAP_settings_excludeMarkerFromRecord on each local machine to determine if a marker should be recorded.

If so, sends marker data to OCAP_handleMarker on the server for processing.

MarkerDeleted

Description

Tracks marker deletions.  Present on server and all clients.  Ignores remotely-owned markers.

References OCAP_settings_excludeMarkerFromRecord on each local machine to determine if a marker should be recorded.

If so, sends marker data to OCAP_handleMarker on the server for processing.

Handles marker creation, modification, and deletion events.
Array of prefixes.
Used for applying mission event handlers.
Close