Made friendly fire an option

This commit is contained in:
Anuken
2018-01-16 15:00:46 -05:00
parent c2a10193c6
commit 1e63236cc4
13 changed files with 76 additions and 22 deletions

View File

@@ -50,6 +50,12 @@ public class Player extends SyncEntity{
@Override
public boolean collides(SolidEntity other){
if(other instanceof Bullet){
Bullet b = (Bullet)other;
if(!Vars.control.isFriendlyFire() && b.owner instanceof Player){
return false;
}
}
return super.collides(other) && !isAndroid;
}