AliasAlreadyTaken reports: When I spawn an NPC and fashio ... #80

Closed
opened 2020-10-15 18:06:51 +00:00 by yourland-report · 4 comments

AliasAlreadyTaken reports a bug:

When I spawn an NPC and fashion him, then spawn another NPC, the second one comes with the skin of the first one. There's somewhere a delete meta missing

Player position:

{
	y = 25.5,
	x = 1941.37890625,
	z = 1015.0349731445
}

Player look:

{
	y = -0.21251878142357,
	x = -0.38211968541145,
	z = -0.89934438467026
}

Log identifier


[MOD] yl_report log identifier = FaBKV9eOW11HXaZPMZN2eBavqabizecn

Profiler save:

profile-20201015T200650.json_pretty

Status:

# Server: version=5.3.0-yl, uptime=244431, max_lag=0.339661, clients={AliasAlreadyTaken, Skyisblue, Annalysa, Bailiff}
AliasAlreadyTaken reports a bug: > When I spawn an NPC and fashion him, then spawn another NPC, the second one comes with the skin of the first one. There's somewhere a delete meta missing Player position: ``` { y = 25.5, x = 1941.37890625, z = 1015.0349731445 } ``` Player look: ``` { y = -0.21251878142357, x = -0.38211968541145, z = -0.89934438467026 } ``` Log identifier ``` [MOD] yl_report log identifier = FaBKV9eOW11HXaZPMZN2eBavqabizecn ``` Profiler save: ``` profile-20201015T200650.json_pretty ``` Status: ``` # Server: version=5.3.0-yl, uptime=244431, max_lag=0.339661, clients={AliasAlreadyTaken, Skyisblue, Annalysa, Bailiff} ```
AliasAlreadyTaken was assigned by yourland-report 2020-10-15 18:06:51 +00:00
AliasAlreadyTaken added the
1. kind/bug
label 2020-10-15 19:02:41 +00:00
flux added this to the (deleted) project 2022-03-31 00:41:59 +00:00

Was bored so I picked an old bug.

I think 98ad212149/functions.lua (L1786) is the problem.

textures = self.textures

This creates a reference to the mob definition texture table and not a copy of that table. This way any following changes will be done on the mob definition which is also used to create the next mob hence the same skin.

To avoid that the mob definition table needs to be copied and this simple fix should work.

textures = table.copy(self.textures)

Unfortunately I can´t test it locally because mod security messes with me if yl_speak_up tries to load the world texture folder.
Would be nice to get some feedback or even someone able to test it.

Was bored so I picked an old bug. I think https://gitea.your-land.de/your-land/yl_speak_up/src/commit/98ad212149380fa4d0b6fd1a8860e6e4fef77e10/functions.lua#L1786 is the problem. ```lua textures = self.textures ``` This creates a reference to the mob definition texture table and not a copy of that table. This way any following changes will be done on the mob definition which is also used to create the next mob hence the same skin. To avoid that the mob definition table needs to be copied and this simple fix should work. ```lua textures = table.copy(self.textures) ``` Unfortunately I can´t test it locally because mod security messes with me if yl_speak_up tries to load the world texture folder. Would be nice to get some feedback or even someone able to test it.
flux added the
2. prio/elevated
label 2023-01-19 04:34:39 +00:00

The fix is on the testserver, I tested it but couldn't find a positive effect so far.

The fix is on the testserver, I tested it but couldn't find a positive effect so far.

tested locally after reading readme.md and creating needed folders so that mod security stops complaining 😆

tested locally after reading readme.md and creating needed folders so that mod security stops complaining 😆
AliasAlreadyTaken added the
ugh/QA OK
label 2023-01-19 21:28:35 +00:00
AliasAlreadyTaken added this to the 1.1.117 milestone 2023-01-19 21:28:38 +00:00
flux added the
5. result/fixed
label 2023-01-25 16:52:01 +00:00
AliasAlreadyTaken was unassigned by flux 2023-01-25 16:52:04 +00:00
Member

this is live

this is live
flux closed this issue 2023-01-25 16:52:11 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#80
No description provided.