[tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Enthusiast xingbarking is offline
    MemberRank
    Apr 2008 Join Date
    27Posts

    happy [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    open Weapon.cpp
    Code:
    r3dMesh* WeaponConfig::getMesh( bool allow_async_loading, bool first_person ) const
    {
    	extern bool g_bEditMode;
    	if(!g_bEditMode) // do not check this in editor to allow artists to test models without changing DB
    		if(!IsFPS)
    			first_person = false;
    
    	if( first_person )
    	{
    		if(m_Model_FPS == 0)
    		{
    
    #ifndef FINAL_BUILD
    			if(g_bEditMode && !r3dFileExists(m_ModelPath_1st))
    			{
    				char buf[128];
    				sprintf(buf, "FPS model isn't available for %s", FNAME);
    				MessageBox(NULL, buf, "Warning", MB_OK);
    				m_Model_FPS = m_Model;
    			}
    			else
    #endif
    			{
    				m_Model_FPS = r3dGOBAddMesh(m_ModelPath_1st, true, false, allow_async_loading, true );
    				if(m_Model_FPS==0)
    				{
    					r3dError("ART: failed to load mesh '%s'\n", m_ModelPath_1st);
    				}
    				r3d_assert(m_Model_FPS);
    			}
    		}
    
    		return m_Model_FPS;
    	}
    
    	r3d_assert( m_Model ) ;
    
    	return m_Model;
    }
    change it
    m_Model_FPS = r3dGOBAddMesh(m_ModelPath_1st, true, false, allow_async_loading, true );
    if(m_Model_FPS==0)
    {
    r3dError("ART: failed to load mesh '%s'\n", m_ModelPath_1st);
    }
    r3d_assert(m_Model_FPS);

    return m_Model_FPS;
    2.
    Code:
    	R3DPROFILE_FUNCTION("Weapon::Update");
    	
    	obj_Player* player = (obj_Player*)m_Owner;
    	if(!m_isMeshLoaded)
    	{
    		m_isMeshLoaded = isLoaded();
    		if(m_isMeshLoaded)
    		{
    			m_pConfig->updateMuzzleOffset(g_camera_mode->GetInt()==2 && player->NetworkLocal);
    			if(g_camera_mode->GetInt()==2 && player->NetworkLocal)
    				checkForSkeleton();
    		}
    	}
    change :
    Code:
    			m_pConfig->updateMuzzleOffset(g_camera_mode->GetInt()==2 && player->NetworkLocal);
    			//if(g_camera_mode->GetInt()==2 && player->NetworkLocal)
    				checkForSkeleton();
    Last edited by xingbarking; 03-11-17 at 02:39 AM.


  2. #2
    Enthusiast italofialho is offline
    MemberRank
    Apr 2014 Join Date
    40Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    I could not understand what you said to do in the first part that you say to change!You could post how was your code? Thank you

  3. #3
    failed in javascript ItzFdr is offline
    MemberRank
    May 2013 Join Date
    BrasilLocation
    293Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    Quote Originally Posted by italofialho View Post
    I could not understand what you said to do in the first part that you say to change!You could post how was your code? Thank you
    Really? You have to replace everyting (already tested)... So hard to read?

    Btw, hammerpoint is big crap, can even make good item models ^^


    Last edited by ItzFdr; 17-10-15 at 12:13 AM.

  4. #4
    Banned Karti is offline
    BannedRank
    May 2015 Join Date
    10Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    Quote Originally Posted by fdrgamer View Post
    Really? You have to replace everyting (already tested)... So hard to read?

    Btw, hammerpoint is big crap, can even make good item models ^^



    They do..

    You just used wrong model to load in the tps....

    use _FPS model not _AIM model...

  5. #5
    Apprentice lastmuonline is offline
    MemberRank
    Sep 2014 Join Date
    16Posts

    sad Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    //delete
    Last edited by lastmuonline; 07-11-15 at 04:18 PM.

  6. #6
    Valued Member Doky is offline
    MemberRank
    Oct 2014 Join Date
    BrazilLocation
    127Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    don't work :(


  7. #7
    Enthusiast Italo Salazar is offline
    MemberRank
    Jun 2013 Join Date
    43Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    I did not understand the first part.

  8. #8
    Member kukk1 is offline
    MemberRank
    Dec 2015 Join Date
    Cold NorthLocation
    67Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    Open weapon.cpp? Auehaueu.
    Just replace the first code with the second. However this won't work 100% as bones etc aren't made for this. It does show attachments, but not perfectly if I remember correctly.
    Last edited by kukk1; 22-11-16 at 09:03 PM.

  9. #9
    Apprentice Tobiasxc12345 is offline
    MemberRank
    Dec 2014 Join Date
    16Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    Gang gang gang!
    Last edited by Tobiasxc12345; 21-04-17 at 12:29 AM.

  10. #10
    Member zsh7954 is offline
    MemberRank
    May 2016 Join Date
    81Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    Players can not see that in addition to the muzzle of the accessories, I will take a picture.

    - - - Updated - - -

    I will bring the picture below.
    Attached Thumbnails Attached Thumbnails i-see.png   others-see..jpg   weapons-on-my-back..png  

  11. #11
    Apprentice Tobiasxc12345 is offline
    MemberRank
    Dec 2014 Join Date
    16Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    Gang gang gang!
    Last edited by Tobiasxc12345; 21-04-17 at 12:29 AM.

  12. #12
    Member zsh7954 is offline
    MemberRank
    May 2016 Join Date
    81Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    I follow your tutorial, but he doesn't have any effect.
    Quote Originally Posted by Tobiasxc12345 View Post
    I dont know why I do this for you...

    But here you got the solution of your problem:

    Go open WarZ.Sln

    Code:
    Search for:
    
    slot.Attachment[0].attachments[WPN_ATTM_MUZZLE]    = n.Attm0.MuzzleID;
    
    in ClientGameLogic.cpp
    
    EXAMPLE:
    replace all slot.Attachment[0].attachments[..........] = n...........; & slot.Attachment[1].attachments[..........] = n...........;
    
    NOW LET IT LOOKS LIKE THIS HERE:
    
            slot.Attachment[0].attachments[WPN_ATTM_MUZZLE]    = n.Attm0.MuzzleID;
            slot.Attachment[0].attachments[WPN_ATTM_LEFT_RAIL] = n.Attm0.LeftRailID;
            slot.Attachment[0].attachments[WPN_ATTM_UPPER_RAIL] = n.Attm0.UpperRailID;
            slot.Attachment[0].attachments[WPN_ATTM_BOTTOM_RAIL] = n.Attm0.BottomRailID;
            slot.Attachment[0].attachments[WPN_ATTM_CLIP] = n.Attm0.ClipID;
            slot.Attachment[1].attachments[WPN_ATTM_MUZZLE]    = n.Attm1.MuzzleID;
            slot.Attachment[1].attachments[WPN_ATTM_LEFT_RAIL] = n.Attm1.LeftRailID;
            slot.Attachment[1].attachments[WPN_ATTM_UPPER_RAIL] = n.Attm1.UpperRailID;
            slot.Attachment[1].attachments[WPN_ATTM_BOTTOM_RAIL] = n.Attm1.BottomRailID;
            slot.Attachment[1].attachments[WPN_ATTM_CLIP] = n.Attm1.ClipID;
    Code:
    Search for:
    
    CurLoadout.Attachment[n.wid].attachments[WPN_ATTM_MUZZLE]    = n.Attm.MuzzleID;
    
    in AI_Player.cpp
    
    replace it again and let it looks like:
    
            CurLoadout.Attachment[n.wid].attachments[WPN_ATTM_MUZZLE]    = n.Attm.MuzzleID;
        CurLoadout.Attachment[n.wid].attachments[WPN_ATTM_LEFT_RAIL] = n.Attm.LeftRailID;
        CurLoadout.Attachment[n.wid].attachments[WPN_ATTM_UPPER_RAIL]    = n.Attm.UpperRailID;
        CurLoadout.Attachment[n.wid].attachments[WPN_ATTM_BOTTOM_RAIL]    = n.Attm.BottomRailID;
        CurLoadout.Attachment[n.wid].attachments[WPN_ATTM_CLIP]    = n.Attm.ClipID;
    Code:
    Search for:
    
    struct wiNetWeaponAttm
    
    in P2PMessages.h
    
    replace the hole function with:
    
    struct wiNetWeaponAttm
    {
        DWORD        LeftRailID;
        DWORD        MuzzleID;
        DWORD        UpperRailID;
        DWORD        BottomRailID;
        DWORD        ClipID;
        
        wiNetWeaponAttm()
        {
          LeftRailID = 0;
          MuzzleID   = 0;
          UpperRailID = 0;
          BottomRailID = 0;
          ClipID = 0;
        }
    };
    Now go open WarZ_Server.Sln

    Code:
    Search for:
    
    wiNetWeaponAttm    obj_ServerPlayer::GetWeaponNetAttachment(int wid)
    
    in obj_ServerPlayer.cpp
    
    replace the hole function with:
    
    wiNetWeaponAttm    obj_ServerPlayer::GetWeaponNetAttachment(int wid)
    {
        wiNetWeaponAttm atm;
        
        const ServerWeapon* wpn = m_WeaponArray[wid];
        if(!wpn)
            return atm;
        
        if(wpn->m_Attachments[WPN_ATTM_LEFT_RAIL])
            atm.LeftRailID = wpn->m_Attachments[WPN_ATTM_LEFT_RAIL]->m_itemID;
        if(wpn->m_Attachments[WPN_ATTM_MUZZLE])
            atm.MuzzleID = wpn->m_Attachments[WPN_ATTM_MUZZLE]->m_itemID;
        if(wpn->m_Attachments[WPN_ATTM_UPPER_RAIL])
            atm.UpperRailID = wpn->m_Attachments[WPN_ATTM_UPPER_RAIL]->m_itemID;
        if(wpn->m_Attachments[WPN_ATTM_BOTTOM_RAIL])
            atm.BottomRailID = wpn->m_Attachments[WPN_ATTM_BOTTOM_RAIL]->m_itemID;
        if(wpn->m_Attachments[WPN_ATTM_CLIP])
            atm.ClipID = wpn->m_Attachments[WPN_ATTM_CLIP]->m_itemID;
    
    
        return atm;
    }
    - - - Updated - - -

    And I have a gun in the shape of the problem.

    - - - Updated - - -

    I will attach a picture.
    Attached Thumbnails Attached Thumbnails qqjie-tu-20161126102935.png  

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

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments


  14. #14
    Apprentice Tobiasxc12345 is offline
    MemberRank
    Dec 2014 Join Date
    16Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    @zsh7954

    I don't know what you did wrong... but its not the fault of my tutorials...


  15. #15
    Member zsh7954 is offline
    MemberRank
    May 2016 Join Date
    81Posts

    Re: [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

    Well, I don't seem to be using it. Thank you for giving me the tutorial. In a word, thank you very much.
    Quote Originally Posted by Tobiasxc12345 View Post
    @zsh7954

    I don't know what you did wrong... but its not the fault of my tutorials...




Page 1 of 2 12 LastLast

Advertisement