mirror of
https://github.com/rehlds/rehlds.git
synced 2025-04-17 14:52:31 +03:00
Fix #483
This commit is contained in:
parent
237ee46464
commit
469908f5c5
@ -4555,19 +4555,26 @@ void SV_WriteEntitiesToClient(client_t *client, sizebuf_t *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
if (sv_rehlds_attachedentities_playeranimationspeed_fix.value != 0)
|
|
||||||
{
|
|
||||||
int attachedEntCount[MAX_CLIENTS + 1] = {};
|
int attachedEntCount[MAX_CLIENTS + 1] = {};
|
||||||
for (int i = curPack->num_entities - 1; i >= 0; i--)
|
for (int i = curPack->num_entities - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
auto &entityState = curPack->entities[i];
|
auto &entityState = curPack->entities[i];
|
||||||
if (entityState.number > MAX_CLIENTS)
|
if (entityState.number > MAX_CLIENTS)
|
||||||
{
|
{
|
||||||
if (entityState.movetype == MOVETYPE_FOLLOW
|
if (sv_rehlds_attachedentities_playeranimationspeed_fix.string[0] == '1'
|
||||||
|
&& entityState.movetype == MOVETYPE_FOLLOW
|
||||||
&& 1 <= entityState.aiment && entityState.aiment <= MAX_CLIENTS)
|
&& 1 <= entityState.aiment && entityState.aiment <= MAX_CLIENTS)
|
||||||
{
|
{
|
||||||
attachedEntCount[entityState.aiment]++;
|
attachedEntCount[entityState.aiment]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent spam "Non-sprite set to glow!" in console on client-side
|
||||||
|
if (entityState.rendermode == kRenderGlow
|
||||||
|
&& (entityState.modelindex >= 0 && entityState.modelindex < MAX_MODELS)
|
||||||
|
&& g_psv.models[entityState.modelindex]->type != mod_sprite)
|
||||||
|
{
|
||||||
|
entityState.rendermode = kRenderNormal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -4579,7 +4586,6 @@ void SV_WriteEntitiesToClient(client_t *client, sizebuf_t *msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//for REHLDS_FIXES: Entities are already in the frame's storage, no need to copy them
|
//for REHLDS_FIXES: Entities are already in the frame's storage, no need to copy them
|
||||||
|
Loading…
x
Reference in New Issue
Block a user