Navy Seals: centralizing bullets?

Discuss programming in the QuakeC language.
Post Reply
JasonX
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Navy Seals: centralizing bullets?

Post by JasonX »

I'm hacking away the old navy seals codebase and started by removing the laser sights. However, i'm not sure where the code for changing the bullets center "target". Does anyone have an idea?
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Navy Seals: centralizing bullets?

Post by ceriux »

if its like normal quake, its in the fire function
JasonX
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Re: Navy Seals: centralizing bullets?

Post by JasonX »

There are many different "fire" functions. I was trying to find the piece of code that shifts all bullets a little bit to the left.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Navy Seals: centralizing bullets?

Post by ceriux »

im pretty sure, that its handled individually, in each of the fire functions.
Supa
Posts: 164
Joined: Tue Oct 26, 2004 8:10 am

Re: Navy Seals: centralizing bullets?

Post by Supa »

You'll want to dike out the lines that play with the traceline sources in things like W_FireM16:

Code: Select all

   src_z = (self.absmin_z + (self.size_z * 0.800));
   src_y = (self.absmin_y + (self.size_y * 0.400));
Also, from looking at M16.qc itself I'm not really sure just wtf is going on in the NS 3.0 source, just from seeing gems like this:

Code: Select all

   vel = normalize (((dir + (v_up * crandom ())) + (v_right * crandom ())));
   vel = (vel + (FL_SWIM * trace_plane_normal));
   vel = (vel * 200.000);
   org = (trace_endpos - (dir * MOVETYPE_STEP));
in M16_TraceAttack I'm pretty sure ns30src is based on decompiled source, but I can't say for certain as I don't know the whole story. Would be interesting to hear it from someone who does, though :)
aut viam inveniam aut faciam
Post Reply