mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-04-28 00:10:48 -07:00
Fixed #9195
This commit is contained in:
parent
da32780a38
commit
ef7ee5fdfe
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue