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
Hrm... 
I've ran into that before...might be a conflict with whichever bitflag value you used for IT_JAZZAXE. Can you upload a zip of your qc files? I might be able to take a look at it. 
QMaster 
http://www.quaketastic.com/files/QC%20Mistakes/ijazz3_qc_jazzaxe_screwed.zip

This one has a few changes from standard id1,including the code which seems to be wrong for the Jazz Axe and some AD-inspired health model changes (.bsp to .mdl) 
Weapons.qc 
W_BestWeapon
Add if at the bottom
if (self.items & IT_JAZZAXE) return IT_JAZZAXE; else return IT_AXE;

And just below that in W_CheckNoAmmo:
inside the if (self.weapon == IT_AXE add "|| self.weapon == IT_JAZZAXE") 
W_CheckNoAmmo 
Something is not right.

CheckNoAmmo does not have if (self.weapon == IT_AXE) part! 
 
i'm out of axe ammo! 
? From The Weapons.qc In The Zip You Sent Me... 
float() W_CheckNoAmmo =
{
if (self.currentammo > 0)
return TRUE;

if (self.weapon == IT_AXE)
return TRUE;

self.weapon = W_BestWeapon ();

W_SetCurrentAmmo ();

// drop the weapon down
return FALSE;
};
 
Thanks 
Never mind,found it.FTEQCCGUI has no Atrl+F combo!!! why!!!!! 
Wait,wut? 
QMaster,the problem is still there.
I did some checking but I can't find anything wrong. 
 
in checknoammo shouldint you also add if(self.weapon == IT_JAZZAXE) return; ? 
 
otherwise it says you have no ammo jump to SG 
 
otherwise it says you have no ammo jump to SG 
TRIPPLE POST FTW 
if ((self.weapon == IT_AXE) || (self.weapon == IT_JAZZAXE))
return TRUE; 
@rook
Yes,I added that.It sill switches to SG after showing JAZZAXE for a split second. 
 
hmm what about ‘rankforweapon’ function?
im just thinking off the top of my head been awhile since i did the ol double tap
impuls to switch weapons; i had once made the lg
double as a flame thrower
you might need to add your axe there too 
Suggestion 
Have you looked at client.qc?

There's a line

if(time > self.attack_finished && self.currentammo == 0 &&
       self.weapon != IT_AXE)
{
   self.weapon = W_BestWeapon ();
   W_SetCurrentAmmo ();
}

I suspect you need to change that last test to also consider IT_JAZZAXE
...... 
I am sorry.It does not work.Still switching after a second.

I am going to try and hunt down the warpspasm decompiled code I gave someone when I played Quake 2 years ago before going to Half-(my)-Life.

But please,try helping me.I might feature you in my mod. 
Just Checking 
What did you change it to? Was it this:

if(time > self.attack_finished && self.currentammo == 0 &&
self.weapon != IT_AXE && self.weapon != IT_JAZZAXE )
 
Thank You Sir 
You have saved me a complete rewrite.
Now,the world shall remember you as the savior of QuakeC.

Go Preach! 
Lol, Preach Is Always The Qc Master 
 
You Guys Might See 4 Teens Around 14-15 Age. 
They also will ask questions like these.Why?

Those idiots are my classmates! 
PDF For Beginners 
I created this PDF from a forum post on QuakeOne. This may be useful information for users new to QuakeC.

http://www.quaketastic.com/files/QuakeC_Tutuorial_by_MadGypsy.pdf 
Seconded That 
The way I found the problem line for the jazz axe was searching the entire sourcecode for every example of the keyword IT_AXE, which lead me to the one you hadn't changed yet. 
PUBLIC SERVICE ANNOUNCEMENT 
(from discord chat, I've chopped it down to just give the salient points)

Kinn - Today at 10:19 AM
I've had the "grenades occasionally clip straight through shamblers" bug plenty of times in vanilla quake. I'd totally forgotten it was a thing. Is it still a thing in QS etc?

...

c0burn - Today at 8:18 PM
entities are re-used
when an entity is removed, not all fields are cleared
the shambler code sets self.owner = lightningbolt

...

[editors note: player then fires a rocket/grenade, spawning a new entity just after the lightning ent has been removed]

c0burn - Today at 8:21 PM
the shamblers .owner field is set to your rocket
so it passes straight through

...

c0burn - Today at 8:21 PM
you can just set self.owner = world to fix it
when the bolt is removed
or not set self.owner
really it should be bolt.owner = shambler

...

Kinn - Today at 8:27 PM
holky fuck 
Aaand 
c0burn gets the Preach award for April. 
FURTHER RUMBLINGS 
The Shambler needs to store a "link" to the lighting flash, just so that it can refer to it over the next few frames in order to animate it. There is no special reason why the Shambler has to use the ".owner" field to create this link. It could have used another entity field. Using .owner for this is a pretty dumb hack and as we can see, just invites bugs.

IMO however, the cleanest fix would be to not actually require the Shambler and flash to be linked like this - I would personally simply spawn the flash, and make it animate by thinking for itself (like the rocket explosion does.)

BONUS POINTS: notice also that whilst this is all kicking off, the Shambler sets self.effects = self.effects | EF_MUZZLEFLASH;

This has the (probably unwanted) side effect of disabling animation interpolation on the Shambler during its lighting attack.

If you made the lightning flash animate itself, as suggested earlier, you could also throw the muzzleflash effect on the flash ent instead of the shambler, controlling it through the flash anim functions. This will re-enable anim interpolation on the Shambler, and disable it on the flash - which is kind of what you want. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2025 John Fitzgibbons. All posts are copyright their respective authors.