QuentinGruber / h1z1-server

Library used to emulate h1z1 game servers
https://h1emu.com
GNU General Public License v3.0
95 stars 54 forks source link

Freeplaced Entities don't save on server restart #1954

Closed Nikolassparrow closed 8 months ago

Nikolassparrow commented 8 months ago

1k reported this in the Discord.

Describe the bug Freely placed entities don't save upon server restarts. This affects items like Hand Shovels/stashes, containers, furnaces, etc.

To Reproduce Steps to reproduce the behavior:

  1. Place an entity freely around the world
  2. Restart the server and observe the entity no longer being there.

Expected behavior Freely placed entities and their containers should be saved upon server restarts like how entities placed in shelters/shacks do.

Screenshots When I get some time today, I'll make a recording of this happening.

Additional Context: This issue is highly likely to be unrelated, but does this maybe tie into #1467 ?

QuentinGruber commented 8 months ago

1k reported this in the Discord.

Describe the bug Freely placed entities don't save upon server restarts. This affects items like Hand Shovels/stashes, containers, furnaces, etc.

To Reproduce Steps to reproduce the behavior:

  1. Place an entity freely around the world
  2. Restart the server and observe the entity no longer being there.

Expected behavior Freely placed entities and their containers should be saved upon server restarts like how entities placed in shelters/shacks do.

Screenshots When I get some time today, I'll make a recording of this happening.

Additional Context: This issue is highly likely to be unrelated, but does this maybe tie into #1467 ?

not linked to #1467 we probably just not save them

QuentinGruber commented 8 months ago

i believe some freeplace we're removed but it's definitely and issue for stashes

QuentinGruber commented 8 months ago

@Nikolassparrow test removing this line https://github.com/QuentinGruber/h1z1-server/blob/master/src/servers/ZoneServer2016/zoneserver.ts#L1588

QuentinGruber commented 8 months ago

i don't remember why @jasonmoonen if he can help us on this

jasonmoonen commented 8 months ago

i don't remember why @jasonmoonen if he can help us on this

Oh yeah that's an easy fix. The thing we should think about is decay for those entities. My suggestion would be to despawn those entities after 12 hours if not repaired. Suggestions are welcome of course.. Except for the hand shovels of course

jasonmoonen commented 8 months ago

Fix is on if you want to try b49ca98078540c581c6556f6998447de867d03ad

jefix88 commented 8 months ago

StorageContainers in Basic Shack also disappear after server restart, I don't know if anyone reported this.

Nikolassparrow commented 8 months ago

Fix is on if you want to try b49ca98078540c581c6556f6998447de867d03ad

https://streamable.com/4z0n45 Change looks good thanks man!

@QuentinGruber just need to merge jasons bugfix/freeplace branch and this issue will be fixed :D

Nikolassparrow commented 8 months ago

StorageContainers in Basic Shack also disappear after server restart, I don't know if anyone reported this.

Currently small shacks are disabled on the main servers due to a bug where it crashes client (I'm not sure if the cause has been found but disabling them is a reliable fix..) Should still be looked into for when they are re-enabled though.

jefix88 commented 8 months ago

StorageContainers in Basic Shack also disappear after server restart, I don't know if anyone reported this.

Currently small shacks are disabled on the main servers due to a bug where it crashes client (I'm not sure if the cause has been found but disabling them is a reliable fix..) Should still be looked into for when they are re-enabled though.

BASIC SHACK is the smallest one, where you put everything on the ground. Furnace disappears too :D

QuentinGruber commented 8 months ago

StorageContainers in Basic Shack also disappear after server restart, I don't know if anyone reported this.

Currently small shacks are disabled on the main servers due to a bug where it crashes client (I'm not sure if the cause has been found but disabling them is a reliable fix..) Should still be looked into for when they are re-enabled though.

BASIC SHACK is the smallest one, where you put everything on the ground. Furnace disappears too :D

nice to know @jefix88 , hopefully it's fixed, if not recreate an issue or comment this one :)