Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. #pragma once
  2. #include <array>
  3.  
  4. /*
  5.  
  6. namespace sdk
  7. {
  8. class CUserCmd;
  9. class CBaseEntity;
  10. class CBaseWeapon;
  11. class tickrecord_t {
  12. public:
  13. float _lowerbody_yaw;
  14. float _yaw;
  15. float _simulation_time;
  16. int _tickbase;
  17. int _flags;
  18. float _pitch;
  19. Vector _velocity;
  20.  
  21.  
  22. tickrecord_t() {}
  23.  
  24. tickrecord_t(CBaseEntity* entity) {
  25. _lowerbody_yaw = entity->GetLowerBodyYaw();
  26. _yaw = entity->GetEyeAngles().y;
  27. _simulation_time = entity->GetSimTime();
  28. _tickbase = entity->GetTickBase();
  29. _flags = entity->GetFlags();
  30. _velocity = entity->GetVelocity();
  31.  
  32. }
  33.  
  34. tickrecord_t(CBaseEntity* entity, float yaw) {
  35. _lowerbody_yaw = entity->GetLowerBodyYaw();
  36. _yaw = yaw;
  37.  
  38. _simulation_time = entity->GetSimTime();
  39. _tickbase = entity->GetTickBase();
  40. _flags = entity->GetFlags();
  41. _velocity = entity->GetVelocity();
  42.  
  43. }
  44. };
  45. }
  46.  
  47. struct Info
  48. {
  49. Info() {}
  50.  
  51. sdk::CAnimationLayer backup_layer, prev_layer;
  52. Vector last_lby, inverse, inverse_right, inverse_left, lby, back, left, right, backtrack;
  53. float stored_simtime, last_move_time, pre_anim_lby;
  54. int last_ammo;
  55. bool breaking_lby, reset_state, could_be_faking;
  56. std::vector<float> unresolved_yaw, lby_deltas;
  57.  
  58. bool lby_changed;
  59. bool could_be_slowmo;
  60. bool is_moving;
  61. bool is_jumping;
  62. bool is_crouching;
  63. bool lby_updated;
  64. bool using_fake_angles;
  65. float last_moving_lby;
  66. float stored_lby;
  67. float next_lby_update_time;
  68. int stored_missed;
  69. };
  70.  
  71. class CResolver
  72. {
  73. public:
  74. Info player_info[65];
  75. float lby_delta(sdk::CBaseEntity* entity);
  76. bool lby_delta_found(sdk::CBaseEntity* entity);
  77. void record(sdk::CBaseEntity * entity, float new_yaw);
  78. void resolve(sdk::CBaseEntity* entity);
  79. void lby_update_checks(sdk::CBaseEntity*, sdk::tickrecord_t, sdk::tickrecord_t);
  80. bool lowerBodyYawUpdated(sdk::CBaseEntity* entity);
  81. bool IsBreakingLBY120(sdk::CBaseEntity* entity);
  82. bool IsResolvableByLBY(sdk::CBaseEntity* entity);
  83. bool playerStoppedMoving(sdk::CBaseEntity* entity);
  84. void perform_delta_checks(sdk::CBaseEntity* entity, sdk::tickrecord_t _previous, sdk::tickrecord_t _current);
  85. float moving_lby(sdk::CBaseEntity* entity);
  86.  
  87. bool can_backtrack(sdk::CBaseEntity* entity);
  88. bool breaking_lby(sdk::CBaseEntity* entity);
  89. void reset(int idx)
  90. {
  91.  
  92. backtrack1[idx] = false;
  93. unresolved[idx] = false;
  94. }
  95.  
  96. };
  97.  
  98. extern CResolver* resolver;*/
  99.  
  100. namespace sdk
  101. {
  102. class CUserCmd;
  103. class CBaseEntity;
  104. class CBaseWeapon;
  105. }
  106.  
  107. struct STickRecord {
  108.  
  109. bool operator==(STickRecord &other) {
  110. return other.m_flSimulationTime == m_flSimulationTime;
  111. }
  112.  
  113. float m_flVelocity = 0.f;
  114. Vector m_vecVelocity = Vector(0, 0, 0);
  115. float m_flSimulationTime = 0.f;
  116. float m_flLowerBodyYawTarget = 0.f;
  117. QAngle m_angEyeAngles = QAngle(0, 0, 0);
  118. std::array<float, 24> m_flPoseParameter = {};
  119. float m_flCurTime = 0.f;
  120. int m_nFlags = 0;
  121.  
  122. int m_iLayerCount = 0;
  123. sdk::CAnimationLayer animationLayer[15];
  124. };
  125.  
  126. struct Info
  127. {
  128. Info() {}
  129.  
  130. sdk::CAnimationLayer backup_layer, prev_layer;
  131. Vector last_lby, inverse, inverse_right, inverse_left, lby, back, left, right, backtrack;
  132. float stored_simtime, last_move_time, pre_anim_lby;
  133. int last_ammo;
  134. bool breaking_lby, reset_state, could_be_faking;
  135. std::vector<float> unresolved_yaw, lby_deltas;
  136.  
  137. bool lby_changed;
  138. bool could_be_slowmo;
  139. bool is_moving;
  140. bool is_jumping;
  141. bool is_crouching;
  142. bool lby_updated;
  143. bool using_fake_angles;
  144. float last_moving_lby;
  145. float stored_lby;
  146. float next_lby_update_time;
  147. int stored_missed;
  148. };
  149.  
  150. class CResolver
  151. {
  152. public:
  153. Info player_info[65];
  154. void record(sdk::CBaseEntity * entity, float new_yaw);
  155. bool breaking_lby(sdk::CBaseEntity * entity);
  156. void Experimental(sdk::CBaseEntity * entity);
  157. void Default(sdk::CBaseEntity * entity);
  158. void Nospread(sdk::CBaseEntity* player, int entID);
  159. void resolve(sdk::CBaseEntity* entity);
  160. };
  161.  
  162. extern CResolver* resolver;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement