Removed debug info from 64 bit porting
Fixed minor bugs
This commit is contained in:
parent
6dc00f64f8
commit
bbf8a21693
@ -71,7 +71,6 @@ cell CForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
||||
if (iter->pPlugin->isExecutable(iter->func))
|
||||
{
|
||||
// handle strings & arrays
|
||||
AMXXLOG_Log("String handling");
|
||||
int i;
|
||||
for (i = 0; i < m_NumParams; ++i)
|
||||
{
|
||||
@ -106,16 +105,13 @@ cell CForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
||||
realParams[i] = params[i];
|
||||
}
|
||||
}
|
||||
AMXXLOG_Log("Exec");
|
||||
// exec
|
||||
cell retVal;
|
||||
AMXXLOG_Log("Entering exec");
|
||||
int err = amx_Execv(iter->pPlugin->getAMX(), &retVal, iter->func, m_NumParams, realParams);
|
||||
// log runtime error, if any
|
||||
if (err != AMX_ERR_NONE)
|
||||
AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err, iter->pPlugin->getAMX()->curline, iter->pPlugin->getName());
|
||||
|
||||
AMXXLOG_Log("Cleanup strings");
|
||||
// cleanup strings & arrays
|
||||
for (i = 0; i < m_NumParams; ++i)
|
||||
{
|
||||
@ -240,7 +236,6 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
||||
|
||||
// exec
|
||||
cell retVal;
|
||||
AMXXLOG_Log("Entering exec2");
|
||||
amx_Execv(m_Amx, &retVal, m_Func, m_NumParams, realParams);
|
||||
|
||||
// cleanup strings & arrays
|
||||
|
@ -25,9 +25,6 @@
|
||||
#include <sclinux.h>
|
||||
#endif
|
||||
|
||||
#define SMALL_CELL_SIZE 64
|
||||
#undef JIT
|
||||
|
||||
#ifndef AMX_H_INCLUDED
|
||||
#define AMX_H_INCLUDED
|
||||
|
||||
|
@ -1940,34 +1940,21 @@ static cell AMX_NATIVE_CALL get_user_aiming(AMX *amx, cell *params) /* 4 param *
|
||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||
cell *cpId = get_amxaddr(amx,params[2]);
|
||||
cell *cpBody = get_amxaddr(amx,params[3]);
|
||||
cell fCell;
|
||||
REAL pFloat = amx_ctof(fCell);
|
||||
pFloat = 0.0;
|
||||
cell fCell;
|
||||
REAL *pFloat = (REAL *)((void *)&fCell);
|
||||
*pFloat = 0.0;
|
||||
if (pPlayer->ingame) {
|
||||
edict_t* edict = pPlayer->pEdict;
|
||||
Vector v_forward;
|
||||
Vector v_src = edict->v.origin + edict->v.view_ofs;
|
||||
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 );
|
||||
ANGLEVECTORS( edict->v.v_angle , v_forward, NULL, NULL );
|
||||
TraceResult trEnd;
|
||||
Vector v_dest = v_src + v_forward * params[4];
|
||||
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 );
|
||||
TRACE_LINE( v_src , v_dest, 0 , edict, &trEnd );
|
||||
*cpId = FNullEnt(trEnd.pHit) ? 0 : ENTINDEX(trEnd.pHit);
|
||||
*cpBody = trEnd.iHitgroup;
|
||||
if (trEnd.flFraction < 1.0) {
|
||||
pFloat = (trEnd.vecEndPos - v_src).Length();
|
||||
*pFloat = (trEnd.vecEndPos - v_src).Length();
|
||||
return fCell;
|
||||
}
|
||||
else {
|
||||
@ -1977,6 +1964,7 @@ static cell AMX_NATIVE_CALL get_user_aiming(AMX *amx, cell *params) /* 4 param *
|
||||
*cpId = 0;
|
||||
*cpBody = 0;
|
||||
return fCell;
|
||||
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL remove_cvar_flags(AMX *amx, cell *params)
|
||||
|
@ -940,16 +940,4 @@ void *Module_ReqFnptr(const char *funcName)
|
||||
return functions[i].ptr;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// :TODO: REMOVE!!!!!
|
||||
extern "C" void amxx_print(const char * fmt, ...)
|
||||
{
|
||||
static char string[256];
|
||||
|
||||
va_list argptr;
|
||||
va_start (argptr, fmt);
|
||||
vsnprintf (string, 255, fmt, argptr);
|
||||
va_end (argptr);
|
||||
print_srvconsole(string);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user