Move disconnect reasons to natives
This commit is contained in:
@@ -7,6 +7,23 @@
|
|||||||
// TYPE: Server (JavaScript)
|
// 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) {
|
function sendNetworkEventToPlayer(networkEvent, client, ...args) {
|
||||||
triggerNetworkEvent.apply(null, networkEvent, client, args);
|
triggerNetworkEvent.apply(null, networkEvent, client, args);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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) {
|
function getPlayerPosition(client) {
|
||||||
if(!areServerElementsSupported()) {
|
if(!areServerElementsSupported()) {
|
||||||
return getPlayerData(client).syncPosition;
|
return getPlayerData(client).syncPosition;
|
||||||
|
|||||||
@@ -7,20 +7,7 @@
|
|||||||
// TYPE: Server (JavaScript)
|
// TYPE: Server (JavaScript)
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
let disconnectReasons = [
|
|
||||||
"Lost Connection",
|
|
||||||
"Disconnected",
|
|
||||||
"Unsupported Client",
|
|
||||||
"Wrong Game",
|
|
||||||
"Incorrect Password",
|
|
||||||
"Unsupported Executable",
|
|
||||||
"Disconnected",
|
|
||||||
"Banned",
|
|
||||||
"Failed",
|
|
||||||
"Invalid Name",
|
|
||||||
"Crashed",
|
|
||||||
"Modified Game"
|
|
||||||
];
|
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user