mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Respect possible particle size increase, of worst case rotation
This commit is contained in:
parent
505656313c
commit
bce1f45a2b
|
@ -177,6 +177,10 @@ bool CParticles::ParticleIsVisibleOnScreen(const vec2 &CurPos, float CurSize)
|
|||
float ScreenX0, ScreenY0, ScreenX1, ScreenY1;
|
||||
Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1);
|
||||
|
||||
// for simplicity assume the worst case rotation, that increases the bounding box around the particle by its diagonal
|
||||
const float SqrtOf2 = sqrtf(2);
|
||||
CurSize = SqrtOf2 * CurSize;
|
||||
|
||||
// always uses the mid of the particle
|
||||
float SizeHalf = CurSize / 2;
|
||||
|
||||
|
|
Loading…
Reference in a new issue