Update hash again (someone keeps fiddling with bot AI)
authorMario <mario@smbclan.net>
Sat, 1 Apr 2017 17:53:08 +0000 (03:53 +1000)
committerMario <mario@smbclan.net>
Sat, 1 Apr 2017 17:53:08 +0000 (03:53 +1000)
13 files changed:
.gitlab-ci.yml
qcsrc/client/weapons/projectile.qc
qcsrc/client/weapons/projectile.qh
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/sounds/all.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/server/miscfunctions.qh

index 488ed3e..27a3e88 100644 (file)
@@ -29,7 +29,7 @@ test_sv_game:
     - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
     - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
     - make
-    - EXPECT=6278f5ed2abb15f99cddd78d946e657e
+    - EXPECT=29c9a2567f546cf96080cc8b512099eb
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index f31bef7..ae5ae63 100644 (file)
@@ -164,13 +164,13 @@ void Projectile_Draw(entity this)
        this.drawmask = MASK_NORMAL;
 }
 
-void loopsound(entity e, int ch, string samp, float vol, float attn)
+void loopsound(entity e, int ch, Sound samp, float vol, float attn)
 {
     TC(int, ch);
        if (e.silent)
                return;
 
-       _sound(e, ch, samp, vol, attn);
+       sound(e, ch, samp, vol, attn);
        e.snd_looping = ch;
 }
 
@@ -357,7 +357,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                {
                        case PROJECTILE_ELECTRO:
                                // only new engines support sound moving with object
-                               loopsound(this, CH_SHOTS_SINGLE, SND(ELECTRO_FLY), VOL_BASE, ATTEN_NORM);
+                               loopsound(this, CH_SHOTS_SINGLE, SND_ELECTRO_FLY, VOL_BASE, ATTEN_NORM);
                                this.mins = '-4 -4 -4';
                                this.maxs = '4 4 4';
                                set_movetype(this, MOVETYPE_BOUNCE);
@@ -367,7 +367,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                                break;
                        case PROJECTILE_RPC:
                        case PROJECTILE_ROCKET:
-                               loopsound(this, CH_SHOTS_SINGLE, SND(ROCKET_FLY), VOL_BASE, ATTEN_NORM);
+                               loopsound(this, CH_SHOTS_SINGLE, SND_ROCKET_FLY, VOL_BASE, ATTEN_NORM);
                                this.mins = '-3 -3 -3';
                                this.maxs = '3 3 3';
                                break;
@@ -414,12 +414,12 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                                settouch(this, func_null);
                                break;
                        case PROJECTILE_FIREBALL:
-                               loopsound(this, CH_SHOTS_SINGLE, SND(FIREBALL_FLY2), VOL_BASE, ATTEN_NORM);
+                               loopsound(this, CH_SHOTS_SINGLE, SND_FIREBALL_FLY2, VOL_BASE, ATTEN_NORM);
                                this.mins = '-16 -16 -16';
                                this.maxs = '16 16 16';
                                break;
                        case PROJECTILE_FIREMINE:
-                               loopsound(this, CH_SHOTS_SINGLE, SND(FIREBALL_FLY), VOL_BASE, ATTEN_NORM);
+                               loopsound(this, CH_SHOTS_SINGLE, SND_FIREBALL_FLY, VOL_BASE, ATTEN_NORM);
                                set_movetype(this, MOVETYPE_BOUNCE);
                                settouch(this, func_null);
                                this.mins = '-4 -4 -4';
@@ -434,7 +434,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                                this.maxs = '2 2 2';
                                break;
                        case PROJECTILE_SEEKER:
-                               loopsound(this, CH_SHOTS_SINGLE, SND(TAG_ROCKET_FLY), VOL_BASE, ATTEN_NORM);
+                               loopsound(this, CH_SHOTS_SINGLE, SND_TAG_ROCKET_FLY, VOL_BASE, ATTEN_NORM);
                                this.mins = '-4 -4 -4';
                                this.maxs = '4 4 4';
                                break;
@@ -447,17 +447,17 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                        case PROJECTILE_RAPTORCANNON:
                                break;
                        case PROJECTILE_SPIDERROCKET:
-                               loopsound(this, CH_SHOTS_SINGLE, SND(TAG_ROCKET_FLY), VOL_BASE, ATTEN_NORM);
+                               loopsound(this, CH_SHOTS_SINGLE, SND_TAG_ROCKET_FLY, VOL_BASE, ATTEN_NORM);
                                break;
                        case PROJECTILE_WAKIROCKET:
-                               loopsound(this, CH_SHOTS_SINGLE, SND(TAG_ROCKET_FLY), VOL_BASE, ATTEN_NORM);
+                               loopsound(this, CH_SHOTS_SINGLE, SND_TAG_ROCKET_FLY, VOL_BASE, ATTEN_NORM);
                                break;
                        /*
                        case PROJECTILE_WAKICANNON:
                            break;
                        case PROJECTILE_BUMBLE_GUN:
                            // only new engines support sound moving with object
-                           loopsound(this, CH_SHOTS_SINGLE, SND(ELECTRO_FLY), VOL_BASE, ATTEN_NORM);
+                           loopsound(this, CH_SHOTS_SINGLE, SND_ELECTRO_FLY, VOL_BASE, ATTEN_NORM);
                            this.mins = '0 0 -4';
                            this.maxs = '0 0 -4';
                            this.move_movetype = MOVETYPE_BOUNCE;
index 27bca00..cc95753 100644 (file)
@@ -24,7 +24,7 @@ void Projectile_DrawTrail(entity this, vector to);
 
 void Projectile_Draw(entity this);
 
-void loopsound(entity e, int ch, string samp, float vol, float attn);
+void loopsound(entity e, int ch, Sound samp, float vol, float attn);
 
 void Ent_RemoveProjectile(entity this);
 
index 5270fc2..246c1be 100644 (file)
@@ -1079,7 +1079,7 @@ void Monster_Damage(entity this, entity inflictor, entity attacker, float damage
        this.dmg_time = time;
 
        if(deathtype != DEATH_DROWN.m_id && deathtype != DEATH_FIRE.m_id && sound_allowed(MSG_BROADCAST, attacker))
-               spamsound (this, CH_PAIN, SND(BODYIMPACT1), VOL_BASE, ATTEN_NORM);  // FIXME: PLACEHOLDER
+               spamsound (this, CH_PAIN, SND_BODYIMPACT1, VOL_BASE, ATTEN_NORM);  // FIXME: PLACEHOLDER
 
        this.velocity += force * this.damageforcescale;
 
index d268b16..da244ea 100644 (file)
@@ -74,7 +74,7 @@ MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile)
 
        if (proj.cnt == PROJECTILE_NAPALM_FOUNTAIN)
        {
-               loopsound(proj, CH_SHOTS_SINGLE, SND(FIREBALL_FLY2), VOL_BASE, ATTEN_NORM);
+               loopsound(proj, CH_SHOTS_SINGLE, SND_FIREBALL_FLY2, VOL_BASE, ATTEN_NORM);
                proj.mins = '-16 -16 -16';
                proj.maxs = '16 16 16';
        }
@@ -265,7 +265,7 @@ void nade_napalm_ball(entity this)
        entity proj;
        vector kick;
 
-       spamsound(this, CH_SHOTS, SND(FIREBALL_FIRE), VOL_BASE, ATTEN_NORM);
+       spamsound(this, CH_SHOTS, SND_FIREBALL_FIRE, VOL_BASE, ATTEN_NORM);
 
        proj = new(grenade);
        proj.owner = this.owner;
@@ -798,7 +798,7 @@ void nade_touch(entity this, entity toucher)
        //UpdateCSQCProjectile(this);
        if(this.health == this.max_health)
        {
-               spamsound(this, CH_SHOTS, SND(GRENADE_BOUNCE_RANDOM()), VOL_BASE, ATTEN_NORM);
+               spamsound(this, CH_SHOTS, SND_GRENADE_BOUNCE_RANDOM(), VOL_BASE, ATTEN_NORM);
                return;
        }
 
index b3bdf99..203b643 100644 (file)
@@ -114,13 +114,13 @@ void play2(entity e, string filename)
 
 .float spamtime;
 /** use this one if you might be causing spam (e.g. from touch functions that might get called more than once per frame) */
-float spamsound(entity e, int chan, string samp, float vol, float _atten)
+float spamsound(entity e, int chan, Sound samp, float vol, float _atten)
 {
        if (!sound_allowed(MSG_BROADCAST, e)) return false;
        if (time > e.spamtime)
        {
                e.spamtime = time;
-               _sound(e, chan, samp, vol, _atten);
+               sound(e, chan, samp, vol, _atten);
                return true;
        }
        return false;
index 8daa561..b469c50 100644 (file)
@@ -686,11 +686,11 @@ void vehicles_damage(entity this, entity inflictor, entity attacker, float damag
                        this.vehicle_shieldent.alpha = 0.75;
 
                        if(sound_allowed(MSG_BROADCAST, attacker))
-                               spamsound (this, CH_PAIN, "onslaught/ons_hit2.wav", VOL_BASE, ATTEN_NORM);   // FIXME: PLACEHOLDER
+                               spamsound (this, CH_PAIN, SND_ONS_HIT2, VOL_BASE, ATTEN_NORM);   // FIXME: PLACEHOLDER
                }
                else
                        if(sound_allowed(MSG_BROADCAST, attacker))
-                               spamsound (this, CH_PAIN, "onslaught/electricity_explode.wav", VOL_BASE, ATTEN_NORM);  // FIXME: PLACEHOLDER
+                               spamsound (this, CH_PAIN, SND_ONS_ELECTRICITY_EXPLODE, VOL_BASE, ATTEN_NORM);  // FIXME: PLACEHOLDER
 
        }
        else
@@ -698,7 +698,7 @@ void vehicles_damage(entity this, entity inflictor, entity attacker, float damag
                this.vehicle_health -= damage;
 
                if(sound_allowed(MSG_BROADCAST, attacker))
-                       spamsound (this, CH_PAIN, "onslaught/ons_hit2.wav", VOL_BASE, ATTEN_NORM);  // FIXME: PLACEHOLDER
+                       spamsound (this, CH_PAIN, SND_ONS_HIT2, VOL_BASE, ATTEN_NORM);  // FIXME: PLACEHOLDER
        }
 
        if(this.damageforcescale < 1 && this.damageforcescale > 0)
index 7e77d34..1f6c3d4 100644 (file)
@@ -1317,7 +1317,7 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew)
                IL_PUSH(g_drawables, this);
                this.entremove = Remove_ArcBeam;
                this.move_time = time;
