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

I heard about this earlier. Can you give more details where and why this happens? 
the explobox's th_die function calls T_RadiusDamage which calls findradius, which calls another explobox's th_die which calls findradius again, which clobbers the first findradius's chain causing it to not see the ents that it should have. You can see this on e3m1 I think it was.
The solution is to add a small delay between the th_die and the T_RadiusDamage.
This additionally fixes a stack overflow crash, as well as this fiend bug, and imho looks a little nicer when a group explodes over time, instead of all at once.

Unfortunately there's not really anything an engine can do to fix this (short of ugly hacks that rewrite the qc at load time). Increasing max stack depth delays the crash but still doesn't allow you to have 10000 exploboxes in a domino-run sort of layout...
I guess you'll have to do that with spawns instead... 
This bug is fixed in URQP. I'd suggest looking at its source, especially misc.qc and combat.qc. 
No More Zombie Fiends 
Thanks a lot for your help, Spike and c0burn!

Since my map already has custom code in it (to enable some custom decorative models), I solved the problem the qc way: I simply copied the explobox-related code from the URQP misc.qc, so now my barrels explode in a cool domino style (but still almost instantaneously for it to feel vanilla enough)! B)

The only problem is that the fiends no longer deliciously gib to pieces when they kill themselves by leaping into a bunch of barrels. :'( I did lazily check if URQP had a more "vanilla" solution, fixing the zombie fiend issue while still retaining the instantaneous explosion chaining, but I couldn't be bothered enough. Did you have something in mind, c0burn, when you referred to combat.qc? o: Oh well, better having less gib-inducing barrel clusters than having some solid "ghost" fiends (or their heads) leaping about.

I also gave Spike's "clip shield" workaround a try, but my memory served me well as I recalled that the clip texture can only be used on world brushes and func_details, it seems. Not even info_notnull or InitTrigger trickery fooled qbsp to compile the brush. :/ I even tried giving the func_detail brush a targetname and tried to killtarget it with a trigger, but nothing worked.

Anyway, the delayed barrel chain explosion fix is a good enough workaround for me. Thanks again! :) 
Best Darkplaces Controller Analog Config? 
So, I'm trying to fine tune the analog stick movements so they aren't so twitchy. However, everytime I try to edit the config, it just doesn't do anything. I think I'm using the wrong commands. Darkplaces joystick config commands are so confusing so I don't know which one to use! Basically, I need it so that the character always moves slowly when the left analog stick on the 360 controller moves around. I'm using chase_active for my game, so if they need to see the player and it can't be too fast. If someone could give me the base settings and new better settings that I can tweak to fit the game, please do! 
iiuc, you can build clip brushes into non-world entities, but you do have to include a non-clip brush somewhere in the same entity.
But yeah, better to fix it via qc, if you have that option. 
Try using the fixed T_RadiusDamage from URQP (you can skip the dtype stuff though). 
Hmm just had a though they're probably not gibbing because the demon gib check is for less than -80 health. You could try increasing it. 
Garbled Centerprint Text 
Hi. I'm trying to get back into quakec so I can finally finish my mod I started ages ago. Anyways, trying to brush up and some things by starting simple. I added a reverseweaponcycle to Malice ( I found a source on github). I seem to be getting some garbled text when shooting buttons which activate secrets. For instance, in level 2, there is a button which is supposed to display "there are more to go) after you shoot it. But now it displays some sort of garbled text which includes some of the brown text. Any idea where I would look to see about fixing this? As in which source file? Thanks. 
The Malice src. is decompiled. So don't expect everything to work. 

I get that, but I don't know which of the files to look in to try and fix it. :( Been looking through other info to try and figure it out, but no luck yet.

