- bugfix for attacking logic to always listen to what you tell it (commented out recently added logic)
- bugfix for building units and unit is too far away
This commit is contained in:
parent
001ef20c1b
commit
c9518d727a
|
@ -983,7 +983,7 @@ Vec2i Map::findBestBuildApproach(const Unit *unit, Vec2i originalBuildPos,const
|
|||
|
||||
float bestRange = -1;
|
||||
|
||||
Vec2i start = pos - Vec2i(ut->getSize());
|
||||
Vec2i start = pos - Vec2i(unit->getType()->getSize());
|
||||
Vec2i end = pos + Vec2i(ut->getSize());
|
||||
|
||||
for(int i = start.x; i <= end.x; ++i) {
|
||||
|
|
|
@ -482,7 +482,9 @@ void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
|||
}
|
||||
else {
|
||||
//if unit arrives destPos order has ended
|
||||
switch (tsValue){
|
||||
switch (tsValue) {
|
||||
|
||||
/*
|
||||
case tsMoving:
|
||||
unit->setCurrSkill(act->getMoveSkillType());
|
||||
|
||||
|
@ -512,6 +514,7 @@ void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
|||
}
|
||||
|
||||
break;
|
||||
*/
|
||||
case tsBlocked:
|
||||
if(unit->getPath()->isBlocked()){
|
||||
unit->finishCommand();
|
||||
|
|
Loading…
Reference in New Issue