Rolling has a 50% chance of removing fire effects, as demonstrated by this snippet:
else
{ //otherwise send us into the roll
pm->ps->legsTimer = 0;
pm->ps->legsAnim = 0;
PM_SetAnim(SETANIM_BOTH,rolled,SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD);
PM_AddEventWithParm( EV_ROLL, 0 );
pm->maxs[2] = pm->ps->crouchheight;//CROUCH_MAXS_2;
pm->ps->viewheight = DEFAULT_VIEWHEIGHT;
pm->ps->pm_flags &= ~PMF_DUCKED;
pm->ps->pm_flags |= PMF_ROLLING;
// Remove fire damage...some of the time. Jumping into water is a better bet --eez
#ifdef _GAME
if(Q_irand(1,2) == 1)
{
JKG_RemoveDamageType((gentity_t *)pm_entSelf, DT_FIRE);
}
#endif
Also, you have to be almost completely submerged in water (just enough that you are swimming) in order for fire to be removed from being in water. While you are swimming, you are also completely immune to fire. Note that @@Silverfang says "by default." Some weapons can be better than average at these. For instance, sniper rifles have armor piercing capability which allows them to ignore some (or all) of an armor piece's DR. It can also be based on the ammo. Slugthrowers can have armor piercing rounds to help mitigate their weakness towards armor, while stinger ion rounds help ion weapons be better at dealing with things other than droids and shields. Here are all of the damage types:
// Bit of damage types stuff here...
typedef enum damageType_e
{
DT_DISINTEGRATE,
DT_ELECTRIC,
DT_EXPLOSION,
DT_FIRE,
DT_FREEZE,
DT_IMPLOSION,
DT_STUN,
DT_CARBONITE,
DT_BLASTER,
DT_SLUG,
DT_ACP,
DT_PULSE,
DT_ION,
DT_SONIC,
DT_BLEED,
DT_COLD,
NUM_DAMAGE_TYPES
} damageType_t;
Note that Implosion and Stun aren't used. Cold and Freeze are different because cold slows the target while Freeze locks them in place. Fire removes all Cold and Freeze effects. Disintegrate just does the disintegrate effect when a player is killed by it, there is no other difference.