Rocket Jump Damage!


#1

Hey there!
Im looking for someone who can edit the sourcecode (or tell me wich lines to change and i will do it myself) to remove the splash damage from rockets to the player himself to allow rocket jumping! anyone can help?

thanks :slight_smile:


#2

Any particular reason?
You can switch off self-damage in OSP/CPMA mods. Anyway, You can always do rocket jumps, just grab some armor first :slight_smile:


#3

I think it is around here: https://github.com/ioquake/ioq3/blob/master/code/game/g_combat.c#L973 in g_combat.c.


#4

About line 402 under ROCKET theres this code…

m = fire_rocket (ent, muzzle, forward);
m->damage *= s_quadFactor;
//m->splashDamage *= s_quadFactor;

comment out the slashDamage line with the double back slash as shown, and you’ll get what you need.


#5

iirc the damage is used to calculate the size of the rocket jump so commenting out the splashdamage would not work and would remove the damage other players receive if a rocket explodes nearby.

in g_combat.c the following lines can be found:

// always give half damage if hurting self
// calculated after knockback, so rocket jumping works
if ( targ == attacker) {
damage *= 0.5;
}
multiply by 0 here instead.


#6

In g_missile.c, there is a line in fire_rocket, that has a splashDamage.
Do this:
if(self->takedamage){
bolt->splashDamage = 0;
}
else{
bolt->splashDamage = /put here the normal value/;
}
I don’t know if this will really work, as you cannot test if the player will take damage, if the missile even hasn’t exploded.
Another thing you can do, is to search for BATTLESUIT, and making its effects always available.
Aaand, another method (I think this will work), is in g_combat.c
Writr this under the line 863:
if (targ->client) {
if (targ == attacker) {
return;
}
}
I think (not tested), this will make that only YOU cannot attack yourself, but bots takes normal damage.


#8

That’s an excellent answer! it worked! I also had to remove fall damage. there is still a handful of damage points dealt each time, though, and I have no idea what causes that. Does anyone have an idea?