From b5c4e4e7ed81394070b05296ed087b6043d27667 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 29 Jun 2023 04:19:34 +0100 Subject: Replace dependent names with explicit template definition (#490) --- NorthstarDLL/scripts/scriptdatatables.cpp | 4 ++-- NorthstarDLL/scripts/server/miscserverscript.cpp | 6 +++--- NorthstarDLL/scripts/server/scriptuserinfo.cpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'NorthstarDLL') diff --git a/NorthstarDLL/scripts/scriptdatatables.cpp b/NorthstarDLL/scripts/scriptdatatables.cpp index b050ff8d..8a2935c2 100644 --- a/NorthstarDLL/scripts/scriptdatatables.cpp +++ b/NorthstarDLL/scripts/scriptdatatables.cpp @@ -116,7 +116,7 @@ REPLACE_SQFUNC(GetDataTable, (ScriptContext::UI | ScriptContext::CLIENT | Script // first, check the cache if (CSVCache.find(pAssetName) != CSVCache.end()) { - CSVData** pUserdata = g_pSquirrel->createuserdata(sqvm, sizeof(CSVData*)); + CSVData** pUserdata = g_pSquirrel->template createuserdata(sqvm, sizeof(CSVData*)); g_pSquirrel->setuserdatatypeid(sqvm, -1, USERDATA_TYPE_DATATABLE_CUSTOM); *pUserdata = &CSVCache[pAssetName]; @@ -251,7 +251,7 @@ REPLACE_SQFUNC(GetDataTable, (ScriptContext::UI | ScriptContext::CLIENT | Script } // add to cache and return - CSVData** pUserdata = g_pSquirrel->createuserdata(sqvm, sizeof(CSVData*)); + CSVData** pUserdata = g_pSquirrel->template createuserdata(sqvm, sizeof(CSVData*)); g_pSquirrel->setuserdatatypeid(sqvm, -1, USERDATA_TYPE_DATATABLE_CUSTOM); CSVCache[pAssetName] = csv; *pUserdata = &CSVCache[pAssetName]; diff --git a/NorthstarDLL/scripts/server/miscserverscript.cpp b/NorthstarDLL/scripts/server/miscserverscript.cpp index 06e9fda0..3ea44ceb 100644 --- a/NorthstarDLL/scripts/server/miscserverscript.cpp +++ b/NorthstarDLL/scripts/server/miscserverscript.cpp @@ -9,7 +9,7 @@ ADD_SQFUNC("void", NSEarlyWritePlayerPersistenceForLeave, "entity player", "", ScriptContext::SERVER) { - const R2::CBasePlayer* pPlayer = g_pSquirrel->getentity(sqvm, 1); + const R2::CBasePlayer* pPlayer = g_pSquirrel->template getentity(sqvm, 1); if (!pPlayer) { spdlog::warn("NSEarlyWritePlayerPersistenceForLeave got null player"); @@ -38,7 +38,7 @@ ADD_SQFUNC("bool", NSIsWritingPlayerPersistence, "", "", ScriptContext::SERVER) ADD_SQFUNC("bool", NSIsPlayerLocalPlayer, "entity player", "", ScriptContext::SERVER) { - const R2::CBasePlayer* pPlayer = g_pSquirrel->getentity(sqvm, 1); + const R2::CBasePlayer* pPlayer = g_pSquirrel->template getentity(sqvm, 1); if (!pPlayer) { spdlog::warn("NSIsPlayerLocalPlayer got null player"); @@ -65,7 +65,7 @@ ADD_SQFUNC( "Disconnects the player from the server with the given reason", ScriptContext::SERVER) { - const R2::CBasePlayer* pPlayer = g_pSquirrel->getentity(sqvm, 1); + const R2::CBasePlayer* pPlayer = g_pSquirrel->template getentity(sqvm, 1); const char* reason = g_pSquirrel->getstring(sqvm, 2); if (!pPlayer) diff --git a/NorthstarDLL/scripts/server/scriptuserinfo.cpp b/NorthstarDLL/scripts/server/scriptuserinfo.cpp index 6b26ed61..fac458a3 100644 --- a/NorthstarDLL/scripts/server/scriptuserinfo.cpp +++ b/NorthstarDLL/scripts/server/scriptuserinfo.cpp @@ -7,7 +7,7 @@ ADD_SQFUNC("string", GetUserInfoKVString_Internal, "entity player, string key, s "Gets the string value of a given player's userinfo convar by name", ScriptContext::SERVER) // clang-format on { - const R2::CBasePlayer* pPlayer = g_pSquirrel->getentity(sqvm, 1); + const R2::CBasePlayer* pPlayer = g_pSquirrel->template getentity(sqvm, 1); if (!pPlayer) { g_pSquirrel->raiseerror(sqvm, "player is null"); @@ -27,7 +27,7 @@ ADD_SQFUNC("asset", GetUserInfoKVAsset_Internal, "entity player, string key, ass "Gets the asset value of a given player's userinfo convar by name", ScriptContext::SERVER) // clang-format on { - const R2::CBasePlayer* pPlayer = g_pSquirrel->getentity(sqvm, 1); + const R2::CBasePlayer* pPlayer = g_pSquirrel->template getentity(sqvm, 1); if (!pPlayer) { g_pSquirrel->raiseerror(sqvm, "player is null"); @@ -48,7 +48,7 @@ ADD_SQFUNC("int", GetUserInfoKVInt_Internal, "entity player, string key, int def "Gets the int value of a given player's userinfo convar by name", ScriptContext::SERVER) // clang-format on { - const R2::CBasePlayer* pPlayer = g_pSquirrel->getentity(sqvm, 1); + const R2::CBasePlayer* pPlayer = g_pSquirrel->template getentity(sqvm, 1); if (!pPlayer) { g_pSquirrel->raiseerror(sqvm, "player is null"); -- cgit v1.2.3