From 71a005fda6a40516152e2bc5d9c70f07fbbe0f48 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 16 Apr 2023 10:41:38 +0200 Subject: [PATCH] - added a few 'const'. --- source/games/duke/src/dukeactor.h | 4 ++-- source/games/duke/src/vmexports.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/duke/src/dukeactor.h b/source/games/duke/src/dukeactor.h index a6590cb9d..7df9890af 100644 --- a/source/games/duke/src/dukeactor.h +++ b/source/games/duke/src/dukeactor.h @@ -23,12 +23,12 @@ DDukeActor* spawn(DDukeActor* spawner, int type); DDukeActor* spawn(DDukeActor* actj, PClassActor* pname); // return type is int for scripting - the value must still be true or false! -inline int badguy(DDukeActor* pSprite) +inline int badguy(const DDukeActor* pSprite) { return !!(pSprite->flags1 & (SFLAG_BADGUY | SFLAG_INTERNAL_BADGUY)); } -inline int bossguy(DDukeActor* pSprite) +inline int bossguy(const DDukeActor* pSprite) { return !!(pSprite->flags1 & SFLAG_BOSS); } diff --git a/source/games/duke/src/vmexports.cpp b/source/games/duke/src/vmexports.cpp index 4e9762e89..1308ffb3f 100644 --- a/source/games/duke/src/vmexports.cpp +++ b/source/games/duke/src/vmexports.cpp @@ -587,7 +587,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, badguy, badguy) ACTION_RETURN_INT(badguy(self)); } -int duke_scripted(DDukeActor* act) +int duke_scripted(const DDukeActor* act) { return act->conInfo() != nullptr; }