News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last
Shadow_Code 
when loading a level the first time, spawn functions are run on each entity in the level, and a list of sound precaches is built up, where each sound is given a number. After that, any time a sound is played it simply uses the number to identify it.

When loading a save game, the level first loads the normal way, building a list of precaches by calling spawn functions. If this list doesn't match the original list, then the numbers that are used to identify sounds in the savegame won't me correct.

Normally this is not something people notice with sounds, but with models being wrong in a savegame.

Since you haven't really described when you see the problem, the savegame thing may be a red herring.

Calling "precache_sound" multiple times on the same sound is harmless. 
Metlslime 
Thanks again for your time and knowledge. I should be able to fix the problem now. 
Madfox 
I'm using the Darkplaces engine, but not the Darkplaces mod. 
Do Not Use A Savegame From A Different Progs.dat 
Do NOT save your game, switch progs.dat and load your old save. Things like this will happen.

Basically what meltslime wrote.

This is common behaviour and expected when working with different progs.dat´s and using the same savegame again and again.

You mentioned that you are working on a mod and add several new sound files. That is why. 
Sound Mismatching 
Nope that isn't the cause. Of course I'm not loading old save games post-progs.dat modification, that's coding 101 stuff. 
I've Got The Strangest Problem.. 
I've made a mod based on Copper and yesterday after adding runes to my new HUD I noticed that new rune pickups don't show up *at all* on the HUD.

The serverflags are being set, I can progress to Shub's lair no problem. It's just the runes never get displayed on the HUD.

So I thought maybe I made some kind of mistake with the new gfx.wad, but when I try it out in regular Copper the runes show up fine.

I thought all the UI stuff was handled by the engine itself, so I dunno how this is even happening.

I never touched the serverflags. The closest thing I can think of that might be the cause is I made use of an extra parm - parm11 - to store additional data about the player and extra weapons (all stored using bitflags).

Other than that, I don't know where to look and what to look for. Anyone got any ideas? 
Another Quick One - Clear Screen 
Is there a reliable way to clear the color buffer so that models can be rendered outside the level area?

I know about gl_clear but that doesn't do the trick here.

Here's some context: I want to move the player outside the level area and render a player select 'menu' with a couple of models in his line of sight. When he's made his choice, the player gets plopped back onto the spawnpoint.

This works fine in Quakespasm Spiked. FTE QW and Kex Quake render nothing at all when I move the viewpoint outside the level however.

Any ideas to get this working across engines? 
Metlslime 
Yes, precaching of sounds alongside a dynamic element of gameplay was the problem. Thanks again, very glad to see that fixed. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.