Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Fixing Shadows for Characters, Armors, Wings and Pets in Main 5.2 Client  (Visto 169 veces)

Lotto4K4k, Dexign, EmiOconnor, HECA, tcbaoanh, saske98 and 1 Guest are viewing this topic.

Offline zhangjianle865 Posteado: Today at 05:04:05 AM | Modificado: Today at 05:51:27 AM by zhangjianle865

  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 158
  • Gracias recibida: 229
  • ca
Let’s make the MU community active again!
Thanks to everyone who has selflessly shared their fixes in the past. I hope more people will join and contribute their solutions.



https://ibb.co/kVhk9Tx4
https://ibb.co/qM5v2rRd
https://ibb.co/LDZSh2Kz
https://ibb.co/p6xrdh0S
https://ibb.co/DHJx9W1w
https://ibb.co/0RWs1WYd
https://ibb.co/rRq6FKJK


GOBoid.cpp


Code: [Select]
ZzzCharacter.cpp

Search for:
void RenderLinkObject(float x, float y, float z, CHARACTER* c, PART_t* f, int Type, int Level, int Option1, bool Link, bool Translate, int RenderType, bool bRightHandItem)

Add the following below:
CreateSprite(BITMAP_LIGHT_MARKS, Position, fSize + 0.3f, vLight, Object, rand() % 360);
}
break;
}
if (gMapManager.WorldActive != WD_10HEAVEN &&!gMapManager.InHellas() &&!g_Direction.m_CKanturu.IsMayaScene())
{
bool handled = false;    // 标记:是否已经在 switch 里专门处理过

switch (Type)
{
//================= 各种翅膀:不带布料 =================
case MODEL_WINGS_OF_ELF:        // Wings of Elf
case MODEL_WINGS_OF_HEAVEN:     // Wings of Heaven
case MODEL_WINGS_OF_SATAN:      // Wings of Satan
case MODEL_WING_OF_CURSE:       // Wing of Curse

case MODEL_WINGS_OF_SPIRITS:    // Wings of Spirits
case MODEL_WINGS_OF_SOUL:       // Wings of Soul
case MODEL_WINGS_OF_DRAGON:     // Wings of Dragon
case MODEL_WINGS_OF_DARKNESS:   // Wings of Darkness
case MODEL_WINGS_OF_DESPAIR:    // Wings of Despair

case MODEL_WING_OF_STORM:       // Wing of Storm
case MODEL_WING_OF_ETERNAL:     // Wing of Eternal
case MODEL_WING_OF_ILLUSION:    // Wing of Illusion
case MODEL_WING_OF_RUIN:        // Wing of Ruin
case MODEL_WING_OF_DIMENSION:   // Wing of Dimension

case MODEL_WING + 131:          // Small Wing of Curse
case MODEL_WING + 132:          // Small Wings of Elf
case MODEL_WING + 133:          // Small Wings of Heaven
case MODEL_WING + 134:          // Small Wings of Satan
b->RenderBodyShadow();      // 普通阴影
handled = true;
break;

//================= 披风:带物理布料的阴影 =================
case MODEL_CAPE_OF_LORD:        // Cape of Lord
case MODEL_CAPE_OF_FIGHTER:     // Cape of Fighter
case MODEL_CAPE_OF_EMPEROR:     // Cape of Emperor
case MODEL_CAPE_OF_OVERRULE:    // Cape of Overrule
case MODEL_WING + 130:          // Small Cape of Lord
case MODEL_WING + 135:          // Little Warrior's Cloak
b->RenderBodyShadow(-1, -1, -1, -1, o->m_pCloth, o->m_byNumCloth);
handled = true;
break;
}

//================= 默认情况(武器 / 盾牌 / 防具 / 其它) =================
if (!handled)
{
// 如果这个模型有布料,就按披风那套画,不然就普通阴影
if (o->m_pCloth && o->m_byNumCloth > 0)
{
b->RenderBodyShadow(-1, -1, -1, -1, o->m_pCloth, o->m_byNumCloth);
}
else
{
b->RenderBodyShadow();
}
}
}




Code: [Select]
ZzzCharacter.cpp

Search for:
void RenderCharacter(CHARACTER* c, OBJECT* o, int Select)

Find the block:
if (o->Alpha >= 0.5f && c->HideShadow == false)

Replace the entire block with your fixed shadow logic.

if (o->Alpha >= 0.5f && c->HideShadow == false)
{
if (gMapManager.WorldActive != WD_10HEAVEN&& (o->Type == MODEL_PLAYER)&& gMapManager.InHellas() == false)
{
if (gMapManager.InBloodCastle() && o->m_bActionStart && c->Dead > 0)
{
float height = RequestTerrainHeight(o->Position[0], o->Position[1]);
if (height < o->Position[2])
{
o->Position[2] = height;
}
}
o->EnableShadow = true;
for (int i = MAX_BODYPART - 1; i >= 0; i--)
{
PART_t* p = &c->BodyPart[i];
if (p->Type != -1)
{
int Type = p->Type;

RenderPartObject(&c->Object, Type, p, c->Light, o->Alpha, 0, 0, 0, false, false, Translate);
}
else
{
RenderPartObject(&c->Object, MODEL_SHADOW_BODY, NULL, c->Light, o->Alpha, 0, 0, 0, false, false, Translate);
}
}

o->EnableShadow = false;
}
}

Of course, you can also add a shadow toggle option to the Settings menu (opened with the O key).


Offline coolgepds #1 Posteado: Today at 06:18:47 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 88
  • Gracias recibida: 41
  • cn
Como faço para substituir e adicionar itens? Adicionei algo aqui, mas recebi um erro.


Offline bigrealtk92 #2 Posteado: Today at 06:22:43 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 83
  • Gracias recibida: 19
  • vn

Online Lotto4K4k #3 Posteado: Today at 06:43:28 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 12
  • Gracias recibida: 3
  • br
 cryy2Your contribution is really good, but it's a bit confusing where some parts of the code fit in.


Offline nhantac #4 Posteado: Today at 07:26:45 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 89
  • Gracias recibida: 141
  • vn

Offline muccone #5 Posteado: Today at 07:51:35 AM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 54
  • Gracias recibida: 186
  • tw
Telegram Account :@mucone    develop Mu

Offline zpzwb113 #6 Posteado: Today at 08:29:50 AM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 42
  • Gracias recibida: 32
  • cn

Offline c4nhsatcodong #7 Posteado: Today at 11:57:08 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 374
  • Gracias recibida: 2438
  • vn
Publicar un anuncio Mu Online gratis - Mu Online Community GRATIS.
Post free Mu Online ads - FREE Mu Online Community
https://www.facebook.com/groups/274190243227367/
https://www.facebook.com/groups/435291436622354/

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
35 Replies
6711 Views
Last post May 16, 2021, 05:21:10 PM
by daimer
7 Replies
7917 Views
Last post February 09, 2022, 07:07:00 AM
by skinmuonline
2 Replies
528 Views
Last post June 06, 2021, 01:45:38 AM
by phantrungloi
2 Replies
1309 Views
Last post May 28, 2024, 12:29:00 PM
by Matt1995
2 Replies
2057 Views
Last post January 21, 2023, 08:10:26 PM
by kayito