This commit is contained in:
Anuken
2024-05-26 09:31:40 -04:00
parent 617d5581e0
commit f1f17965bc
5 changed files with 10 additions and 7 deletions
@@ -1981,9 +1981,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
switch(prop){
case health -> {
health = (float)Mathf.clamp(value, 0, maxHealth);
healthChanged();
if(health <= 0f && !dead()){
Call.buildDestroyed(self());
}else{
healthChanged();
}
}
case team -> {