]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/runematch.qc
stuff.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / runematch.qc
index 8f5e005a425811016052ba7b63882c9cab3f83bb..ba8f648c888b33e0e312cdf8774b3e1cd0169cad 100644 (file)
@@ -133,7 +133,8 @@ string RuneName(float r)
 
 vector RuneColormod(float r)
 {
-       vector _color;
+       vector _color = '255 0 255';
+
        if(r == RUNE_STRENGTH)
                _color = '255 0 0';
        if(r == RUNE_DEFENSE)
@@ -164,7 +165,7 @@ void rune_respawn();
 void RuneCarriedThink()
 {
        float rcount, rnum;
-       vector ang;
+       vector ang = '0 0 0';
        entity rune;
 
        if(self.owner.classname != "player" || time < game_starttime)
@@ -178,6 +179,7 @@ void RuneCarriedThink()
        // count runes my owner holds
        rcount = 0;
        rune = find(world, classname, "rune");
+       rnum = -1;
        while(rune)
        {
                if(rune.owner == self.owner)
@@ -217,11 +219,11 @@ void rune_touch()
 
        other.runes = other.runes | self.runes | self.enemy.runes;
 
-       //self.think = SUB_Null;
+       //self.think = func_null;
        //self.nextthink = 0;
        self.think = RuneCarriedThink;
        self.nextthink = time;
-       self.touch = SUB_Null;
+       self.touch = func_null;
 
        self.solid = SOLID_NOT;
        setorigin(self, self.origin);
@@ -341,16 +343,15 @@ void DropAllRunes(entity pl)
 
        entity curse1, rune1, curse2, rune2;
 
-       rune = curse = world;
        rcount = ccount = r = c = 0;
-       rune = find(rune, classname, "rune");
+       rune = find(world, classname, "rune");
        while(rune)
        {
                if(rune.owner == pl)
                        rcount = rcount + 1;
                rune = find(rune, classname, "rune");
        }
-       curse = find(curse, classname, "curse");
+       curse = find(world, classname, "curse");
        while(curse)
        {
                if(curse.owner == pl)
@@ -361,7 +362,6 @@ void DropAllRunes(entity pl)
        numtodrop = autocvar_g_runematch_drop_runes_max;
        prevent_same = !autocvar_g_runematch_allow_same;
 
-       rune = curse = world;
        do
        {
                rune = find(rune, classname, "rune");
@@ -588,6 +588,7 @@ float RunematchHandleFrags(entity attacker, entity targ, float f)
        if(!arunes && !trunes)
                return f - 1 + autocvar_g_runematch_frags_norune; // don't give points to players when no runes are involved.
 
+       newfrags = 0;
        if(arunes)
        {       // got a kill while holding runes
                newfrags = newfrags + autocvar_g_runematch_frags_killedby_runeholder;//5;