mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 14:32:06 -08:00
This commit is contained in:
parent
d171048004
commit
d6546a38c0
4 changed files with 4 additions and 4 deletions
|
|
@ -131,7 +131,7 @@ public class Damage{
|
|||
}
|
||||
|
||||
//try to heal the tile
|
||||
if(collide && hitter.type.collides(hitter, tile)){
|
||||
if(collide && hitter.type.testCollision(hitter, tile)){
|
||||
hitter.type.hitTile(hitter, tile, tile.health, false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ public abstract class BulletType extends Content{
|
|||
return Math.max(speed * lifetime * (1f - drag), maxRange);
|
||||
}
|
||||
|
||||
public boolean collides(Bullet bullet, Building tile){
|
||||
public boolean testCollision(Bullet bullet, Building tile){
|
||||
return healPercent <= 0.001f || tile.team != bullet.team || tile.healthf() < 1f;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
|||
Building tile = world.build(x, y);
|
||||
if(tile == null || !isAdded()) return false;
|
||||
|
||||
if(tile.collide(self()) && type.collides(self(), tile) && !tile.dead() && (type.collidesTeam || tile.team != team) && !(type.pierceBuilding && collided.contains(tile.id))){
|
||||
if(tile.collide(self()) && type.testCollision(self(), tile) && !tile.dead() && (type.collidesTeam || tile.team != team) && !(type.pierceBuilding && collided.contains(tile.id))){
|
||||
boolean remove = false;
|
||||
|
||||
float health = tile.health;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ public class PlacementFragment extends Fragment{
|
|||
break;
|
||||
}
|
||||
}
|
||||
}else if(blockSelectEnd || Time.timeSinceMillis(blockSelectSeqMillis) > 750){ //1st number of combo, select category
|
||||
}else if(blockSelectEnd || Time.timeSinceMillis(blockSelectSeqMillis) > 400){ //1st number of combo, select category
|
||||
//select only visible categories
|
||||
if(!getUnlockedByCategory(Category.all[i]).isEmpty()){
|
||||
currentCategory = Category.all[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue