Many bugfixes

This commit is contained in:
Anuken
2022-03-02 21:03:45 -05:00
parent 315c273de3
commit 7865950ec8
18 changed files with 102 additions and 53 deletions

View File

@@ -152,13 +152,13 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
public boolean inFogTo(Team viewer){
if(this.team == viewer || !state.rules.fog) return false;
if(hitSize <= 14f){
if(hitSize <= 16f){
return !fogControl.isVisible(viewer, x, y);
}else{
//for large hitsizes, check around the unit instead
float trns = hitSize / 2f;
for(var p : Geometry.d8){
if(fogControl.isVisible(team, x + p.x * trns, y + p.y * trns)){
if(fogControl.isVisible(viewer, x + p.x * trns, y + p.y * trns)){
return false;
}
}