Code center > Bugs and fixes

Keeping eye on tied bot RESOLVED 2.43r

<< < (2/2)

EricL:
Fixed in 2.43r.  Both .tieang and .tielen were broken.  It appears there simply was no code in the 2.4 fork to update them.  Now there is code to populate the the appropriate values for either the last tie (when .tienum is 0) or whatever the tie specified by .tienum.    They work both for the bot which initiated the tie and the bot to which a tie is connected.

*.tieang .aimsx store

should now work correctly at both ends of the tie.

Additionally, it looks like .tiepres was not working correctly for non consecutive tie ports or for bots that had different numbers of ties.  That is, as far as I understand, after you do:

99 .tie store

.tiepres should contain 99, not 1 or 2 or whatever .numties happens to be.  But if you are the bot at which the tie is fired, .tiepres should be 1 or 2 or whatever .numties is since you didn't fire the tie and didn't specify a tie port.  The tieport should be different for each bot at each end of the tie as a fiunction of the number of ties each bot has, the order they were created and what (if any) tie port number was specified when the tie was created.

Anyway, things now work as they should I think.  Should be able to release 2.43r later today hopefully.

EricL:
One small correction.  *.tieang returns the angle from .aim to the tied bot.  Angles clockwise from .aim are positive, counter-clockise negative.   Thus, to rotate to face the direction of the tied bot, one needs rotate clockwise *.tieang and thus the gene above should store *.tieang into .aimdx (aka .aimright) not .aimsx (aka .aimleft).

Numsgil:

--- Quote from: EricL ---...The tieport should be different for each bot at each end of the tie as a fiunction of the number of ties each bot has, the order they were created and what (if any) tie port number was specified when the tie was created.
--- End quote ---

As far as I know, tieport was designed to be the same for both bots.  I never really played around much with ties, so the reasoning is before my time.  I have no objections to changing it, (no real feelings one way or another), but just wanted to point out this would be a feature change, not a bug fix.

EricL:

--- Quote from: Numsgil ---just wanted to point out this would be a feature change, not a bug fix.
--- End quote ---
You are correct.  Per the other thread on this topic, I think it makes sense to change it but I'm very open to other points of view...

Navigation

[0] Message Index

[*] Previous page

Go to full version