]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Merge branch 'master' into terencehill/accuracy_shotgun
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index afe018c08bc0198c2240c99e44f7dea7e75295fd..713cf385dccc4387f6283b34433f064ea177cf55 100644 (file)
@@ -47,7 +47,7 @@ void GiveFrags (entity attacker, entity targ, float f, int deathtype)
                else
                {
                        // teamkill
-                       GameRules_scoring_add(attacker, KILLS, -1); // or maybe add a teamkills field?
+                       GameRules_scoring_add(attacker, TEAMKILLS, 1);
                }
        }
        else
@@ -521,7 +521,7 @@ void Ice_Think(entity this)
        this.nextthink = time;
 }
 
-void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypoint)
+void Freeze (entity targ, float revivespeed, float frozen_type, float show_waypoint)
 {
        if(!IS_PLAYER(targ) && !IS_MONSTER(targ)) // only specified entities can be freezed
                return;
@@ -534,10 +534,11 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo
        STAT(FROZEN, targ) = frozen_type;
        targ.revive_progress = ((frozen_type == 3) ? 1 : 0);
        SetResourceAmount(targ, RESOURCE_HEALTH, ((frozen_type == 3) ? targ_maxhealth : 1));
-       targ.revive_speed = freeze_time;
+       targ.revive_speed = revivespeed;
        if(targ.bot_attack)
                IL_REMOVE(g_bot_targets, targ);
        targ.bot_attack = false;
+       targ.freeze_time = time;
 
        entity ice = new(ice);
        ice.owner = targ;
@@ -698,7 +699,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                                                                        force = '0 0 0';
                                                        }
                                                }
-                                               else
+                                               else if(!targ.canteamdamage)
                                                        damage = 0;
                                        }
                                }