[HELP] Third person attachments holster bug

Results 1 to 8 of 8
  1. #1
    Valued Member balazs12 is offline
    MemberRank
    Dec 2014 Join Date
    128Posts

    [HELP] Third person attachments holster bug

    Right, first of all Happy New Year everybody.

    Second there is this annoying bug with the third person attachments.So basically when you holster the weapons ( press backspace) it gets squashed to a texture on the characters back.
    What Im thinking its cause of the fps model , cause the code uses the fps model to make the attachments visible.
    NOTE: It does work with the weapons, its just buggy when its on the back :)

    Any ideas?
    Last edited by balazs12; 01-01-17 at 08:28 PM.


  2. #2
    Valued Member FrageDev is offline
    MemberRank
    Apr 2016 Join Date
    FranceLocation
    120Posts

    Re: [HELP] Third person attachments holster bug

    Quote Originally Posted by balazs12 View Post
    Right, first of all Happy New Year everybody.

    Second there is this annoying bug with the third person attachments.So basically when you holster the weapons ( press backspace) it gets squashed to a texture on the characters back.
    What Im thinking its cause of the fps model , cause the code uses the fps model to make the attachments visible.

    Any ideas?
    I have a code to make attachment visible in TPS, I tested a bit, worked well, didn't try if other ppl saw it too.
    Will extract it from a source when I will have the time, if needed, or if someone want to share is own code...

    - - - Updated - - -

    Update :

    This is the code to see attachments in TPS, not coded by me. Use WinMerge to compare this file with ISS Clean V3.
    This code is from TV2 so just focus on the big changes (top of the .cpp file).
    If I remember well you just have to change one things to fix a bug, you see shotgun ammo flying next to your weapon, juste exclude ammo ID from the function.

    https://mega.nz/#!fE9zkLoQ!ktpYh7D6IDvrekjsJjp2cz8beVf-h-Z5isrAUNuzIvk

    And thanks to this 100 messages, got the dislike button during the New Year Kappa !

  3. #3
    Account Upgraded | Title Enabled! Oosmar02 is offline
    MemberRank
    Sep 2013 Join Date
    FranceLocation
    894Posts

    Re: [HELP] Third person attachments holster bug

    Thanks for your share!
    [STRIKE]
    delete[/STRIKE]

    - - - Updated - - -

    The probleme for back is here i know:

    Code:
    if(dt != DT_AURA)
        {
            D3DXMATRIX world = getWeaponBone(skel, CharMat);
            if(!first_person)
            {
                if(slots_[SLOT_WeaponBackRight].wpn)
                {
                    skel->GetBoneWorldTM("Weapon_BackRight", &world, CharMat);
                    DrawSlot(SLOT_WeaponBackRight, world, dt, false, first_person, NULL);
                }
                if(slots_[SLOT_WeaponSide].wpn)
                {
                    skel->GetBoneWorldTM("Weapon_Side", &world, CharMat);
                    DrawSlot(SLOT_WeaponSide, world, dt, false, first_person, NULL);
                }
            }
    
            if(draw_weapon)
            {
                world = getWeaponBone(skel, CharMat);
                bool skinned = false;
                r3dSkeleton* wpnSkel = NULL;
                Weapon* wpn = slots_[SLOT_Weapon].wpn;
                if(wpn)
                {
                    r3dMesh* msh = wpn->getModel(true, first_person);
                    if(msh->IsSkeletal() && wpn->getConfig()->getSkeleton())
                    {
                        wpn->getAnimation()->Recalc();
                        wpn->getAnimation()->pSkeleton->SetShaderConstants();
                        wpnSkel = wpn->getAnimation()->pSkeleton;
                        skinned = false;
                    }
                }
                DrawSlot(SLOT_Weapon, world, dt, skinned, first_person, wpnSkel);
            }
        }

  4. #4
    Valued Member balazs12 is offline
    MemberRank
    Dec 2014 Join Date
    128Posts

    Re: [HELP] Third person attachments holster bug

    Quote Originally Posted by FrageDev View Post
    I have a code to make attachment visible in TPS, I tested a bit, worked well, didn't try if other ppl saw it too.
    Will extract it from a source when I will have the time, if needed, or if someone want to share is own code...

    - - - Updated - - -

    Update :

    This is the code to see attachments in TPS, not coded by me. Use WinMerge to compare this file with ISS Clean V3.
    This code is from TV2 so just focus on the big changes (top of the .cpp file).
    If I remember well you just have to change one things to fix a bug, you see shotgun ammo flying next to your weapon, juste exclude ammo ID from the function.

    https://mega.nz/#!fE9zkLoQ!ktpYh7D6IDvrekjsJjp2cz8beVf-h-Z5isrAUNuzIvk

    And thanks to this 100 messages, got the dislike button during the New Year Kappa !

    Thanks
    for this. But I dont think this is the problem , in TPS attachments were working perfectly its just on the back its gets squashed , when the weapon is in the slot _Backright.

    Btw could you upload weaponconfig.cpp/h aswell for that code , please.

  5. #5
    Valued Member FrageDev is offline
    MemberRank
    Apr 2016 Join Date
    FranceLocation
    120Posts

    Re: [HELP] Third person attachments holster bug

    Quote Originally Posted by balazs12 View Post
    Thanks
    for this. But I dont think this is the problem , in TPS attachments were working perfectly its just on the back its gets squashed , when the weapon is in the slot _Backright.

    Btw could you upload weaponconfig.cpp/h aswell for that code , please.
    If you are talking to me, their is no difference between orignal and the other.
    The TPS Attchement feature is available on this src :
    https://mega.nz/#!PYgTGCQB!dTLbD9LvJ...2BBdWsZ6Po1B-U

  6. #6
    Account Upgraded | Title Enabled! dNi3L is offline
    MemberRank
    Nov 2014 Join Date
    IllinoisLocation
    237Posts

    Re: [HELP] Third person attachments holster bug

    I had this issue as well,but got irritated with trying to figure it out and just commented out the holstered weapon function..I know quick and easy,but no more problem..lol..

  7. #7
    Valued Member balazs12 is offline
    MemberRank
    Dec 2014 Join Date
    128Posts

    Re: [HELP] Third person attachments holster bug

    Quote Originally Posted by dNi3L View Post
    I had this issue as well,but got irritated with trying to figure it out and just commented out the holstered weapon function..I know quick and easy,but no more problem..lol..
    Where
    is the function that does it , where backspace is bound and stuff. Cant seem to find it :D quite late aswell :D

  8. #8
    Account Upgraded | Title Enabled! dNi3L is offline
    MemberRank
    Nov 2014 Join Date
    IllinoisLocation
    237Posts

    Re: [HELP] Third person attachments holster bug

    I just commented this out in AI_Player.cpp

    if(slots_[SLOT_WeaponBackRight].wpn)
    {
    skel->GetBoneWorldTM("Weapon_BackRight", &world, CharMat);
    DrawSlot(SLOT_WeaponBackRight, world, dt, false, first_person, NULL);
    }
    if(slots_[SLOT_WeaponSide].wpn)
    {
    skel->GetBoneWorldTM("Weapon_Side", &world, CharMat);
    DrawSlot(SLOT_WeaponSide, world, dt, false, first_person, NULL);
    }



Advertisement