cmangos / issues

This repository is used as a centralized point for all issues regarding CMaNGOS.
180 stars 47 forks source link

🐛 [BUG] ignoreM2Model allow to cast through textures #3526

Closed Eonfluxx closed 1 year ago

Eonfluxx commented 1 year ago

Bug Details

There's some checks of WorldObject::IsWithinLOSInMap that using ignoreM2Model as true. When checking casting, it always ignoring client textures, including BG and arenas. Why it should be like that? It is wrong by all means.

It is should be like at the screen, but it casting through. image

Please, explain me why it's like that.

Steps to Reproduce

1. 2. 3. 4.

Expected behavior

No response

Suggested Workaround

No response

Crash Log

No response

Core SHA1 Commit Hash

last

Database SHA1 Commit Hash

last

Operating System

win11

Client Version

2.4.3 (The Burning Crusade)

killerwife commented 1 year ago

Please tell me on map where you were testing :) This screenshot is not enough.

Eonfluxx commented 1 year ago

Please tell me on map where you were testing :) This screenshot is not enough.

.go xyz 7127 -7037 48 530 and spawn a creature behind the tree. Then try to cast any target spell.

Eonfluxx commented 1 year ago

For thix example if (m_spellInfo->HasAttribute(SPELL_ATTR_EX5_ALWAYS_LINE_OF_SIGHT) || (!IsIgnoreLosSpellCast(m_spellInfo) && !m_IsTriggeredSpell)) if (!m_trueCaster->IsWithinLOSInMap(target, true)) return SPELL_FAILED_LINE_OF_SIGHT;

In Spell.cpp should have if (!m_trueCaster->IsWithinLOSInMap(target))

killerwife commented 1 year ago

image Classic wotlk - used ranged ability through tree to kill it.

image Very much blizzlike.

Eonfluxx commented 1 year ago

Of course Blizzard did it this way to reduce the load on the servers, but it shouldn't be the case in Battlegrounds and Arenas. Casting through pillars in Nagrand Arena or stumps in Warsong is ridiculous.

insunaa commented 1 year ago

That is accurate to the source material

killerwife commented 1 year ago

Feel free to provide videos of arenas and battlegrounds with the evidence. This was super easy to check for me, but despite your reservations to the source, that is not a reason to change it in an emulation project.

insunaa commented 1 year ago

image this is on CMaNGOS. the nagrand arena is a WMO, and WMOs are not affected by the LoS ignore attribute

killerwife commented 1 year ago

Correction, they can be, but are not flagged m2.

Eonfluxx commented 1 year ago

Warsong

image

killerwife commented 1 year ago

Ok but please provide evidence it shouldnt be this way from official servers. These to my knowledge do not prevent los on official either.

insunaa commented 1 year ago

In warsong this is the correct behaviour.

miraco commented 1 year ago

No bug, thats intended video from wotlk classic https://youtu.be/GYNt6bSHSY0

Eonfluxx commented 1 year ago

I would never have believed that on the official server so. Well, thank you for the answers.