Merge pull request #4 from alliedmodders/master

merge
This commit is contained in:
OciXCrom 2018-08-09 21:14:39 +02:00 committed by GitHub
commit 0e38efcf83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -12,9 +12,12 @@
//
#include "fakemeta_amxx.h"
#include <engine_strucs.h>
TraceResult g_tr;
ke::AString LightStyleBuffers[MAX_LIGHTSTYLES];
//by mahnsawce from his NS module
static cell AMX_NATIVE_CALL engfunc(AMX *amx, cell *params)
{
@ -595,8 +598,13 @@ static cell AMX_NATIVE_CALL engfunc(AMX *amx, cell *params)
case EngFunc_LightStyle: // void ) (int style, const char* val);
cRet = MF_GetAmxAddr(amx,params[2]);
iparam1=cRet[0];
temp = MF_GetAmxString(amx,params[3],0,&len);
(*g_engfuncs.pfnLightStyle)(iparam1,temp);
if (iparam1 < 0 || iparam1 >= ARRAYSIZE(LightStyleBuffers))
{
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid style %d", iparam1);
return 0;
}
LightStyleBuffers[iparam1] = MF_GetAmxString(amx, params[3], 0, &len);
(*g_engfuncs.pfnLightStyle)(iparam1, LightStyleBuffers[iparam1].chars());
return 1;

View File

@ -459,7 +459,7 @@ native client_print_color(index, sender, const message[], any:...);
* last, to the client with the highest index.
*
* @param player Client index, use 0 to display to all clients
* @param type Message type, see print_* destination constants in
* @param type Message type, see engprint_* destination constants in
* amxconst.inc
* @param message Formatting rules
* @param ... Variable number of formatting parameters

View File

@ -221,7 +221,7 @@ native menu_find_id(menu, page, key);
* @return 1 on success, 0 on failure.
* @error Invalid menu resource.
*/
native menu_item_getinfo(menu, item, &access, info[], infolen, name[]="", namelen=0, &callback);
native menu_item_getinfo(menu, item, &access = 0, info[] = "", infolen = 0, name[]="", namelen=0, &callback = 0);
/**
* Sets an item's display text.