ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.68k stars 623 forks source link

[CS 1.6/BUG] See through smokes #1104

Open Freeman-AM opened 11 years ago

Freeman-AM commented 11 years ago

Is it possible to fix this bug ? It's too long to explain just watch the vid.

http://www.youtube.com/watch?v=qx1A4HDzhPA

healthycs16 commented 11 years ago

That's a pretty cool bug. :P

WaLkZa commented 7 years ago

https://github.com/s1lentq/ReGameDLL_CS/pull/180

WaLkZa commented 5 years ago

@mikela-valve

Maxi605 commented 5 years ago

@mikela-valve can this be considered to be fixed for a future update?

RauliTop commented 5 years ago

Related to #1814

SamVanheer commented 5 years ago

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; 
}
incognico commented 3 years ago

Unrelated to the issue, only curious:

I see that SV_Physics_Follow adds entvars_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?