h1z1-server 0.25.3-0 → 0.25.3-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,58 +1,66 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"iv": "
|
|
4
|
-
"encryptedData": "
|
|
3
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
4
|
+
"encryptedData": "947e47e8df9e2f731162884274e4e3d1"
|
|
5
5
|
},
|
|
6
6
|
{
|
|
7
|
-
"iv": "
|
|
8
|
-
"encryptedData": "
|
|
7
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
8
|
+
"encryptedData": "4954430770cb8335663b2c7603905a9b"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
"iv": "
|
|
12
|
-
"encryptedData": "
|
|
11
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
12
|
+
"encryptedData": "dd4b5855c9051fa0df4568217ed32a33"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
"iv": "
|
|
16
|
-
"encryptedData": "
|
|
15
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
16
|
+
"encryptedData": "59703a77bfcc16fd80bfd66bb227a3e3"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
"iv": "
|
|
20
|
-
"encryptedData": "
|
|
19
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
20
|
+
"encryptedData": "d13c8ffed1f28b19dc8333a99e09200d"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"iv": "
|
|
24
|
-
"encryptedData": "
|
|
23
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
24
|
+
"encryptedData": "2616f54828387e0fb0d92c6689a8a9cf"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
"iv": "
|
|
28
|
-
"encryptedData": "
|
|
27
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
28
|
+
"encryptedData": "6153f99f87d648497b06ab6d2e934860"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
"iv": "
|
|
32
|
-
"encryptedData": "
|
|
31
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
32
|
+
"encryptedData": "bf05833bb819c4ae1fbb1fb2293e3b51"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
"iv": "
|
|
36
|
-
"encryptedData": "
|
|
35
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
36
|
+
"encryptedData": "ab69bf026aa0feafb6df1e27d80f3707"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
"iv": "
|
|
40
|
-
"encryptedData": "
|
|
39
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
40
|
+
"encryptedData": "0722c7b737c42ad953a7389bd95aaf0f"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
"iv": "
|
|
44
|
-
"encryptedData": "
|
|
43
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
44
|
+
"encryptedData": "46fef4dab38ea5f2442b840e3dc007bb"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
"iv": "
|
|
48
|
-
"encryptedData": "
|
|
47
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
48
|
+
"encryptedData": "4e6f01bad798b569e1dae68676d8cefd"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
"iv": "
|
|
52
|
-
"encryptedData": "
|
|
51
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
52
|
+
"encryptedData": "1f562e064e059540d0a0aa42ae19284c"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
"iv": "
|
|
56
|
-
"encryptedData": "
|
|
55
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
56
|
+
"encryptedData": "e65f9a873a07982e3b257a00fd3c7aa4620fea877b7eedf5dcb2e0745530667d"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
60
|
+
"encryptedData": "8085c4bbdf7e82eb5988a67d81f6c348"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"iv": "9bdd2548821a980912fab12c9aef9c5c",
|
|
64
|
+
"encryptedData": "0c79c3c3203083bb993840b74b91a09571a7d95cf9286db439e46fad5c212ac3"
|
|
57
65
|
}
|
|
58
66
|
]
|
package/package.json
CHANGED
|
@@ -2402,65 +2402,70 @@ export class ZoneServer2016 extends EventEmitter {
|
|
|
2402
2402
|
sequenceTime: number,
|
|
2403
2403
|
position: Float32Array
|
|
2404
2404
|
): boolean {
|
|
2405
|
-
if (client.isAdmin || !this._useFairPlay
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
this.
|
|
2413
|
-
|
|
2414
|
-
false
|
|
2415
|
-
);
|
|
2416
|
-
return true;
|
|
2417
|
-
}
|
|
2418
|
-
if (!client.isLoading && client.enableChecks) {
|
|
2419
|
-
if (distance > 6) {
|
|
2405
|
+
if (client.isAdmin || !this._useFairPlay) return false;
|
|
2406
|
+
if (!this.isSaving) {
|
|
2407
|
+
const distance = getDistance2d(client.oldPos.position, position);
|
|
2408
|
+
if (
|
|
2409
|
+
Number(client.character.lastLoginDate) + 20000 <
|
|
2410
|
+
new Date().getTime()
|
|
2411
|
+
) {
|
|
2412
|
+
const drift = Math.abs(sequenceTime - this.getServerTime());
|
|
2413
|
+
if (drift > 10000) {
|
|
2420
2414
|
this.kickPlayer(client);
|
|
2421
2415
|
this.sendAlertToAll(`FairPlay: kicking ${client.character.name}`);
|
|
2422
2416
|
this.sendChatTextToAdmins(
|
|
2423
|
-
`FairPlay: ${client.character.name} has been kicked for
|
|
2417
|
+
`FairPlay: ${client.character.name} has been kicked for sequence time drifting by ${drift}`,
|
|
2424
2418
|
false
|
|
2425
2419
|
);
|
|
2426
2420
|
return true;
|
|
2427
2421
|
}
|
|
2422
|
+
if (!client.isLoading && client.enableChecks) {
|
|
2423
|
+
if (distance > 6) {
|
|
2424
|
+
this.kickPlayer(client);
|
|
2425
|
+
this.sendAlertToAll(`FairPlay: kicking ${client.character.name}`);
|
|
2426
|
+
this.sendChatTextToAdmins(
|
|
2427
|
+
`FairPlay: ${client.character.name} has been kicked for suspeced teleport by ${distance} from [${client.oldPos.position[0]} ${client.oldPos.position[1]} ${client.oldPos.position[2]}] to [${position[0]} ${position[1]} ${position[2]}]`,
|
|
2428
|
+
false
|
|
2429
|
+
);
|
|
2430
|
+
return true;
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2428
2433
|
}
|
|
2429
|
-
}
|
|
2430
2434
|
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2435
|
+
const speed =
|
|
2436
|
+
(distance / 1000 / (sequenceTime - client.oldPos.time)) * 3600000;
|
|
2437
|
+
const verticalSpeed =
|
|
2438
|
+
(getDistance1d(client.oldPos.position[1], position[1]) /
|
|
2439
|
+
1000 /
|
|
2440
|
+
(sequenceTime - client.oldPos.time)) *
|
|
2441
|
+
3600000;
|
|
2442
|
+
if (speed > 35 && verticalSpeed < 20) {
|
|
2443
|
+
const soeClient = this.getSoeClient(client.soeClientId);
|
|
2444
|
+
if (soeClient) {
|
|
2445
|
+
if (soeClient.avgPing >= 250) return false;
|
|
2446
|
+
}
|
|
2447
|
+
client.speedWarnsNumber += 1;
|
|
2448
|
+
} else if (client.speedWarnsNumber > 0) {
|
|
2449
|
+
client.speedWarnsNumber -= 1;
|
|
2442
2450
|
}
|
|
2443
|
-
client.speedWarnsNumber
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2451
|
+
if (client.speedWarnsNumber > 35) {
|
|
2452
|
+
this.kickPlayer(client);
|
|
2453
|
+
client.speedWarnsNumber = 0;
|
|
2454
|
+
if (!this._soloMode) {
|
|
2455
|
+
logClientActionToMongo(
|
|
2456
|
+
this._db?.collection(DB_COLLECTIONS.FAIRPLAY) as Collection,
|
|
2457
|
+
client,
|
|
2458
|
+
this._worldId,
|
|
2459
|
+
{ type: "SpeedHack" }
|
|
2460
|
+
);
|
|
2461
|
+
}
|
|
2462
|
+
this.sendAlertToAll(`FairPlay: kicking ${client.character.name}`);
|
|
2463
|
+
this.sendChatTextToAdmins(
|
|
2464
|
+
`FairPlay: ${client.character.name} has been kicking for speed hacking: ${speed} m/s at position [${position[0]} ${position[1]} ${position[2]}]`,
|
|
2465
|
+
false
|
|
2456
2466
|
);
|
|
2467
|
+
return true;
|
|
2457
2468
|
}
|
|
2458
|
-
this.sendAlertToAll(`FairPlay: kicking ${client.character.name}`);
|
|
2459
|
-
this.sendChatTextToAdmins(
|
|
2460
|
-
`FairPlay: ${client.character.name} has been kicking for speed hacking: ${speed} m/s at position [${position[0]} ${position[1]} ${position[2]}]`,
|
|
2461
|
-
false
|
|
2462
|
-
);
|
|
2463
|
-
return true;
|
|
2464
2469
|
}
|
|
2465
2470
|
client.oldPos = { position: position, time: sequenceTime };
|
|
2466
2471
|
return false;
|
|
@@ -2472,52 +2477,53 @@ export class ZoneServer2016 extends EventEmitter {
|
|
|
2472
2477
|
position: Float32Array,
|
|
2473
2478
|
vehicle: Vehicle
|
|
2474
2479
|
): boolean {
|
|
2475
|
-
if (client.isAdmin || !this._useFairPlay
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
}
|
|
2487
|
-
const distance = getDistance2d(vehicle.oldPos.position, position);
|
|
2488
|
-
const speed =
|
|
2489
|
-
(distance / 1000 / (sequenceTime - vehicle.oldPos.time)) * 3600000;
|
|
2490
|
-
const verticalSpeed =
|
|
2491
|
-
(getDistance1d(vehicle.oldPos.position[1], position[1]) /
|
|
2492
|
-
1000 /
|
|
2493
|
-
(sequenceTime - vehicle.oldPos.time)) *
|
|
2494
|
-
3600000;
|
|
2495
|
-
if (speed > 130 && verticalSpeed < 20) {
|
|
2496
|
-
const soeClient = this.getSoeClient(client.soeClientId);
|
|
2497
|
-
if (soeClient) {
|
|
2498
|
-
if (soeClient.avgPing >= 250) return false;
|
|
2480
|
+
if (client.isAdmin || !this._useFairPlay) return false;
|
|
2481
|
+
if (!this.isSaving) {
|
|
2482
|
+
const drift = Math.abs(sequenceTime - this.getServerTime());
|
|
2483
|
+
if (drift > 10000) {
|
|
2484
|
+
this.kickPlayer(client);
|
|
2485
|
+
this.sendAlertToAll(`FairPlay: kicking ${client.character.name}`);
|
|
2486
|
+
this.sendChatTextToAdmins(
|
|
2487
|
+
`FairPlay: ${client.character.name} has been kicked for sequence time drifting by ${drift}`,
|
|
2488
|
+
false
|
|
2489
|
+
);
|
|
2490
|
+
return true;
|
|
2499
2491
|
}
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2492
|
+
const distance = getDistance2d(vehicle.oldPos.position, position);
|
|
2493
|
+
const speed =
|
|
2494
|
+
(distance / 1000 / (sequenceTime - vehicle.oldPos.time)) * 3600000;
|
|
2495
|
+
const verticalSpeed =
|
|
2496
|
+
(getDistance1d(vehicle.oldPos.position[1], position[1]) /
|
|
2497
|
+
1000 /
|
|
2498
|
+
(sequenceTime - vehicle.oldPos.time)) *
|
|
2499
|
+
3600000;
|
|
2500
|
+
if (speed > 130 && verticalSpeed < 20) {
|
|
2501
|
+
const soeClient = this.getSoeClient(client.soeClientId);
|
|
2502
|
+
if (soeClient) {
|
|
2503
|
+
if (soeClient.avgPing >= 250) return false;
|
|
2504
|
+
}
|
|
2505
|
+
client.speedWarnsNumber += 1;
|
|
2506
|
+
} else if (client.speedWarnsNumber > 0) {
|
|
2507
|
+
client.speedWarnsNumber -= 1;
|
|
2508
|
+
}
|
|
2509
|
+
if (client.speedWarnsNumber > 5) {
|
|
2510
|
+
this.kickPlayer(client);
|
|
2511
|
+
client.speedWarnsNumber = 0;
|
|
2512
|
+
if (!this._soloMode) {
|
|
2513
|
+
logClientActionToMongo(
|
|
2514
|
+
this._db?.collection(DB_COLLECTIONS.FAIRPLAY) as Collection,
|
|
2515
|
+
client,
|
|
2516
|
+
this._worldId,
|
|
2517
|
+
{ type: "SpeedHack" }
|
|
2518
|
+
);
|
|
2519
|
+
}
|
|
2520
|
+
this.sendAlertToAll(`FairPlay: kicking ${client.character.name}`);
|
|
2521
|
+
this.sendChatTextToAdmins(
|
|
2522
|
+
`FairPlay: ${client.character.name} has been kicking for vehicle speed hacking: ${speed} m/s at position [${position[0]} ${position[1]} ${position[2]}]`,
|
|
2523
|
+
false
|
|
2513
2524
|
);
|
|
2525
|
+
return true;
|
|
2514
2526
|
}
|
|
2515
|
-
this.sendAlertToAll(`FairPlay: kicking ${client.character.name}`);
|
|
2516
|
-
this.sendChatTextToAdmins(
|
|
2517
|
-
`FairPlay: ${client.character.name} has been kicking for vehicle speed hacking: ${speed} m/s at position [${position[0]} ${position[1]} ${position[2]}]`,
|
|
2518
|
-
false
|
|
2519
|
-
);
|
|
2520
|
-
return true;
|
|
2521
2527
|
}
|
|
2522
2528
|
vehicle.oldPos = { position: position, time: sequenceTime };
|
|
2523
2529
|
return false;
|