Can't hurt me
Code to be Added or Changed
g_combat.c
Look for G_Damage this is a pretty big chunk of code and an important one, it handles all the damage done in the game. What we're interested in is the lines:
// always give half damage if hurting self
// calculated after knockback, so rocket jumping works
if ( targ == attacker) {
damage *= 0.5;
}
That tells the game to only give the player half the damage if they are hurting themselves, but we want to now stop that totally, so we receive no damage. So we change it to this:
// always give half damage if hurting self
// calculated after knockback, so rocket jumping works
if ( targ == attacker) {
damage = 0;
} |