1.1 --- a/core/smn_events.cpp Sat Dec 19 12:57:26 2009 -0800
1.2 +++ b/core/smn_events.cpp Sat Dec 19 18:16:41 2009 -0800
1.3 @@ -348,6 +348,23 @@
1.4 return 1;
1.5 }
1.6
1.7 +static cell_t sm_SetEventBroadcast(IPluginContext *pContext, const cell_t *params)
1.8 +{
1.9 + Handle_t hndl = static_cast<Handle_t>(params[1]);
1.10 + HandleError err;
1.11 + EventInfo *pInfo;
1.12 +
1.13 + if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
1.14 + != HandleError_None)
1.15 + {
1.16 + return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
1.17 + }
1.18 +
1.19 + pInfo->bDontBroadcast = params[2] ? true : false;
1.20 +
1.21 + return 1;
1.22 +}
1.23 +
1.24 REGISTER_NATIVES(gameEventNatives)
1.25 {
1.26 {"HookEvent", sm_HookEvent},
1.27 @@ -365,5 +382,7 @@
1.28 {"SetEventInt", sm_SetEventInt},
1.29 {"SetEventFloat", sm_SetEventFloat},
1.30 {"SetEventString", sm_SetEventString},
1.31 + {"SetEventBroadcast", sm_SetEventBroadcast},
1.32 {NULL, NULL}
1.33 };
1.34 +