Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.30 KB | None | 0 0
  1. #include "main.h"
  2.  
  3. RecvVarProxyFn OldProxy_X, OldProxy_Y, OldProxy_Z, OldProxy_Velocity, VeloProx1, VeloProx2, VeloProx3;
  4.  
  5. float AAA_Pitch(C_BaseEntity* entity)
  6. {
  7.     int index = entity->GetIndex();
  8.     float angle = gCorrections[index].x;
  9.    
  10.     if(gCorrections[index].dropdown_x == 0)
  11.     {
  12.         if (angle == 0.f)
  13.            
  14.             angle = 89;
  15.         if (angle > 90.0f &&  angle < 270.f)
  16.         {
  17.             if (angle > 180.f)
  18.                 angle = -89.f;
  19.             else
  20.                 angle = 89.0f;
  21.         }
  22.        
  23.     } else if(gCorrections[index].dropdown_x == 1) {
  24.         angle = 89;
  25.     } else if(gCorrections[index].dropdown_x == 2) {
  26.         angle = -89;
  27.     }
  28.    
  29.     return angle;
  30. }
  31.  
  32. float AAA_Yaw(C_BaseEntity* entity) {
  33.     int index = entity->GetIndex();
  34.     float angle = gCorrections[index].y;
  35.    
  36.     if(gCorrections[index].dropdown_y == 0) {
  37.         angle = entity->GetLowerBodyYawTarget();
  38.     } else if(gCorrections[index].dropdown_y == 1) {
  39.         angle -= 90;
  40.     } else if(gCorrections[index].dropdown_y == 2) {
  41.         angle -= 270.f;
  42.     } else if(gCorrections[index].dropdown_y == 3) {
  43.         static bool bJitter;
  44.         angle = (bJitter) ? 90 : -90;
  45.         bJitter = !bJitter;
  46.     } else if(gCorrections[index].dropdown_y == 4) {
  47.         angle = pGlobals->curtime * 1000.f;
  48.     }
  49.     else if(gCorrections[index].dropdown_y == 6) {
  50.         angle = entity->GetLowerBodyYawTarget();
  51.     }else if(gCorrections[index].dropdown_y == 7) {
  52.         angle += 45; // this is the real way of 45 step?
  53.     }
  54.    
  55.    
  56.     return angle;
  57. }
  58.  
  59. void FixPitch(const CRecvProxyData *pData, void *pStruct, void *pOut) { // Auto Detection for FakeDown Down and Up.
  60.    
  61.     float angle = pData->m_Value.m_Float;
  62.    
  63.     int index = ((C_BaseEntity*)pStruct)->GetIndex();
  64.    
  65.     gCorrections[index].x = angle;
  66.    
  67.     OldProxy_X(pData, pStruct, pOut);
  68. }
  69.  
  70. void FixYaw(const CRecvProxyData *pData, void *pStruct, void *pOut) {
  71.     float flYaw = pData->m_Value.m_Float;
  72.    
  73.     int index = ((C_BaseEntity*)pStruct)->GetIndex();
  74.    
  75.     gCorrections[index].y = flYaw;
  76.    
  77.    
  78.     OldProxy_Y(pData, pStruct, pOut);
  79. }
  80.  
  81. void BaseVelocityProxy(const CRecvProxyData *pData, void *pStruct, void *pOut)
  82. {
  83.     Vector baseVelocity = *(Vector*)(&pData->m_Value.m_Vector[0]);
  84.    
  85.     float fValue = -0.000977;
  86.    
  87.     baseVelocity = Vector(fValue, fValue, fValue);
  88.    
  89.     if (baseVelocity == Vector(fValue, fValue, fValue))
  90.     {
  91.         baseVelocity = Vector(0, 0, 0);
  92.     }
  93.    
  94.     OldProxy_Velocity(pData, pStruct, pOut);
  95. }
  96.  
  97. void ViewOffsetZProxy(const CRecvProxyData *pData, void *pStruct, void *pOut)
  98. {
  99.     float viewOffsetZ = pData->m_Value.m_Float;
  100.    
  101.     if (viewOffsetZ == 64.062561) // 64.062561
  102.     {
  103.         viewOffsetZ = 64.f;
  104.     }
  105.     else if (viewOffsetZ == 46.044968) // 46.044968
  106.     {
  107.         viewOffsetZ = 46.f;
  108.     }
  109.    
  110.     OldProxy_Z(pData, pStruct, pOut);
  111. }
  112.  
  113. void VelocityProxy0(const CRecvProxyData *pData, void *pStruct, void *pOut)
  114. {
  115.     *(float*)(pOut) = pData->m_Value.m_Float;
  116. }
  117.  
  118. void VelocityProxy1(const CRecvProxyData *pData, void *pStruct, void *pOut)
  119. {
  120.     *(float*)(pOut) = pData->m_Value.m_Float;
  121. }
  122.  
  123. void VelocityProxy2(const CRecvProxyData *pData, void *pStruct, void *pOut)
  124. {
  125.     *(float*)(pOut) = pData->m_Value.m_Float;
  126. }
  127. /*RecvVarProxyFn OldProxy_Y;
  128.  
  129. float AAA_Yaw(C_BaseEntity* entity) {
  130.     int index = entity->GetIndex();
  131.     float angle = gCorrections[index].y;
  132.    
  133.     float delta = angle - entity->GetLowerBodyYawTarget();
  134.    
  135.     if (entity->GetLowerBodyYawTarget() != entity->oldlby || fabsf(delta) >= 91.f || (entity->GetVelocity().Length2D() > 0.1f && entity->GetFlags() & FL_ONGROUND))
  136.     {
  137.         angle = entity->GetLowerBodyYawTarget();
  138.         entity->oldlby = entity->GetLowerBodyYawTarget();
  139.     }
  140.     else
  141.     {
  142.         if (fabsf(delta) < -91.f && fabsf(delta) > 0.f)
  143.         {
  144.             angle = entity->GetLowerBodyYawTarget() + delta;
  145.         }
  146.     }
  147.    
  148.     return angle;
  149. }
  150.  
  151. void FixYaw(const CRecvProxyData *pData, void *pStruct, void *pOut) {
  152.     float flYaw = pData->m_Value.m_Float;
  153.    
  154.     int index = ((C_BaseEntity*)pStruct)->GetIndex();
  155.    
  156.     gCorrections[index].y = flYaw;
  157.    
  158.     OldProxy_Y(pData, pStruct, pOut);
  159. }
  160. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement