View Full Version : Questions and Comments (two subjects here)

12-31-2003, 09:50 PM
OK, the first topic I want to bring up is my new mod called "conc_modbeta" so far I've gotten the player to spawn with a conussion rifle and be able to shoot without taking up any ammo. Secondary fire doesn't do any damage.

Now, for my questions:
1. How do I make the dll's build into a "Final" folder?
2. How do I make the secondary blast throw ppl farther?
3/4. How can I make it so that no one can pull the Concussion rifle away from the player? (or do you think this is a good thing since players also have a saber or should I get rid of the saber too?)

Thanks in advance.

01-01-2004, 05:54 PM

Nith Sahor
01-02-2004, 02:35 AM
1. I don't know, 3/4 I can't really explain. As for 2, look in the function G_Damage (in g_combat.c). One of the arguments of that function is the mod int (which stores the "means of death" of the weapon like MOD_SABER) and one of the arguments is the dflags int, which contains different options for the weapon (one of which is the knockback flag). What you have to do is look through the function, find the part where the function checks if the weapon should do knockback - it looks like this:

knockback = damage;
if ( knockback > 200 ) {
knockback = 200;
if ( targ->flags & FL_NO_KNOCKBACK ) {
knockback = 0;
if ( dflags & DAMAGE_NO_KNOCKBACK ) {
knockback = 0;

what you need to do is add in an extra if condition which checks if the mod integer is MOD_CONC and appropriately set the knockback to whatever you want it to be.

01-07-2004, 07:08 PM
I did this:
if (CONC_MOD) {
knockback = 10000;

And it didn't work All it does is make the program crash after a certain amount of time. Can anyone tell me how to do this right. And BTW I'm starting to think that causing a pushing effect with the concussion rifles secondary is not that good of a thing. ppl would just push everyone else around all the time. Any help would be appreciated :)

Nith Sahor
01-07-2004, 08:53 PM
Ok, if I'm not mistaken it should be MOD_CONC, but I'm not sure because you're implying that you were able to compile your mod without a problem...

MOD_CONC is an enum (enumerator - kind of like a constant value) and not a variable so there's no point to doing if (MOD_CONC)... because then the code in the block underneath will either always execute or never execute. You need to check if the variable mod which is supplied to the function as an argument is equivalent to MOD_CONC.

Where did you put if (CONC_MOD) ... ? Because if it is before the condition if ( knockback > 200 )... then you need to move it after (otherwise, every time it checks whether knockback is over 200 it will change it to 200, even though you want it to be 10000).

Also, I'd suggest that you go to the bookstore and buy a book on C because you won't get very far without a decent knowledge of C (and you'll have to keep asking questions at these forums, which isn't helpful when there's no one around to answer them).