ดาบติดขา
##.ใช้ได้Test แล้ว.##
WarZ.sln :
ค้นหา :
void CUberEquip::DrawSlot(ESlot slotId, const D3DXMATRIX& world, DrawType dt, bool skin, bool draw_firstperson, const r3dSkeleton* wpnSkeleton)
ใส่ // :
{
//if(slotId == SLOT_WeaponSide)
//return;
if(draw_firstperson)
{
if(slotId == SLOT_Armor || slotId == SLOT_LowerBody || slotId == SLOT_Head || slotId == SLOT_Helmet || slotId == SLOT_Backpack)
return;
}
ค้นหา :
if(slots_[SLOT_WeaponSide].wpn)
ทับ :
if(slots_[SLOT_WeaponSide].wpn)
{
if(slots_[SLOT_WeaponSide].wpn->getCategory() == storecat_HG) // Rolor:put handguns in side slot
{
skel->GetBoneWorldTM("Weapon_Side", &world, CharMat);
}
else if(slots_[SLOT_WeaponSide].wpn->getCategory() == storecat_MELEE) // Rolor:it is a melee weapon, put it on back but rotate it to look better (for most)
{
D3DXMATRIX mr1;
D3DXMatrixRotationYawPitchRoll(&mr1, 0, R3D_PI/2 + 40, 30);
skel->GetBoneWorldTM("Weapon_Side", &world, CharMat);
world = mr1 * world;
}
else // Rolor:it is not handgun or melee, put it on back
{
skel->GetBoneWorldTM("Weapon_Side", &world, CharMat);
}
DrawSlot(SLOT_WeaponSide, world, dt, false, first_person, NULL);
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น