mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-03 13:30:25 +07:00
Fixed #9195
This commit is contained in:
parent
da32780a38
commit
ef7ee5fdfe
@ -389,9 +389,9 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
//if there's a cycle, ignore its heat
|
||||
if(!(build instanceof HeatConductorBuild hc && hc.cameFrom.contains(id()))){
|
||||
//x/y coordinate difference across point of contact
|
||||
int diff = Math.min(Math.abs(build.tileX() - tileX()), Math.abs(build.tileY() - tileY()));
|
||||
float diff = (Math.min(Math.abs(build.x - x), Math.abs(build.y - y)) / tilesize);
|
||||
//number of points that this block had contact with
|
||||
int contactPoints = Math.min(Math.max(build.block.size, block.size) - diff, Math.min(build.block.size, block.size));
|
||||
int contactPoints = Math.min((int)(block.size/2f + build.block.size/2f - diff), Math.min(build.block.size, block.size));
|
||||
|
||||
//heat is distributed across building size
|
||||
float add = heater.heat() / build.block.size * contactPoints;
|
||||
|
Loading…
Reference in New Issue
Block a user