Advertisement
Sugisaki

Untitled

Mar 18th, 2017
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | None | 0 0
  1. #ifdef REHLDS_FIXES
  2.     if (sv_rehlds_attachedentities_playeranimationspeed_fix.value != 0)
  3.     {
  4.         int attachedEntCount[MAX_CLIENTS + 1] = {};
  5.         for (int i = curPack->num_entities - 1; i >= 0; i--)
  6.         {
  7.             auto &entityState = curPack->entities[i];
  8.             if (entityState.number > MAX_CLIENTS)
  9.             {
  10.                 if (entityState.movetype == MOVETYPE_FOLLOW
  11.                     && 1 <= entityState.aiment && entityState.aiment <= MAX_CLIENTS)
  12.                 {
  13.                     attachedEntCount[entityState.aiment]++;
  14.                 }
  15.             }
  16.             else
  17.             {
  18.                 if (attachedEntCount[entityState.number] != 0)
  19.                 {
  20.                     // Each attached entity causes StudioProcessGait for player
  21.                     // But this will slow down normal animation predicting on client
  22.                     entityState.framerate /= (1 + attachedEntCount[entityState.number]);
  23.                 }
  24.             }
  25.         }
  26.     }
  27. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement