Formula for SIZE_FACTOR

Post here if you need help setting up your server, etc.
Post Reply
XzL.Smart
Round Winner
Posts: 216
Joined: Sun Apr 30, 2006 4:21 am
Location: Arizona

Formula for SIZE_FACTOR

Post by XzL.Smart »

I'm not quite sure how to explain this well, so bear with me...

The map has a zone at this location

Code: Select all

<Zone effect="death">
<ShapeCircle radius="47">
<Point x="432" y="-368"/>
</ShapeCircle>
</Zone>
and I want to SPAWN_ZONE at that location, so the X and Y coordinates would be 432 and -368 with a size of 47. That all works fine and dandy when the SIZE_FACTOR is 0, but if I want to spawn a zone at the same location that deathzone is in when the size factor is, say, -1, What is the formula to figure out what the new coordinates would be?

I hope this question is easy to understand.

Thanks
Image
User avatar
Z-Man
God & Project Admin
Posts: 11624
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Formula for SIZE_FACTOR

Post by Z-Man »

All coordinates get scaled up by pow(2, size_factor/2).
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1897
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Formula for SIZE_FACTOR

Post by kyle »

I could change SPAWN_ZONE so it accounts for the size_factor, Probaboly not a bad idea to do that, I donno how many maps/servers this change would effect though.
Image
User avatar
dukevin
Round Winner
Posts: 219
Joined: Mon Aug 30, 2010 8:25 am
Location: Southern California
Contact:

Re: Formula for SIZE_FACTOR

Post by dukevin »

kyle wrote:I could change SPAWN_ZONE so it accounts for the size_factor, Probaboly not a bad idea to do that, I donno how many maps/servers this change would effect though.
This would have saved me so much hair pulling and make my zone spawning scripts compatible with any size_factor
Image
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1897
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Formula for SIZE_FACTOR

Post by kyle »

Revision 766 should now account for SIZE_FACTOR on all SPAWN_ZONE and other related settings. I am sure i did not check all cases, but I did check quite a few of them.
Image
Post Reply