Rename getServerGame to getGame to match client

This commit is contained in:
Vortrex
2022-04-28 11:32:35 -05:00
parent f4ff54178c
commit b1256193ef
14 changed files with 157 additions and 154 deletions

View File

@@ -7,6 +7,13 @@
// TYPE: Server (JavaScript)
// ===========================================================================
function initGateScript() {
logToConsole(LOG_INFO, `[VRR.Gate]: Initializing gate script ...`);
logToConsole(LOG_INFO, `[VRR.Gate]: Gate script initialized successfully!`);
}
// ===========================================================================
function doesPlayerHaveGateKeys(client, vehicle) {
let gateData = getGateData(vehicle);
@@ -91,7 +98,7 @@ function getGateData(gateId) {
function getClosestGate(position) {
let closest = 0;
for(let i in getServerData().gates[getServerGame()]) {
for(let i in getServerData().gates[getGame()]) {
if(getDistance(getServerData().gates[i].position, position) < getDistance(getServerData().gates[closest].position, position)) {
closest = i;
}
@@ -185,7 +192,7 @@ function saveGateToDatabase(gateId) {
}
logToConsole(LOG_VERBOSE, `[VRR.Gate]: Saved gate ${gateDataId} to database!`);
return false;
return true;
}
// ===========================================================================