Proper shield arc velocity nullification
This commit is contained in:
@@ -95,8 +95,10 @@ public class ShieldArcAbility extends Ability{
|
|||||||
float overlapDst = reach - unit.dst(paramPos.x, paramPos.y);
|
float overlapDst = reach - unit.dst(paramPos.x, paramPos.y);
|
||||||
|
|
||||||
if(overlapDst > 0){
|
if(overlapDst > 0){
|
||||||
//stop
|
//only nullify velocity if it's heading towards the shield
|
||||||
|
if(Angles.angleDist(unit.angleTo(paramPos), unit.vel.angle()) < 90f){
|
||||||
unit.vel.setZero();
|
unit.vel.setZero();
|
||||||
|
}
|
||||||
// get out
|
// get out
|
||||||
unit.move(Tmp.v1.set(unit).sub(paramUnit).setLength(overlapDst + 0.01f));
|
unit.move(Tmp.v1.set(unit).sub(paramUnit).setLength(overlapDst + 0.01f));
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=181f842e5c
|
archash=acf486b6f6
|
||||||
|
|||||||
Reference in New Issue
Block a user