Search: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:// 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:// 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 }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 { 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 }Change:if(!PermRecoilViewMod.AlmostEqual(r3dPoint3D(0,0,0), 0.01f)) { r3dPoint3D d = PermRecoilViewMod*0.1f; ViewAngle += d; PermRecoilViewMod -= d; }Search:/*if(!PermRecoilViewMod.AlmostEqual(r3dPoint3D(0,0,0), 0.01f)) { r3dPoint3D d = PermRecoilViewMod*0.1f; ViewAngle += d; PermRecoilViewMod -= d; }*/
Change:PermRecoilViewMod.Assign(0,0,0);
Search://PermRecoilViewMod.Assign(0,0,0);
Change:r3dVector PermRecoilViewMod; // this recoil doesn't snap back to original position
//r3dVector PermRecoilViewMod; // this recoil doesn't snap back to original position



Reply With Quote![[Tut] Alpha Recoil (adds recoil to View Angle)](http://ragezone.com/hyper728.png)

