Rail Jumping with Quake III

Locked
jkoder
Posts: 59
Joined: Tue Jun 17, 2008 9:10 pm

Rail Jumping with Quake III

Post by jkoder »

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.
Kaz
Posts: 1077
Joined: Wed Mar 08, 2006 3:43 am

Re: Rail Jumping with Quake III

Post by Kaz »

G_Damage in G_Combat.c might be a good starting point (its where the knockback is performed)
jkoder
Posts: 59
Joined: Tue Jun 17, 2008 9:10 pm

Re: Rail Jumping with Quake III

Post by jkoder »

Hi Kaz,

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

Code: Select all

// 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.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Rail Jumping with Quake III

Post by ^misantropia^ »

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.
Locked