How does rounding work with minesweep range?

Here you can find, hints, strategies and other info for VGA Planets, PHost and it's many addon's and utilities.

Moderators: BitMask, Havok

Post Reply
Wacky
Posts: 32
Joined: Thu Dec 20, 2012 6:37 pm

How does rounding work with minesweep range?

Post by Wacky » Mon Oct 13, 2014 5:03 pm

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?

User avatar
casebolt
Posts: 1589
Joined: Sun Sep 10, 2006 8:17 pm

Re: How does rounding work with minesweep range?

Post by casebolt » Wed Oct 15, 2014 1:57 am

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?

Wacky
Posts: 32
Joined: Thu Dec 20, 2012 6:37 pm

Re: How does rounding work with minesweep range?

Post by Wacky » Wed Oct 15, 2014 1:22 pm

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

User avatar
albatross
Posts: 412
Joined: Fri Sep 17, 2010 3:03 pm
Location: Greece
Contact:

Re: How does rounding work with minesweep range?

Post by albatross » Wed Oct 15, 2014 1:43 pm

Interesting thing. Thanks for sharing it :)

Post Reply

Return to “Intel”