mirror of
https://github.com/glest/glest-source.git
synced 2025-08-29 19:00:07 +02:00
- 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:
@@ -983,7 +983,7 @@ Vec2i Map::findBestBuildApproach(const Unit *unit, Vec2i originalBuildPos,const
|
|||||||
|
|
||||||
float bestRange = -1;
|
float bestRange = -1;
|
||||||
|
|
||||||
Vec2i start = pos - Vec2i(ut->getSize());
|
Vec2i start = pos - Vec2i(unit->getType()->getSize());
|
||||||
Vec2i end = pos + Vec2i(ut->getSize());
|
Vec2i end = pos + Vec2i(ut->getSize());
|
||||||
|
|
||||||
for(int i = start.x; i <= end.x; ++i) {
|
for(int i = start.x; i <= end.x; ++i) {
|
||||||
|
@@ -483,6 +483,8 @@ void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
|||||||
else {
|
else {
|
||||||
//if unit arrives destPos order has ended
|
//if unit arrives destPos order has ended
|
||||||
switch (tsValue) {
|
switch (tsValue) {
|
||||||
|
|
||||||
|
/*
|
||||||
case tsMoving:
|
case tsMoving:
|
||||||
unit->setCurrSkill(act->getMoveSkillType());
|
unit->setCurrSkill(act->getMoveSkillType());
|
||||||
|
|
||||||
@@ -512,6 +514,7 @@ void UnitUpdater::updateAttack(Unit *unit, int frameIndex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
case tsBlocked:
|
case tsBlocked:
|
||||||
if(unit->getPath()->isBlocked()){
|
if(unit->getPath()->isBlocked()){
|
||||||
unit->finishCommand();
|
unit->finishCommand();
|
||||||
|
Reference in New Issue
Block a user