Skip to content

Commit

Permalink
Merge branch 'release/0.41.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGruber committed Dec 5, 2024
2 parents 29b8953 + 20529f9 commit 7398179
Show file tree
Hide file tree
Showing 30 changed files with 712 additions and 241 deletions.
2 changes: 1 addition & 1 deletion data/2016/dataSources/AllowedFileHashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@
},
{
"file_name": "Assets_256.pack",
"crc32_hash": "8bec25f0"
"crc32_hash": "f3774e08"
}
]

46 changes: 42 additions & 4 deletions data/2016/dataSources/weather.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
"temperature": 36,
"skyClarity": 0.3,
"cloudWeight0": 0.01,
"cloudWeight1": 0.0,
"cloudWeight2": 0.0,
"cloudWeight3": 0.0,
"cloudWeight1": 0,
"cloudWeight2": 0,
"cloudWeight3": 0,
"transitionTime": 1,
"sunAxisX": 38,
"sunAxisY": 15,
Expand Down Expand Up @@ -121,7 +121,7 @@
"skyClarity": 0.2,
"cloudWeight0": 0.01,
"cloudWeight1": 0.21,
"cloudWeight2": 0.0,
"cloudWeight2": 0,
"cloudWeight3": 0.22,
"transitionTime": 3,
"sunAxisX": 38,
Expand Down Expand Up @@ -294,5 +294,43 @@
"cloudSilverLiningThickness": 0.25,
"cloudSilverLiningBrightness": 7,
"cloudShadows": 0.5
},
"winter": {
"templateName": "winter",
"overcast": 25,
"fogDensity": 0.000235,
"fogFloor": 35,
"fogGradient": 0.001,
"globalPrecipitation": 100,
"temperature": 0,
"skyClarity": 0.2,
"cloudWeight0": 0.08,
"cloudWeight1": 0.03,
"cloudWeight2": 0.08,
"cloudWeight3": 0.08,
"transitionTime": 3,
"sunAxisX": 38,
"sunAxisY": 15,
"sunAxisZ": 0,
"windDirectionX": 2,
"windDirectionY": 2,
"windDirectionZ": 0,
"wind": 2,
"rainMinStrength": 0,
"rainRampupTimeSeconds": 1,
"cloudFile": "sky_Z_clouds.dds",
"stratusCloudTiling": 0.3,
"stratusCloudScrollU": -0.002,
"stratusCloudScrollV": 0,
"stratusCloudHeight": 1000,
"cumulusCloudTiling": 0.3,
"cumulusCloudScrollU": 0.001,
"cumulusCloudScrollV": 0.004,
"cumulusCloudHeight": 8000,
"cloudAnimationSpeed": 0.09,
"cloudSilverLiningThickness": 0.15,
"cloudSilverLiningBrightness": 2,
"cloudShadows": 0.25
}
}

12 changes: 6 additions & 6 deletions data/2016/sampleData/defaultconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,17 @@ decay:
vehicleDamageRange: 25 # how large of a range to detect maxVehiclesPerArea
dailyRepairMaterials:
- itemDefinitionId: 16 # wood log
requiredCount: 5
requiredCount: 1
- itemDefinitionId: 109 # wood plank
requiredCount: 79
requiredCount: 10
- itemDefinitionId: 135 # nail
requiredCount: 28
requiredCount: 4
- itemDefinitionId: 141 # metal bracket
requiredCount: 16
requiredCount: 4
- itemDefinitionId: 46 # metal sheet
requiredCount: 20
requiredCount: 1
- itemDefinitionId: 114 # metal shard
requiredCount: 44
requiredCount: 8
- itemDefinitionId: 111 # wood stick
requiredCount: 2

Expand Down
2 changes: 2 additions & 0 deletions data/2016/sampleData/staticbuildings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[]

