Fix for snow support and skin select
This commit is contained in:
@@ -212,7 +212,7 @@ function syncPlayerProperties(client) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function updatePlayerSnowState(client) {
|
function updatePlayerSnowState(client) {
|
||||||
if(doesGameHaveSnow(getServerGame())) {
|
if(isSnowSupported(getServerGame())) {
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s snow state (Falling: ${toUpperCase(getOnOffFromBool(getServerConfig().fallingSnow))}, Ground: ${toUpperCase(getOnOffFromBool(getServerConfig().groundSnow))})`);
|
logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s snow state (Falling: ${toUpperCase(getOnOffFromBool(getServerConfig().fallingSnow))}, Ground: ${toUpperCase(getOnOffFromBool(getServerConfig().groundSnow))})`);
|
||||||
triggerNetworkEvent("vrr.snow", client, getServerConfig().fallingSnow, getServerConfig().groundSnow);
|
triggerNetworkEvent("vrr.snow", client, getServerConfig().fallingSnow, getServerConfig().groundSnow);
|
||||||
}
|
}
|
||||||
@@ -865,12 +865,12 @@ function playerFinishedSkinSelection(client, allowedSkinIndex) {
|
|||||||
restorePlayerCamera(client);
|
restorePlayerCamera(client);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
getPlayerCurrentSubAccount(client).skin = allowedSkins[getServerGame()][allowedSkinIndex][0];
|
getPlayerCurrentSubAccount(client).skin = getSkinIndexFromSkin(allowedSkins[allowedSkinIndex][0]);
|
||||||
if(isPlayerWorking(client)) {
|
if(isPlayerWorking(client)) {
|
||||||
messagePlayerAlert(client, "Your new skin has been saved but won't be shown until you stop working.");
|
messagePlayerAlert(client, "Your new skin has been saved but won't be shown until you stop working.");
|
||||||
setPlayerSkin(client, getJobData(getPlayerCurrentSubAccount(client).job).uniforms[getPlayerData(client).jobUniform].skinId);
|
setPlayerSkin(client, getJobData(getPlayerCurrentSubAccount(client).job).uniforms[getPlayerData(client).jobUniform].skinId);
|
||||||
} else {
|
} else {
|
||||||
setPlayerSkin(client, allowedSkins[getServerGame()][allowedSkinIndex][0]);
|
setPlayerSkin(client, getPlayerCurrentSubAccount(client).skin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(getPlayerData(client).returnToPosition != null) {
|
if(getPlayerData(client).returnToPosition != null) {
|
||||||
@@ -891,7 +891,7 @@ function playerFinishedSkinSelection(client, allowedSkinIndex) {
|
|||||||
switchPlayerActiveHotBarSlot(client, -1);
|
switchPlayerActiveHotBarSlot(client, -1);
|
||||||
cachePlayerHotBarItems(client);
|
cachePlayerHotBarItems(client);
|
||||||
|
|
||||||
meActionToNearbyPlayers(client, `changes their skin to ${allowedSkins[getServerGame()][allowedSkinIndex][1]}`);
|
meActionToNearbyPlayers(client, `changes their skin to ${allowedSkins[allowedSkinIndex][1]}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user