Jump to content

[Zero]Falling through the world?


Xenithar
 Share

Recommended Posts

This appears to be a warrior-only issue where when charging, whether on flat land or not, you charge through the floor/ground and fall to your death. This also happened during combat a few minutes later, without the use of charge. So far this only happens to warriors. What's up with that?

Link to comment
Share on other sites

It's an old bug that has plagued MaNGOS for years, but things have gotten better. It used to be that Mage Blink, Rogue Shadowstep, and Warrior Charge all three were affected equally. I know Blink received the most attention in fixing this trouble and, to my knowledge, has supposedly been fixed for a while.

You might want to post this one in the Bug Reports section, especially since using mmaps and vmaps together would otherwise prevent this.

I know some custom forks used checks to prevent fall-throughs. You may find an applicable patch in an older commit from one of them.

Here's an old patch for 3.3.5a I have gathering dust on my hard drive that was intended to prevent fall-through with a call to vmaps to do a check when "leaping forward" with spells like Blink, Charge, Shadowstep. It's intended to replace the code in module [em]void Spell::EffectLeapForward(SpellEffectIndex eff_idx)[/em] inside SpellEffects.cpp:

void Spell::EffectLeapForward(SpellEffectIndex eff_idx)

{

if(unitTarget->IsTaxiFlying())

return;

if( m_spellInfo->rangeIndex == 1) //self range

{

float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[eff_idx]));

// before caster

float fx, fy, fz;

unitTarget->GetClosePoint(fx, fy, fz, unitTarget->GetObjectBoundingRadius(), dis);

float ox, oy, oz;

unitTarget->GetPosition(ox, oy, oz);

float fx2, fy2, fz2; // getObjectHitPos overwrite last args in any result case

if(VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(unitTarget->GetMapId(), ox,oy,oz+0.5f, fx,fy,oz+0.5f,fx2,fy2,fz2, -0.5f))

{

fx = fx2;

fy = fy2;

fz = fz2;

}

if(!unitTarget->IsInWater())

fz = m_caster->GetBaseMap()->GetHeight(fx,fy,fz,true);

else

fz = m_caster->GetMap()->GetWaterLevel(fx,fy);

if (fabs(fz-oz) > 4.0f)

{

fx = ox;

fy = oy;

fz = oz;

}

unitTarget->NearTeleportTo(fx, fy, fz, unitTarget->GetOrientation(),unitTarget==m_caster);

}

}

Please be aware that this code may now be incompatible or not work as intended with the current MaNGOS cores, vmaps, or movemaps.

My apologies to the original author for not remembering his name. This was a copy/paste job I did from a commit I found in a Github repo. I think it was prezmaratjaczk... and I know I'm probably spelling his name incorrectly.

Since my C++ programming studies have not progressed much past the "Hello world!" stage (and likely won't for a while), this is the best I can offer. I hope it helps.

Link to comment
Share on other sites

  • 2 weeks later...
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use