Inside3D!
     

precaching models

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Handshakes



Joined: 30 May 2010
Posts: 4
Location: Detroit, MI

PostPosted: Sun May 30, 2010 7:01 pm    Post subject: precaching models Reply with quote

Hi all!

So I've made a new weapon and weapon model and I can get it into the game like nobody's business. However, whenever I pull up the weapon in-game DP (via the console) tells me that I haven't precache'd the weapon and I should fix my code.

The thing is, I thought I precache'd the hell out of my weapon. In world.qc I added precache_model ("progs/v_mg.mdl");, and yet everytime I play Darkplaces says that I need to precache "progs/v_mg.mdl".

What am I missing? Very Happy
Back to top
View user's profile Send private message AIM Address
Lardarse



Joined: 05 Nov 2005
Posts: 243
Location: Bristol, UK

PostPosted: Sun May 30, 2010 10:32 pm    Post subject: Reply with quote

Sounds like one of a few things:

1: Are you putting the command to precache the code in a function that actually gets called? There's a function in world.qc called worldspawn, which has a list of precaches that will happen when the map loads. Rather confusingly, there's also a function called main that has another list of precaches, that never gets called at alll it exists only for use with a tool that Id software used to build the .pak files.

2: Are you compiling your code after changing it? (Kinda feel guilty asking this, but you never know...)

3: Could be something more obscure, that I can't think of right now...
_________________
<ekiM> Son, you're writing data structures your CPU can't cache.
Back to top
View user's profile Send private message
Handshakes



Joined: 30 May 2010
Posts: 4
Location: Detroit, MI

PostPosted: Mon May 31, 2010 12:05 am    Post subject: Reply with quote

Lardarse wrote:
Sounds like one of a few things:

1: Are you putting the command to precache the code in a function that actually gets called? There's a function in world.qc called worldspawn, which has a list of precaches that will happen when the map loads.


Ah hah! Thanks for the help!

I was using an old save for testing purposes and that seemed to be what was throwing a wrench into the works. When I start a new game and the game loads maps the normal way then everything is just fine.
Back to top
View user's profile Send private message AIM Address
Lardarse



Joined: 05 Nov 2005
Posts: 243
Location: Bristol, UK

PostPosted: Mon May 31, 2010 2:41 pm    Post subject: Reply with quote

Saved games can get screwy if the progs.dat changes. You may end up with things using the wrong model.
_________________
<ekiM> Son, you're writing data structures your CPU can't cache.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group