Jump to content

Sash death visual bug


Recommended Posts

  • Premium

The problem is basically the skeleton part to which they're attached to, I believe the normal servers also have this issue.

  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • 2 months later...
  • Honorable Member

A possible way to fix this issue is to change the scale of sash when the character is dead, at first I think all characters will be in the same position while laying down so adjusting the z position to -30 should do the trick and would be less weird. 

 

dk7XG3j.gif

 

@ InstanceBase.cpp
/// 1.
// Search @ void CInstanceBase::SetAcce
		m_GraphicThingInstance.SetScalePosition(fPositionX, fPositionY, fPositionZ);

// Add above
		if (IsDead())
			fPositionZ -= 30;

@ char_battle.cpp
/// 1.
// Search @ void CHARACTER::Dead
		GetDesc()->SetPhase(PHASE_DEAD);

// Add below
		LPITEM pkAcce = GetWear(WEAR_COSTUME_ACCE);
		if (pkAcce && pkAcce->IsEquipped())
			this->UpdatePacket();

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 3
Link to comment
Share on other sites

  • 1 month later...
  • Honorable Member

Yes they did, but diffent way.

807deea178.png

Spoiler

int __thiscall CGraphicThingInstance::DeformNoSkin(int this)
{
  int v1; // esi
  int result; // eax
  unsigned int v3; // edi
  unsigned int v4; // ecx
  int v5; // ecx
  int v6; // ecx
  int v7; // ecx
  int v8; // eax
  int v9; // ecx

  v1 = this;
  *(_BYTE *)(this + 604) = 1;
  result = (*(_DWORD *)(this + 684) - *(_DWORD *)(this + 680)) >> 2;
  v3 = 0;
  if ( result )
  {
    do
    {
      v4 = (*(_DWORD *)(v1 + 684) - *(_DWORD *)(v1 + 680)) >> 2;
      if ( v3 >= v4 )
        _invalid_parameter_noinfo(v4);
      result = CGrannyLODController::isModelInstance(*(_DWORD *)(*(_DWORD *)(v1 + 680) + 4 * v3));
      if ( result )
      {
        if ( v3 == 5 )
        {
          CGraphicThingInstance::RecalcAccePositionMatrixFromBoneMatrix((float *)v1);
          if ( (unsigned int)((*(_DWORD *)(v1 + 684) - *(_DWORD *)(v1 + 680)) >> 2) <= 5 )
            _invalid_parameter_noinfo(v6);
          v7 = *(_DWORD *)(*(_DWORD *)(v1 + 680) + 20);
          v8 = v1 + 380;
        }
        else
        {
          if ( v3 >= (*(_DWORD *)(v1 + 684) - *(_DWORD *)(v1 + 680)) >> 2 )
            _invalid_parameter_noinfo(v5);
          v9 = *(_DWORD *)(*(_DWORD *)(v1 + 680) + 4 * v3);
          v8 = v1 + 108;
        }
        result = CGrannyLODController::DeformNoSkin(v8);
      }
      ++v3;
    }
    while ( v3 < (*(_DWORD *)(v1 + 684) - *(_DWORD *)(v1 + 680)) >> 2 );
  }
  return result;
}

int __thiscall CGraphicThingInstance::RecalcAccePositionMatrixFromBoneMatrix(float *this)
{
  float *v1; // ebx
  int result; // eax
  float *v3; // eax
  double v4; // st7
  float *v5; // eax
  double v6; // st7
  int v7; // [esp+8h] [ebp-ACh]
  float v8; // [esp+Ch] [ebp-A8h]
  float v9; // [esp+10h] [ebp-A4h]
  float v10; // [esp+14h] [ebp-A0h]
  float v11; // [esp+18h] [ebp-9Ch]
  float v12; // [esp+1Ch] [ebp-98h]
  float v13; // [esp+20h] [ebp-94h]
  int v14; // [esp+24h] [ebp-90h]
  int v15; // [esp+28h] [ebp-8Ch]
  int v16; // [esp+2Ch] [ebp-88h]
  int v17; // [esp+30h] [ebp-84h]
  char v18; // [esp+34h] [ebp-80h]
  char v19; // [esp+74h] [ebp-40h]

  v1 = this;
  if ( !((*((_DWORD *)this + 171) - *((_DWORD *)this + 170)) >> 2) )
    _invalid_parameter_noinfo(this);
  result = CGrannyLODController::GetModelInstance(**((_DWORD **)v1 + 170));
  if ( result )
  {
    v7 = 0;
    CGrannyModelInstance::GetBoneIndexByName("Bip01 Spine2", &v7);
    v3 = (float *)CGrannyModelInstance::GetBoneMatrixPointer(v7);
    if ( v3 )
    {
      v12 = v3[12];
      v13 = v3[13];
      v4 = v3[14];
      v5 = v1 + 111;
      v11 = v4;
      v5[14] = 0.0;
      v5[13] = 0.0;
      v14 = 0;
      v5[12] = 0.0;
      v15 = 0;
      v5[11] = 0.0;
      v16 = 0;
      v5[9] = 0.0;
      v17 = 0;
      v5[8] = 0.0;
      v5[7] = 0.0;
      v5[6] = 0.0;
      v5[4] = 0.0;
      v5[3] = 0.0;
      v5[2] = 0.0;
      v5[1] = 0.0;
      v5[15] = 1.0;
      v5[10] = 1.0;
      v5[5] = 1.0;
      *v5 = 1.0;
      v8 = v12;
      v9 = v13;
      v10 = v11;
      D3DXMatrixTransformation(v1 + 111, &v8, &v14, v1 + 91, 0, 0, 0);
    }
    D3DXMatrixMultiply(&v18, v1 + 127, v1 + 111);
    result = D3DXMatrixMultiply(&v19, &v18, v1 + 10);
    v6 = v1[1];
    qmemcpy(v1 + 95, &v19, 64u);
    v1[107] = v6 + v1[107];
    v1[108] = v1[2] + v1[108];
    v1[109] = v1[3] + v1[109];
  }
  return result;
}

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.