[Tut] Alpha Recoil (adds recoil to View Angle)

Results 1 to 1 of 1
  1. #1
    Apprentice xDos is offline
    MemberRank
    Jun 2016 Join Date
    15Posts

    thumbs up [Tut] Alpha Recoil (adds recoil to View Angle)

    Search:
    // BEGIN SPREAD\RECOIL LOGIC /*if(!m_isPressedFireTrigger) // if user let go of trigger, start return recoil back to normal right away, so that it doesn't linger at the top for a second or two after stopping firing { if(wpn->getCategory() != storecat_SNP) { RecoilCooldown = 0; } }*/ //Cynthia: 233 comment this block to bring recoil back when in single mode.
    Change:
    // BEGIN SPREAD\RECOIL LOGIC if(!m_isPressedFireTrigger) // if user let go of trigger, start return recoil back to normal right away, so that it doesn't linger at the top for a second or two after stopping firing { if(wpn->getCategory() != storecat_SNP) { RecoilCooldown = 0; } } //Cynthia: 233 comment this block to bring recoil back when in single mode.
    Search:
    // in prone, have recoil snap back to original aim if(PlayerState>=PLAYER_MOVE_PRONE && PlayerState<=PLAYER_PRONE_IDLE) { RecoilViewModTarget.y += recoil * u_GetRandom(0.85f, 1.75f); if(RecoilViewModTarget.y > GPP->c_MaxVerticalRecoil) // limit how much gun goes up { RecoilViewModTarget.y = u_GetRandom(GPP->c_MaxVerticalRecoil*0.95f, GPP->c_MaxVerticalRecoil*1.1f); } RecoilViewModTarget.x += recoil*u_GetRandom(-0.15f, 0.3f); // + to a side } else // otherwise player has to put aim back manually { PermRecoilViewMod.y += recoil * u_GetRandom(0.85f, 1.75f); if(PermRecoilViewMod.y > GPP->c_MaxVerticalRecoil) // limit how much gun goes up { PermRecoilViewMod.y = u_GetRandom(GPP->c_MaxVerticalRecoil*0.95f, GPP->c_MaxVerticalRecoil*1.1f); } PermRecoilViewMod.x += recoil*u_GetRandom(-0.15f, 0.3f); // + to a side }
    Change:
    // in prone, have recoil snap back to original aim if(PlayerState>=PLAYER_MOVE_PRONE && PlayerState<=PLAYER_PRONE_IDLE) { RecoilViewModTarget.y += recoil * u_GetRandom(0.85f, 1.75f); if(RecoilViewModTarget.y > GPP->c_MaxVerticalRecoil) // limit how much gun goes up { RecoilViewModTarget.y = u_GetRandom(GPP->c_MaxVerticalRecoil*0.95f, GPP->c_MaxVerticalRecoil*1.1f); } RecoilViewModTarget.x += recoil*u_GetRandom(-0.15f, 0.3f); // + to a side } else // otherwise player has to put aim back manually { RecoilViewModTarget.y += recoil * u_GetRandom(0.85f, 1.75f); //M.Genc:: Alpha recoil if(RecoilViewModTarget.y > GPP->c_MaxVerticalRecoil) // limit how much gun goes up { RecoilViewModTarget.y = u_GetRandom(GPP->c_MaxVerticalRecoil*0.95f, GPP->c_MaxVerticalRecoil*1.1f); } RecoilViewModTarget.x += recoil*u_GetRandom(-0.15f, 0.3f); // + to a side }
    Search:
    if(!PermRecoilViewMod.AlmostEqual(r3dPoint3D(0,0,0), 0.01f)) { r3dPoint3D d = PermRecoilViewMod*0.1f; ViewAngle += d; PermRecoilViewMod -= d; }
    Change:
    /*if(!PermRecoilViewMod.AlmostEqual(r3dPoint3D(0,0,0), 0.01f)) { r3dPoint3D d = PermRecoilViewMod*0.1f; ViewAngle += d; PermRecoilViewMod -= d; }*/
    Search:

    PermRecoilViewMod.Assign(0,0,0);
    Change:

    //PermRecoilViewMod.Assign(0,0,0);
    Search:

    r3dVector PermRecoilViewMod; // this recoil doesn't snap back to original position
    Change:

    //r3dVector PermRecoilViewMod; // this recoil doesn't snap back to original position




Advertisement