New unit death, wreck and creation noises
This commit is contained in:
@@ -854,7 +854,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
Effect.scorch(x, y, (int)(hitSize / 5));
|
||||
}
|
||||
Effect.shake(shake, shake, this);
|
||||
type.deathSound.at(this);
|
||||
type.deathSound.at(this, 1f, type.deathSoundVolume);
|
||||
|
||||
Events.fire(new UnitDestroyEvent(self()));
|
||||
|
||||
@@ -935,6 +935,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
//don't waste time when the unit is already on the ground, just destroy it
|
||||
if(!type.flying || !type.createWreck){
|
||||
destroy();
|
||||
}else{
|
||||
type.wreckSound.at(this, 1f, type.wreckSoundVolume);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ public class AIController implements UnitController{
|
||||
if(arrive && length > 0){
|
||||
Tmp.v3.set(-unit.vel.x / unit.type.accel * 2f, -unit.vel.y / unit.type.accel * 2f).add((target.getX() - unit.x), (target.getY() - unit.y));
|
||||
|
||||
if(unit.type.omniMovement){
|
||||
if(unit.type.omniMovement || unit.type.rotateMoveFirst){
|
||||
vec.add(Tmp.v3).limit(speed * length);
|
||||
}else{
|
||||
//directly move the unit to prevent a backwards movement vector from messing things up
|
||||
|
||||
Reference in New Issue
Block a user