diff --git a/src/playsim/mapthinkers/a_lightning.cpp b/src/playsim/mapthinkers/a_lightning.cpp index 854e262121..bcca1a5201 100644 --- a/src/playsim/mapthinkers/a_lightning.cpp +++ b/src/playsim/mapthinkers/a_lightning.cpp @@ -36,6 +36,7 @@ #include "g_levellocals.h" #include "events.h" #include "gi.h" +#include static FRandom pr_lightning ("Lightning"); @@ -297,3 +298,11 @@ void FLevelLocals::ForceLightning (int mode) lightning->ForceLightning (mode); } } + +DEFINE_ACTION_FUNCTION(FLevelLocals, ForceLightning) +{ + PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals); + PARAM_INT(mode); + self->ForceLightning(mode); + return 0; +} \ No newline at end of file diff --git a/wadsrc/static/zscript/doombase.zs b/wadsrc/static/zscript/doombase.zs index 9dd5e550b1..cded9e3a89 100644 --- a/wadsrc/static/zscript/doombase.zs +++ b/wadsrc/static/zscript/doombase.zs @@ -524,6 +524,7 @@ struct LevelLocals native native String GetChecksum() const; native void ChangeSky(TextureID sky1, TextureID sky2 ); + native void ForceLightning(int mode = 0); native SectorTagIterator CreateSectorTagIterator(int tag, line defline = null); native LineIdIterator CreateLineIdIterator(int tag);