T4/5 naval / Controversial weapon outlines
This commit is contained in:
@@ -128,7 +128,6 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc{
|
||||
float rotation = this.rotation - 90;
|
||||
float weaponRotation = rotation + (weapon.rotate ? mount.rotation : 0);
|
||||
|
||||
//m a t h
|
||||
|
||||
float mountX = this.x + Angles.trnsx(rotation, weapon.x, weapon.y),
|
||||
mountY = this.y + Angles.trnsy(rotation, weapon.x, weapon.y);
|
||||
@@ -166,9 +165,8 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc{
|
||||
Angles.shotgun(weapon.shots, weapon.spacing, rotation, f -> bullet(weapon, x, y, f + Mathf.range(weapon.inaccuracy), lifeScl));
|
||||
}
|
||||
|
||||
if(this instanceof Velc){
|
||||
((Velc)this).vel().add(Tmp.v1.trns(rotation + 180f, ammo.recoil));
|
||||
}
|
||||
vel().add(Tmp.v1.trns(rotation + 180f, ammo.recoil));
|
||||
|
||||
boolean parentize = ammo.keepVelocity;
|
||||
|
||||
Effect.shake(weapon.shake, weapon.shake, x, y);
|
||||
@@ -178,6 +176,11 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc{
|
||||
}
|
||||
|
||||
private void bullet(Weapon weapon, float x, float y, float angle, float lifescl){
|
||||
weapon.bullet.create(this, team(), x, y, angle, (1f - weapon.velocityRnd) + Mathf.random(weapon.velocityRnd), lifescl);
|
||||
float xr = Mathf.range(weapon.xRand);
|
||||
|
||||
weapon.bullet.create(this, team(),
|
||||
x + Angles.trnsx(angle, 0, xr),
|
||||
y + Angles.trnsy(angle, 0, xr),
|
||||
angle, (1f - weapon.velocityRnd) + Mathf.random(weapon.velocityRnd), lifescl);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user