View previous topic :: View next topic |
Author |
Message |
Handshakes
Joined: 30 May 2010 Posts: 4 Location: Detroit, MI
|
Posted: Sun May 30, 2010 7:01 pm Post subject: precaching models |
|
|
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?  |
|
Back to top |
|
 |
Lardarse

Joined: 05 Nov 2005 Posts: 243 Location: Bristol, UK
|
Posted: Sun May 30, 2010 10:32 pm Post subject: |
|
|
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 |
|
 |
Handshakes
Joined: 30 May 2010 Posts: 4 Location: Detroit, MI
|
Posted: Mon May 31, 2010 12:05 am Post subject: |
|
|
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 |
|
 |
Lardarse

Joined: 05 Nov 2005 Posts: 243 Location: Bristol, UK
|
Posted: Mon May 31, 2010 2:41 pm Post subject: |
|
|
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 |
|
 |
|