GTA SA won't load sounds for some reason
This commit is contained in:
@@ -18,10 +18,11 @@ let payPhoneRingingSound = null;
|
|||||||
let payPhoneDialingSound = null;
|
let payPhoneDialingSound = null;
|
||||||
let payPhonePickupSound = null;
|
let payPhonePickupSound = null;
|
||||||
let payPhoneHangupSound = null;
|
let payPhoneHangupSound = null;
|
||||||
let payPhoneRingingSoundFilePath = "files/sounds/payphone/old-payphone-ring.mp3";
|
|
||||||
let payPhoneDialingSoundFilePath = "files/sounds/payphone/old-payphone-dial.mp3";
|
let payPhoneRingingSoundFilePath = "";
|
||||||
let payPhonePickupSoundFilePath = "files/sounds/payphone/old-payphone-pickup.mp3";
|
let payPhoneDialingSoundFilePath = "";
|
||||||
let payPhoneHangupSoundFilePath = "files/sounds/payphone/old-payphone-hangup.mp3";
|
let payPhonePickupSoundFilePath = "";
|
||||||
|
let payPhoneHangupSoundFilePath = "";
|
||||||
|
|
||||||
let ringingPayPhone = -1;
|
let ringingPayPhone = -1;
|
||||||
|
|
||||||
@@ -40,6 +41,21 @@ class PayPhoneData {
|
|||||||
|
|
||||||
function initPayPhoneScript() {
|
function initPayPhoneScript() {
|
||||||
logToConsole(LOG_DEBUG, "[V.RP.PayPhone]: Initializing payphone script ...");
|
logToConsole(LOG_DEBUG, "[V.RP.PayPhone]: Initializing payphone script ...");
|
||||||
|
|
||||||
|
if (getGame() == V_GAME_MAFIA_ONE) {
|
||||||
|
payPhoneRingingSoundFilePath = "files/sounds/payphone/old-payphone-ring.mp3";
|
||||||
|
payPhoneDialingSoundFilePath = "files/sounds/payphone/old-payphone-dial.mp3";
|
||||||
|
payPhonePickupSoundFilePath = "files/sounds/payphone/old-payphone-pickup.mp3";
|
||||||
|
payPhoneHangupSoundFilePath = "files/sounds/payphone/old-payphone-hangup.mp3";
|
||||||
|
} else {
|
||||||
|
if (getGame() != V_GAME_GTA_SA) {
|
||||||
|
payPhoneRingingSoundFilePath = "files/sounds/payphone/old-payphone-ring.mp3";
|
||||||
|
payPhoneDialingSoundFilePath = "files/sounds/payphone/old-payphone-dial.mp3";
|
||||||
|
payPhonePickupSoundFilePath = "files/sounds/payphone/old-payphone-pickup.mp3";
|
||||||
|
payPhoneHangupSoundFilePath = "files/sounds/payphone/old-payphone-hangup.mp3";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//payPhoneRingingIndicatorImage = loadPayPhoneRingingIndicatorImage();
|
//payPhoneRingingIndicatorImage = loadPayPhoneRingingIndicatorImage();
|
||||||
payPhoneRingingSound = loadPayPhoneRingingSound();
|
payPhoneRingingSound = loadPayPhoneRingingSound();
|
||||||
payPhoneDialingSound = loadPayPhoneDialingSound();
|
payPhoneDialingSound = loadPayPhoneDialingSound();
|
||||||
@@ -51,6 +67,10 @@ function initPayPhoneScript() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadPayPhoneRingingIndicatorImage() {
|
function loadPayPhoneRingingIndicatorImage() {
|
||||||
|
if (payPhoneRingingIndicatorImagePath == "") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
let imageStream = openFile(payPhoneRingingIndicatorImagePath);
|
let imageStream = openFile(payPhoneRingingIndicatorImagePath);
|
||||||
let tempImage = null;
|
let tempImage = null;
|
||||||
if (imageStream != null) {
|
if (imageStream != null) {
|
||||||
@@ -64,6 +84,10 @@ function loadPayPhoneRingingIndicatorImage() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadPayPhoneRingingSound() {
|
function loadPayPhoneRingingSound() {
|
||||||
|
if (payPhoneRingingSoundFilePath == "") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
let soundStream = openFile(payPhoneRingingSoundFilePath);
|
let soundStream = openFile(payPhoneRingingSoundFilePath);
|
||||||
let tempSound = null;
|
let tempSound = null;
|
||||||
if (soundStream != null) {
|
if (soundStream != null) {
|
||||||
@@ -77,6 +101,10 @@ function loadPayPhoneRingingSound() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadPayPhoneDialingSound() {
|
function loadPayPhoneDialingSound() {
|
||||||
|
if (payPhoneDialingSoundFilePath == "") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
let soundStream = openFile(payPhoneDialingSoundFilePath);
|
let soundStream = openFile(payPhoneDialingSoundFilePath);
|
||||||
let tempSound = null;
|
let tempSound = null;
|
||||||
if (soundStream != null) {
|
if (soundStream != null) {
|
||||||
@@ -94,6 +122,10 @@ function loadPayPhoneDialingSound() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadPayPhonePickupSound() {
|
function loadPayPhonePickupSound() {
|
||||||
|
if (payPhonePickupSoundFilePath == "") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
let soundStream = openFile(payPhonePickupSoundFilePath);
|
let soundStream = openFile(payPhonePickupSoundFilePath);
|
||||||
let tempSound = null;
|
let tempSound = null;
|
||||||
if (soundStream != null) {
|
if (soundStream != null) {
|
||||||
@@ -111,6 +143,10 @@ function loadPayPhonePickupSound() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadPayPhoneHangupSound() {
|
function loadPayPhoneHangupSound() {
|
||||||
|
if (payPhoneHangupSoundFilePath == "") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
let soundStream = openFile(payPhoneHangupSoundFilePath);
|
let soundStream = openFile(payPhoneHangupSoundFilePath);
|
||||||
let tempSound = null;
|
let tempSound = null;
|
||||||
if (soundStream != null) {
|
if (soundStream != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user