From dd102caf13d2e558a680be604d12d12b5b651da7 Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Wed, 8 Feb 2017 08:30:00 -0600 Subject: [PATCH] - Fixed: SetCamera didn't have the 'action' identifier, nor did it use the actual 'cam' actor provided, rendering it nonfunctional. --- src/p_actionfunctions.cpp | 10 +++++----- wadsrc/static/zscript/actor.txt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index ea271967b..518d2fb63 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -6923,18 +6923,18 @@ DEFINE_ACTION_FUNCTION(AActor, SetCamera) if (self->player == nullptr || self->player->mo != self) return 0; - if (camera == nullptr) + if (cam == nullptr) { - camera = self; + cam = self; revert = false; } AActor *oldcamera = self->player->camera; - self->player->camera = camera; + self->player->camera = cam; if (revert) self->player->cheats |= CF_REVERTPLEASE; - if (oldcamera != camera) + if (oldcamera != cam) { - R_ClearPastViewer(camera); + R_ClearPastViewer(cam); } return 0; } diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 9b6f42b88..ceda20bd8 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -498,7 +498,7 @@ class Actor : Thinker native native bool UsePuzzleItem(int PuzzleItemType); native float AccuracyFactor(); native bool MorphMonster (Class spawntype, int duration, int style, Class enter_flash, Class exit_flash); - native void SetCamera(Actor cam, bool revert = false); + action native void SetCamera(Actor cam, bool revert = false); // DECORATE compatible functions native int CountInv(class itemtype, int ptr_select = AAPTR_DEFAULT);