Sorry neon, but im reverting this for now.

This commit is contained in:
zaCade 2019-05-22 20:49:27 +02:00
parent 227f3a6c05
commit d761e82294
3 changed files with 5 additions and 62 deletions

View File

@ -29,9 +29,9 @@ def CopyFiles(src, dest, files):
builder.AddCopy(source_path, dest_entry) builder.AddCopy(source_path, dest_entry)
# Include files # Include files
CopyFiles('include', 'addons/sourcemod/scripting/include', #CopyFiles('include', 'addons/sourcemod/scripting/include',
[ 'A2SFixes.inc', ] # [ 'sample.inc', ]
) #)
# GameData files # GameData files
#CopyFiles('gamedata', 'addons/sourcemod/gamedata', #CopyFiles('gamedata', 'addons/sourcemod/gamedata',

View File

@ -59,14 +59,13 @@ CDetour *g_pDetour_SendTo = NULL;
char *NewBuf; char *NewBuf;
char *OldBuf; char *OldBuf;
struct PlayerInfo { struct PlayerInfo
{
char Name[32]; char Name[32];
long Score; long Score;
float Time; float Time;
}; };
int g_FakePlayers = 0;
/** /**
* @brief * @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 // Correct playercount
memset(NewBuf, iPlayers, 1); 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); 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. * @brief This is called after the initial loading sequence has been processed.
* *

View File

@ -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