I can't seem to register on insideqc and since quakeone changed, it won't let me enter text to post over there. :( This is the only other place I know to ask. 
Legend, Open Up Your Mind! 
The source is alright. The only thing your Quake engine cannot do is to print russian letters.

You might have noticed that EVERY print is like that. Not just the secret button text.

The fix is really easy. Just copy the english phrases into your Malice source. Overwriting the russian text and you are done. Use the ones from vanilla 1.06. It works like a charm.

Or you can switch from english to russian in your engine if it supports it :P

To give you a start: For your specific secret button issue replace the russian words in the function: void() counter_use into english. The function starts in line 170 inside triggers.qc in the Malice source.

The rest we can discuss at if you prefer. 
Wow. Thanks. I didn't notice the rest of the text because I kept testing off of a save file. I'll start poking around. Thanks again.

Unfortunately, I can't use quakeone anymore. I think it may be because my computer is too old and therefore my chrome version is outdated. I'm on xp. I can't enter any text in quakeone for some reason in order to make posts or replies. 
Any idea what this one is supposed to mean? "предмет выпал с уровня на". Using google translate, it comes out as "the subject fell from the level on". But I have no idea what that should really say or what the context is. It's in line 157 of triggers2.qc. Void() The_plant. 
Something To Do With Map Testing? 
I'm no expert, but as I understand, Quake has some tools for map testing. For example, if you place one of your entities like health/ammo boxes etc. too close to the floor when creating the map, there's a chance the entity falls of the level when you run it and get a message in your console for every entity that had fallen off the level. Maybe the line of code is referring to that? 
Malice Source Tweaks 
Thanks for the tips. Spent a few hours getting most pertinent messages translated back into English correctly. The last one I posted still escapes me. As well as one I find that translates into "Splitter" But no idea what it actually does.

Other than the translations, I have managed to add reverse weapon cycling and reverse item cycling. Is there anywhere I can post it when I'm finished so that an English source is available for all?

Also, any ideas on a fix for the probe not moving when selected? Is there a quakec fix for this or only an engine side fix within quakespasm?

Legend Is Everywhere 
Hello again my friend,

I noticed that you posted about your Malice issues in the Quakespasm thread as well. I would like to stay here in the coding help section to better keep topics together. Also because it is not an Quakespasm-only bug.

First of all I am glad that the russian-english tip brought you further in your project.

You brought up some other related questions which I would like to try to answer.

- Chrome is outdated:
You would be suprised who else is still using XP. Why not try and install firefox if chrome doesnt work. You can install and use multiple browsers.

- "the subject fell from the level on":
Like Esrael already wrote, this is a developer message. Please look at the vanilla function inside items.qc: void() PlaceItem
It is exactly the same. You can even use the original english text from there. Which is: "Item fell out of level at "

- minigun texture misalignment:
Please find a fix for it here:

- spy probe not flying in Quakespasm:
Never use setmodel() without setsize()
That is the main culprit here.
So, what you want to do is, open probe.qc and add after: setmodel(self, "progs/probe.mdl");
this line: setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);
That will fix the basic issue and the probe works again.
But there is another issue with the code: Malice spawns it in relation to the players view and angle. That needs another fix to make the probe also work when it is spawned while the player is looking upwards:
Change this line: self.origin = self.origin + v_forward * 40;
To this: self.origin = self.origin + v_forward * 40 + v_up * 10;
That should do the trick for most angles and situations. The ceiling is normally always 10 units higher than the player. So that is no problem.

Best of luck with your version of Malice. 
Cool. Thanks again for the probe and message help. I was hoping the probe could be fixed with qc. :)

As for the browser, I do have firefox installed as well. Unfortunately it doesn't wanna work either as far as quakeone goes. :(

I came across that minigun skin you pointed out and it does indeed fix the issue. Though, I suspected it could have been an engine thing since messing about with graphic settings does temporarily fix it without the need of the new skin. Though I'm happy to just go with the skin for simplicity sake.

I posted in Quakespasm thread cause I believed the probe to be an engine issue.

Thanks again. 
Thanks I got the probe working now with your code. One odd thing is that it won't start moving until the player looks up first. As in, you can't activate the probe and immediately start moving forward. Is this how it originally was supposed to work? 
That Dang Probe! 
Something is eluding me here. I can make it it function, but only after the player looks straight up. I've even tried using code from spawning rockets to try and make it begin further out. I'm missing something. Any other ideas? 
No problems here, Legend.
I push the use button and right after that the fire button and it starts flying without even moving the mouse. It doesnt matter if I look straight, a little down or upwards.
Sorry, you must have done some wrong copy/paste.
I used the exact same lines I gave you.

Just in case, be sure to not use a previously saved game with your new progs.dat as the gamecode has been changed. Always start a new game/map and test.

Even in that tiny place at the start of map d2 it works as it should. I am using QS 0.93.
Try harder Legend :) 
Malice Probe Code 
Thanks. I'm using the same version of QS. Could you possibly look at my code and let me know where I went wrong?


self.probe_sound = time + random() * SVC_SETVIEWPORT;

Gotta love decompilers. :)
All those assignments to unrelated constants from defs.qc makes it really hard to read. Consider changing them because that'll be way more appealing for anyone willing to help. 
C´mon Legend ... :) 
I wrote:
So, what you want to do is, open probe.qc and add after: setmodel(self, "progs/probe.mdl");
this line: setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);

Unfortunately you added the new line at the wrong place. You must read more carefully.

You added the line after:
setmodel(probe, "progs/probe.mdl");
That is NOT:
setmodel(self, "progs/probe.mdl");
You set the model to the wrong entity.
probe is not self and self is not probe. ;)

You should not change model or size to different entities in one code block. That awakes evil things and the shamblers will hunt you for that :P

I am sure you can fix it by yourself now. Just reread post #2448.

Also, you still have the russian text inside your code...

Best wishes my friend.
And many greetings to osjclatchford. 
Ugghh. Of course it was just a simple silly oversight by me.

I cannot find any more russian in the probe.qc. I'm sure I may still be missing some in the rest of the files. Though. Which is my blind ass missing in the probe.qc though?

And btw, who is you is? Seven? Dutch? And how do you know I've been talking with osjclatchford? Are you psychic? A sorcerer? :O

Anyways, thanks again for all your help and explanations. 
First | Previous | Next | Last
Post A Reply:
Website copyright © 2002-2017 John Fitzgibbons. All posts are copyright their respective authors.