AVA2 unlock P4: sash (mt_sash windows/slot/tooltips, sash module, CHR_EQUIPPART_SASH, item_scale)
Client side of metin2-server FEATURE-AVA2-UNLOCK P4: HEADER_CG_SASH 211 / HEADER_GC_SASH 215, a fifth awPart WORD in the character packets (old servers break), the sash part attached by scale per job/sex, the combine and absorb windows in script mt_sash, and quest tools/server/sash on 20016. The ava2items pack keeps the four grade-4 sashes plus their effects, acce window images and item_scale.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0d2a9ebe36
commit
4d7306792e
@@ -685,21 +685,50 @@ void CGraphicThingInstance::DeformAll()
|
||||
{
|
||||
m_bUpdated = true;
|
||||
|
||||
CGrannyLODController::FDeformAll deform;
|
||||
deform.mc_pWorldMatrix = &m_worldMatrix;
|
||||
std::for_each(m_LODControllerVector.begin(), m_LODControllerVector.end(), deform);
|
||||
D3DXMATRIX matScaled;
|
||||
for (int i = 0; i < (int)m_LODControllerVector.size(); ++i)
|
||||
{
|
||||
CGrannyLODController* pkLOD = m_LODControllerVector[i];
|
||||
if (pkLOD->isModelInstance())
|
||||
pkLOD->DeformAll(__GetPartWorldMatrix(i, matScaled));
|
||||
}
|
||||
}
|
||||
|
||||
void CGraphicThingInstance::SetPartScale(int iPart, float fX, float fY, float fZ)
|
||||
{
|
||||
D3DXMATRIX matScale;
|
||||
D3DXMatrixScaling(&matScale, fX, fY, fZ);
|
||||
m_partScaleMap[iPart] = matScale;
|
||||
}
|
||||
|
||||
void CGraphicThingInstance::ClearPartScale(int iPart)
|
||||
{
|
||||
m_partScaleMap.erase(iPart);
|
||||
}
|
||||
|
||||
const D3DXMATRIX * CGraphicThingInstance::__GetPartWorldMatrix(int iPart, D3DXMATRIX & rScaled) const
|
||||
{
|
||||
if (m_partScaleMap.empty())
|
||||
return &m_worldMatrix;
|
||||
|
||||
std::map<int, D3DXMATRIX>::const_iterator it = m_partScaleMap.find(iPart);
|
||||
if (it == m_partScaleMap.end())
|
||||
return &m_worldMatrix;
|
||||
|
||||
D3DXMatrixMultiply(&rScaled, &it->second, &m_worldMatrix);
|
||||
return &rScaled;
|
||||
}
|
||||
|
||||
void CGraphicThingInstance::DeformNoSkin()
|
||||
{
|
||||
m_bUpdated = true;
|
||||
|
||||
std::vector<CGrannyLODController*>::iterator i;
|
||||
for (i=m_LODControllerVector.begin(); i!=m_LODControllerVector.end(); ++i)
|
||||
D3DXMATRIX matScaled;
|
||||
for (int i = 0; i < (int)m_LODControllerVector.size(); ++i)
|
||||
{
|
||||
CGrannyLODController* pkLOD=*i;
|
||||
CGrannyLODController* pkLOD=m_LODControllerVector[i];
|
||||
if (pkLOD->isModelInstance())
|
||||
pkLOD->DeformNoSkin(&m_worldMatrix);
|
||||
pkLOD->DeformNoSkin(__GetPartWorldMatrix(i, matScaled));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -707,9 +736,13 @@ void CGraphicThingInstance::OnDeform()
|
||||
{
|
||||
m_bUpdated = true;
|
||||
|
||||
CGrannyLODController::FDeform deform;
|
||||
deform.mc_pWorldMatrix = &m_worldMatrix;
|
||||
std::for_each(m_LODControllerVector.begin(), m_LODControllerVector.end(), deform);
|
||||
D3DXMATRIX matScaled;
|
||||
for (int i = 0; i < (int)m_LODControllerVector.size(); ++i)
|
||||
{
|
||||
CGrannyLODController* pkLOD = m_LODControllerVector[i];
|
||||
if (pkLOD->isModelInstance())
|
||||
pkLOD->Deform(__GetPartWorldMatrix(i, matScaled));
|
||||
}
|
||||
}
|
||||
|
||||
void CGraphicThingInstance::__SetLocalTime(float fLocalTime)
|
||||
@@ -938,6 +971,7 @@ void CGraphicThingInstance::OnClear()
|
||||
{
|
||||
stl_wipe(m_LODControllerVector);
|
||||
stl_wipe_second(m_roMotionThingMap);
|
||||
m_partScaleMap.clear();
|
||||
|
||||
for (DWORD d = 0; d < m_modelThingSetVector.size(); ++d)
|
||||
m_modelThingSetVector[d].Clear();
|
||||
|
||||
Reference in New Issue
Block a user