Page 1 of 1
Rail Jumping with Quake III
Posted: Tue Jun 17, 2008 9:16 pm
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.
Re: Rail Jumping with Quake III
Posted: Tue Jun 17, 2008 10:11 pm
by Kaz
G_Damage in G_Combat.c might be a good starting point (its where the knockback is performed)
Re: Rail Jumping with Quake III
Posted: Tue Jun 17, 2008 10:29 pm
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.
Re: Rail Jumping with Quake III
Posted: Wed Jun 18, 2008 6:49 am
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.