ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.74k stars 631 forks source link

[GoldSource/CS][Bug] Non-sprite set to glow! #2202

Open ArmynC opened 5 years ago

ArmynC commented 5 years ago

Spam in console with message 'Non-sprite set to glow!' on some maps where mapper putted "kRenderGlow" wrongly on non-sprite entity.

Source & Fix code

EDIT: Extracted piece of code from ReHLDS

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)
    {
        // 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;
        }
    }
}
RauliTop commented 5 years ago

Related: https://github.com/dreamstalker/rehlds/issues/483

metita commented 5 years ago

AFAIK this was ""fixed"" in some way but they hide the message as a dev only.

ArmynC commented 5 years ago

This is still 'available' in ReHLDS and AlliedModders from what I see. If so, someone should clarify its status :confused: