mehah / otclient

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Other
268 stars 208 forks source link

Outfits not displaying correctly while using asset files #966

Open AvajiOT opened 2 days ago

AvajiOT commented 2 days ago

Priority

Medium

Area

What happened?

While using assets in OTCR, a visual bug happens when creatures of certain looktypes are moving. I personally tested with OTCR (multiple builds throughout the last two years) and TFS, 1.5 to 1.7.

Few examples;

Posted back in 2023, https://discord.com/channels/888062548082061433/1091770506253959318 I reported the issue showcasing a broken looktype, # 63. Can't upload directly to github, so here's an imgur link. Unknown what my versions were at the time, but it would've been whatever was the most recent at that time. https://i.imgur.com/cJTwFdm.gif This certain looktype is not the only one to be broken, but was just shown as an example. Left side of the gif shows OTCR, and the right side shows

Just today, I pulled the latest versions of OTCR (commit c3aace1) and TFS (commit 6982d66) and logged into test. I clicked through a few outfits to showcase multiple that were broken. On this image, the right side, is OTCR with assets files, and on the right side is again OTCR with the exact same asset files just converted to .dat/.spr files with the game feature GameLoadSprInsteadProtobuf enabled. https://i.imgur.com/Rf1RE11.gif

Recently, another user on discord (_mattzon) posted having the same issue using the most recent version of Canary, OTCR (unknown build) and 1340 CIP client. Can see their post here; https://discord.com/channels/888062548082061433/1306420047853387827/1306420047853387827 The images are again too large to attach to this issue

Would love to move to assets fully if this gets corrected, as the asset files are a lot smaller then dat/spr files, and easier to update.

What OS are you seeing the problem on?

Windows

Code of Conduct

kokekanon commented 2 days ago

There are several open issues on the same problem (# 828 # 875 # 914 # 961 # 966 , # 968). I think the problem is here

https://github.com/mehah/otclient/issues/914#issuecomment-2475029008

in: otclient/src/client/thingtype.cpp function: void ThingType::unserializeAppearance If :

"// correction for some sprites "

Or

does not incorporate logic:

AvajiOT commented 2 days ago

There are several open issues on the same problem (# 828 # 875 # 914 # 961). I think the problem is here

#914 (comment)

in: otclient/src/client/thingtype.cpp function: void ThingType::unserializeAppearance If :

"// correction for some sprites "

Or

does not incorporate logic:

* bounding_square

* bounding_box_per_direction

I took a loot at the assets through assets editor and realized that

I think you're correct