fix PA dipole max speed penalty applying to particles that aren't turning

This commit is contained in:
George Paton 2025-10-27 12:42:13 +11:00
parent bff3e15fb3
commit f9baf87289

View File

@ -77,10 +77,10 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
if(isInline) mult = 1; if(isInline) mult = 1;
} }
if(!isCool()) particle.crash(PAState.CRASH_NOCOOL); if(!isCool()) particle.crash(PAState.CRASH_NOCOOL);
if(this.power < this.usage * mult) particle.crash(PAState.CRASH_NOPOWER); if(this.power < usage * mult) particle.crash(PAState.CRASH_NOPOWER);
if(type == null) particle.crash(PAState.CRASH_NOCOIL); if(type == null) particle.crash(PAState.CRASH_NOCOIL);
if(type != null && type.diMax < particle.momentum) particle.crash(PAState.CRASH_OVERSPEED); if(type != null && type.diMax < particle.momentum && !isInline) particle.crash(PAState.CRASH_OVERSPEED);
if(particle.invalid) return; if(particle.invalid) return;
@ -90,7 +90,7 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
particle.resetDistance(); particle.resetDistance();
} }
this.power -= this.usage * mult; this.power -= usage * mult;
} }
@Override @Override