forgottenserver icon indicating copy to clipboard operation
forgottenserver copied to clipboard

tile stack carpet bug

Open Zbizu opened this issue 3 years ago • 6 comments

  • [x] This is a bug in the software that resides in this repository, and not a support matter (use https://otland.net/forums/support.16/ for support)
  • [x] This issue is reproducible without changes to the C++ code in this repository

Summary

I was coding carpet system for houses and I discovered that there is something wrong with how they are being placed in stack

Steps to reproduce

create two carpets on same tile:

  1. /i blue carpet
  2. /i brown carpet

Expected behaviour

brown carpet on top

Actual behaviour

blue carpet on top

Another example: placing two carpets in a house obraz

after saving and restarting: obraz

they get flipped every save+restart

Zbizu avatar Dec 22 '22 11:12 Zbizu

I can confirm that this bug is indeed existing.

Tofame avatar Dec 22 '22 11:12 Tofame

potential fix for house loading (needs testing): https://github.com/otland/forgottenserver/blob/c274252b4a00be243564d2f1d8d86beed2bc3042/src/iomapserialize.cpp#L144

-				parent->internalAddThing(item);
+				parent->addThing(item);

Zbizu avatar Dec 22 '22 12:12 Zbizu

how this work with more carpets? maybe we can use this behavior for "random houses", after each ss we can take top one and move it on bottom (ofc enabled by config) #feature_not_bug

ArturKnopik avatar Dec 25 '22 15:12 ArturKnopik

how this work with more carpets?

well, you can (should) only put 3 carpets on same sqm, and they should keep the stack order that you added them, this is a very weird bug

EPuncker avatar Dec 25 '22 20:12 EPuncker

how this work with more carpets? maybe we can use this behavior for "random houses", after each ss we can take top one and move it on bottom (ofc enabled by config) #feature_not_bug

It's a bug. Rather small sample size, but 3/3 of my testers arranged their carpet stack and found this annoying.

Answering the other question (can't quote because I'm on a phone) the placing script limits the carpets.

Zbizu avatar Dec 26 '22 18:12 Zbizu

how this work with more carpets? maybe we can use this behavior for "random houses", after each ss we can take top one and move it on bottom (ofc enabled by config) #feature_not_bug

@ArturKnopik maybe u understood that this is a bug in a house, but this bug happens everywhere, not only in houses. Should be fixed, not implemented as a feature.

Tofame avatar Dec 29 '22 09:12 Tofame