Improve splash damage falloff calculation to account for obstruction size.

Splash falloff was calculated using centre-to-point distance, where
nearest-edge to nearest-edge ought to have been used.
Use DistanceToPoint to correct for that.

Make sure the damage multiplier cannot go negative.
Remove GetUnitSize in favour of GetSize.

Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D2963
This was SVN commit r24010.
This commit is contained in:
wraitii
2020-08-31 15:01:04 +00:00
parent 32886202a3
commit e916b8cc01
11 changed files with 91 additions and 31 deletions
@@ -503,14 +503,6 @@ public:
return true;
}
virtual entity_pos_t GetUnitRadius() const
{
if (m_Type == UNIT)
return m_Clearance;
else
return entity_pos_t::Zero();
}
virtual entity_pos_t GetSize() const
{
if (m_Type == UNIT)