Anyone know why? Cannon works but machine gun and coax doesnt deal damage anyone know fix? I think there is something wrong in this:
private void ApplyDamage(BaseCombatEntity entity, float damage, Vector3 point, Vector3 normal)
{
float single = damage * UnityEngine.Random.Range(0.9f, 1.1f);
entity.OnAttacked(new HitInfo(this.entity, entity, DamageType.Bullet, single, point));
if (entity is BasePlayer || entity is BaseNpc)
{
HitInfo hitInfo = new HitInfo()
{
HitPositionWorld = point,
HitNormalWorld = -normal,
HitMaterial = StringPool.Get("Flesh")
};
Effect.server.ImpactEffect(hitInfo);
}
}