Move disconnect reasons to natives

This commit is contained in:
Vortrex
2022-05-17 08:55:40 -05:00
parent 8841958a8d
commit 9a346b2b41
3 changed files with 35 additions and 14 deletions

View File

@@ -7,6 +7,23 @@
// TYPE: Server (JavaScript)
// ===========================================================================
let disconnectReasons = [
"Lost Connection",
"Disconnected",
"Unsupported Client",
"Wrong Game",
"Incorrect Password",
"Unsupported Executable",
"Disconnected",
"Banned",
"Failed",
"Invalid Name",
"Crashed",
"Modified Game"
];
// ===========================================================================
function sendNetworkEventToPlayer(networkEvent, client, ...args) {
triggerNetworkEvent.apply(null, networkEvent, client, args);
}

View File

@@ -22,6 +22,23 @@ let builtInCommands = [
// ===========================================================================
let disconnectReasons = [
"Lost Connection",
"Disconnected",
"Unsupported Client",
"Wrong Game",
"Incorrect Password",
"Unsupported Executable",
"Disconnected",
"Banned",
"Failed",
"Invalid Name",
"Crashed",
"Modified Game"
];
// ===========================================================================
function getPlayerPosition(client) {
if(!areServerElementsSupported()) {
return getPlayerData(client).syncPosition;

View File

@@ -7,20 +7,7 @@
// TYPE: Server (JavaScript)
// ===========================================================================
let disconnectReasons = [
"Lost Connection",
"Disconnected",
"Unsupported Client",
"Wrong Game",
"Incorrect Password",
"Unsupported Executable",
"Disconnected",
"Banned",
"Failed",
"Invalid Name",
"Crashed",
"Modified Game"
];
// ===========================================================================