Raised This Month: $32 Target: $400
 8% 

2048 Max Edict Change


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kriax
Senior Member
Join Date: Apr 2012
Old 02-02-2015 , 10:42   2048 Max Edict Change
Reply With Quote #1

Hello,

CS: S is limited to 2048 edict, once this number exceed the server crash.
You can change this number?

Last edited by Kriax; 02-02-2015 at 10:42.
Kriax is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-02-2015 , 10:49   Re: 2048 Max Edict Change
Reply With Quote #2

Quote:
Originally Posted by Kriax View Post
Hello,

CS: S is limited to 2048 edict, once this number exceed the server crash.
You can change this number?
No, it's hardcoded at compile time of game
__________________

Last edited by WildCard65; 02-02-2015 at 10:49.
WildCard65 is offline
Kriax
Senior Member
Join Date: Apr 2012
Old 02-02-2015 , 12:58   Re: 2048 Max Edict Change
Reply With Quote #3

Ah okay, I have another solution but I do not know how to apply:

Code:
 ...

 Public Action:Command(client, args)
 {
 new = max GetMaxEntities();
 PrintToChat(client, "% i", max);
 }

 Public Action:CommandPurge(client, args)
 {
 HERE
 }
Is it possible to purge the number of entity?
If I created a env_sprite, I delete it, it will always be included in the GetMaxEntities, how to remove it?

Kriax.

Last edited by Kriax; 02-02-2015 at 12:58.
Kriax is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-02-2015 , 13:37   Re: 2048 Max Edict Change
Reply With Quote #4

Quote:
Originally Posted by Kriax View Post
Ah okay, I have another solution but I do not know how to apply:

Code:
 ...

 Public Action:Command(client, args)
 {
 new = max GetMaxEntities();
 PrintToChat(client, "% i", max);
 }

 Public Action:CommandPurge(client, args)
 {
 HERE
 }
Is it possible to purge the number of entity?
If I created a env_sprite, I delete it, it will always be included in the GetMaxEntities, how to remove it?

Kriax.
when entities are destroyed in source games, their entity index is freed up.
__________________
WildCard65 is offline
Kriax
Senior Member
Join Date: Apr 2012
Old 02-02-2015 , 13:45   Re: 2048 Max Edict Change
Reply With Quote #5

When I removed my env_sprite they are not released and still present in my GetMaxEntities ()

Code:
 stock Entity_Rmove(entity)
 {
 if (IsValidEntity(entity))
 {
    AcceptEntityInput(entity, "Kill");

    if (IsValidEntity(entity))
       RemoveEdict(entity)
 }
 }
I did this to make sure that this'm free without effect ...
Kriax is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 02-03-2015 , 01:07   Re: 2048 Max Edict Change
Reply With Quote #6

I believe GetMaxEntities() GetEntityCount() actually returns the highest edict slot that the server has used so far. To get the actual number of active entities, you'll have to do something not fun, such as looping through all entities and counting them yourself.

By the way, AcceptEntityInput() takes a frame to do anything (once again, as far as I know), so the entity will still be valid after firing Kill on it, and therefore, RemoveEdict() will always be called in that stock, which is apparently not as safe as firing Kill.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)

Last edited by MasterOfTheXP; 02-03-2015 at 15:06.
MasterOfTheXP is offline
Kriax
Senior Member
Join Date: Apr 2012
Old 02-03-2015 , 13:25   Re: 2048 Max Edict Change
Reply With Quote #7

I wanted to say GetEntityCount, sorry 3
Kriax is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 02-03-2015 , 13:52   Re: 2048 Max Edict Change
Reply With Quote #8

https://sm.alliedmods.net/api/index....ad=show&id=57&

Quote:
Originally Posted by KyleS
This isn't what you think it is. This function will return the highest edict index in use on the server, not the true number of active entities.
Potato Uno is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 02-03-2015 , 15:05   Re: 2048 Max Edict Change
Reply With Quote #9

...Right, that. I actually don't believe I've used GetMaxEntities()...nor have I done anything cool in SourcePawn for quite some time.

GetEntityCount() is also what I meant. My bad.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)

Last edited by MasterOfTheXP; 02-03-2015 at 15:06.
MasterOfTheXP is offline
Kriax
Senior Member
Join Date: Apr 2012
Old 02-04-2015 , 12:59   Re: 2048 Max Edict Change
Reply With Quote #10

A solution to empty GetEntityCount?
I mean, a solution to avoid to 2048? : /
Kriax 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 00:41.


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