diff --git a/dlls/engine/amxxapi.cpp b/dlls/engine/amxxapi.cpp index bb123fda..f9b4610c 100755 --- a/dlls/engine/amxxapi.cpp +++ b/dlls/engine/amxxapi.cpp @@ -1,4 +1,4 @@ -#include "engine.h" +include "engine.h" int AmxStringToEngine(AMX *amx, cell param, int &len) { @@ -33,19 +33,18 @@ void OnAmxxAttach() void OnPluginsLoaded() { - pfnThinkForward = MF_RegisterForward("pfnThink", ET_STOP, FP_CELL, FP_DONE); + pfnThinkForward = MF_RegisterForward("pfn_think", ET_STOP, FP_CELL, FP_DONE); PlayerPreThinkForward = MF_RegisterForward("client_PreThink", ET_STOP, FP_CELL, FP_DONE); PlayerPostThinkForward = MF_RegisterForward("client_PostThink", ET_STOP, FP_CELL, FP_DONE); ClientKillForward = MF_RegisterForward("client_kill", ET_STOP, FP_CELL, FP_DONE); CmdStartForward = MF_RegisterForward("client_impulse", ET_STOP, FP_CELL, FP_CELL, FP_DONE); StartFrameForward = MF_RegisterForward("ServerFrame", ET_IGNORE, FP_DONE); - DispatchKeyForward = MF_RegisterForward("Dispatch_KeyVal", ET_STOP, FP_CELL, FP_DONE); +// DispatchKeyForward = MF_RegisterForward("Dispatch_KeyVal", ET_STOP, FP_CELL, FP_DONE); PlaybackForward = MF_RegisterForward("PlaybackEvent", ET_STOP, FP_CELL, FP_CELL, FP_CELL, FP_FLOAT, FP_ARRAY, FP_ARRAY, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE); ChangelevelForward = MF_RegisterForward("server_changelevel", ET_STOP, FP_STRING, FP_DONE); - SpawnForward = MF_RegisterForward("pfnSpawn", ET_IGNORE, FP_CELL, FP_DONE); - DispatchUseForward = MF_RegisterForward("pfnUse", ET_STOP, FP_CELL, FP_CELL, FP_DONE); - pfnTouchForward = MF_RegisterForward("pfnTouch", ET_STOP, FP_CELL, FP_CELL, FP_DONE); - MF_Log("pfnTouch Forward: %d", pfnTouchForward); + SpawnForward = MF_RegisterForward("pfn_spawn", ET_IGNORE, FP_CELL, FP_DONE); + DispatchUseForward = MF_RegisterForward("pfn_use", ET_STOP, FP_CELL, FP_CELL, FP_DONE); + pfnTouchForward = MF_RegisterForward("pfn_touch", ET_STOP, FP_CELL, FP_CELL, FP_DONE); } qboolean Voice_SetClientListening(int iReceiver, int iSender, qboolean bListen) diff --git a/dlls/engine/entity.cpp b/dlls/engine/entity.cpp index c5ceb572..2acdd90d 100755 --- a/dlls/engine/entity.cpp +++ b/dlls/engine/entity.cpp @@ -1350,8 +1350,8 @@ static cell AMX_NATIVE_CALL get_offset_short(AMX *amx, cell *params) } edict_t *pEnt = INDEXENT(idx); -#ifndef __linux__ - off -= 5; +#ifdef __linux__ + off += 5; #endif return *((short *)pEnt->pvPrivateData + off); @@ -1368,8 +1368,8 @@ static cell AMX_NATIVE_CALL set_offset_short(AMX *amx, cell *params) } edict_t *pEnt = INDEXENT(idx); -#ifndef __linux__ - off -= 5; +#ifdef __linux__ + off += 5; #endif *((short *)pEnt->pvPrivateData + off) = (short)params[3]; @@ -1388,8 +1388,8 @@ static cell AMX_NATIVE_CALL get_offset_char(AMX *amx, cell *params) } edict_t *pEnt = INDEXENT(idx); -#ifndef __linux__ - off -= 5; +#ifdef __linux__ + off += 5; #endif char r = *((char *)pEnt->pvPrivateData + off); @@ -1407,8 +1407,8 @@ static cell AMX_NATIVE_CALL set_offset_char(AMX *amx, cell *params) } edict_t *pEnt = INDEXENT(idx); -#ifndef __linux__ - off -= 5; +#ifdef __linux__ + off += 5; #endif char data = params[3]; @@ -1428,8 +1428,8 @@ static cell AMX_NATIVE_CALL get_offset_int(AMX *amx, cell *params) } edict_t *pEnt = INDEXENT(idx); -#ifndef __linux__ - off -= 5; +#ifdef __linux__ + off += 5; #endif return *((int *)pEnt->pvPrivateData + off); @@ -1446,8 +1446,8 @@ static cell AMX_NATIVE_CALL set_offset_int(AMX *amx, cell *params) } edict_t *pEnt = INDEXENT(idx); -#ifndef __linux__ - off -= 5; +#ifdef __linux__ + off += 5; #endif *((int *)pEnt->pvPrivateData + off) = params[3]; @@ -1466,8 +1466,8 @@ static cell AMX_NATIVE_CALL get_offset_float(AMX *amx, cell *params) } edict_t *pEnt = INDEXENT(idx); -#ifndef __linux__ - off -= 5; +#ifdef __linux__ + off += 5; #endif REAL fRet = (REAL)(*((REAL*)pEnt->pvPrivateData + off)); @@ -1486,8 +1486,8 @@ static cell AMX_NATIVE_CALL set_offset_float(AMX *amx, cell *params) } edict_t *pEnt = INDEXENT(idx); -#ifndef __linux__ - off -= 5; +#ifdef __linux__ + off += 5; #endif REAL fVal = amx_ctof(params[3]); @@ -1770,6 +1770,8 @@ AMX_NATIVE_INFO ent_Natives[] = { {"set_offset_char", set_offset_char}, {"get_offset", get_offset_int}, {"set_offset", set_offset_int}, + {"get_offset_int", get_offset_int}, + {"set_offset_int", set_offset_int}, {"get_offset_float", get_offset_float}, {"set_offset_float", set_offset_float}, {"get_entity_pointer", get_entity_pointer},