mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Fix builderID remaining -1 for Call.onDeconstructFinish (#1162)
BuildEntity.deconstruct is missing code to set builderID, so the builderID parameter is always set to -1 in Call.onDeconstructFinish. The same code exists in BuildEntity.construct.
This commit is contained in:
parent
7dd7ccf698
commit
2e315e5516
@ -280,6 +280,10 @@ public class BuildBlock extends Block{
|
||||
|
||||
progress = Mathf.clamp(progress - amount);
|
||||
|
||||
if(builder instanceof Player){
|
||||
builderID = builder.getID();
|
||||
}
|
||||
|
||||
if(progress <= 0 || state.rules.infiniteResources){
|
||||
Call.onDeconstructFinish(tile, this.cblock == null ? previous : this.cblock, builderID);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user