Raised This Month: $82 Target: $400
 20% 

[ANY]Security entity limit (0.5.4v)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Plugin ID:
4714
Plugin Version:
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    103 
    Plugin Description:
    Prevent server crashing by entity limit
    Old 07-07-2015 , 05:42   [ANY]Security entity limit (0.5.4v)
    Reply With Quote #1

    Security entity limit


    Why a another one?
    • Remove oldest entity and not new
    • Server owner support with entities counter
    • Request

    Current Version: 0.5.5v

    Current Beta Version: N/A


    Cvar
    • sm_sel_version Version of the plugin
    • sm_sel_log_enabled Enable/Disable SEL logs

    Command
    • sm_sel_show_counter Enable/Disable the counter for show in real time the entities alive in a map. Default flag access: Adm_slay

    How install it?
    • Click on Get Plugins
    • Copy and paste the file in servername>tf>addons>sourcemod>plugins
    • Optional: You can add the source in servername>tf>addons>sourcemod>scripting
    Know bugs?
    • Nothing for now
    Special thanks
    • TonyBarreta for the request and idea, and for testing the beta version
    • psychonic for showing me a better way to loop every entities
    Changelog

    Code:
    v0.5.5
    -Code clean-up.
    -Improved logs.
    -Fixed a bug in entity deletion method.
    v0.5.4
    -Tested on custom gamemode and MvM.
    -Reworked code.
    v0.5.3
    -Fixed a wrong/non working version.
    v0.5.2
    -Beta ended
    -Improved killing of entities
    -Moved code to new syntax SM 1.7+
    v0.5.1_9 Beta
    -Fixed bug with array in OnEntityDestroyed
    -Entities counter improved
    v0.5.1_8 Beta
    -Fixed the hud counter from blocking text hud in TF2Ware
    v0.5.1_7 Beta
    -Fixed counter not being showed
    -Fixed leaks with the critical limit
    -Entities are now properly deleted
    v0.5.1_5 Beta
    -Improving map entities detection again
    -Added a command for show in real time the entities alive in the map
    v0.5 Beta
    -Improving map entities detection
    -Added a cvar for disable/enable log
    -Reworked entities checking
    v0.4
    -Decreased cleanning limit
    -The plugin delete now ghost entity
    v0.3
    -Inproved logs
    -Inproved entity limit detection
    -Added a critial entity limit to 2044 entities(planning to add a cvar for this)
    -Decreased cleaning limit to 2040 (from 2044)
    -Fixed code not to work properly sometimes
    v0.2_2
    -Fixed a bug with arrays
    v0.2
    -Better map entities protection
    -Fixed possible lags with this plugin on TF2Ware
    -Plugin now log the entity deleted with his classname
    v0.1
    -Initial release
    Counter of old total views
    • 1593
    Note:
    • Feel free to use and add my code in your plugin, don't forget to give credits
    Attached Files
    File Type: sp Get Plugin or Get Source (security_entity_limit.sp - 721 views - 5.5 KB)
    __________________

    Last edited by Benoist3012; 12-29-2017 at 03:46. Reason: typo
    Benoist3012 is offline
    Potato Uno
    Veteran Member
    Join Date: Jan 2014
    Location: Atlanta, Georgia
    Old 07-07-2015 , 06:46   Re: Security entity limit
    Reply With Quote #2

    What does this do exactly? I don't get it.

    EDIT: So every time an entity is created, you loop across all 2048 entities?

    So every time I fire a rocket from my beggar's bazooka, the server will freeze the game, check all 2048 entities, and then allow me to fire my 2nd rocket?

    This is a really freaking unoptimized plugin especially in mann vs machine (where entities get made and destroyed A LOT).

    Last edited by Potato Uno; 07-07-2015 at 06:49.
    Potato Uno is offline
    Benoist3012
    Veteran Member
    Join Date: Mar 2014
    Location: CWave::ForceFinish()
    Old 07-07-2015 , 08:08   Re: Security entity limit
    Reply With Quote #3

    I have to say I think my plugin is good and don't freeze any server(already tested and used by the offcial server TF2Ware), if you freeze for that you have a server with a bad ram, other plugin for prevent crashing from to much entity use OnEntityCreated + OnGameFrame + Timer, those plugins have more chance to freeze the servers, than mine.

    Ps: TF2bwr(original, reborn, and hard reboot) check in OnGameFrame every clients(64), and OnGameFrame is called more time than OnEntityCreated, and for now, no tf2bwr server or server with my plugin freeze or crash.
    You should really look more about the function "for", if it's correctly used nothing will "freeze"

    Pss(all): I'm not saying other entity limiter plugins are bad
    __________________

    Last edited by Benoist3012; 07-07-2015 at 08:27.
    Benoist3012 is offline
    Michalplyoutube
    Veteran Member
    Join Date: Jan 2013
    Location: Tank Carrier in Mannhatt
    Old 07-07-2015 , 08:26   Re: Security entity limit
    Reply With Quote #4

    Quote:
    Originally Posted by Potato Uno View Post
    What does this do exactly? I don't get it.

    EDIT: So every time an entity is created, you loop across all 2048 entities?

    So every time I fire a rocket from my beggar's bazooka, the server will freeze the game, check all 2048 entities, and then allow me to fire my 2nd rocket?

    This is a really freaking unoptimized plugin especially in mann vs machine (where entities get made and destroyed A LOT).
    It depends on ent amount and cpu speed and on the code

    And It doesn't seem to be broken little operations like looping all ents does nothing realy to performance

    it would if we would try to count distance between each
    __________________
    The plugin developer of TF2BWR Reborn
    And a TF2 Player
    Michalplyoutube is offline
    Benoist3012
    Veteran Member
    Join Date: Mar 2014
    Location: CWave::ForceFinish()
    Old 07-07-2015 , 12:26   Re: [ANY]Security entity limit
    Reply With Quote #5

    Update Security Entity Limit 0.2v

    Changelog in first post
    __________________

    Last edited by Benoist3012; 07-07-2015 at 12:27.
    Benoist3012 is offline
    Horsedick
    AlliedModders Donor
    Join Date: Sep 2011
    Old 07-07-2015 , 21:19   Re: [ANY]Security entity limit
    Reply With Quote #6

    How does this one differ in performance and control of them vs edict over flow fix plugin that xCoderx made?
    Horsedick is offline
    Benoist3012
    Veteran Member
    Join Date: Mar 2014
    Location: CWave::ForceFinish()
    Old 07-08-2015 , 13:37   Re: [ANY]Security entity limit
    Reply With Quote #7

    Quote:
    Originally Posted by Horsedick View Post
    How does this one differ in performance and control of them vs edict over flow fix plugin that xCoderx made?
    Quote:
    Originally Posted by Benoist3012 View Post
    Security entity limit


    Why a another one?
    • Remove oldest entity and not new
    __________________
    Benoist3012 is offline
    Benoist3012
    Veteran Member
    Join Date: Mar 2014
    Location: CWave::ForceFinish()
    Old 07-08-2015 , 16:25   Re: [ANY]Security entity limit
    Reply With Quote #8

    Update Security Entity Limit 0.3v
    Changelog in first post.
    __________________
    Benoist3012 is offline
    Horsedick
    AlliedModders Donor
    Join Date: Sep 2011
    Old 07-08-2015 , 20:45   Re: [ANY]Security entity limit
    Reply With Quote #9

    I've love to see something target certain entities vs just old... as in bullets and rockets - problem I end up having from the other is that it sometimes kills entities from the map and how things like portals should work. I'm maybe gonna test this one unless you believe you can come up with something along the lines of entity targeting.
    Horsedick is offline
    Benoist3012
    Veteran Member
    Join Date: Mar 2014
    Location: CWave::ForceFinish()
    Old 07-09-2015 , 04:56   Re: [ANY]Security entity limit
    Reply With Quote #10

    Quote:
    Originally Posted by Horsedick View Post
    I've love to see something target certain entities vs just old... as in bullets and rockets - problem I end up having from the other is that it sometimes kills entities from the map and how things like portals should work. I'm maybe gonna test this one unless you believe you can come up with something along the lines of entity targeting.
    My plugin protect map entities, my plugin can't delet them, and if the plugin kill your projectiles it's maybe because you use a OP valve launcher and you rush the limit in less 5 secs x)
    __________________

    Last edited by Benoist3012; 05-05-2016 at 11:35.
    Benoist3012 is offline
    Reply


    Thread Tools
    Display Modes

    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:21.


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