From 21551a6ea8e9da26cba1ea60ad76474f8afdd7af Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 20 Jul 2005 03:19:53 +0000 Subject: [PATCH] Fixed it for real <_< --- dlls/fakemeta/pev.cpp | 31 +++++++++++++------------------ dlls/fakemeta/sdk/moduleconfig.h | 2 +- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/dlls/fakemeta/pev.cpp b/dlls/fakemeta/pev.cpp index 641b1398..a40b0c97 100755 --- a/dlls/fakemeta/pev.cpp +++ b/dlls/fakemeta/pev.cpp @@ -614,8 +614,7 @@ static cell AMX_NATIVE_CALL amx_set_pev(AMX *amx, cell *params) { // Grrr... int len; - char *string = MF_GetAmxString(amx, params[3], 0, &len); - int iValue = ALLOC_STRING(string); + int iValue = blah[0]; switch(iSwitch) { case fixangle: @@ -742,7 +741,6 @@ static cell AMX_NATIVE_CALL amx_set_pev(AMX *amx, cell *params) else if (iSwitch > pev_float_start && iSwitch < pev_float_end) { float fValue = amx_ctof(blah[0]); - switch(iSwitch) { case impacttime: @@ -861,8 +859,9 @@ static cell AMX_NATIVE_CALL amx_set_pev(AMX *amx, cell *params) } else if (iSwitch > pev_string_start && iSwitch < pev_string_end) { - - int iValue = blah[0]; + int len; + char *string = MF_GetAmxString(amx, params[3], 0, &len); + int iValue = ALLOC_STRING(string); switch (iSwitch) { case classname: @@ -944,11 +943,10 @@ static cell AMX_NATIVE_CALL amx_set_pev(AMX *amx, cell *params) } else if (iSwitch > pev_vecarray_start && iSwitch < pev_vecarray_end) { - cell *vCell = MF_GetAmxAddr(amx,params[3]); Vector vValue; - vValue.x = amx_ctof(vCell[0]); - vValue.y = amx_ctof(vCell[1]); - vValue.z = amx_ctof(vCell[2]); + vValue.x = amx_ctof(blah[0]); + vValue.y = amx_ctof(blah[1]); + vValue.z = amx_ctof(blah[2]); switch(iSwitch) { case origin: @@ -1026,9 +1024,7 @@ static cell AMX_NATIVE_CALL amx_set_pev(AMX *amx, cell *params) } else if (iSwitch > pev_byte_start && iSwitch < pev_byte_end) { - cell *blah = MF_GetAmxAddr(amx,params[3]); int iValue = blah[0]; - switch(iSwitch) { case controller_0: @@ -1055,18 +1051,17 @@ static cell AMX_NATIVE_CALL amx_set_pev(AMX *amx, cell *params) } else if (iSwitch > pev_bytearray_start && iSwitch < pev_bytearray_end) { - cell *vCell = MF_GetAmxAddr(amx,params[3]); switch(iSwitch) { case controller: - pPlayer->v.controller[0]=vCell[0]; - pPlayer->v.controller[1]=vCell[1]; - pPlayer->v.controller[2]=vCell[2]; - pPlayer->v.controller[3]=vCell[3]; + pPlayer->v.controller[0]=blah[0]; + pPlayer->v.controller[1]=blah[1]; + pPlayer->v.controller[2]=blah[2]; + pPlayer->v.controller[3]=blah[3]; return 1; case blending: - pPlayer->v.controller[0]=vCell[0]; - pPlayer->v.controller[1]=vCell[1]; + pPlayer->v.controller[0]=blah[0]; + pPlayer->v.controller[1]=blah[1]; return 1; default: return 0; diff --git a/dlls/fakemeta/sdk/moduleconfig.h b/dlls/fakemeta/sdk/moduleconfig.h index 5ee7bc93..10536d46 100755 --- a/dlls/fakemeta/sdk/moduleconfig.h +++ b/dlls/fakemeta/sdk/moduleconfig.h @@ -5,7 +5,7 @@ // Module info #define MODULE_NAME "FakeMeta" -#define MODULE_VERSION "1.01" +#define MODULE_VERSION "1.10RC1" #define MODULE_AUTHOR "AMX Mod X Dev Team" #define MODULE_URL "http://www.amxmodx.org" #define MODULE_LOGTAG "FAKEMETA"