This commit is contained in:
Anuken 2020-10-29 11:51:17 -04:00
parent 2ad14cc884
commit 0c418d1a09
3 changed files with 5 additions and 2 deletions

View file

@ -261,11 +261,12 @@ public class Teams{
} }
public void updateCount(UnitType type, int amount){ public void updateCount(UnitType type, int amount){
if(type == null) return;
unitCount = Math.max(amount + unitCount, 0); unitCount = Math.max(amount + unitCount, 0);
if(typeCounts == null || typeCounts.length <= type.id){ if(typeCounts == null || typeCounts.length <= type.id){
typeCounts = new int[Vars.content.units().size]; typeCounts = new int[Vars.content.units().size];
} }
typeCounts[type.id] = Math.max(amount + typeCounts [type.id], 0); typeCounts[type.id] = Math.max(amount + typeCounts[type.id], 0);
} }
public QuadTree<Unit> tree(){ public QuadTree<Unit> tree(){

View file

@ -1,3 +1,3 @@
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=ddc3e52e7c4f534a22f4f69be22a7c32a9589784 archash=d4381c1fed03df6e69a6d99c75c723409c19f904

View file

@ -37,6 +37,8 @@
</forceLinkClasses> </forceLinkClasses>
<libs> <libs>
<lib>z</lib> <lib>z</lib>
<lib>arc</lib>
<lib>arc-freetype</lib>
</libs> </libs>
<frameworks> <frameworks>
<framework>UIKit</framework> <framework>UIKit</framework>