Page 1 of 1

How does rounding work with minesweep range?

Posted: Mon Oct 13, 2014 5:03 pm
by Wacky
My webmines got swept by a ship 0.4 LY outside the webminefield, and another by a ship 0.2 LY outside the minefield.

I checked the host settings: webmine sweeprange = 0
I knew my minefield size, I just scanned my own mines.
There were no cloakers involved [not possible given the math of #beams and sweeping and stuff, it was 10 beams that did the sweeping].

So I was wondering, how does the HOST calculate if a ship is within minesweeping range?

I guess the HOST code does this:
A = Calculate distance ship to minefield centre
B = Calculate minefield radius
C = A-B
if C < sweeprange --> you can sweep

Now, where does it round? Does host round both A and B, or C?
And what does it use to round? ROUND or TRUNC?

Anybody ever tested this?

Re: How does rounding work with minesweep range?

Posted: Wed Oct 15, 2014 1:57 am
by casebolt
When Sweeping webs one has to consider decay rate also, so not sure what your seeing what client are you using Win Plan, VPA, informer?

Re: How does rounding work with minesweep range?

Posted: Wed Oct 15, 2014 1:22 pm
by Wacky
Did some testing on a testgame, turns out the ships distance to the minefield is indeed rounded.
So if you are within 0.5 LY of the minefield outer edge, HOST will report your distance to the minefield is 0 LY and that you are INSIDE the minefield ;).

*edit* and yes, that means you can sweep webmines from outside the webminefield

Re: How does rounding work with minesweep range?

Posted: Wed Oct 15, 2014 1:43 pm
by albatross
Interesting thing. Thanks for sharing it :)