mosinrecoil.c 1.4 KB

12345678910111213141516171819202122232425262728
  1. class MosinRecoil: RecoilBase
  2. {
  3. override void Init()
  4. {
  5. vector point_1;
  6. vector point_2;
  7. vector point_3;
  8. vector point_4;
  9. point_1[0] = m_Player.GetRandomGeneratorSyncManager().GetRandomInRange(RandomGeneratorSyncUsage.RGSRecoil,0.5,0.75); point_1[1] = 2.5; point_1[2] = 0;
  10. point_2[0] = m_Player.GetRandomGeneratorSyncManager().GetRandomInRange(RandomGeneratorSyncUsage.RGSRecoil,-0.25,0.25); point_2[1] = 2.75; point_2[2] = 0;
  11. point_3[0] = m_Player.GetRandomGeneratorSyncManager().GetRandomInRange(RandomGeneratorSyncUsage.RGSRecoil,-0.5,-0.75); point_3[1] = 1.75; point_3[2] = 0;
  12. point_4[0] = m_Player.GetRandomGeneratorSyncManager().GetRandomInRange(RandomGeneratorSyncUsage.RGSRecoil,-0.5,-0.1); point_4[1] = 0.75; point_4[2] = 0;
  13. m_HandsCurvePoints.Insert(point_1);//forms a 2 dimensional spline(z is ignored)
  14. m_HandsCurvePoints.Insert(point_2);
  15. m_HandsCurvePoints.Insert(point_3);
  16. m_HandsCurvePoints.Insert(point_4);
  17. m_HandsCurvePoints.Insert("0 0 0");
  18. m_HandsOffsetRelativeTime = 0.125;
  19. m_MouseOffsetRangeMin = 80;//in degrees min
  20. m_MouseOffsetRangeMax = 100;//in degrees max
  21. m_MouseOffsetDistance = 1.8;//how far should the mouse travel
  22. m_MouseOffsetRelativeTime = 0.0625;//[0..1] a time it takes to move the mouse the required distance relative to the reload time of the weapon(firing mode)
  23. m_CamOffsetDistance = 0.02;
  24. m_CamOffsetRelativeTime = 0.125;
  25. }
  26. }