Cleanup
This commit is contained in:
@@ -95,7 +95,7 @@ public class Wall extends Block{
|
|||||||
//deflect bullets if necessary
|
//deflect bullets if necessary
|
||||||
if(chanceDeflect > 0f){
|
if(chanceDeflect > 0f){
|
||||||
//slow bullets are not deflected
|
//slow bullets are not deflected
|
||||||
if(bullet.vel().len() <= 0.1f || !bullet.type.reflectable) return true;
|
if(bullet.vel.len() <= 0.1f || !bullet.type.reflectable) return true;
|
||||||
|
|
||||||
//bullet reflection chance depends on bullet damage
|
//bullet reflection chance depends on bullet damage
|
||||||
if(!Mathf.chance(chanceDeflect / bullet.damage())) return true;
|
if(!Mathf.chance(chanceDeflect / bullet.damage())) return true;
|
||||||
@@ -114,9 +114,9 @@ public class Wall extends Block{
|
|||||||
bullet.vel.y *= -1;
|
bullet.vel.y *= -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bullet.owner(this);
|
bullet.owner = this;
|
||||||
bullet.team(team);
|
bullet.team = team;
|
||||||
bullet.time(bullet.time() + 1f);
|
bullet.time += 1f;
|
||||||
|
|
||||||
//disable bullet collision by returning false
|
//disable bullet collision by returning false
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user