Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef REHLDS_FIXES
- if (sv_rehlds_attachedentities_playeranimationspeed_fix.value != 0)
- {
- int attachedEntCount[MAX_CLIENTS + 1] = {};
- for (int i = curPack->num_entities - 1; i >= 0; i--)
- {
- auto &entityState = curPack->entities[i];
- if (entityState.number > MAX_CLIENTS)
- {
- if (entityState.movetype == MOVETYPE_FOLLOW
- && 1 <= entityState.aiment && entityState.aiment <= MAX_CLIENTS)
- {
- attachedEntCount[entityState.aiment]++;
- }
- }
- else
- {
- if (attachedEntCount[entityState.number] != 0)
- {
- // Each attached entity causes StudioProcessGait for player
- // But this will slow down normal animation predicting on client
- entityState.framerate /= (1 + attachedEntCount[entityState.number]);
- }
- }
- }
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement