From 9b10a3e32f9f9452e8152f4effa37271736c9cdc Mon Sep 17 00:00:00 2001 From: ineed bots Date: Fri, 22 Sep 2023 11:31:54 -0600 Subject: [PATCH] Add this func --- src/codsrc/clientscript/cscr_vm.cpp | 6 ++++++ src/codsrc/clientscript/cscr_vm.hpp | 1 + src/game/clientscript/cscr_vm.hpp | 1 + src/game/clientscript/cscr_vm_w.cpp | 5 +++++ 4 files changed, 13 insertions(+) diff --git a/src/codsrc/clientscript/cscr_vm.cpp b/src/codsrc/clientscript/cscr_vm.cpp index ff1edce..9f231d7 100644 --- a/src/codsrc/clientscript/cscr_vm.cpp +++ b/src/codsrc/clientscript/cscr_vm.cpp @@ -5739,5 +5739,11 @@ namespace codsrc { game::Scr_NotifyNum_Internal(game::SCRIPTINSTANCE_SERVER, entnum, classnum, stringValue, paramcount); } + + // Restored + unsigned int Scr_GetNumParam(game::scriptInstance_t inst) + { + return game::gScrVmPub[inst].outparamcount; + } } #pragma warning(pop) diff --git a/src/codsrc/clientscript/cscr_vm.hpp b/src/codsrc/clientscript/cscr_vm.hpp index 2eb2323..ec17ef3 100644 --- a/src/codsrc/clientscript/cscr_vm.hpp +++ b/src/codsrc/clientscript/cscr_vm.hpp @@ -116,4 +116,5 @@ namespace codsrc unsigned int GetInternalVariableIndex(game::scriptInstance_t inst, unsigned int unsignedValue); const char* Scr_ReadData(game::scriptInstance_t inst, const char** pos, unsigned int count); void Scr_NotifyNum(int entnum, game::classNum_e classnum, unsigned int stringValue, unsigned int paramcount); + unsigned int Scr_GetNumParam(game::scriptInstance_t inst); } diff --git a/src/game/clientscript/cscr_vm.hpp b/src/game/clientscript/cscr_vm.hpp index 07c4098..0e4330f 100644 --- a/src/game/clientscript/cscr_vm.hpp +++ b/src/game/clientscript/cscr_vm.hpp @@ -178,4 +178,5 @@ namespace game void Scr_EvalBoolNot(scriptInstance_t inst, VariableValue* value); unsigned int GetInternalVariableIndex(scriptInstance_t inst, unsigned int unsignedValue); const char* Scr_ReadData(scriptInstance_t inst, const char** pos, unsigned int count); + unsigned int Scr_GetNumParam(game::scriptInstance_t inst); } \ No newline at end of file diff --git a/src/game/clientscript/cscr_vm_w.cpp b/src/game/clientscript/cscr_vm_w.cpp index 934e64e..9e0beb7 100644 --- a/src/game/clientscript/cscr_vm_w.cpp +++ b/src/game/clientscript/cscr_vm_w.cpp @@ -981,4 +981,9 @@ namespace game { return codsrc::Scr_ReadData(inst, pos, count); } + + unsigned int Scr_GetNumParam(game::scriptInstance_t inst) + { + return codsrc::Scr_GetNumParam(inst); + } } \ No newline at end of file