Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spectator - Fix script error in ui_draw3d #5722

Merged
merged 1 commit into from
Nov 4, 2017
Merged

Conversation

PabstMirror
Copy link
Contributor

[ACE] (spectator) TRACE: 85515 respawnTemplate: _newCorpse=unit1, _oldKiller=unit1, _respawn=3, _respawnDelay=10 z\ace\addons\spectator\functions\fnc_respawnTemplate.sqf:26
[ACE] (spectator) TRACE: 85515 Params: _set=false, _force=true, _hide=true z\ace\addons\spectator\functions\fnc_setSpectator.sqf:25
[ACE] (spectator) TRACE: 85515 cam: _init=false z\ace\addons\spectator\functions\fnc_cam.sqf:20
[ACE] (spectator) TRACE: 85515 : player=unit1, _hidden=false z\ace\addons\spectator\functions\fnc_setSpectator.sqf:107
Error in expression <30625 ) then {
private _intersections = lineIntersectsSurfaces [_start, _end, _c>
  Error position: <lineIntersectsSurfaces [_start, _end, _c>
  Error Type Any, expected Object
File z\ace\addons\spectator\functions\fnc_ui_draw3D.sqf, line 18
[ACE] (spectator) TRACE: 85516 ui: _init=false z\ace\addons\spectator\functions\fnc_ui.sqf:20

FUNC(cam) sets GVAR(camFocus) = nil;
draw EH is removed a frame later in FUNC(ui) because it's delayed with
[{ !isNull MAIN_DISPLAY },{ [false] call FUNC(ui) }] call CBA_fnc_waitUntilAndExecute;

this just uses getVariable to prevent nil error

@PabstMirror PabstMirror added impact/trivial kind/bug-fix Release Notes: **FIXED:** labels Nov 2, 2017
@PabstMirror PabstMirror added this to the 3.12.0 milestone Nov 2, 2017
@commy2
Copy link
Contributor

commy2 commented Nov 3, 2017

FUNC(cam) sets GVAR(camFocus) = nil;
Why not null?

@kymckay
Copy link
Member

kymckay commented Nov 4, 2017

Setting to objNull would also work, it's only nil for consistency (fnc_cam and fnc_ui clean up all their respective GVARs on spectator exit).

@PabstMirror PabstMirror merged commit c20ec65 into master Nov 4, 2017
@PabstMirror PabstMirror deleted the specScriptError branch November 4, 2017 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/trivial kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants