Re-implemented some units / Bugfixes

This commit is contained in:
Anuken
2020-05-19 14:58:04 -04:00
parent 8c6e8d8bcb
commit 77c0163a79
39 changed files with 924 additions and 834 deletions

View File

@@ -16,6 +16,6 @@ abstract class LegsComp implements Posc, Flyingc, Hitboxc, Unitc, Legsc, Elevati
public void update(){
float len = vel().len();
baseRotation = Angles.moveToward(baseRotation, vel().angle(), type().baseRotateSpeed * Mathf.clamp(len / type().speed));
walkTime += Time.delta()*len/1f;
walkTime += Time.delta()*len*2f;
}
}

View File

@@ -97,7 +97,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
float rotation = this.rotation - 90;
//shoot if applicable
if(mount.reload <= 0.0001f && Angles.within(weapon.rotate ? mount.rotation : this.rotation, mount.targetRotation, 1.5f)){
if(mount.reload <= 0.0001f && Angles.within(weapon.rotate ? mount.rotation : this.rotation, mount.targetRotation, mount.weapon.shootCone)){
for(int i : (weapon.mirror && !weapon.alternate ? Mathf.signs : Mathf.one)){
i *= Mathf.sign(weapon.flipped) * (mount.weapon.mirror ? Mathf.sign(mount.side) : 1);