]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Many fixes for announcer code, plus FINALLY fix the hagar "linkexplode" bug for conte...
authorSamual <samual@xonotic.org>
Fri, 4 Nov 2011 06:30:42 +0000 (02:30 -0400)
committerSamual <samual@xonotic.org>
Fri, 4 Nov 2011 06:30:42 +0000 (02:30 -0400)
defaultXonotic.cfg
qcsrc/client/announcer.qc
qcsrc/server/w_common.qc
qcsrc/server/w_hagar.qc

index 7dc17ccbdd7c55bd8fa27e0cad95285154eee60f..69b97a9c8ad39f6f559c19e00e15004a83610643 100644 (file)
@@ -960,7 +960,7 @@ sv_sound_watersplash ""
 
 seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"
 seta cl_announcer_antispam 2 "number of seconds before an announcement of the same sound can be played again"
-seta cl_announcer_maptime "1" "play announcer sound telling you the remaining maptime - 0: do not play at all, 1: play at one minute, 2: play at five minutes, 3: play both"
+seta cl_announcer_maptime 3 "play announcer sound telling you the remaining maptime - 0: do not play at all, 1: play at one minute, 2: play at five minutes, 3: play both"
 seta cl_notify_carried_items "3" "notify you of carried items when you obtain them (e.g. flags in CTF) - 0: disabled, 1: notify of taken items, 2: notify of picking up dropped items, 3: notify of both"
 
 // startmap_dm is used when running with the -listen or -dedicated commandline options
index 4c8884ddf37d1eb8e236c23e0e6ec9982709bc19..be2f8734c04594f9833ece10990b4f812824118f 100644 (file)
@@ -11,11 +11,11 @@ void Announcer_Play(string announcement)
        if((announcement != previous_announcement) || (time >= (previous_announcement_time + autocvar_cl_announcer_antispam)))
        {
                sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", announcement, ".wav"), VOL_BASEVOICE, ATTN_NONE);
-               print(strcat("announcement: '", announcement, "' at time: ", ftos(time), ". \n"));
 
                previous_announcement = announcement;
                previous_announcement_time = time;
        }
+       print(strcat("announcement: '", announcement, "' at time: ", ftos(time), ". \n"));
 }
 
 void Announcer_Countdown() 
index 45b5545dd16273a50e5fa495defb737026d1a126..a05c17bd4b40f7dbd392f0a8b45970824d4bb6e8 100644 (file)
@@ -542,7 +542,7 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp
        float is_from_owner = (inflictor == projowner);
        float is_from_exception = (exception != -1);
        
-       print(strcat("from_contents ", ftos(is_from_contents), " : from_owner ", ftos(is_from_owner), " : exception ", strcat(ftos(is_from_exception), " (", ftos(exception), "). \n")));
+       //dprint(strcat("W_CheckProjectileDamage: from_contents ", ftos(is_from_contents), " : from_owner ", ftos(is_from_owner), " : exception ", strcat(ftos(is_from_exception), " (", ftos(exception), "). \n")));
 
        if(autocvar_g_projectiles_damage <= -2)
        {
index aa0dcdcd6ecc5cfa5bd6729ed91c9ffd3e851b70..76103f347e34fa50c6d16c849f6ee0dc0c15f2ac 100644 (file)
@@ -25,24 +25,15 @@ void W_Hagar_Damage (entity inflictor, entity attacker, float damage, float deat
        if (self.health <= 0)
                return;
                
-       float is_linkexplode = ((inflictor.owner == self.owner) 
+       float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == self.owner) : TRUE)
                && (inflictor.projectiledeathtype & HITTYPE_SECONDARY) 
                && (self.projectiledeathtype & HITTYPE_SECONDARY));
-               
-       /*
-       float is_linkexplode = ( ( ((inflictor.realowner == self.realowner) 
-       && (inflictor.projectiledeathtype & HITTYPE_SECONDARY))
-       || (deathtype == DEATH_SLIME || deathtype == DEATH_LAVA) ) 
-               && (self.projectiledeathtype & HITTYPE_SECONDARY) );
-       */
        
        if(is_linkexplode)
                is_linkexplode = (is_linkexplode && autocvar_g_balance_hagar_secondary_load_linkexplode);
        else
                is_linkexplode = -1; // not secondary load, so continue as normal without exception.
-               
-       print(strcat("is_linkexplode: ", ftos(is_linkexplode), ", inflict_owner_classname: ", inflictor.owner.classname, ", self_owner_classname: ", self.owner.classname, ". \n"));
-               
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, is_linkexplode))
                return; // g_projectiles_damage says to halt