IHittable
public interface IHittable
{
List<ICollisionShape> GetHitShapes();
void TakeDamage(int dmg, HitType type, SVector attackOrigin, IDamage attacker);
bool IsHittable();
}
Have NetworkEntities implement this interface to have them take damage from stuff. Feel free to change this as much as you like. For instance, these methods do not take any faction or team data into account, so currently anything that deals damage will hurt those who implement this interface
Methods
List<ICollisionShape> GetHitShapes()
NetworkEntities can be described as a number of rectangles and circles that can take damage
void TakeDamage(int dmg, HitType type, SVector attackOrigin, IDamage attacker)
How does the NetworkEntity deal with taking damage?
bool IsHittable()
Sometimes NetworkEntities may be in a state you’ve deemed unhittable, like doing a dodge roll or temporarily invincible. This method helps there