Removed debug info from 64 bit porting

Fixed minor bugs
This commit is contained in:
Pavol Marko 2004-07-23 17:29:03 +00:00
parent 6dc00f64f8
commit bbf8a21693
4 changed files with 8 additions and 40 deletions

View File

@ -71,7 +71,6 @@ cell CForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
if (iter->pPlugin->isExecutable(iter->func)) if (iter->pPlugin->isExecutable(iter->func))
{ {
// handle strings & arrays // handle strings & arrays
AMXXLOG_Log("String handling");
int i; int i;
for (i = 0; i < m_NumParams; ++i) for (i = 0; i < m_NumParams; ++i)
{ {
@ -106,16 +105,13 @@ cell CForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
realParams[i] = params[i]; realParams[i] = params[i];
} }
} }
AMXXLOG_Log("Exec");
// exec // exec
cell retVal; cell retVal;
AMXXLOG_Log("Entering exec");
int err = amx_Execv(iter->pPlugin->getAMX(), &retVal, iter->func, m_NumParams, realParams); int err = amx_Execv(iter->pPlugin->getAMX(), &retVal, iter->func, m_NumParams, realParams);
// log runtime error, if any // log runtime error, if any
if (err != AMX_ERR_NONE) 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("[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 // cleanup strings & arrays
for (i = 0; i < m_NumParams; ++i) for (i = 0; i < m_NumParams; ++i)
{ {
@ -240,7 +236,6 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
// exec // exec
cell retVal; cell retVal;
AMXXLOG_Log("Entering exec2");
amx_Execv(m_Amx, &retVal, m_Func, m_NumParams, realParams); amx_Execv(m_Amx, &retVal, m_Func, m_NumParams, realParams);
// cleanup strings & arrays // cleanup strings & arrays

View File

@ -25,9 +25,6 @@
#include <sclinux.h> #include <sclinux.h>
#endif #endif
#define SMALL_CELL_SIZE 64
#undef JIT
#ifndef AMX_H_INCLUDED #ifndef AMX_H_INCLUDED
#define AMX_H_INCLUDED #define AMX_H_INCLUDED

View File

@ -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); CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
cell *cpId = get_amxaddr(amx,params[2]); cell *cpId = get_amxaddr(amx,params[2]);
cell *cpBody = get_amxaddr(amx,params[3]); cell *cpBody = get_amxaddr(amx,params[3]);
cell fCell; cell fCell;
REAL pFloat = amx_ctof(fCell); REAL *pFloat = (REAL *)((void *)&fCell);
pFloat = 0.0; *pFloat = 0.0;
if (pPlayer->ingame) { if (pPlayer->ingame) {
edict_t* edict = pPlayer->pEdict; edict_t* edict = pPlayer->pEdict;
Vector v_forward; Vector v_forward;
Vector v_src = edict->v.origin + edict->v.view_ofs; Vector v_src = edict->v.origin + edict->v.view_ofs;
Vector vang = edict->v.v_angle; ANGLEVECTORS( edict->v.v_angle , v_forward, NULL, NULL );
float fang[3];
fang[0] = vang.x;
fang[1] = vang.y;
fang[2] = vang.z;
ANGLEVECTORS( fang , v_forward, NULL, NULL );
TraceResult trEnd; TraceResult trEnd;
Vector v_dest = v_src + v_forward * params[4]; Vector v_dest = v_src + v_forward * params[4];
float fsrc[3]; TRACE_LINE( v_src , v_dest, 0 , edict, &trEnd );
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); *cpId = FNullEnt(trEnd.pHit) ? 0 : ENTINDEX(trEnd.pHit);
*cpBody = trEnd.iHitgroup; *cpBody = trEnd.iHitgroup;
if (trEnd.flFraction < 1.0) { if (trEnd.flFraction < 1.0) {
pFloat = (trEnd.vecEndPos - v_src).Length(); *pFloat = (trEnd.vecEndPos - v_src).Length();
return fCell; return fCell;
} }
else { else {
@ -1977,6 +1964,7 @@ static cell AMX_NATIVE_CALL get_user_aiming(AMX *amx, cell *params) /* 4 param *
*cpId = 0; *cpId = 0;
*cpBody = 0; *cpBody = 0;
return fCell; return fCell;
} }
static cell AMX_NATIVE_CALL remove_cvar_flags(AMX *amx, cell *params) static cell AMX_NATIVE_CALL remove_cvar_flags(AMX *amx, cell *params)

View File

@ -940,16 +940,4 @@ void *Module_ReqFnptr(const char *funcName)
return functions[i].ptr; return functions[i].ptr;
} }
return NULL; 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);
}