mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Removed some amxmod compat stuff for now so this can actually compile and link properly again
This commit is contained in:
parent
2905217607
commit
557958b408
@ -33,7 +33,6 @@
|
||||
#include "amxmodx.h"
|
||||
#include "CLang.h"
|
||||
#include "format.h"
|
||||
#include "amxmod_compat.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#define _snprintf snprintf
|
||||
@ -288,23 +287,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
||||
static char outbuf[4096];
|
||||
cell *addr = get_amxaddr(amx, params[parm++]);
|
||||
|
||||
if (amx->flags & AMX_FLAG_OLDFILE)
|
||||
{
|
||||
if (*addr & BCOMPAT_TRANSLATE_BITS)
|
||||
{
|
||||
const char *key, *def;
|
||||
if (!translate_bcompat(amx, addr, &key, &def))
|
||||
{
|
||||
goto normal_string;
|
||||
}
|
||||
len = atcprintf(outbuf, sizeof(outbuf)-1, def, amx, params, &parm);
|
||||
} else {
|
||||
goto normal_string;
|
||||
}
|
||||
} else {
|
||||
normal_string:
|
||||
len = atcprintf(outbuf, sizeof(outbuf)-1, addr, amx, params, &parm);
|
||||
}
|
||||
|
||||
return outbuf;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "amxmodx.h"
|
||||
#include "format.h"
|
||||
#include "amxmod_compat.h"
|
||||
|
||||
//Adapted from Quake3's vsprintf
|
||||
// thanks to cybermind for linking me to this :)
|
||||
@ -423,24 +422,6 @@ reswitch:
|
||||
break;
|
||||
case 's':
|
||||
CHECK_ARGS(0);
|
||||
if (amx->flags & AMX_FLAG_OLDFILE)
|
||||
{
|
||||
cell *addr = get_amxaddr(amx, params[arg]);
|
||||
if (*addr & BCOMPAT_TRANSLATE_BITS)
|
||||
{
|
||||
const char *key, *def;
|
||||
if (!translate_bcompat(amx, addr, &key, &def))
|
||||
{
|
||||
goto break_to_normal_string;
|
||||
}
|
||||
arg++;
|
||||
size_t written = atcprintf(buf_p, llen, def, amx, params, &arg);
|
||||
buf_p += written;
|
||||
llen -= written;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break_to_normal_string:
|
||||
AddString(&buf_p, llen, get_amxaddr(amx, params[arg]), width, prec);
|
||||
arg++;
|
||||
break;
|
||||
|
@ -628,7 +628,6 @@ void C_ServerDeactivate_Post()
|
||||
g_xvars.clear();
|
||||
g_plugins.clear();
|
||||
ClearPluginLibraries();
|
||||
ClearTransCache();
|
||||
modules_callPluginsUnloaded();
|
||||
|
||||
ClearMessages();
|
||||
|
@ -579,11 +579,6 @@ int set_amxnatives(AMX* amx, char error[128])
|
||||
amx_Register(amx, vector_Natives, -1);
|
||||
amx_Register(amx, g_SortNatives, -1);
|
||||
|
||||
if (amx->flags & AMX_FLAG_OLDFILE)
|
||||
{
|
||||
amx_Register(amx, g_BcompatNatives, -1);
|
||||
}
|
||||
|
||||
//we're not actually gonna check these here anymore
|
||||
amx->flags |= AMX_FLAG_PRENIT;
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include "amxmodx.h"
|
||||
#include "format.h"
|
||||
#include "binlog.h"
|
||||
#include "amxmod_compat.h"
|
||||
|
||||
const char* stristr(const char* str, const char* substr)
|
||||
{
|
||||
@ -116,21 +115,8 @@ extern "C" size_t get_amxstring_r(AMX *amx, cell amx_addr, char *destination, in
|
||||
register char *dest = destination;
|
||||
char *start = dest;
|
||||
|
||||
if ( (amx->flags & AMX_FLAG_OLDFILE) &&
|
||||
(*source & BCOMPAT_TRANSLATE_BITS) )
|
||||
{
|
||||
const char *def, *key;
|
||||
if (!translate_bcompat(amx, source, &key, &def))
|
||||
{
|
||||
goto normal_string;
|
||||
}
|
||||
while (maxlen-- && *def)
|
||||
*dest++=(*source++);
|
||||
} else {
|
||||
normal_string:
|
||||
while (maxlen-- && *source)
|
||||
*dest++=(char)(*source++);
|
||||
}
|
||||
|
||||
*dest = '\0';
|
||||
|
||||
@ -153,22 +139,9 @@ char *get_amxstring(AMX *amx, cell amx_addr, int id, int& len)
|
||||
register char* dest = buffor[id];
|
||||
char* start = dest;
|
||||
|
||||
if ( (amx->flags & AMX_FLAG_OLDFILE) &&
|
||||
(*source & BCOMPAT_TRANSLATE_BITS) )
|
||||
{
|
||||
const char *def, *key;
|
||||
if (!translate_bcompat(amx, source, &key, &def))
|
||||
{
|
||||
goto normal_string;
|
||||
}
|
||||
while ( (*dest++ = (*def++)) );
|
||||
len = --dest - start;
|
||||
} else {
|
||||
normal_string:
|
||||
while ((*dest++=(char)(*source++)));
|
||||
|
||||
len = --dest - start;
|
||||
}
|
||||
|
||||
#if defined BINLOG_ENABLED
|
||||
if (g_binlog_level & 2)
|
||||
|
Loading…
Reference in New Issue
Block a user