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
 
Is there any way to attach colored lights to projectiles or explosions via QC?

I would like to make the vore's ball glow with a purple light, make the tarbaby's explosion blue, this sort of thing...

I'm using quakespasm-spiked btw. 
Qss 
a trail particle effect with 'lightrgb' and 'lightradius' set should be able to provide coloured dynamic lights, but it might only be with flashblends. I don't think I actually got around to testing it properly.

point effects will additionally need lighttime, and probably want at least one of lightrgbfade+lightradiusfade.

there are additional light properties, but those are specific to rtlights, which are definitely not supported in qss. 
@Spike 
Thanks! I'll try that =D 
 
What's the most reliable way to detect if the player is on a slippery slope (mostly vertical angle)? I'm using QuakeSpasm-Spiked. 
Slippery Slope 
tracebox(self.origin, self.mins, self.maxs, self.origin-'0 0 1', TRUE, self);
if (trace_fraction < 1 && trace_plane_normal_z < 0.7)
surfaceangleissteeperthanabout45degrees();

you could instead use traceline, but it would not match the player's physics so well. 
 
Thanks, but the most difficult thing about it is detecting the exact moment when the player touches/lands on the slope. AFAIK the engine doesn't set FL_ONGROUND for it, and assigning .touch functions to players doesn't work properly. 
 
Is there a way to achieve something similar to DP's (and Makaqu's) .glow_size in QSS, through QC?

More specifically, negative dynamic lighting with custom radius and intensity, tied to an entity.

I've seen some ways to customize lighting effects in qsextensions.qc, but there's no way to change their properties and make them move around dynamically.

Also, I would like such negative lights to affect only BSP models, without affecting MDL, SPR and particles. 
Out Of The Blue 
moving lights hack, maybe? 
Can't Jump When On Top Of Monsters/explo Boxes 
There was some QuakeC fix posted here, but I can't find it. Can someone repost the fix? 
@Six-Shoota 
C0burn 
10x 
TIL... 
... that the source code of Quake has a 256*5 char static array whose contents, literally, are:

*0
*1
*2
*3
...
*254
*255

Do you guys know if this particular array (localmodels) has survived in any of the modern engines, somehow? 
Cl.viewent - Where Is It Loaded? 
Awfully sorry to bring this up, but I have had no luck doing it myself. Where exactly is cl.viewent assigned a specific value? Where in the code do you tell the client which gun model to use? I can´t find any direct assignments to the field, and (unless I´m doing something wrong) I can´t also find a place where the whole cl struct is being copied off somewhere else.

Do you guys know where in the source is cl.viewent being (directly or indirectly) assigned to? 
Bump 
Someone help Izhido out here.

Also I still request this thread be stickied to make it more useful. 
@Izhido 
Quick search indicates that it's happening in V_CalcRefdef() and V_CalcIntermissionRefdef(), both in view.c.

It may or may not be obvious but this represents weapon from the POV of the player and is set based on the client state structure (cl.stats).

The reason "find references" (which you probably used) didn't show you any results is that a pointer to cl.viewent is taken in the V_CalcRefdef() body (view = &cl.viewent;) and later assignments are done on the temporary pointer (e.g. view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
mentioned above).

Hope this is the answer you were looking for. Non-vanilla engines perform some additional operations on cl.viewent but I haven't seen any other model assignment logic in QS so I assume these are the only two places where it happens.

HTH 
@Thulsa - Thank You! 
It *did* help. Looks like I need to be way more careful about variable assignments in there for future changes. 
9 posts not shown on this page because they were spam
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.