Cutscene interior net events

This commit is contained in:
Vortrex
2022-03-15 04:16:28 -05:00
parent 8e2c69c1b1
commit 50616b7c8a

View File

@@ -87,6 +87,7 @@ function addAllNetworkHandlers() {
addNetworkEventHandler("vrr.hideAllGUI", hideAllGUI);
addNetworkEventHandler("vrr.clientInfo", serverRequestedClientInfo);
addNetworkEventHandler("vrr.interiorLights", updateInteriorLightsState);
addNetworkEventHandler("vrr.cutsceneInterior", setCutsceneInterior);
addNetworkEventHandler("vrr.syncElement", forceSyncElementProperties);
addNetworkEventHandler("vrr.elementPosition", setElementPosition);
@@ -327,3 +328,18 @@ function sendLocalPlayerNetworkIdToServer() {
}
// ===========================================================================
function setCutsceneInterior(cutsceneName) {
if(getGame() == VRR_GAME_GTA_IV) {
if(cutsceneName == "") {
natives.clearCutscene();
} else {
if(natives.isInteriorScene()) {
natives.clearCutscene();
}
natives.initCutscene(cutsceneName);
}
}
}
// ===========================================================================