From 11fb1fa25cf84dc1aa8ad6422f85c65d2c5d28b0 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Wed, 16 Mar 2022 17:02:11 +0200 Subject: [PATCH] Update Events.inc --- module/Core/Events.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/Core/Events.inc b/module/Core/Events.inc index a442adac..d461dacb 100644 --- a/module/Core/Events.inc +++ b/module/Core/Events.inc @@ -392,7 +392,8 @@ void Core::EmitPlayerRequestSpawn(int32_t player_id) #ifdef VCMP_ENABLE_OFFICIAL if (IsOfficial()) { - ExecuteLegacyEvent(m_VM, _SC("onPlayerRequestSpawn"), _player.mLgObj); + LightObj r = EvaluateLegacyEvent(m_VM, _SC("onPlayerRequestSpawn"), _player.mLgObj); + SetState(r.IsNull() ? 1 : r.Cast< int32_t >()); } #endif }