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

There is a way to cleanup precached assets?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sharivan
Junior Member
Join Date: Feb 2013
Location: Brazil
Old 09-09-2014 , 14:30   There is a way to cleanup precached assets?
Reply With Quote #1

I will explain my problem.

I installed some maps with custom particles in my csgo server. Unfortunately the csgo doesnt have per-map manifests to attach custom particles but due a recent update in this year is now possible to precache custom pcf files using the PrecacheGeneric method. Some mappers made plugins that follow their maps to load right the custom particles used in these maps.

The problem is: Every custom particle precached during a map is not removed from precache table on the map end. Then, if a lot of maps that uses custom particles are running in my server the precache table will be filled and the custom particles used on the next maps will not show right but erros will appear in their place.

I tryed to search if there is a api to remove a precached asset in the precache table but without success, apparently the precache tables is only progressive, you can only add and query but remove never.

The only way to avoid the particle errors due the overflowed precache table is restarting my server on every map that use custom particles, there is another way to solve it?

Thks in advance.

Sharivan;

Last edited by sharivan; 09-09-2014 at 14:31.
sharivan is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-09-2014 , 17:11   Re: There is a way to cleanup precached assets?
Reply With Quote #2

That seems odd... in most games, all StringTables are cleared at map change.

I wonder if this is a bug in CS:GO.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
sharivan
Junior Member
Join Date: Feb 2013
Location: Brazil
Old 09-12-2014 , 00:39   Re: There is a way to cleanup precached assets?
Reply With Quote #3

Quote:
Originally Posted by Powerlord View Post
That seems odd... in most games, all StringTables are cleared at map change.

I wonder if this is a bug in CS:GO.
Thks for ur reply Powerlord, its really seems to be more one of a lot of csgo unfixed bugs. There is not soluction unless restart the server even the particle system precache table is full;
sharivan is offline
PresidentEvil
AlliedModders Donor
Join Date: Jun 2012
Old 09-12-2014 , 00:58   Re: There is a way to cleanup precached assets?
Reply With Quote #4

have you made a ticket on pwnsource, if its a bug theres a good chance they'll fix it
__________________
PresidentEvil is offline
sharivan
Junior Member
Join Date: Feb 2013
Location: Brazil
Old 09-12-2014 , 01:00   Re: There is a way to cleanup precached assets?
Reply With Quote #5

Quote:
Originally Posted by PresidentEvil View Post
have you made a ticket on pwnsource, if its a bug theres a good chance they'll fix it
I will do it but i think that it will be fixed only 1 year after;
sharivan is offline
sharivan
Junior Member
Join Date: Feb 2013
Location: Brazil
Old 09-12-2014 , 01:33   Re: There is a way to cleanup precached assets?
Reply With Quote #6

I opened the ticked, it can be found at

http://www.pwnsource.com/tickets/2097

Please guys vote up;
sharivan is offline
SHUFEN
Senior Member
Join Date: Jun 2014
Location: Japan, Tokyo
Old 10-05-2015 , 18:31   Re: There is a way to cleanup precached assets?
Reply With Quote #7

I also have this problem. It's cs:go srcds bug.
I tried a lot of code, but I can't clean up precache at map change.
How to clean up precache tables?
SHUFEN is offline
Send a message via Skype™ to SHUFEN
sharivan
Junior Member
Join Date: Feb 2013
Location: Brazil
Old 10-05-2015 , 18:58   Re: There is a way to cleanup precached assets?
Reply With Quote #8

Quote:
Originally Posted by SHUFEN.jp View Post
I also have this problem. It's cs:go srcds bug.
I tried a lot of code, but I can't clean up precache at map change.
How to clean up precache tables?
Hello.

I solved this problem almost a year ago, but the solution to this problem is not trivial and requires a lot of sdk calls to source engine methods.

Speaking briefly what i did, i found a way to access global variable g_pParticleSystemMgr and all needed methods from the class CParticleSystemMgr. But the class CParticleSystemMgr doesnt have a method to uncache a specific particle system collection, then i implemented a new function (a new method) to this class in my code in sourcepawn. This method used the same data struct used in the class CParticleSystemMgr to manage resources, the RBTree (Red Black Tree) and i needed to implement this data struct in sourcepawn too.

I cant here now all the code because its too big to release here and its a part of one of private plugins from my clan ZMBR, the zmbr_fixes plugin. But dont worry, i have plans to publish all of our plugins soon here in this forum.

Regards.

SHARIVAN from ΖмBя.™ Clan;
sharivan is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-05-2015 , 22:12   Re: There is a way to cleanup precached assets?
Reply With Quote #9

Stringtables (including Precache) are reset on every map change.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
sharivan
Junior Member
Join Date: Feb 2013
Location: Brazil
Old 10-05-2015 , 22:50   Re: There is a way to cleanup precached assets?
Reply With Quote #10

Quote:
Originally Posted by Powerlord View Post
Stringtables (including Precache) are reset on every map change.

Yes, its right, but this bug is not in Stringtables but in Particle System Manager. Even clearing all related to particle systems from the tables ParticleEffectNames, ExtraParticleFilesTable and genericprecache, when the next map loads all particles will be reloaded again;
sharivan is offline
Reply



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 17:34.


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