mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-01 18:50:27 +03:00
Bugfix: laserbolt pierces plast walls (#12573)
* Bugfix: laserbolt pierces plast walls * whether ugh
This commit is contained in:
@@ -64,6 +64,8 @@ public class BulletType extends Content implements Cloneable{
|
||||
public boolean removeAfterPierce = true;
|
||||
/** For piercing lasers, setting this to true makes it get absorbed by plastanium walls. */
|
||||
public boolean laserAbsorb = true;
|
||||
/** Whether this bullet is considered a laser bullet and thus absorbed by plastanium walls. */
|
||||
public boolean laserBullet = false;
|
||||
/** Life fraction at which this bullet has the best range/damage/etc. Used for lasers and continuous turrets. */
|
||||
public float optimalLifeFract = 0f;
|
||||
/** Z layer to drawn on. */
|
||||
|
||||
@@ -16,6 +16,7 @@ public class LaserBoltBulletType extends BasicBulletType{
|
||||
despawnEffect = Fx.hitLaser;
|
||||
hittable = false;
|
||||
reflectable = false;
|
||||
laserBullet = true;
|
||||
lightColor = Pal.heal;
|
||||
lightOpacity = 0.6f;
|
||||
}
|
||||
|
||||
@@ -292,6 +292,12 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
||||
remove();
|
||||
}
|
||||
|
||||
if(type.laserBullet && build.absorbLasers()){
|
||||
hit = true;
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
|
||||
//stop raycasting when building is hit
|
||||
if(type.pierceBuilding) return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user