Quake3World.com Forums
     Programming Discussion
        Rail Jumping with Quake III


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Rail Jumping with Quake III

Grunt
Grunt
Joined: 17 Jun 2008
Posts: 59
PostPosted: 06-17-2008 01:16 PM           Profile Send private message  E-mail  Edit post Reply with quote


Hello All,

I am modifying an existing mod and one of the things I wish to add is rail jumping and also the ability to jump
with the lightning gun. Does anyone know how this is accomplished in mods like insta? Do I need to add something
in g_missiles for the rail gun?

Any help with this would be much appreciated.




Top
                 

Señor Shambler
Señor Shambler
Joined: 07 Mar 2006
Posts: 849
PostPosted: 06-17-2008 02:11 PM           Profile Send private message  E-mail  Edit post Reply with quote


G_Damage in G_Combat.c might be a good starting point (its where the knockback is performed)




Top
                 

Grunt
Grunt
Joined: 17 Jun 2008
Posts: 59
PostPosted: 06-17-2008 02:29 PM           Profile Send private message  E-mail  Edit post Reply with quote


Hi Kaz,

I noticed the knockback var in these method and also g_RadiusDamage has the following

Code:
// push the center of mass higher than the origin so players
         // get knocked into the air more
         dir[2] += 24;
         G_Damage (ent, NULL, attacker, dir, origin, (int)points, DAMAGE_RADIUS, mod);


But these two methods are only called for weapons that fire missiles like the BFG and RL. I can't work out
how to incorporate a call to these methods from the LG or RG weapon_fire methods. I've had the game crash
on me with some previous attempts :)

I was hoping to find the source for instaunlagged online somewhere but no look as yet. I would imagine the change
is quite simple but I am not great with C and I am only learning the code base for now.

Thanks for the reply.




Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 06-17-2008 10:49 PM           Profile Send private message  E-mail  Edit post Reply with quote


weapon_railgun_fire() in game/g_weapon.c is the function you want. If the trace stopped within, say, 64 units, hitting a surface, apply knockback.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group