From d761e822945e51358e2e0ede93b2a8bd9e16aaa0 Mon Sep 17 00:00:00 2001 From: zaCade Date: Wed, 22 May 2019 20:49:27 +0200 Subject: [PATCH] Sorry neon, but im reverting this for now. --- PackageScript | 6 +++--- extension.cpp | 31 ++----------------------------- include/A2SFixes.inc | 30 ------------------------------ 3 files changed, 5 insertions(+), 62 deletions(-) delete mode 100644 include/A2SFixes.inc diff --git a/PackageScript b/PackageScript index 1b7210a..e207870 100644 --- a/PackageScript +++ b/PackageScript @@ -29,9 +29,9 @@ def CopyFiles(src, dest, files): builder.AddCopy(source_path, dest_entry) # Include files -CopyFiles('include', 'addons/sourcemod/scripting/include', - [ 'A2SFixes.inc', ] -) +#CopyFiles('include', 'addons/sourcemod/scripting/include', +# [ 'sample.inc', ] +#) # GameData files #CopyFiles('gamedata', 'addons/sourcemod/gamedata', diff --git a/extension.cpp b/extension.cpp index 2a78ab6..25dfc8b 100644 --- a/extension.cpp +++ b/extension.cpp @@ -59,14 +59,13 @@ CDetour *g_pDetour_SendTo = NULL; char *NewBuf; char *OldBuf; -struct PlayerInfo { +struct PlayerInfo +{ char Name[32]; long Score; float Time; }; -int g_FakePlayers = 0; - /** * @brief */ @@ -126,9 +125,6 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag } } - if (iPlayers + g_FakePlayers < 64) - iPlayers += g_FakePlayers; - // Correct playercount memset(NewBuf, iPlayers, 1); @@ -194,29 +190,6 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag return DETOUR_STATIC_CALL(Detour_SendTo)(s, buf, len, flags, to, tolen); } -/** - * @brief - */ -cell_t FakePlayers(IPluginContext *pContext, const cell_t *params) -{ - g_FakePlayers = params[1]; - return 1; -} - -/** - * @brief - */ -const sp_nativeinfo_t MyNatives[] = -{ - {"FakePlayers", FakePlayers}, - {NULL, NULL}, -}; - -void A2SFixes::SDK_OnAllLoaded() -{ - sharesys->AddNatives(myself, MyNatives); -} - /** * @brief This is called after the initial loading sequence has been processed. * diff --git a/include/A2SFixes.inc b/include/A2SFixes.inc deleted file mode 100644 index 93c42f5..0000000 --- a/include/A2SFixes.inc +++ /dev/null @@ -1,30 +0,0 @@ -#if defined _A2SFixes_included - #endinput -#endif -#define _A2SFixes_included - -native bool FakePlayers(int amount); - - -public Extension __ext_RevEmuAPI = -{ - name = "A2SFixes", - file = "A2SFixes.ext", -#if defined AUTOLOAD_EXTENSIONS - autoload = 1, -#else - autoload = 0, -#endif -#if defined REQUIRE_EXTENSIONS - required = 1, -#else - required = 0, -#endif -}; - -#if !defined REQUIRE_EXTENSIONS -public __ext_A2SFixes_SetNTVOptional() -{ - MarkNativeAsOptional("FakePlayers"); -} -#endif