precaching models
Moderator: InsideQC Admins
4 posts
• Page 1 of 1
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?
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?
- Handshakes
- Posts: 11
- Joined: Sun May 30, 2010 6:53 pm
- Location: Detroit, MI
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...
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...
Roaming status: Testing and documentation
-

Lardarse - Posts: 266
- Joined: Sat Nov 05, 2005 1:58 pm
- Location: Bristol, UK
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.
- Handshakes
- Posts: 11
- Joined: Sun May 30, 2010 6:53 pm
- Location: Detroit, MI
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest