Hi
Could someone tell me the code and where it should go for railjump ?
Thank you
Railjump in quake3
Re: Railjump in quake3
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.
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.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Railjump in quake3
This has been asked a few times before. If you search the forum, you'll find several threads with answers.
Re: Railjump in quake3
Thank you Eraser/^misantropia^
Im new to this so its hard for me at the mo
Thanks again for your help
Im new to this so its hard for me at the mo
Thanks again for your help
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Railjump in quake3
Don't be shy if you run into issues, that's what this forum is for.