Couple error checks

This commit is contained in:
Vortrex
2023-02-15 21:56:32 -06:00
parent c0f7d1ce02
commit ae96568c0a

View File

@@ -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;
}