CafeFPS / r5_flowstate

Flowstate scripts. Bugs fixes, new features and more content.
https://X.com/CafeFps
395 stars 49 forks source link

Update sh_character_cosmetics.nut #122

Closed ttvmkos closed 1 month ago

ttvmkos commented 6 months ago

Setting the camo to 0 generates an invalid range.

Therefore, when the skin is invalid, the fallback should not be an index of 0, but the index of the current camo instead.

ttvmkos commented 6 months ago

I chose to change it at call:

void function forbiddenZone_leave(entity trigger , entity ent)

{
    if( !IsValid(ent) || !ent.IsPlayer() ) return
    EnableOffhandWeapons(ent)
    DeployAndEnableWeapons( ent )
    EntityBackInBounds( trigger, ent, null, null )
}