Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // battlesuit protects from all radius damage (but takes knockback)
- // and protects 50% against all damage
- if ( qtrue ) {
- G_AddEvent( targ, EV_POWERUP_BATTLESUIT, 0 );
- if ( ( dflags & DAMAGE_RADIUS ) || ( mod == MOD_FALLING ) ) {
- return;
- }
- damage *= 0.5;
- }
- // add to the attacker's hit counter (if the target isn't a general entity like a prox mine)
- if ( attacker->client && targ != attacker && targ->health > 0
- && targ->s.eType != ET_MISSILE
- && targ->s.eType != ET_GENERAL) {
- if ( OnSameTeam( targ, attacker ) ) {
- attacker->client->ps.persistant[PERS_HITS]--;
- } else {
- attacker->client->ps.persistant[PERS_HITS]++;
- }
- attacker->client->ps.persistant[PERS_ATTACKEE_ARMOR] = (targ->health<<8)|(client->ps.stats[STAT_ARMOR]);
- }
- // always give half damage if hurting self
- // calculated after knockback, so rocket jumping works
- if ( targ == attacker) {
- damage *= 0.5;
- }
- if ( damage < 1 ) {
- damage = 1;
- }
- if ((g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_CTF_ELIMINATION || g_gametype.integer == GT_LMS)
- && g_elimination_selfdamage.integer<1 && ( targ == attacker || mod == MOD_FALLING )) {
- damage = 0;
- }
- //So people can be telefragged!
- if ((g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_CTF_ELIMINATION || g_gametype.integer == GT_LMS) && level.time < level.roundStartTime && ((mod == MOD_LAVA) || (mod == MOD_SLIME)) ) {
- damage = 1000;
- }
- damage = 0
- take = damage;
- save = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement