Raised This Month: $ Target: $400
 0% 

[SNIPPET] Polygon Zones


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Deathknife
Senior Member
Join Date: Aug 2014
Old 01-09-2017 , 12:10   Re: [SNIPPET] Polygon Zones
Reply With Quote #3

Quote:
Originally Posted by shavit View Post
pretty damn cool
is performance any good?
Yeah it shouldn't have any notable performance impact. By checking if the point is in the "box" the polygon is, it helps to reduce usage greatly. It won't be doing too much checking.

You can also check if player moved from his last position before checking all the polygons again, this will reduce checking for AFK players.

To put this into perspective; Surf server, ~40people online, multiple polygons, checking 4 points(edges) of players and no notable decrease in performance or any notable increase in CPU usage. It should be perfectly fine.
__________________
Deathknife is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode