Forum

Navy Seals: centralizing bullets?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Navy Seals: centralizing bullets?

Postby JasonX » Fri Apr 26, 2013 3:06 am

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?
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Re: Navy Seals: centralizing bullets?

Postby ceriux » Fri Apr 26, 2013 12:14 pm

if its like normal quake, its in the fire function
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Navy Seals: centralizing bullets?

Postby JasonX » Sat Apr 27, 2013 8:23 pm

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.
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Re: Navy Seals: centralizing bullets?

Postby ceriux » Sun Apr 28, 2013 4:30 am

im pretty sure, that its handled individually, in each of the fire functions.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Navy Seals: centralizing bullets?

Postby Supa » Sun May 05, 2013 3:11 am

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
User avatar
Supa
 
Posts: 164
Joined: Tue Oct 26, 2004 8:10 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest