Forum

> > CS2D > General > Curtailed explosion
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Curtailed explosion

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Curtailed explosion

mozilla1
User Off Offline

Zitieren
Can someone explain to me how the curtailed explosion option in cs2d works? what is the exact algorithm to calculate how it negates damage behind wall?

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

alt Re: Curtailed explosion

DC
Admin Off Offline

Zitieren
Yes, it basically works like that. It just doesn't shoot rays in all directions. Instead it does this:

• 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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht