mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
Malformat bug fixes, RC version bump
This commit is contained in:
parent
64b7c7b600
commit
611ad2be94
@ -612,7 +612,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
|||||||
*tmpPtr++ = *tmpCell++;
|
*tmpPtr++ = *tmpCell++;
|
||||||
|
|
||||||
*tmpPtr = 0;
|
*tmpPtr = 0;
|
||||||
sprintf(outptr, format, tmpString);
|
_snprintf(outptr, sizeof(outbuf)-(outptr-outbuf)-1, format, tmpString);
|
||||||
ZEROTERM(outbuf);
|
ZEROTERM(outbuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -620,7 +620,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
|||||||
case 'f':
|
case 'f':
|
||||||
{
|
{
|
||||||
NEXT_PARAM();
|
NEXT_PARAM();
|
||||||
sprintf(outptr, format, *(REAL*)get_amxaddr(amx, params[parm++]));
|
_snprintf(outptr, sizeof(outbuf)-(outptr-outbuf)-1, format, *(REAL*)get_amxaddr(amx, params[parm++]));
|
||||||
ZEROTERM(outbuf);
|
ZEROTERM(outbuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -629,7 +629,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
|||||||
case 'c':
|
case 'c':
|
||||||
{
|
{
|
||||||
NEXT_PARAM();
|
NEXT_PARAM();
|
||||||
sprintf(outptr, format, (int)*get_amxaddr(amx, params[parm++]));
|
_snprintf(outptr, sizeof(outbuf)-(outptr-outbuf)-1, format, (int)*get_amxaddr(amx, params[parm++]));
|
||||||
ZEROTERM(outbuf);
|
ZEROTERM(outbuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -698,7 +698,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
|||||||
while (tmpPtr-tmpString<sizeof(tmpString) && *tmpCell)
|
while (tmpPtr-tmpString<sizeof(tmpString) && *tmpCell)
|
||||||
*tmpPtr++ = *tmpCell++;
|
*tmpPtr++ = *tmpCell++;
|
||||||
*tmpPtr = 0;
|
*tmpPtr = 0;
|
||||||
sprintf(outptr, format, tmpString);
|
_snprintf(outptr, sizeof(outbuf)-(outptr-outbuf)-1, format, tmpString);
|
||||||
ZEROTERM(outbuf);
|
ZEROTERM(outbuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -706,7 +706,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
|||||||
case 'f':
|
case 'f':
|
||||||
{
|
{
|
||||||
NEXT_PARAM();
|
NEXT_PARAM();
|
||||||
sprintf(outptr, format, *(REAL*)get_amxaddr(amx, params[parm++]));
|
_snprintf(outptr, sizeof(outbuf)-(outptr-outbuf)-1, format, *(REAL*)get_amxaddr(amx, params[parm++]));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'i':
|
case 'i':
|
||||||
@ -714,7 +714,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
|||||||
case 'c':
|
case 'c':
|
||||||
{
|
{
|
||||||
NEXT_PARAM();
|
NEXT_PARAM();
|
||||||
sprintf(outptr, format, (int)*get_amxaddr(amx, params[parm++]));
|
_snprintf(outptr, sizeof(outbuf)-(outptr-outbuf)-1, format, (int)*get_amxaddr(amx, params[parm++]));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -158,7 +158,7 @@ static cell AMX_NATIVE_CALL console_cmd(AMX *amx, cell *params) /* 2 param */
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if ( !pPlayer->bot && pPlayer->initialized ) CLIENT_COMMAND(pPlayer->pEdict, cmd );
|
if ( !pPlayer->bot && pPlayer->initialized ) CLIENT_COMMAND(pPlayer->pEdict, UTIL_VarArgs("%s", cmd) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
@ -1141,7 +1141,7 @@ static cell AMX_NATIVE_CALL client_cmd(AMX *amx, cell *params) /* 2 param */
|
|||||||
for(int i = 1; i <= gpGlobals->maxClients; ++i){
|
for(int i = 1; i <= gpGlobals->maxClients; ++i){
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(i);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(i);
|
||||||
if (!pPlayer->bot && pPlayer->initialized /*&& pPlayer->ingame*/ )
|
if (!pPlayer->bot && pPlayer->initialized /*&& pPlayer->ingame*/ )
|
||||||
CLIENT_COMMAND(pPlayer->pEdict, cmd );
|
CLIENT_COMMAND(pPlayer->pEdict, UTIL_VarArgs("%s", cmd) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1152,7 +1152,7 @@ static cell AMX_NATIVE_CALL client_cmd(AMX *amx, cell *params) /* 2 param */
|
|||||||
}
|
}
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if ( !pPlayer->bot && pPlayer->initialized /*&& pPlayer->ingame*/ )
|
if ( !pPlayer->bot && pPlayer->initialized /*&& pPlayer->ingame*/ )
|
||||||
CLIENT_COMMAND(pPlayer->pEdict, cmd );
|
CLIENT_COMMAND(pPlayer->pEdict, UTIL_VarArgs("%s", cmd) );
|
||||||
}
|
}
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
#include "amxxlog.h"
|
#include "amxxlog.h"
|
||||||
|
|
||||||
#define AMXXLOG_Log g_log.Log
|
#define AMXXLOG_Log g_log.Log
|
||||||
#define AMX_VERSION "1.01"
|
#define AMX_VERSION "1.10-RC1"
|
||||||
|
|
||||||
extern AMX_NATIVE_INFO core_Natives[];
|
extern AMX_NATIVE_INFO core_Natives[];
|
||||||
extern AMX_NATIVE_INFO time_Natives[];
|
extern AMX_NATIVE_INFO time_Natives[];
|
||||||
@ -116,6 +116,7 @@ void UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms, char *pM
|
|||||||
void UTIL_IntToString(int value, char *output);
|
void UTIL_IntToString(int value, char *output);
|
||||||
void UTIL_ShowMOTD( edict_t *client , char *motd, int mlen, const char *name);
|
void UTIL_ShowMOTD( edict_t *client , char *motd, int mlen, const char *name);
|
||||||
void UTIL_ShowMenu( edict_t* pEntity, int slots, int time, char *menu, int mlen );
|
void UTIL_ShowMenu( edict_t* pEntity, int slots, int time, char *menu, int mlen );
|
||||||
|
const char *UTIL_VarArgs(const char *fmt, ...);
|
||||||
|
|
||||||
|
|
||||||
#define GET_PLAYER_POINTER(e) (&g_players[ENTINDEX(e)])
|
#define GET_PLAYER_POINTER(e) (&g_players[ENTINDEX(e)])
|
||||||
|
@ -33,6 +33,22 @@
|
|||||||
|
|
||||||
#include "amxmodx.h"
|
#include "amxmodx.h"
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#define _vsnprintf vsnprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *UTIL_VarArgs(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
static char string[4096];
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
|
_vsnprintf(string, sizeof(string)-1, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
|
||||||
int UTIL_ReadFlags(const char* c)
|
int UTIL_ReadFlags(const char* c)
|
||||||
{
|
{
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
@ -260,17 +276,6 @@ void UTIL_FakeClientCommand(edict_t *pEdict, const char *cmd, const char *arg1,
|
|||||||
{
|
{
|
||||||
if (!cmd)
|
if (!cmd)
|
||||||
return; // no command
|
return; // no command
|
||||||
/*
|
|
||||||
char clCmd[256];
|
|
||||||
snprintf(g_fakecmd.args, 255, "%s%s%s%s%s", cmd,
|
|
||||||
arg1 ? " " : "", arg1 ? arg1 : "",
|
|
||||||
arg2 ? " " : "", arg2 ? arg2 : "");
|
|
||||||
clCmd[255] = 0;
|
|
||||||
CLIENT_COMMAND(pEdict, clCmd);
|
|
||||||
return;
|
|
||||||
*/
|
|
||||||
if (!cmd)
|
|
||||||
return; // no command
|
|
||||||
|
|
||||||
// store command
|
// store command
|
||||||
g_fakecmd.argv[0] = cmd;
|
g_fakecmd.argv[0] = cmd;
|
||||||
|
@ -27,8 +27,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,1,0
|
FILEVERSION 1,1,0,0
|
||||||
PRODUCTVERSION 1,0,1,0
|
PRODUCTVERSION 1,1,0,0
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -45,12 +45,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "AMX Mod X"
|
VALUE "Comments", "AMX Mod X"
|
||||||
VALUE "FileDescription", "AMX Mod X"
|
VALUE "FileDescription", "AMX Mod X"
|
||||||
VALUE "FileVersion", "1.01"
|
VALUE "FileVersion", "1.10-RC1"
|
||||||
VALUE "InternalName", "amxmodx"
|
VALUE "InternalName", "amxmodx"
|
||||||
VALUE "LegalCopyright", "Copyright (c) 2004-2005, AMX Mod X Dev Team"
|
VALUE "LegalCopyright", "Copyright (c) 2004-2005, AMX Mod X Dev Team"
|
||||||
VALUE "OriginalFilename", "amxmodx_mm.dll"
|
VALUE "OriginalFilename", "amxmodx_mm.dll"
|
||||||
VALUE "ProductName", "AMX Mod X"
|
VALUE "ProductName", "AMX Mod X"
|
||||||
VALUE "ProductVersion", "1.01"
|
VALUE "ProductVersion", "1.10-RC1"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
Loading…
Reference in New Issue
Block a user