My guess is that you cast a ray in all directions with the explosion center as origin and check any walls in the path, however i'm not sure
Forum
CS2D General Curtailed explosionCurtailed explosion
2 replies 1
My guess is that you cast a ray in all directions with the explosion center as origin and check any walls in the path, however i'm not sure
All objects (players, hostages, breakable entities, dynamic objects) within the explosion radius are detected (with a simple radius distance check)
if curtailed explosion is on, a single ray is shot from the center of the explosion to the center of the object (per object). Only if the ray isn't blocked the game applies the damage.
if curtailed explosion is off, the game just applies damage and skips the ray check.
And it really shoots rays just from center to center? Isn't that quite imprecise? Yes it does and yes it is - but it's good enough. That's because targets are mostly smaller than walls and when a ray doesn't hit it means - in most cases - that like 50%+ of the target are covered behind a wall or something.
1