SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
83 stars 17 forks source link

Should-Play Anims-On-Edited_Server Enabling Causes Server to Continuously Error #4436

Closed hyjhkt closed 3 weeks ago

hyjhkt commented 3 weeks ago

The number of objects placed by players on my server is very large (more than 2000), and the size of the map is also very large, which leads to the animals on my map. Once there are many online players on the server, the movement of the animals will become too laggy (instantaneous movement. Pause to move a distance in an instant, pause to move a distance in an instant). So I want to try to enable Should_Play_Anims_On_Dedicated_Server true on the animal's. dat, but this causes the server background to "continuously" report errors

Should_Play_Anims_On_Dedicated_Server true The continuous error content is: NullReferenceException: Object reference not set to an instance of an object at SDG.Unturned.Animal.askEat () [0x0007a] in <157edbe38df54503879dc8058d128628>:0 at SDG.Unturned.Animal.Update () [0x00321] in <157edbe38df54503879dc8058d128628>:0 SRE6 M4X12NQOV)%R0C7JHV

SDGNelson commented 3 weeks ago

Animal_Dedicated.prefab is the one loaded on the dedicated server, so it looks like the issue is that the version loaded on the server doesn't have the Animation component but it's expecting one because you enabled Should_Play_Anims_On_Dedicated_Server.

hyjhkt commented 3 weeks ago

Animal_Dedicated.prefab是在专用服务器上加载的版本,因此看起来问题在于服务器上加载的版本没有动画组件,但它需要一个动画组件,因为您启用了Should_Play_Anims_On_Dedicated_Server. @SDGNelson If enabled Should_Play_Anims_On_Dedicated_Server true, Can we solve the problem of players placing too many obstacles on the server, high server load, and high latency, which can cause animals to move and lag on the server?