Fix snow util, move game object utils to game resource

This commit is contained in:
Vortrex
2021-10-25 12:59:17 -05:00
parent 04c0443b37
commit 299ce12008

View File

@@ -350,11 +350,14 @@ function setLocalPlayerInterior(interior) {
// ===========================================================================
function setSnowState(fallingSnow, groundSnow) {
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting falling snow to ${fallingSnow} and ground snow to ${groundSnow}`);
function setSnowState(falling, ground) {
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting falling snow to ${falling} and ground snow to ${ground}`);
if(!isNull(snowing)) {
snowing = fallingSnow;
forceSnowing(groundSnow);
if(ground == true) {
forceSnowing(ground);
} else {
snowing = falling;
}
}
}
@@ -488,25 +491,6 @@ function setLocalPlayerCash(amount) {
// ===========================================================================
function removeWorldObject(model, position, range) {
if(isRemovingWorldObjectsSupported()) {
logToConsole(LOG_DEBUG, `[VRR.Utilities] Removing world object ${model} at X: ${position.x}, Y: ${position.x}, Z: ${position.x} with range of ${range}`);
if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
game.removeWorldObject(model, position, range);
}
}
}
// ===========================================================================
function excludeModelFromGroundSnow(model) {
logToConsole(LOG_DEBUG, `[VRR.Utilities] Disabling ground snow for object model ${model}`);
groundSnow.excludeModel(model);
}
// ===========================================================================
function destroyAutoCreatedPickups() {
if(arePickupsSupported()) {
getElementsByType(ELEMENT_PICKUP).forEach(function(pickup) {