AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY]Security entity limit (0.5.4v) (https://forums.alliedmods.net/showthread.php?t=265902)

Benoist3012 07-07-2015 05:42

[ANY]Security entity limit (0.5.4v)
 
2 Attachment(s)
Security entity limit


Why another one?
  • Remove the 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 to show in real time 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, 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 an 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 shown
-Fixed leaks with the critical limit
-Entities are now properly deleted
v0.5.1_5 Beta
-Improving map entities detection again
-Added a command to show in real time the entities alive in the map
v0.5 Beta
-Improving map entities detection
-Added a cvar to disable/enable log
-Reworked entities checking
v0.4
-Decreased cleaning limit
-The plugin deletes now ghost entities
v0.3
-Improved logs
-Improved entity limit detection
-Added a critical 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 TF2Ware
-Plugin now logs 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 :)

Potato Uno 07-07-2015 06:46

Re: Security entity limit
 
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).

Benoist3012 07-07-2015 08:08

Re: Security entity limit
 
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

Michalplyoutube 07-07-2015 08:26

Re: Security entity limit
 
Quote:

Originally Posted by Potato Uno (Post 2316587)
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

Benoist3012 07-07-2015 12:26

Re: [ANY]Security entity limit
 
Update Security Entity Limit 0.2v

Changelog in first post

Horsedick 07-07-2015 21:19

Re: [ANY]Security entity limit
 
How does this one differ in performance and control of them vs edict over flow fix plugin that xCoderx made?

Benoist3012 07-08-2015 13:37

Re: [ANY]Security entity limit
 
Quote:

Originally Posted by Horsedick (Post 2316913)
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 (Post 2316579)
Why another one?
  • Remove oldest entity and not new


Benoist3012 07-08-2015 16:25

Re: [ANY]Security entity limit
 
Update Security Entity Limit 0.3v
Changelog in first post.

Horsedick 07-08-2015 20:45

Re: [ANY]Security entity limit
 
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.

Benoist3012 07-09-2015 04:56

Re: [ANY]Security entity limit
 
Quote:

Originally Posted by Horsedick (Post 2317406)
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 protects map entities, my plugin can't delete them, and if the plugin kills your projectiles it's maybe because you use a OP valve launcher and you rush the limit in less 5 secs x)


All times are GMT -4. The time now is 03:25.

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