SHARE
TWEET

Untitled

a guest Jul 28th, 2019 2,083 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void __stdcall Resolver(int localplayer_1)
  2. {
  3.   // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
  4.  
  5.   animstate = GetAnimState(localplayer_1);
  6.   if ( animstate )
  7.   {                                             // inlined max_desync_delta
  8.     v9 = absolute_mask(COERCE_INT(animstate->last_client_side_animation_update_framecount - animstate->last_client_side_animation_update_time));
  9.     speedfraction = 0.0;
  10.     if ( animstate->feet_speed_forwards_or_sideways < 0.0 )
  11.       speedfraction = 0.0;
  12.     else
  13.       speedfraction = fminf(LODWORD(animstate->feet_speed_forwards_or_sideways), 0x3F800000);
  14.     v2 = (*animstate->pad_0x0120 * -0.30000001 - 0.19999999) * speedfraction;
  15.     v18 = v2;
  16.     v3 = v2 + 1.0;
  17.     v23 = v3;
  18.     if ( animstate->duck_amount > 0.0 )
  19.     {
  20.       v29 = 0.0;
  21.       if ( animstate->feet_speed_unknown_forwards_or_sideways < 0.0 )
  22.         v29 = 0.0;
  23.       else
  24.         v29 = fminf(LODWORD(animstate->feet_speed_unknown_forwards_or_sideways), 0x3F800000);
  25.     }
  26.     GetClientEnt = *(*g_EntityList + 12);
  27.     localplayer_index = (*(*g_EngineClient + 48))(g_EngineClient);// GetLocalPlayer
  28.     localplayer = GetClientEnt(g_EntityList, localplayer_index);
  29.     if ( localplayer )
  30.     {
  31.       for ( i = 0; i <= *(g_GlobalVars + 24); ++i )
  32.       {
  33.         GetClientEntity = *(*g_EntityList + 12);
  34.         player = GetClientEntity(g_EntityList, i);
  35.         if ( player && IsAlive(player) && !(*(*(player + 8) + 36))(player + 8) )// dormant
  36.         {
  37.           v28 = m_angEyeAngles(player)->y == 0.0 ? -58 : 58;
  38.           if ( v28 )
  39.             return;
  40.           v27 = m_angEyeAngles(player)->y == 0.0 ? -89 : 89;
  41.           if ( v27 )
  42.             return;
  43.           v26 = m_angEyeAngles(player)->y == 0.0 ? -79 : 79;
  44.           if ( v26 )
  45.             return;
  46.           v25 = m_angEyeAngles(player)->y == 0.0 ? -125 : 125;
  47.           if ( v25 )
  48.             return;
  49.           v24 = m_angEyeAngles(player)->y == 0.0 ? -78 : 78;
  50.           if ( v24 )
  51.             return;
  52.         }
  53.       }
  54.       v8 = 0;
  55.       v7 = 0;
  56.       for ( a2a = 0; a2a < GetNumAnimLayers(); ++a2a )
  57.       {
  58.         v32 = GetAnimLayer(localplayer_1, a2a);
  59.         if ( v32 && m_nSequence_0(localplayer_1) == 979 && *(v32 + 44) != *(v32 + 28) )
  60.           v6 = m_flLowerBodyYawTarget(localplayer_1);
  61.       }
  62.       v20 = SLOBYTE(animstate->velocity_subtract_z) * v23;
  63.       a1 = SLOBYTE(animstate->velocity_subtract_y) * v23;
  64.       v30 = 0.0;
  65.       eye_angles_y = animstate->eye_angles_y;
  66.       goal_feet_yaw = animstate->goal_feet_yaw;
  67.       v22 = absolute_mask(COERCE_INT(eye_angles_y - goal_feet_yaw));
  68.       if ( v20 < v22 )
  69.       {
  70.         v11 = absolute_mask(SLODWORD(v20));
  71.         v30 = eye_angles_y - v11;
  72.       }
  73.       else if ( a1 > v22 )
  74.       {
  75.         v12 = absolute_mask(SLODWORD(a1));
  76.         v30 = v12 + eye_angles_y;
  77.       }
  78.       v36 = std::fmodf(SLODWORD(v30), 360.0);
  79.       if ( v36 > 180.0 )
  80.         v36 = v36 - 360.0;
  81.       if ( v36 < 180.0 )
  82.         v36 = v36 + 360.0;
  83.       animstate->goal_feet_yaw = v36;
  84.       if ( missed_shots[(*(*(localplayer_1 + 8) + 40))(localplayer_1 + 8)] > 2 )
  85.       {
  86.         v19 = missed_shots[(*(*(localplayer_1 + 8) + 40))(localplayer_1 + 8)] % 4;
  87.         switch ( v19 )
  88.         {
  89.           case 0:
  90.             animstate->goal_feet_yaw = animstate->goal_feet_yaw + 45.0;
  91.             break;
  92.           case 1:
  93.             animstate->goal_feet_yaw = animstate->goal_feet_yaw - 45.0;
  94.             break;
  95.           case 2:
  96.             animstate->goal_feet_yaw = animstate->goal_feet_yaw - 30.0;
  97.             break;
  98.           case 3:
  99.             animstate->goal_feet_yaw = animstate->goal_feet_yaw + 30.0;
  100.             break;
  101.           default:
  102.             return;
  103.         }
  104.       }
  105.     }
  106.   }
  107. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top