Open Freeman-AM opened 11 years ago
That's a pretty cool bug. :P
@mikela-valve
@mikela-valve can this be considered to be fixed for a future update?
Related to #1814
The code to show the sprite is in CBasePlayer::Radio
on the server side.
Unfortunately it's a player attachment sprite so a proper fix will require an env_sprite
with kRenderTransAlpha
(alpha tested) attached to the player using MOVETYPE_FOLLOW
.
I see that SV_Physics_Follow
adds entvars_t::v_angle
to the followed entity position so that could be used to offset the sprite's position to match the original behavior.
You can use a modified CSprite::AnimateAndDie
to play the sprite for the same amount of time as the original:
inline void AnimateForTime( float framerate, float lifetime )
{
SetThink(&CSprite::AnimateUntilDead);
pev->framerate = framerate;
pev->dmgtime = gpGlobals->time + lifetime;
pev->nextthink = gpGlobals->time;
}
Unrelated to the issue, only curious:
I see that
SV_Physics_Follow
addsentvars_t::v_angle
to the followed entity position
Is there a logical reason for that? Why is v.origin not just copied 1:1 like the v.angles are in SV_Physics_Follow
?
Is it possible to fix this bug ? It's too long to explain just watch the vid.
http://www.youtube.com/watch?v=qx1A4HDzhPA