X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmode_onslaught.qc;h=ebca6ee2b7b4353ba16afe6b76a941973e1ffcc5;hb=fbb2508f740a7458edb2517369241b40cc02b744;hp=4f8aee2e76431f3cb36d5f438007c7037cdd6076;hpb=b5a593d8425521092f05949c4143d86a25d49f4c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mode_onslaught.qc b/qcsrc/server/mode_onslaught.qc index 4f8aee2e7..ebca6ee2b 100644 --- a/qcsrc/server/mode_onslaught.qc +++ b/qcsrc/server/mode_onslaught.qc @@ -43,11 +43,11 @@ void ons_throwgib_think() if(d>2) if(random()<0.6) pointparticles(particleeffectnum("onslaught_generator_gib_flame"), self.origin, '0 0 0', 1); -}; +} void ons_throwgib(vector v_from, vector v_to, string smodel, float f_lifetime, float b_burn) { - local entity gib; + entity gib; gib = spawn(); @@ -70,12 +70,12 @@ void ons_throwgib(vector v_from, vector v_to, string smodel, float f_lifetime, f } else SUB_SetFade(gib, gib.giblifetime, 2); -}; +} void onslaught_updatelinks() { - local entity l, links; - local float stop, t1, t2, t3, t4; + entity l, links; + float stop, t1, t2, t3, t4; // first check if the game has ended dprint("--- updatelinks ---\n"); links = findchain(classname, "onslaught_link"); @@ -258,7 +258,7 @@ void onslaught_updatelinks() dprint("--- game over ---\n"); else dprint("--- done updating links ---\n"); -}; +} float onslaught_controlpoint_can_be_linked(entity cp, float t) { @@ -375,8 +375,8 @@ float onslaught_controlpoint_attackable(entity cp, float t) float overtime_msg_time; void onslaught_generator_think() { - local float d; - local entity e; + float d; + entity e; self.nextthink = ceil(time + 1); if (!gameover) { @@ -400,18 +400,21 @@ void onslaught_generator_think() d = d + 1; e = e.chain; } - d = d * self.max_health / 300; + if(autocvar_g_campaign && autocvar__campaign_testrun) + d = d * self.max_health; + else + d = d * self.max_health / max(30, 60 * autocvar_timelimit_suddendeath); Damage(self, self, self, d, DEATH_HURTTRIGGER, self.origin, '0 0 0'); } else if (overtime_msg_time) overtime_msg_time = 0; } -}; +} void onslaught_generator_ring_spawn(vector org) { modeleffect_spawn("models/onslaught/shockwavetransring.md3", 0, 0, org, '0 0 0', '0 0 0', '0 0 0', 0, -16, 0.1, 1.25, 0.25); -}; +} void onslaught_generator_ray_think() { @@ -429,7 +432,7 @@ void onslaught_generator_ray_think() self.scale += 0.2; self.count +=1; -}; +} void onslaught_generator_ray_spawn(vector org) { @@ -442,12 +445,12 @@ void onslaught_generator_ray_spawn(vector org) e.scale = random() * 5 + 8; e.think = onslaught_generator_ray_think; e.nextthink = time + 0.05; -}; +} void onslaught_generator_shockwave_spawn(vector org) { shockwave_spawn("models/onslaught/shockwave.md3", org, -64, 0.75, 0.5); -}; +} void onslaught_generator_damage_think() { @@ -467,7 +470,7 @@ void onslaught_generator_damage_think() } else pointparticles(particleeffectnum("torch_small"), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1); -}; +} void onslaught_generator_damage_spawn(entity gd_owner) { @@ -478,12 +481,12 @@ void onslaught_generator_damage_spawn(entity gd_owner) setorigin(e, gd_owner.origin); e.think = onslaught_generator_damage_think; e.nextthink = time+1; -}; +} void onslaught_generator_deaththink() { - local vector org; - local float i; + vector org; + float i; if not (self.count) self.count = 40; @@ -544,11 +547,11 @@ void onslaught_generator_deaththink() self.nextthink = time + 0.05; self.count = self.count - 1; -}; +} void onslaught_generator_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { - local float i; + float i; if (damage <= 0) return; if(inWarmupStage) @@ -664,7 +667,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage, if(random() < damage/200+0.2) if(random() < 0.5) ons_throwgib(hitloc + '0 0 20', randomvec()*360, "models/onslaught/gen_gib1.md3", 5, FALSE); -}; +} // update links after a delay void onslaught_generator_delayed() @@ -673,7 +676,7 @@ void onslaught_generator_delayed() // now begin normal thinking self.think = onslaught_generator_think; self.nextthink = time; -}; +} string onslaught_generator_waypointsprite_for_team(entity e, float t) { @@ -850,7 +853,7 @@ void spawnfunc_onslaught_generator() return; } - local entity e; + entity e; precache_model("models/onslaught/generator.md3"); precache_model("models/onslaught/generator_shield.md3"); precache_model("models/onslaught/generator_dmg1.md3"); @@ -919,7 +922,7 @@ void spawnfunc_onslaught_generator() onslaught_updatelinks(); self.reset = onslaught_generator_reset; -}; +} .float waslinked; .float cp_bob_spd; @@ -949,6 +952,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float if (attacker.classname == "player") { + nag = FALSE; if(self.team == COLOR_TEAM1) { if(time - ons_notification_time_team1 > 10) @@ -1031,7 +1035,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float remove(self); } -}; +} void onslaught_controlpoint_icon_think() { @@ -1139,11 +1143,11 @@ void onslaught_controlpoint_icon_think() else if (random() > 0.5) sound(self, CH_PAIN, "onslaught/ons_spark2.wav", VOL_BASE, ATTN_NORM); } -}; +} void onslaught_controlpoint_icon_buildthink() { - local entity oself; + entity oself; float a; self.nextthink = time + sys_frametime; @@ -1188,14 +1192,14 @@ void onslaught_controlpoint_icon_buildthink() if(random() < 0.9 - self.health / self.max_health) pointparticles(particleeffectnum("rage"), self.origin + 10 * randomvec(), '0 0 -1', 1); -}; +} void onslaught_controlpoint_touch() { - local entity e; + entity e; float a; if (other.classname != "player") return; @@ -1228,7 +1232,7 @@ void onslaught_controlpoint_touch() self.colormap = e.colormap; WaypointSprite_UpdateBuildFinished(self.sprite, time + (e.max_health - e.health) / (e.count / sys_frametime)); onslaught_updatelinks(); -}; +} void onslaught_controlpoint_reset() { @@ -1267,7 +1271,7 @@ keys: */ void spawnfunc_onslaught_controlpoint() { - local entity e; + entity e; if (!g_onslaught) { remove(self); @@ -1320,7 +1324,7 @@ void spawnfunc_onslaught_controlpoint() onslaught_updatelinks(); self.reset = onslaught_controlpoint_reset; -}; +} float onslaught_link_send(entity to, float sendflags) { @@ -1424,4 +1428,4 @@ void spawnfunc_onslaught_link() objerror("target and target2 must be set\n"); InitializeEntity(self, onslaught_link_delayed, INITPRIO_FINDTARGET); Net_LinkEntity(self, FALSE, 0, onslaught_link_send); -}; +}