mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-09 01:01:05 +00:00
SendConsoleEvent function for EventHandlers
This commit is contained in:
parent
a483ad20be
commit
b4a8b1278f
2 changed files with 16 additions and 0 deletions
|
@ -686,6 +686,21 @@ DEFINE_ACTION_FUNCTION(DEventHandler, SendNetworkEvent)
|
|||
ACTION_RETURN_BOOL(currentVMLevel->localEventManager->SendNetworkEvent(name, arg1, arg2, arg3, false));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DEventHandler, SendConsoleEvent)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(playerNum);
|
||||
PARAM_STRING(name);
|
||||
PARAM_INT(arg1);
|
||||
PARAM_INT(arg2);
|
||||
PARAM_INT(arg3);
|
||||
|
||||
if (playerNum == consoleplayer)
|
||||
primaryLevel->localEventManager->Console(-1, name, arg1, arg2, arg3, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DEventHandler, Find)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
|
|
|
@ -148,4 +148,5 @@ class EventHandler : StaticEventHandler native version("2.4")
|
|||
{
|
||||
clearscope static native StaticEventHandler Find(class<StaticEventHandler> type);
|
||||
clearscope static native void SendNetworkEvent(String name, int arg1 = 0, int arg2 = 0, int arg3 = 0);
|
||||
clearscope static native void SendConsoleEvent(int playerNum, string name, int arg1 = 0, int arg2 = 0, int arg3 = 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue