- 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:
Mark Vejvoda 2011-06-09 21:38:04 +00:00
parent 001ef20c1b
commit c9518d727a
2 changed files with 5 additions and 2 deletions

View File

@ -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) {

View File

@ -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();