From 8a9d46ed4917e588c104bed8b68bcb27a1f10aea Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 2 Apr 2017 03:53:08 +1000 Subject: [PATCH] Update hash again (someone keeps fiddling with bot AI) --- .gitlab-ci.yml | 2 +- qcsrc/client/weapons/projectile.qc | 20 ++++++++++---------- qcsrc/client/weapons/projectile.qh | 2 +- qcsrc/common/monsters/sv_monsters.qc | 2 +- qcsrc/common/mutators/mutator/nades/nades.qc | 6 +++--- qcsrc/common/sounds/all.qc | 4 ++-- qcsrc/common/vehicles/sv_vehicles.qc | 6 +++--- qcsrc/common/weapons/weapon/arc.qc | 2 +- qcsrc/common/weapons/weapon/electro.qc | 2 +- qcsrc/common/weapons/weapon/minelayer.qc | 6 +++--- qcsrc/common/weapons/weapon/mortar.qc | 8 ++++---- qcsrc/common/weapons/weapon/porto.qc | 2 +- qcsrc/server/miscfunctions.qh | 2 +- 13 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 488ed3ed2..27a3e88dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 '^:' diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index f31bef7a3..ae5ae630c 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -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; diff --git a/qcsrc/client/weapons/projectile.qh b/qcsrc/client/weapons/projectile.qh index 27bca00c8..cc9575360 100644 --- a/qcsrc/client/weapons/projectile.qh +++ b/qcsrc/client/weapons/projectile.qh @@ -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); diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 5270fc263..246c1bef4 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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; diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index d268b169d..da244ea1f 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -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; } diff --git a/qcsrc/common/sounds/all.qc b/qcsrc/common/sounds/all.qc index b3bdf99e9..203b64385 100644 --- a/qcsrc/common/sounds/all.qc +++ b/qcsrc/common/sounds/all.qc @@ -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; diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 8daa561a1..b469c5002 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -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) diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index 7e77d3470..1f6c3d40a 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -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; diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index 0e8d272e0..9d01d1c32 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -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)) diff --git a/qcsrc/common/weapons/weapon/minelayer.qc b/qcsrc/common/weapons/weapon/minelayer.qc index a6e8cac47..73b29a48d 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qc +++ b/qcsrc/common/weapons/weapon/minelayer.qc @@ -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; diff --git a/qcsrc/common/weapons/weapon/mortar.qc b/qcsrc/common/weapons/weapon/mortar.qc index 0ea0f1b1b..f6b498a8b 100644 --- a/qcsrc/common/weapons/weapon/mortar.qc +++ b/qcsrc/common/weapons/weapon/mortar.qc @@ -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; diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index f7b7a100d..e2ac5ee79 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -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)); diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 4cc3bc3de..1e2dc57f0 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -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); -- 2.39.2