Get full unit life at empty bar #35

Open
ajira86 opened this Issue Jan 26, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@ajira86

ajira86 commented Jan 26, 2012

I was attacking two turrets and one of my tank becom full of life after loosing all in progress bar. After that, he continue to run like a fresh tank

@adityaravishankar

This comment has been minimized.

Show comment Hide comment
@adityaravishankar

adityaravishankar Jan 26, 2012

Owner

Wow... this one is new.... I'll check the code to see if I can find out
whats happening....

However this one is going to be hard to replicate :(

Wow... this one is new.... I'll check the code to see if I can find out
whats happening....

However this one is going to be hard to replicate :(

@jovoud

This comment has been minimized.

Show comment Hide comment
@jovoud

jovoud Jan 27, 2012

line 1203:
[code]
var vehicle = vehicles.add({name:unitButton.name,x:constructedAt.x+1,
y:constructedAt.y + 3,moveDirection:16,turretDirection:16,
orders:{type:'move',to:{x:Math.floor(constructedAt.x-1+ (Math.random()*4)),
// orders:{type:'move',to:{x:Math.floor(constructedAt.x-1),
y:Math.floor(constructedAt.y+5)}}});
game.units.push(vehicle);
[/code]

Could it be that by accident 2 tanks are create on the same coordinates? so when you move they move together and or not detected using the 'tanks move for each other' algorithm? So if that could happen and they both move the same way thereby drawn the same way, when 1 tank is destroyed it will be removed but the other tank is still present?

jovoud commented Jan 27, 2012

line 1203:
[code]
var vehicle = vehicles.add({name:unitButton.name,x:constructedAt.x+1,
y:constructedAt.y + 3,moveDirection:16,turretDirection:16,
orders:{type:'move',to:{x:Math.floor(constructedAt.x-1+ (Math.random()*4)),
// orders:{type:'move',to:{x:Math.floor(constructedAt.x-1),
y:Math.floor(constructedAt.y+5)}}});
game.units.push(vehicle);
[/code]

Could it be that by accident 2 tanks are create on the same coordinates? so when you move they move together and or not detected using the 'tanks move for each other' algorithm? So if that could happen and they both move the same way thereby drawn the same way, when 1 tank is destroyed it will be removed but the other tank is still present?

@adityaravishankar

This comment has been minimized.

Show comment Hide comment
@adityaravishankar

adityaravishankar Jan 27, 2012

Owner

Don't think so....

The second tank would avoid the first tank because of the collision-radius
intersection... So it would turn away before getting near the first tank...

Don't think so....

The second tank would avoid the first tank because of the collision-radius
intersection... So it would turn away before getting near the first tank...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment