Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue #641 - A bug or not?
#1
The issue in question refers to build() exiting too early:

The following code outputs a value of about 0.29:

Code:
    build(ResearchCenter);
    point pos1 = position;
    wait(1);
    point pos2 = position;
    message(distance(pos1,pos2));

 
krzys-h stated as follows:
Quote:The values are different because the function exits as soon as brakes are enabled, but breaking takes some time. It works like that for all the functions in the game that don't slow down gracefully to increase precision (for example move does this, but goto does not), so I wouldn't consider this as a bug.


However it does not work like that for all the functions in the game that don't slow down gracefully to increase precision.
That is not true for move() as this code returns 0.00:
Code:
    move(-1);
    pos1 = position;
    wait(1);
    pos2 = position;
    message(distance(pos1,pos2));

In my humble opinion this is a bug in need of fixing as I've encountered situations where an inpropper distance evaluation due to this issue crashed my program. Otherwise I wouldn't have noticed it in the first place.
I'd love to see a few opinions on the topic.
My Code Battle League program: MhrodeBattle.txt

Welcome back, Mrocza. You last visited: Sunday, July 7th, 2013, 02:12 pm 
http://imgur.com/L3Y8bQz


Forum Jump:


Users browsing this thread: 2 Guest(s)