Lua: Simple CreateEventTimer improvements

This commit is contained in:
Lion Kortlepel
2021-09-20 13:39:14 +03:00
parent 4bf89706b4
commit 3edb9322d4
3 changed files with 51 additions and 13 deletions

View File

@@ -90,7 +90,7 @@ public:
return Results;
}
std::set<std::string> GetEventHandlersForState(const std::string& EventName, TLuaStateId StateId);
void CreateTimedEvent(const std::string& EventName, TLuaStateId StateId, size_t IntervalMS);
void CreateEventTimer(const std::string& EventName, TLuaStateId StateId, size_t IntervalMS);
static constexpr const char* BeamMPFnNotFoundError = "BEAMMP_FN_NOT_FOUND";
@@ -137,7 +137,7 @@ private:
struct TimedEvent {
const std::chrono::high_resolution_clock::duration Duration {};
std::chrono::high_resolution_clock::time_point LastCompletion { };
std::chrono::high_resolution_clock::time_point LastCompletion {};
std::string EventName;
TLuaStateId StateId;
bool Expired();