Removed all warnings.

This commit is contained in:
David Anderson 2004-04-01 05:53:22 +00:00
parent b0e6ea16ce
commit 4f4c87d9b2
15 changed files with 117 additions and 82 deletions

View File

@ -100,8 +100,8 @@ private:
CmdLink* clcmdlist;
struct CmdPrefix {
CmdMngr* parent;
String name;
CmdMngr* parent;
CmdLink* list;
CmdPrefix* next;
CmdPrefix( const char* nn , CmdMngr* pp) : name(nn),parent(pp),list(0),next(0){}

View File

@ -153,3 +153,5 @@ public:
};
#endif // #ifdef __CEVENTS_H__

View File

@ -96,23 +96,22 @@ public:
LogCondEle(CLogCmp *c, LogCondEle *n): cmp(c) , next(n) { }
};
struct LogCond {
LogCondEle *list;
int argnum;
LogCondEle *list;
LogCond *next;
LogCond( int a , LogCondEle* ee , LogCond* n ) : argnum(a) , list(ee), next(n) {}
~LogCond();
};
CPluginMngr::CPlugin *plugin;
int func;
LogEventsMngr* parent;
LogCond *filters;
LogEventsMngr* parent;
CLogEvent *next;
CLogEvent(CPluginMngr::CPlugin *p,int f, LogEventsMngr* ppp) : plugin(p),func(f), filters(0),parent(ppp) ,next(0) { }
~CLogEvent();
public:
void registerFilter( char* filter );
inline CPluginMngr::CPlugin *getPlugin() { return plugin; }
void registerFilter( char* filter );
inline int getFunction() { return func; }
};
@ -144,8 +143,8 @@ public:
class iterator {
LogEventsMngr* b;
CLogEvent* a;
LogEventsMngr* b;
public:
inline iterator(CLogEvent*aa,LogEventsMngr* bb) : a(aa), b(bb) {}
inline iterator& operator++() {

View File

@ -151,11 +151,11 @@ public:
// class ForceObject
// *****************************************************
class ForceObject {
AMX* amx;
String filename;
FORCE_TYPE type;
Vector mins;
Vector maxs;
AMX* amx;
public:
ForceObject(const char* n, FORCE_TYPE c,Vector& mi, Vector& ma, AMX* a) :
filename(n) , type(c), mins(mi), maxs(ma), amx(a) {}

View File

@ -107,8 +107,8 @@ public:
void clear();
class iterator {
CTaskMngr* b;
CTask* a;
CTaskMngr* b;
public:
iterator(CTask*aa,CTaskMngr* bb) : a(aa), b(bb) {}
iterator& operator++() {

View File

@ -44,7 +44,7 @@ endif
LIBFILE_LINUX = $(MODNAME)_i386.so
LIBFILE_LINUX = $(MODNAME)_i686.so
LIBFILE_WIN32 = $(MODNAME).dll
TARGET_LINUX = $(OBJDIR_LINUX)/$(LIBFILE_LINUX)
TARGET_WIN32 = $(OBJDIR_WIN32)/$(LIBFILE_WIN32)
@ -61,7 +61,7 @@ OBJ_WIN32 := $(SRCFILES:%.cpp=$(OBJDIR_WIN32)/%.o)
OBJC_WIN32 := $(CSRCFILES:%.c=$(OBJDIR_WIN32)/%.o)
CCOPT = -O2 -march=i586 -ffast-math -funroll-loops \
CCOPT = -O6 -march=i686 -ffast-math -funroll-loops \
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
-malign-jumps=2 -malign-functions=2 -s -DNDEBUG

View File

@ -1859,14 +1859,14 @@ static void *amx_opcodelist_nodebug[] = {
NEXT(cip);
op_load_i:
/* verify address */
if (pri>=hea && pri<stk || (ucell)pri>=(ucell)amx->stp)
if ((pri>=hea && pri<stk) || (ucell)pri>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
pri= * (cell *)(data+(int)pri);
NEXT(cip);
op_lodb_i:
GETPARAM(offs);
/* verify address */
if (pri>=hea && pri<stk || (ucell)pri>=(ucell)amx->stp)
if ((pri>=hea && pri<stk) || (ucell)pri>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
switch (offs) {
case 1:
@ -1932,14 +1932,14 @@ static void *amx_opcodelist_nodebug[] = {
NEXT(cip);
op_stor_i:
/* verify address */
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
*(cell *)(data+(int)alt)=pri;
NEXT(cip);
op_strb_i:
GETPARAM(offs);
/* verify address */
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
switch (offs) {
case 1:
@ -1956,7 +1956,7 @@ static void *amx_opcodelist_nodebug[] = {
op_lidx:
offs=pri*sizeof(cell)+alt;
/* verify address */
if (offs>=hea && offs<stk || (ucell)offs>=(ucell)amx->stp)
if ((offs>=hea && offs<stk) || (ucell)offs>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
pri= * (cell *)(data+(int)offs);
NEXT(cip);
@ -1964,7 +1964,7 @@ static void *amx_opcodelist_nodebug[] = {
GETPARAM(offs);
offs=(pri << (int)offs)+alt;
/* verify address */
if (offs>=hea && offs<stk || (ucell)offs>=(ucell)amx->stp)
if ((offs>=hea && offs<stk) || (ucell)offs>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
pri= * (cell *)(data+(int)offs);
NEXT(cip);
@ -2461,13 +2461,13 @@ static void *amx_opcodelist_nodebug[] = {
/* verify top & bottom memory addresses, for both source and destination
* addresses
*/
if (pri>=hea && pri<stk || (ucell)pri>=(ucell)amx->stp)
if ((pri>=hea && pri<stk) || (ucell)pri>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
if ((pri+offs)>hea && (pri+offs)<stk || (ucell)(pri+offs)>(ucell)amx->stp)
if (((pri+offs)>hea && (pri+offs)<stk) || (ucell)(pri+offs)>(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
if ((alt+offs)>hea && (alt+offs)<stk || (ucell)(alt+offs)>(ucell)amx->stp)
if (((alt+offs)>hea && (alt+offs)<stk) || (ucell)(alt+offs)>(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
memcpy(data+(int)alt, data+(int)pri, (int)offs);
NEXT(cip);
@ -2476,22 +2476,22 @@ static void *amx_opcodelist_nodebug[] = {
/* verify top & bottom memory addresses, for both source and destination
* addresses
*/
if (pri>=hea && pri<stk || (ucell)pri>=(ucell)amx->stp)
if ((pri>=hea && pri<stk) || (ucell)pri>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
if ((pri+offs)>hea && (pri+offs)<stk || (ucell)(pri+offs)>(ucell)amx->stp)
if (((pri+offs)>hea && (pri+offs)<stk) || (ucell)(pri+offs)>(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
if ((alt+offs)>hea && (alt+offs)<stk || (ucell)(alt+offs)>(ucell)amx->stp)
if (((alt+offs)>hea && (alt+offs)<stk) || (ucell)(alt+offs)>(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
pri=memcmp(data+(int)alt, data+(int)pri, (int)offs);
NEXT(cip);
op_fill:
GETPARAM(offs);
/* verify top & bottom memory addresses */
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
if ((alt+offs)>hea && (alt+offs)<stk || (ucell)(alt+offs)>(ucell)amx->stp)
if (((alt+offs)>hea && (alt+offs)<stk) || (ucell)(alt+offs)>(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
for (i=(int)alt; offs>=sizeof(cell); i+=sizeof(cell), offs-=sizeof(cell))
*(cell *)(data+i) = pri;
@ -3788,7 +3788,7 @@ int AMXAPI amx_GetAddr(AMX *amx,cell amx_addr,cell **phys_addr)
data=(amx->data!=NULL) ? amx->data : amx->base+(int)hdr->dat;
assert(phys_addr!=NULL);
if (amx_addr>=amx->hea && amx_addr<amx->stk || amx_addr<0 || amx_addr>=amx->stp) {
if ((amx_addr>=amx->hea && amx_addr<amx->stk) || amx_addr<0 || amx_addr>=amx->stp) {
*phys_addr=NULL;
return AMX_ERR_MEMACCESS;
} /* if */
@ -3994,19 +3994,19 @@ static long utf8_lowmark[5] = { 0x80, 0x800, 0x10000, 0x200000, 0x4000000 };
switch (followup) {
case 4:
if (((c=*string++) & 0xc0) != 0x80) goto error;
result = (result << 6) | c & 0x3f;
result = (result << 6) | (c & 0x3f);
case 3:
if (((c=*string++) & 0xc0) != 0x80) goto error;
result = (result << 6) | c & 0x3f;
result = (result << 6) | (c & 0x3f);
case 2:
if (((c=*string++) & 0xc0) != 0x80) goto error;
result = (result << 6) | c & 0x3f;
result = (result << 6) | (c & 0x3f);
case 1:
if (((c=*string++) & 0xc0) != 0x80) goto error;
result = (result << 6) | c & 0x3f;
result = (result << 6) | (c & 0x3f);
case 0:
if (((c=*string++) & 0xc0) != 0x80) goto error;
result = (result << 6) | c & 0x3f;
result = (result << 6) | (c & 0x3f);
} /* switch */
/* Do additional checks: shortest encoding & reserved positions. The
* lowmark limits also depends on the code length; it can be read from
@ -4014,7 +4014,7 @@ static long utf8_lowmark[5] = { 0x80, 0x800, 0x10000, 0x200000, 0x4000000 };
*/
if (result<utf8_lowmark[followup])
goto error;
if (result>=0xd800 && result<=0xdfff || result==0xfffe || result==0xffff)
if ((result>=0xd800 && result<=0xdfff) || result==0xfffe || result==0xffff)
goto error;
} /* if */
@ -4049,40 +4049,40 @@ int AMXAPI amx_UTF8Put(char *string, char **endptr, int maxchars, cell value)
} else if (value<0x800) {
/* 110xxxxx 10xxxxxx */
if (maxchars < 2) goto error;
*string++ = (char)((value>>6) & 0x1f | 0xc0);
*string++ = (char)(value & 0x3f | 0x80);
*string++ = (char)(((value>>6) & 0x1f) | 0xc0);
*string++ = (char)((value & 0x3f) | 0x80);
} else if (value<0x10000) {
/* 1110xxxx 10xxxxxx 10xxxxxx (16 bits, BMP plane) */
if (maxchars < 3) goto error;
if (value>=0xd800 && value<=0xdfff || value==0xfffe || value==0xffff)
if ((value>=0xd800 && value<=0xdfff) || value==0xfffe || value==0xffff)
goto error; /* surrogate pairs and invalid characters */
*string++ = (char)((value>>12) & 0x0f | 0xe0);
*string++ = (char)((value>>6) & 0x3f | 0x80);
*string++ = (char)(value & 0x3f | 0x80);
*string++ = (char)(((value>>12) & 0x0f) | 0xe0);
*string++ = (char)(((value>>6) & 0x3f) | 0x80);
*string++ = (char)((value & 0x3f) | 0x80);
} else if (value<0x200000) {
/* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
if (maxchars < 4) goto error;
*string++ = (char)((value>>18) & 0x07 | 0xf0);
*string++ = (char)((value>>12) & 0x3f | 0x80);
*string++ = (char)((value>>6) & 0x3f | 0x80);
*string++ = (char)(value & 0x3f | 0x80);
*string++ = (char)(((value>>18) & 0x07) | 0xf0);
*string++ = (char)(((value>>12) & 0x3f) | 0x80);
*string++ = (char)(((value>>6) & 0x3f) | 0x80);
*string++ = (char)((value & 0x3f) | 0x80);
} else if (value<0x4000000) {
/* 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx */
if (maxchars < 5) goto error;
*string++ = (char)((value>>24) & 0x03 | 0xf8);
*string++ = (char)((value>>18) & 0x3f | 0x80);
*string++ = (char)((value>>12) & 0x3f | 0x80);
*string++ = (char)((value>>6) & 0x3f | 0x80);
*string++ = (char)(value & 0x3f | 0x80);
*string++ = (char)(((value>>24) & 0x03) | 0xf8);
*string++ = (char)(((value>>18) & 0x3f) | 0x80);
*string++ = (char)(((value>>12) & 0x3f) | 0x80);
*string++ = (char)(((value>>6) & 0x3f) | 0x80);
*string++ = (char)((value & 0x3f) | 0x80);
} else {
/* 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx (31 bits) */
if (maxchars < 6) goto error;
*string++ = (char)((value>>30) & 0x01 | 0xfc);
*string++ = (char)((value>>24) & 0x3f | 0x80);
*string++ = (char)((value>>18) & 0x3f | 0x80);
*string++ = (char)((value>>12) & 0x3f | 0x80);
*string++ = (char)((value>>6) & 0x3f | 0x80);
*string++ = (char)(value & 0x3f | 0x80);
*string++ = (char)(((value>>30) & 0x01) | 0xfc);
*string++ = (char)(((value>>24) & 0x3f) | 0x80);
*string++ = (char)(((value>>18) & 0x3f) | 0x80);
*string++ = (char)(((value>>12) & 0x3f) | 0x80);
*string++ = (char)(((value>>6) & 0x3f) | 0x80);
*string++ = (char)((value & 0x3f) | 0x80);
} /* if */
if (endptr!=NULL)

View File

@ -21,6 +21,7 @@
* Version: $Id$
*/
#define LINUX
#if defined __linux__
#include <sclinux.h>
#endif

View File

@ -183,7 +183,7 @@ static cell AMX_NATIVE_CALL setarg(AMX *amx, cell *params)
/* adjust the address in "value" in case of an array access */
value+=params[2]*sizeof(cell);
/* verify the address */
if (value<0 || value>=amx->hea && value<amx->stk)
if (value<0 || (value>=amx->hea && value<amx->stk))
return 0;
/* set the value indirectly */
* (cell *)(data+(int)value) = params[3];

View File

@ -29,11 +29,11 @@
* version.
*/
#include <string>
#include <extdll.h>
#include <meta_api.h>
#include <time.h>
#include "amxmodx.h"
#include <string>
static cell AMX_NATIVE_CALL get_xvar_id(AMX *amx, cell *params)
{
@ -201,7 +201,7 @@ static cell AMX_NATIVE_CALL show_motd(AMX *amx, cell *params) /* 2 param */
if ( !ilen ) szHead = hostname->string;
char* szBody = get_amxstring(amx,params[2],1,ilen);
int iFile = 0;
char* sToShow;// = szBody;
char* sToShow = NULL;// = szBody;
if (ilen<128) sToShow = (char*)LOAD_FILE_FOR_ME( szBody , &iFile );
if (!iFile)
sToShow = szBody;
@ -475,11 +475,24 @@ static cell AMX_NATIVE_CALL get_user_origin(AMX *amx, cell *params) /* 3 param *
if (mode && mode!=2)
pos = pos + edict->v.view_ofs;
if (mode > 1) {
Vector v_forward;
ANGLEVECTORS( edict->v.v_angle , v_forward, NULL, NULL );
Vector vec;
Vector v_angle = edict->v.v_angle;
float v_vec[3];
v_vec[0] = v_angle.x;
v_vec[1] = v_angle.y;
v_vec[2] = v_angle.z;
ANGLEVECTORS( v_vec, vec, NULL, NULL);
TraceResult trEnd;
Vector v_dest = pos + v_forward * 9999;
TRACE_LINE( pos , v_dest, 0 , edict, &trEnd );
Vector v_dest = pos+vec * 9999;
float f_pos[3];
f_pos[0] = pos.x;
f_pos[1] = pos.y;
f_pos[2] = pos.z;
float f_dest[3];
f_dest[0] = v_dest.x;
f_dest[1] = v_dest.y;
f_dest[2] = v_dest.z;
TRACE_LINE( f_pos , f_dest, 0 , edict, &trEnd );
pos = (trEnd.flFraction < 1.0) ? trEnd.vecEndPos : Vector(0,0,0);
}
cpOrigin[0] = (long int)pos.x;
@ -740,7 +753,7 @@ static cell AMX_NATIVE_CALL register_srvcmd(AMX *amx, cell *params) /* 2 param *
if(amx_FindPublic(amx, temp ,&idx)!=AMX_ERR_NONE) {
AMXXLOG_Log("[AMXX] Function is not present (function \"%s\") (plugin \"%s\")",temp,plugin->getName() );
amx_RaiseError(amx,AMX_ERR_NATIVE);
return NULL;
return 0;
}
temp = get_amxstring(amx,params[1],0, i );
char* info = get_amxstring(amx,params[4],1, i );
@ -870,7 +883,7 @@ static cell AMX_NATIVE_CALL user_kill(AMX *amx, cell *params) /* 2 param */
return 0;
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
if (pPlayer->ingame && pPlayer->IsAlive()){
int bef = pPlayer->pEdict->v.frags;
float bef = pPlayer->pEdict->v.frags;
MDLL_ClientKill(pPlayer->pEdict);
if (params[2]) pPlayer->pEdict->v.frags = bef;
return 1;
@ -888,7 +901,7 @@ static cell AMX_NATIVE_CALL user_slap(AMX *amx, cell *params) /* 2 param */
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
if (pPlayer->ingame && pPlayer->IsAlive()){
if (pPlayer->pEdict->v.health <= power) {
int bef = pPlayer->pEdict->v.frags;
float bef = pPlayer->pEdict->v.frags;
MDLL_ClientKill(pPlayer->pEdict);
pPlayer->pEdict->v.frags = bef;
}
@ -902,7 +915,12 @@ static cell AMX_NATIVE_CALL user_slap(AMX *amx, cell *params) /* 2 param */
}
else {
Vector v_forward, v_right;
ANGLEVECTORS( pEdict->v.angles, v_forward, v_right, NULL );
Vector vang = pEdict->v.angles;
float fang[3];
fang[0] = vang.x;
fang[1] = vang.y;
fang[2] = vang.z;
ANGLEVECTORS( fang, v_forward, v_right, NULL );
pEdict->v.velocity = pEdict->v.velocity + v_forward * 220 + Vector(0,0,200);
}
pEdict->v.punchangle.x = RANDOM_LONG(-10,10);
@ -1018,7 +1036,7 @@ static cell AMX_NATIVE_CALL set_cvar_string(AMX *amx, cell *params) /* 2 param *
static cell AMX_NATIVE_CALL message_begin(AMX *amx, cell *params) /* 4 param */
{
int numparam = *params/sizeof(cell);
Vector vecOrigin;
float vecOrigin[3];
cell *cpOrigin;
switch (params[1]){
case MSG_BROADCAST:
@ -1032,9 +1050,9 @@ static cell AMX_NATIVE_CALL message_begin(AMX *amx, cell *params) /* 4 param */
return 0;
}
cpOrigin = get_amxaddr(amx,params[3]);
vecOrigin.x = *cpOrigin;
vecOrigin.y = *(cpOrigin+1);
vecOrigin.z = *(cpOrigin+2);
vecOrigin[0] = *cpOrigin;
vecOrigin[1] = *(cpOrigin+1);
vecOrigin[2] = *(cpOrigin+2);
MESSAGE_BEGIN( params[1], params[2] , vecOrigin );
break;
case MSG_ONE:
@ -1284,7 +1302,7 @@ static cell AMX_NATIVE_CALL get_players(AMX *amx, cell *params) /* 4 param */
cell *aPlayers = get_amxaddr(amx,params[1]);
cell *iMax = get_amxaddr(amx,params[2]);
int team;
int team = 0;
if (flags & 48) {
sptemp = get_amxstring(amx,params[4],0,ilen);
@ -1872,10 +1890,23 @@ static cell AMX_NATIVE_CALL get_user_aiming(AMX *amx, cell *params) /* 4 param *
edict_t* edict = pPlayer->pEdict;
Vector v_forward;
Vector v_src = edict->v.origin + edict->v.view_ofs;
ANGLEVECTORS( edict->v.v_angle , v_forward, NULL, NULL );
Vector vang = edict->v.v_angle;
float fang[3];
fang[0] = vang.x;
fang[1] = vang.y;
fang[2] = vang.z;
ANGLEVECTORS( fang , v_forward, NULL, NULL );
TraceResult trEnd;
Vector v_dest = v_src + v_forward * params[4];
TRACE_LINE( v_src , v_dest, 0 , edict, &trEnd );
float fsrc[3];
fsrc[0] = v_src.x;
fsrc[1] = v_src.y;
fsrc[2] = v_src.z;
float fdst[3];
fdst[0] = v_dest.x;
fdst[1] = v_dest.y;
fdst[2] = v_dest.z;
TRACE_LINE( fsrc , fdst, 0 , edict, &trEnd );
*cpId = FNullEnt(trEnd.pHit) ? 0 : ENTINDEX(trEnd.pHit);
*cpBody = trEnd.iHitgroup;
if (trEnd.flFraction < 1.0) {
@ -2159,7 +2190,7 @@ struct CallFunc_ParamInfo
#define CALLFUNC_MAXPARAMS 64 /* Maximal params number */
cell g_CallFunc_Params[CALLFUNC_MAXPARAMS] = {0}; // Params
CallFunc_ParamInfo g_CallFunc_ParamInfo[CALLFUNC_MAXPARAMS] = {0}; // Flags
CallFunc_ParamInfo g_CallFunc_ParamInfo[CALLFUNC_MAXPARAMS] = {{0}}; // Flags
int g_CallFunc_CurParam = 0; // Current param id
#define CALLFUNC_FLAG_BYREF 1 /* Byref flag so that mem is released */

View File

@ -81,7 +81,7 @@ static cell AMX_NATIVE_CALL n_floatstr(AMX *amx,cell *params)
/* Find out how long the string is in characters. */
amx_StrLen(pString, &nLen);
if (nLen == 0 || nLen >= sizeof szSource)
if (nLen == 0 || (unsigned int)nLen >= sizeof szSource)
return 0;
/* Now convert the Small String into a C type null terminated string */

View File

@ -720,7 +720,7 @@ void MessageBegin_Post(int msg_dest, int msg_type, const float *pOrigin, edict_t
#else
int *z = (int*)ptr + 0x16C;
#endif
int stop = ed->v.armorvalue;
int stop = (int)ed->v.armorvalue;
*z = stop;
ed->v.armorvalue = stop;
}

View File

@ -123,7 +123,7 @@ char* get_amxstring(AMX *amx,cell amx_addr,int id, int& len)
register cell* source = (cell *)(amx->base + (int)(((AMX_HEADER *)amx->base)->dat + amx_addr));
register char* dest = buffor[id];
char* start = dest;
while (*dest++=(char)*source++)
while ((*dest++=(char)(*source++)))
;
len = --dest - start;
return start;

View File

@ -169,7 +169,7 @@ char* UTIL_SplitHudMessage(const char *src)
unsigned short FixedUnsigned16( float value, float scale )
{
int output = value * scale;
int output = (int)(value * scale);
if ( output < 0 )
output = 0;
@ -181,7 +181,7 @@ unsigned short FixedUnsigned16( float value, float scale )
short FixedSigned16( float value, float scale )
{
int output = value * scale;
int output = (int)(value * scale);
if ( output > 32767 )
output = 32767;

View File

@ -83,3 +83,5 @@ AMX_NATIVE_INFO vault_Natives[] = {
{ "vaultdata_exists", vaultdata_exists },
{ 0, 0 }
};