98 changes: 98 additions & 0 deletions data/2016/zoneData/Z1_nerfedPOIs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
[
{
"POIid": 1,
"POIname": "Pleasant Valley",
"stringId": 9570,
"range": 500,
"nerfValue": 30,
"bounds": [
[
[ 688.8599853515625, -1381.3299560546875 ],
[ -519.4099731445312, -1395.1300048828125 ],
[ -514.1300048828125, -703.780029296875 ],
[ 677.9600219726562, -708.0900268554688 ]
],
[
[ 366.1538391113281, -885 ],
[ 380, -348.0769348144531 ],
[ -145.76922607421875, -345.3846130371094 ],
[ -488.8461608886719, -879.6153564453125 ]
],
[
[ -544.20, -779.00 ],
[ -438.20, -854.73 ],
[ -469.12, -966.19 ],
[ -611.42, -928.52 ]
]
],
"position": [
-33.53,
23.48,
-1050.13,
1
]
},
{
"POIid": 5,
"POIname": "Cranberry",
"stringId": 9554,
"range": 300,
"nerfValue": 30,
"bounds": [
[
[ -1012.21, 1689.32 ],
[ -1562.59, 1679.51 ],
[ -1572.25, 2142.52 ],
[ -1020.29, 2169.41 ]
]
],
"position": [
-1318.68,
71.68,
1801.41,
1
]
},
{
"POIid": 10,
"POIname": "Lone Pine Development",
"stringId": 9564,
"range": 300,
"nerfValue": 15,
"bounds": [
[
[ -692.3400268554688, 2793.47998046875 ],
[ -688.9000244140625, 2579.320068359375 ],
[ -1174.68994140625, 2576.340087890625 ],
[ -1198.72998046875, 2839.840087890625 ]
]
],
"position": [
-992.52,
61.41,
2704.51,
1
]
},
{
"POIid": 13,
"POIname": "Ranchito Taquito",
"stringId": 9572,
"range": 400,
"nerfValue": 30,
"bounds": [
[
[ 1783.84, 2037.79 ],
[ 1794.8, 2523.56 ],
[ 2356.19, 2534.53 ],
[ 2325.39, 2041.18 ]
]
],
"position": [
2020.91,
41.2,
2341.24,
1
]
}
]
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "h1z1-server",
"version": "0.40.5",
"version": "0.41.0",
"description": "Library for emulating h1z1 servers",
"author": "Quentin Gruber <[email protected]> (http://github.com/quentingruber)",
"license": "GPL-3.0-only",
Expand Down
2 changes: 1 addition & 1 deletion plugins/TestPlugin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/TestPlugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "H1emu",
"license": "GPL-3.0-only",
"devDependencies": {
"h1z1-server": "^0.38.0",
"h1z1-server": "*",
"typescript": "^5.1.3"
}
}
6 changes: 3 additions & 3 deletions src/servers/SoeServer/soeserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export class SOEServer extends EventEmitter {
_waitTimeMs: number = 24;
keepAliveTimeoutTime: number = 40000;
private readonly _maxMultiBufferSize: number;
private _resendTimeout: number = 400;
private _maxResentTries: number = 6;
private _resendTimeout: number = 250;
private _maxResentTries: number = 12;
_allowRawDataReception: boolean = false;
private _packetResetInterval: NodeJS.Timeout | undefined;
avgEventLoopLag: number = 0;
Expand Down Expand Up @@ -143,7 +143,7 @@ export class SOEServer extends EventEmitter {
const resendedSequences: Set<number> = new Set();
for (const [sequence, time] of client.unAckData) {
// if the packet is too old then we resend it
if (time + this._resendTimeout < currentTime) {
if (time + this._resendTimeout + client.avgPing < currentTime) {
const dataCache = client.outputStream.getDataCache(sequence);
if (dataCache) {
if (dataCache.resendCounter >= this._maxResentTries) {
Expand Down
1 change: 1 addition & 0 deletions src/servers/ZoneServer2016/classes/gridcell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export class GridCell {
objects: Array<BaseEntity> = [];
width: number;
height: number;
availableScrap: number = 50;
constructor(x: number, y: number, width: number, height: number) {
this.position = new Float32Array([x, 0, y, 1]);
this.width = width;
Expand Down
Loading

0 comments on commit 7398179

Please sign in to comment.