Unload only in facing direction
This commit is contained in:
@@ -21,7 +21,7 @@ public class UnitTypes implements ContentList{
|
|||||||
maxVelocity = 0.75f;
|
maxVelocity = 0.75f;
|
||||||
speed = 0.1f;
|
speed = 0.1f;
|
||||||
drag = 0.25f;
|
drag = 0.25f;
|
||||||
hitsize = 4f;
|
hitsize = 3.5f;
|
||||||
mass = 0.5f;
|
mass = 0.5f;
|
||||||
health = 50;
|
health = 50;
|
||||||
rotatespeed = 0.1f;
|
rotatespeed = 0.1f;
|
||||||
|
|||||||
@@ -55,12 +55,8 @@ public class CraterUnit extends GroundUnit{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(item.amount-- <= 0) return; // update will take care of poofing
|
if(item.amount == 0) return; // update will take care of poofing
|
||||||
|
if(on().block().offloadDir(on(), item.item)) item.amount--;
|
||||||
// try to unload
|
|
||||||
int rot = on().rotation();
|
|
||||||
on().block().offloadNear(on(), item.item);
|
|
||||||
on().rotation(rot);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user