mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Expose ForceLightning() to ZScript.
This makes it possible to call the function in ZScript without the Light_ForceLightning special.
This commit is contained in:
parent
173407bf48
commit
ecdf6f7cb2
2 changed files with 10 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
||||||
#include "g_levellocals.h"
|
#include "g_levellocals.h"
|
||||||
#include "events.h"
|
#include "events.h"
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
|
#include <vm.h>
|
||||||
|
|
||||||
static FRandom pr_lightning ("Lightning");
|
static FRandom pr_lightning ("Lightning");
|
||||||
|
|
||||||
|
@ -297,3 +298,11 @@ void FLevelLocals::ForceLightning (int mode)
|
||||||
lightning->ForceLightning (mode);
|
lightning->ForceLightning (mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION(FLevelLocals, ForceLightning)
|
||||||
|
{
|
||||||
|
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
|
||||||
|
PARAM_INT(mode);
|
||||||
|
self->ForceLightning(mode);
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -524,6 +524,7 @@ struct LevelLocals native
|
||||||
native String GetChecksum() const;
|
native String GetChecksum() const;
|
||||||
|
|
||||||
native void ChangeSky(TextureID sky1, TextureID sky2 );
|
native void ChangeSky(TextureID sky1, TextureID sky2 );
|
||||||
|
native void ForceLightning(int mode = 0);
|
||||||
|
|
||||||
native SectorTagIterator CreateSectorTagIterator(int tag, line defline = null);
|
native SectorTagIterator CreateSectorTagIterator(int tag, line defline = null);
|
||||||
native LineIdIterator CreateLineIdIterator(int tag);
|
native LineIdIterator CreateLineIdIterator(int tag);
|
||||||
|
|
Loading…
Reference in a new issue