diff --git a/scripts/client/utilities.js b/scripts/client/utilities.js index 7fbd54d2..22c6bcd5 100644 --- a/scripts/client/utilities.js +++ b/scripts/client/utilities.js @@ -224,6 +224,10 @@ function setLocalPlayerInterior(interior) { // =========================================================================== function setSnowState(falling, ground, forceGround) { + if (!isGameFeatureSupported("snow")) { + return false; + } + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting falling snow to ${falling} and ground snow to ${ground}`); snowing = falling; //snow.force = ground; @@ -238,6 +242,9 @@ function setSnowState(falling, ground, forceGround) { // =========================================================================== function setLocalPlayerHealth(health) { + if (localPlayer == null) { + return false; + } localPlayer.health = health; }