Raised This Month: $12 Target: $400
 3% 

Precache Kit


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-15-2015 , 10:32   Re: Precache Kit
Reply With Quote #11

Quote:
Originally Posted by Jhob94 View Post
The point of this plugin is to people know what files are being precached and check what they don't need.
I mean:

How people are supposed to know from where file are precached?
How people are supposed to know what files they don't need?

Just listing is not enough.

That's the whole point having detailed informations, because it allows you to sort by plugin/modules/etc or by game data/custom. Then plugin could advise things from that. This requires you analyse the map too, that you know the game. And you do some configuration around that.

Having the count could help, but just knowing that has a limited effect, like it helps only in situation like how models/sounds I can add using my plugin. You can't really call that "control".

That's said It's a start, I'm just saying this needs to be way more advanced to be actually useful.

Quote:
Originally Posted by Jhob94 View Post
I mean, i think its very unlikely that i want to unprecache an file in de_dust2 and not in cs_italy.
I think you think wrong lol. Map can be very different and admin could want to do things per map (mod related).
__________________
Arkshine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-15-2015 , 15:49   Re: Precache Kit
Reply With Quote #12

@Arkshine, in order to know from where the model comes can we hook with orpheu precache_model function ? If the model is precached with it, we can say that a plugin is doing that.
__________________
HamletEagle is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 03-15-2015 , 16:08   Re: Precache Kit
Reply With Quote #13

Well i am thinking about read binary file and get the data. But i must check how the map binary is done, i guess this is what arkshine wanted me to figure out.
Also i will have to check if there is a .res file for the map, but that is easy to read.
__________________
Jhob94 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-15-2015 , 17:01   Re: Precache Kit
Reply With Quote #14

Quote:
Originally Posted by HamletEagle View Post
@Arkshine, in order to know from where the model comes can we hook with orpheu precache_model function ? If the model is precached with it, we can say that a plugin is doing that.
AMXX is a library like others.


@Jhob94, just open one, and you will see datas are "readable" (more or less end of file).
__________________
Arkshine is offline
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 03-16-2015 , 11:34   Re: Precache Kit
Reply With Quote #15

99% approved
very good plugin

#GoodJob
__________________
Moroccan and proud
Linkin Hisoka is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-16-2015 , 21:31   Re: Precache Kit
Reply With Quote #16

Quote:
Originally Posted by Arkshine View Post
I mean:

Just listing is not enough.

That's the whole point having detailed informations, because it allows you to sort by plugin/modules/etc or by game data/custom. Then plugin could advise things from that. This requires you analyse the map too, that you know the game. And you do some configuration around that.
Jhob this would actually become a great tool if such features were implented. However at this stage this plugin seems to be just my plugin with a few messages :p
hornet is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 03-17-2015 , 05:45   Re: Precache Kit
Reply With Quote #17

Quote:
Originally Posted by hornet View Post
Jhob this would actually become a great tool if such features were implented. However at this stage this plugin seems to be just my plugin with a few messages :p
I know, i am working at it
Yesterday i fixed crash when unprecache a v_ model. Unprecaching sounds won't cause any crash. Will print a error message at client if is only played at client side, yet if is used with emitsound, everything seems ok.
Now i must fix w_ models crash and do as arkshine said, detailed info about precached files.
__________________
Jhob94 is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-17-2015 , 05:54   Re: Precache Kit
Reply With Quote #18

Quote:
Originally Posted by Linkin Hisoka View Post
99% approved
very good plugin

#GoodJob
Indeed Hisoka, plug-in looks amazing!

Good job, Jhob and thanks Arkshine.
__________________

Last edited by claudiuhks; 03-17-2015 at 05:55.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
m4m3ts
Senior Member
Join Date: Jun 2012
Old 03-17-2015 , 09:01   Re: Precache Kit
Reply With Quote #19

Quote:
Originally Posted by Jhob94 View Post
I know, i am working at it
Yesterday i fixed crash when unprecache a v_ model. Unprecaching sounds won't cause any crash. Will print a error message at client if is only played at client side, yet if is used with emitsound, everything seems ok.
Now i must fix w_ models crash and do as arkshine said, detailed info about precached files.
i've been doing this in my mod.
blocking v_,p_,w_ models.
v_ & p_ can be done with this, put in ham_deploy_post
PHP Code:
set_pev(idpev_viewmodel2"")
set_pev(idpev_weaponmodel2""
just working on weapon parameter in plugin_init what you need to block.

w_ can be done in FM_setmodel
example for blocking w_awp
PHP Code:
if(szModel[7] == 'w' && szModel[8] == '_' && szModel[9] == 'a' && szModel[10] == 'w' && szModel[11] == 'p'
    {
        return 
FMRES_SUPERCEDE
    

thats my method.
very glad if you got a better/more efficient method.
__________________
m4m3ts is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 03-17-2015 , 09:44   Re: Precache Kit
Reply With Quote #20

Well that's not what i have done and is not something that i should do because it is a poor way.
What i have done for don't crash with v_ (that maybe work for p_ too, didn't tested) was hooking pfnModelIndex and return OrpheuSupercede if is one of the models that must not be precached.
For world models i pretend to use pfnSetModel, but i don't want to claim that it is going to work fine since i must look better about it into cssdk.

Off-Topic: Did you guys knew that the game has functions stub_PrecacheModel/Sound/Event that are actually fake functions? I didn't looked at it very deep but my guess is that they are pointers for the engine functions. Well, this guest is based on the fact that i didnt hooked this function and when i unprecached v_knife.mdl, it didn't crashed so i guess this function is some sort of mirror of the engine function. But as i said, didn't looked very deep to claim it
__________________
Jhob94 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 01:43.


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