Mines and Flamethrowers

This commit is contained in:
Reinier Vens 2021-02-06 15:29:04 +00:00
commit 79b0c036cb
36 changed files with 10594 additions and 18 deletions

View file

@ -51,7 +51,7 @@ public class Projectile : MonoBehaviour
{
var t = transform;
var position = t.position;
Velocity += Vector3.up * (Gravity * Time.deltaTime);
Velocity -= Vector3.up * (Gravity * Time.deltaTime);
Velocity *= max(0, 1 - Drag * Time.deltaTime);
var forward = Velocity.normalized;
t.forward = forward;
@ -63,7 +63,7 @@ public class Projectile : MonoBehaviour
{
if (hull.Entity != SourceEntity)
{
hull.SendHit(Damage*DirectHitDamageMultiplier, Penetration, Spread, DamageType, SourceEntity, hit, forward);
hull.SendHit(Damage*DirectHitDamageMultiplier, Penetration, Spread, DamageType, SourceEntity, hit.textureCoord, forward);
transform.position = hit.point;
StartCoroutine(Kill());
}