diff --git a/amxmodx/CForward.cpp b/amxmodx/CForward.cpp index 78bcc421..b08feb2c 100755 --- a/amxmodx/CForward.cpp +++ b/amxmodx/CForward.cpp @@ -60,7 +60,7 @@ int CForward::execute(cell *params, ForwardPreparedArray *preparedArrays) cell realParams[FORWARD_MAX_PARAMS]; cell *physAddrs[FORWARD_MAX_PARAMS]; - const STRINGEX_MAXLENGTH = 128; + const int STRINGEX_MAXLENGTH = 128; int globRetVal = 0; @@ -249,4 +249,4 @@ cell prepareCellArray(cell *ptr, unsigned int size) cell prepareCharArray(char *ptr, unsigned int size) { return g_forwards.prepareArray((void*)ptr, size, Type_Char); -} \ No newline at end of file +} diff --git a/amxmodx/float.cpp b/amxmodx/float.cpp index 267b10db..4219dc72 100755 --- a/amxmodx/float.cpp +++ b/amxmodx/float.cpp @@ -346,6 +346,72 @@ static cell AMX_NATIVE_CALL n_floattan(AMX *amx,cell *params) return amx_ftoc(fA); } +#if defined __BORLANDC__ || defined __WATCOMC__ + #pragma argsused +#endif +/* Added by BAILOPAN */ +static cell AMX_NATIVE_CALL n_floatatan(AMX *amx, cell *params) +{ + /* + * params[1] = angle + * params[2] = radix + */ + REAL fA = amx_ctof(params[1]); + fA = ToRadians(fA, params[2]); + fA = atan(fA); + return amx_ftoc(fA); +} + +#if defined __BORLANDC__ || defined __WATCOMC__ + #pragma argsused +#endif +/* Added by BAILOPAN */ +static cell AMX_NATIVE_CALL n_floatacos(AMX *amx, cell *params) +{ + /* + * params[1] = angle + * params[2] = radix + */ + REAL fA = amx_ctof(params[1]); + fA = ToRadians(fA, params[2]); + fA = acos(fA); + return amx_ftoc(fA); +} + +#if defined __BORLANDC__ || defined __WATCOMC__ + #pragma argsused +#endif +/* Added by BAILOPAN */ +static cell AMX_NATIVE_CALL n_floatasin(AMX *amx, cell *params) +{ + /* + * params[1] = angle + * params[2] = radix + */ + REAL fA = amx_ctof(params[1]); + fA = ToRadians(fA, params[2]); + fA = asin(fA); + return amx_ftoc(fA); +} + +#if defined __BORLANDC__ || defined __WATCOMC__ + #pragma argsused +#endif +/* Added by BAILOPAN */ +static cell AMX_NATIVE_CALL n_floatatan2(AMX *amx, cell *params) +{ + /* + * params[1] = x + * params[2] = y + * params[3] = radix + */ + REAL fA = amx_ctof(params[1]); + REAL fB = amx_ctof(params[2]); + REAL fC; + fC = atan2(fA, fB); + return amx_ftoc(fC); +} + #if defined __BORLANDC__ || defined __WATCOMC__ #pragma argsused #endif @@ -374,6 +440,10 @@ AMX_NATIVE_INFO float_Natives[] = { { "floatcos", n_floatcos }, { "floattan", n_floattan }, { "floatabs", n_floatabs }, + { "floatasin", n_floatasin }, + { "floatacos", n_floatacos }, + { "floatatan", n_floatatan }, + { "floatatan2", n_floatatan2 }, { NULL, NULL } /* terminator */ }; diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index 76585554..6ac38c6c 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -256,7 +256,7 @@ int Spawn( edict_t *pent ) { // :TODO: Remove modules num from amxmodx_version, make amxmodx_modules cvar CVAR_SET_STRING(init_amxmodx_version.name, AMX_VERSION); char buffer[32]; - CVAR_SET_STRING(init_amxmodx_modules.name, itoa(loaded, buffer, 10)); +// CVAR_SET_STRING(init_amxmodx_modules.name, itoa(loaded, buffer, 10)); // ###### Load Vault g_vault.setSource( build_pathname("%s", get_localinfo("amxx_vault", "addons/amxx/configs/vault.ini")) ); diff --git a/amxmodx/string.cpp b/amxmodx/string.cpp index 026f3ecc..12d45194 100755 --- a/amxmodx/string.cpp +++ b/amxmodx/string.cpp @@ -514,7 +514,7 @@ static cell AMX_NATIVE_CALL strbreak(AMX *amx, cell *params) /* 5 param */ if (!done_flag && string[i]!='"') { if (left_pos < LeftMax) { left[left_pos] = string[i]; - if (left[left_pos] = '\'') { + if (left[left_pos] == '\'') { left[left_pos] = hold; } left_pos++;