mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user