Anime-Game-Servers / Grasscutter-Quests

A server software implementation, ineroperable with a certain anime game client. The code in this repository is fully custom made for edyoucational purposes and future preservation, no copyrighted code is allowed in this repository.
https://grasscutters.xyz/grasscutter
GNU Affero General Public License v3.0
138 stars 31 forks source link

Fix bug with region leave not resetting properly #96

Closed scooterboo closed 9 months ago

scooterboo commented 9 months ago

Description

While debugging a different problem, I noticed that the Avatar was leaving every region every refresh tick.

Before:

https://github.com/Anime-Game-Servers/Grasscutter-Quests/assets/1877986/3a2656fe-8eda-4782-acca-ca8a0be38599

I found that leftEntities was not being cleared like newEntities. I looked at resetNewEntities and added the symmetric code to resetEntityLeave.

After:

https://github.com/Anime-Game-Servers/Grasscutter-Quests/assets/1877986/19ac71ca-156d-4286-86c4-e03fe0f66e61

Type of changes

Checklist:

sonarcloud[bot] commented 9 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud