avaraline / Avara

Port of the original 1996 game from Ambrosia Software.
MIT License
122 stars 19 forks source link

Fix grenade splash damage #409

Closed tra closed 4 months ago

tra commented 4 months ago

This fixes 2 basic things:

  1. there was a bug in how the length of the ray was scaled for high-FPS that could cause the grenade to explode closer to the launcher that it should be.

  2. the ray test was modified to extend the ray by sqrt(2)*grenadeRadius. This allows the ray test to pass for grenades that are "kissing" an object right at the end of a frame. For higher frame rates this occurs more often so this fix makes it so that all frame rates behave the same and don't have this "kissing" issue.