Page 1 of 1
Railjump in quake3
Posted: Mon Mar 21, 2011 9:46 pm
by 40nm
Hi
Could someone tell me the code and where it should go for railjump ?
Thank you
Re: Railjump in quake3
Posted: Tue Mar 22, 2011 8:03 am
by Eraser
I guess you could add a call to G_RadiusDamage to the weapon_railgun_fire function in g_weapon.c
edit:
if you add this to the end of the aforementioned function, you can do rail jumps:
G_RadiusDamage( trace.endpos, ent, 100, 120, traceEnt, MOD_ROCKET_SPLASH );
But do note that this simply adds a splash damage effect to the end of the rail trail, so that may not entirely be what you're looking for. I've also let it refer to MOD_ROCKET_SPLASH as method of death so the console will register it as a splash damage hit with the Rocket Launcher. Might be a good idea to add a MOD_RAIL_SPLASH or something like that.
Probably the best thing to do is copy the G_RadiusDamage function and change that so only the client that fired the railgun is affected by the splash. You could probably change that and a copy of the G_Damage function to prevent yourself from getting hurt but still get the knockback you desire.
One final thing, I've put the values 100 and 120 hardcoded into the G_RadiusDamage call. These are the values normally associated with the splash damage and splash radius of a rocket.
Re: Railjump in quake3
Posted: Tue Mar 22, 2011 10:44 am
by ^misantropia^
This has been asked a few times before. If you
search the forum, you'll find several threads with answers.
Re: Railjump in quake3
Posted: Tue Mar 22, 2011 1:31 pm
by 40nm
Thank you Eraser/^misantropia^
Im new to this so its hard for me at the mo
Thanks again for your help
Re: Railjump in quake3
Posted: Tue Mar 22, 2011 2:22 pm
by ^misantropia^
Don't be shy if you run into issues, that's what this forum is for.