-               loopsound(this, CH_SHOTS_SINGLE, SND(ARC_LOOP), VOL_BASE, ATTEN_NORM);
+               loopsound(this, CH_SHOTS_SINGLE, SND_ARC_LOOP, VOL_BASE, ATTEN_NORM);
 
                flash = spawn();
                flash.owner = this;
index 0e8d272..9d01d1c 100644 (file)
@@ -359,7 +359,7 @@ void W_Electro_Orb_Touch(entity this, entity toucher)
        else
        {
                //UpdateCSQCProjectile(this);
-               spamsound(this, CH_SHOTS, SND(ELECTRO_BOUNCE), VOL_BASE, ATTEN_NORM);
+               spamsound(this, CH_SHOTS, SND_ELECTRO_BOUNCE, VOL_BASE, ATTEN_NORM);
                this.projectiledeathtype |= HITTYPE_BOUNCE;
 
                if(WEP_CVAR_SEC(electro, stick))
index a6e8cac..73b29a4 100644 (file)
@@ -66,7 +66,7 @@ spawnfunc(weapon_minelayer) { weapon_defaultspawnfunc(this, WEP_MINE_LAYER); }
 
 void W_MineLayer_Stick(entity this, entity to)
 {
-       spamsound(this, CH_SHOTS, SND(MINE_STICK), VOL_BASE, ATTN_NORM);
+       spamsound(this, CH_SHOTS, SND_MINE_STICK, VOL_BASE, ATTN_NORM);
 
        // in order for mines to face properly when sticking to the ground, they must be a server side entity rather than a csqc projectile
 
@@ -239,7 +239,7 @@ void W_MineLayer_Think(entity this)
        if((time > this.cnt) && (!this.mine_time) && (this.cnt > 0))
        {
                if(WEP_CVAR(minelayer, lifetime_countdown) > 0)
-                       spamsound(this, CH_SHOTS, SND(MINE_TRIGGER), VOL_BASE, ATTN_NORM);
+                       spamsound(this, CH_SHOTS, SND_MINE_TRIGGER, VOL_BASE, ATTN_NORM);
                this.mine_time = time + WEP_CVAR(minelayer, lifetime_countdown);
                this.mine_explodeanyway = 1; // make the mine super aggressive -- Samual: Rather, make it not care if a team mate is near.
        }
@@ -261,7 +261,7 @@ void W_MineLayer_Think(entity this)
                if(head != this.realowner && DIFF_TEAM(head, this.realowner)) // don't trigger for team mates
                if(!this.mine_time)
                {
-                       spamsound(this, CH_SHOTS, SND(MINE_TRIGGER), VOL_BASE, ATTN_NORM);
+                       spamsound(this, CH_SHOTS, SND_MINE_TRIGGER, VOL_BASE, ATTN_NORM);
                        this.mine_time = time + WEP_CVAR(minelayer, time);
                }
                head = head.chain;
index 0ea0f1b..f6b498a 100644 (file)
@@ -151,14 +151,14 @@ void W_Mortar_Grenade_Touch1(entity this, entity toucher)
        }
        else if(WEP_CVAR_PRI(mortar, type) == 1) // bounce
        {
-               spamsound(this, CH_SHOTS, SND(GRENADE_BOUNCE_RANDOM()), VOL_BASE, ATTN_NORM);
+               spamsound(this, CH_SHOTS, SND_GRENADE_BOUNCE_RANDOM(), VOL_BASE, ATTN_NORM);
                Send_Effect(EFFECT_HAGAR_BOUNCE, this.origin, this.velocity, 1);
                this.projectiledeathtype |= HITTYPE_BOUNCE;
                this.gl_bouncecnt += 1;
        }
        else if(WEP_CVAR_PRI(mortar, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.move_movetype == MOVETYPE_NONE))) // stick
        {
-               spamsound(this, CH_SHOTS, SND(GRENADE_STICK), VOL_BASE, ATTN_NORM);
+               spamsound(this, CH_SHOTS, SND_GRENADE_STICK, VOL_BASE, ATTN_NORM);
 
                // let it stick whereever it is
                this.oldvelocity = this.velocity;
@@ -183,7 +183,7 @@ void W_Mortar_Grenade_Touch2(entity this, entity toucher)
        }
        else if(WEP_CVAR_SEC(mortar, type) == 1) // bounce
        {
-               spamsound(this, CH_SHOTS, SND(GRENADE_BOUNCE_RANDOM()), VOL_BASE, ATTN_NORM);
+               spamsound(this, CH_SHOTS, SND_GRENADE_BOUNCE_RANDOM(), VOL_BASE, ATTN_NORM);
                Send_Effect(EFFECT_HAGAR_BOUNCE, this.origin, this.velocity, 1);
                this.projectiledeathtype |= HITTYPE_BOUNCE;
                this.gl_bouncecnt += 1;
@@ -194,7 +194,7 @@ void W_Mortar_Grenade_Touch2(entity this, entity toucher)
        }
        else if(WEP_CVAR_SEC(mortar, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.move_movetype == MOVETYPE_NONE))) // stick
        {
-               spamsound(this, CH_SHOTS, SND(GRENADE_STICK), VOL_BASE, ATTN_NORM);
+               spamsound(this, CH_SHOTS, SND_GRENADE_STICK, VOL_BASE, ATTN_NORM);
 
                // let it stick whereever it is
                this.oldvelocity = this.velocity;
index f7b7a10..e2ac5ee 100644 (file)
@@ -151,7 +151,7 @@ void W_Porto_Touch(entity this, entity toucher)
        }
        else if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK) || (trace_dphitcontents & DPCONTENTS_PLAYERCLIP))
        {
-               spamsound(this, CH_SHOTS, SND(PORTO_BOUNCE), VOL_BASE, ATTEN_NORM);
+               spamsound(this, CH_SHOTS, SND_PORTO_BOUNCE, VOL_BASE, ATTEN_NORM);
                // just reflect
                this.right_vector = this.right_vector - 2 * trace_plane_normal * (this.right_vector * trace_plane_normal);
                this.angles = vectoangles(this.velocity - 2 * trace_plane_normal * (this.velocity * trace_plane_normal));
index 4cc3bc3..1e2dc57 100644 (file)
@@ -40,7 +40,7 @@ void play2team(float t, string filename);
 
 void GetCvars_handleFloat(entity this, string thisname, float f, .float field, string name);
 
-float spamsound(entity e, float chan, string samp, float vol, float _atten);
+float spamsound(entity e, float chan, Sound samp, float vol, float _atten);
 
 void GetCvars_handleString(entity this, string thisname, float f, .string field, string name);