forked from metin-server/m2dev-client-src
MR-5: FlyTarget fixes
This commit is contained in:
@@ -13,7 +13,6 @@ This repository contains the source code necessary to compile the game client ex
|
||||
## 📋 Changelog
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
* **Shaman Mounted Combat:** Fixed a bug that wrongly calculated Shaman characters mounted hits that didn't collide with the target to cause damage when attack speed was had an extremely high value.
|
||||
* **Invisibility VFX Logic:** Fixed an issue where skill visual effects remained visible to the character while under the `AFFECT_INVISIBLE` state.
|
||||
* **Buff Effects Visibility Recovery:** Fixed an issue where buff skill visual effects remained invisible if the skill was cast while the character was under the `AFFECT_INVISIBLE` state.
|
||||
* **Casting Speed Cooldowns:** Fixed an issue where Casting Speed was not properly calculated in skill cooldowns. The system now supports real-time calculation updates whenever the bonus value changes.
|
||||
* **Debug mode:** Fly effects are now registering when using Debug mode.
|
||||
* **Fix effect rendering in low opacity models:** Effects now appear normally on semi-transparent meshes.
|
||||
* **Fly targeting fixed for buff/healing skills:** Fixed an issue where fly target effect would render in the buffer's selected target even if the target was unbuffable (if viewing from another client).
|
||||
|
||||
@@ -351,6 +351,17 @@ void CEffectManager::HideEffect()
|
||||
m_pSelectedEffectInstance->Hide();
|
||||
}
|
||||
|
||||
// MR-5: Fix effect rendering when actor is semi-transparent
|
||||
// Credits to d1str4ught
|
||||
void CEffectManager::RenderEffect()
|
||||
{
|
||||
if (!m_pSelectedEffectInstance)
|
||||
return;
|
||||
|
||||
m_pSelectedEffectInstance->Render();
|
||||
}
|
||||
// MR-5: -- END OF -- Fix effect rendering when actor is semi-transparent
|
||||
|
||||
void CEffectManager::ApplyAlwaysHidden()
|
||||
{
|
||||
if (!m_pSelectedEffectInstance)
|
||||
|
||||
@@ -56,6 +56,10 @@ class CEffectManager : public CScreen, public CSingleton<CEffectManager>
|
||||
|
||||
void ShowEffect();
|
||||
void HideEffect();
|
||||
// MR-5: Fix effect rendering when actor is semi-transparent
|
||||
// Credits to d1str4ught
|
||||
void RenderEffect();
|
||||
// MR-5: -- END OF -- Fix effect rendering when actor is semi-transparent
|
||||
|
||||
void ApplyAlwaysHidden();
|
||||
void ReleaseAlwaysHidden();
|
||||
|
||||
@@ -32,6 +32,18 @@ void CActorInstance::SetMaterialAlpha(DWORD dwAlpha)
|
||||
|
||||
void CActorInstance::OnRender()
|
||||
{
|
||||
// MR-5: Fix effect rendering when actor is semi-transparent
|
||||
// Credits to d1str4ught
|
||||
if (GetAlphaValue() < 1.0f)
|
||||
{
|
||||
for (auto it = m_AttachingEffectList.begin(); it != m_AttachingEffectList.end(); ++it)
|
||||
{
|
||||
CEffectManager::Instance().SelectEffectInstance(it->dwEffectIndex);
|
||||
CEffectManager::Instance().RenderEffect();
|
||||
}
|
||||
}
|
||||
// MR-5: -- END OF -- Fix effect rendering when actor is semi-transparent
|
||||
|
||||
D3DMATERIAL9 kMtrl;
|
||||
STATEMANAGER.GetMaterial(&kMtrl);
|
||||
|
||||
|
||||
@@ -147,9 +147,9 @@ namespace NMotionEvent
|
||||
isFishingEffect = FALSE;
|
||||
}
|
||||
dwEffectIndex = GetCaseCRC32(strEffectFileName.c_str(), strEffectFileName.length());
|
||||
#ifndef _DEBUG
|
||||
// #ifndef _DEBUG
|
||||
CEffectManager::Instance().RegisterEffect(strEffectFileName.c_str());
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -188,10 +188,10 @@ namespace NMotionEvent
|
||||
return false;
|
||||
dwFlyIndex = GetCaseCRC32(strFlyFileName.c_str(), strFlyFileName.length());
|
||||
|
||||
#ifndef _DEBUG
|
||||
// #ifndef _DEBUG
|
||||
// Register Fly
|
||||
CFlyingManager::Instance().RegisterFlyingData(strFlyFileName.c_str());
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1142,10 +1142,38 @@ bool CPythonNetworkStream::SendCharacterStatePacket(const TPixelPosition& c_rkPP
|
||||
// NOTE : SlotIndex는 임시
|
||||
bool CPythonNetworkStream::SendUseSkillPacket(DWORD dwSkillIndex, DWORD dwTargetVID)
|
||||
{
|
||||
// tw1x1 fix wrong fly targeting for viewing clients
|
||||
if (dwTargetVID)
|
||||
{
|
||||
CPythonCharacterManager& rpcm = CPythonCharacterManager::Instance();
|
||||
CInstanceBase* pTarget = rpcm.GetInstancePtr(dwTargetVID);
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
TPixelPosition kPos;
|
||||
|
||||
pTarget->NEW_GetPixelPosition(&kPos);
|
||||
SendFlyTargetingPacket(dwTargetVID, kPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
TPixelPosition kPos;
|
||||
|
||||
kPos.x = 0;
|
||||
kPos.y = 0;
|
||||
kPos.z = 0;
|
||||
|
||||
SendFlyTargetingPacket(0, kPos);
|
||||
}
|
||||
}
|
||||
// END OF tw1x1 fix wrong fly targeting for viewing clients
|
||||
|
||||
TPacketCGUseSkill UseSkillPacket;
|
||||
|
||||
UseSkillPacket.bHeader = HEADER_CG_USE_SKILL;
|
||||
UseSkillPacket.dwVnum = dwSkillIndex;
|
||||
UseSkillPacket.dwTargetVID = dwTargetVID;
|
||||
|
||||
if (!Send(sizeof(TPacketCGUseSkill), &UseSkillPacket))
|
||||
{
|
||||
Tracen("CPythonNetworkStream::SendUseSkillPacket - SEND PACKET ERROR");
|
||||
|
||||
Reference in New Issue
Block a user