X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fmode_onslaught.qc;h=4f8aee2e76431f3cb36d5f438007c7037cdd6076;hp=457141f74a5fc4042a7ee6fce50a434987a16a08;hb=4337dab09bbbe024bcc77db446ed76962fb17f0d;hpb=ead998eb93f3b5df0d46e09455e7aa8fef44540d diff --git a/qcsrc/server/mode_onslaught.qc b/qcsrc/server/mode_onslaught.qc index 457141f74..4f8aee2e7 100644 --- a/qcsrc/server/mode_onslaught.qc +++ b/qcsrc/server/mode_onslaught.qc @@ -372,6 +372,7 @@ float onslaught_controlpoint_attackable(entity cp, float t) return 0; } +float overtime_msg_time; void onslaught_generator_think() { local float d; @@ -379,9 +380,14 @@ void onslaught_generator_think() self.nextthink = ceil(time + 1); if (!gameover) { - if (autocvar_timelimit) - if (time > game_starttime + autocvar_timelimit * 60) + if (autocvar_timelimit && time > game_starttime + autocvar_timelimit * 60) { + if (!overtime_msg_time) + { + FOR_EACH_PLAYER(e) + centerprint(e, "^3Now playing ^1OVERTIME^3!\n^3Generators start now to self-damaging.\n^3The more control points your team holds,\n^3the more damage the enemy generator gets."); + overtime_msg_time = time; + } // self.max_health / 300 gives 5 minutes of overtime. // control points reduce the overtime duration. sound(self, CH_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM); @@ -397,6 +403,8 @@ void onslaught_generator_think() d = d * self.max_health / 300; Damage(self, self, self, d, DEATH_HURTTRIGGER, self.origin, '0 0 0'); } + else if (overtime_msg_time) + overtime_msg_time = 0; } }; @@ -819,6 +827,7 @@ void onslaught_generator_reset() self.think = onslaught_generator_delayed; self.nextthink = time + 0.2; setmodel(self, "models/onslaught/generator.md3"); + setsize(self, '-52 -52 -14', '52 52 75'); WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health); WaypointSprite_UpdateHealth(self.sprite, self.health); @@ -1067,33 +1076,55 @@ void onslaught_controlpoint_icon_think() self.owner.waslinked = self.owner.islinked; } - if (self.punchangle_x > 2) - self.punchangle_x = self.punchangle_x - 2; - else if (self.punchangle_x < -2) - self.punchangle_x = self.punchangle_x + 2; - else - self.punchangle_x = 0; - if (self.punchangle_y > 2) - self.punchangle_y = self.punchangle_y - 2; - else if (self.punchangle_y < -2) - self.punchangle_y = self.punchangle_y + 2; - else - self.punchangle_y = 0; - if (self.punchangle_z > 2) - self.punchangle_z = self.punchangle_z - 2; - else if (self.punchangle_z < -2) - self.punchangle_z = self.punchangle_z + 2; - else - self.punchangle_z = 0; + + if (self.punchangle_x > 0) + { + self.punchangle_x = self.punchangle_x - 60 * sys_frametime; + if (self.punchangle_x < 0) + self.punchangle_x = 0; + } + else if (self.punchangle_x < 0) + { + self.punchangle_x = self.punchangle_x + 60 * sys_frametime; + if (self.punchangle_x > 0) + self.punchangle_x = 0; + } + + if (self.punchangle_y > 0) + { + self.punchangle_y = self.punchangle_y - 60 * sys_frametime; + if (self.punchangle_y < 0) + self.punchangle_y = 0; + } + else if (self.punchangle_y < 0) + { + self.punchangle_y = self.punchangle_y + 60 * sys_frametime; + if (self.punchangle_y > 0) + self.punchangle_y = 0; + } + + if (self.punchangle_z > 0) + { + self.punchangle_z = self.punchangle_z - 60 * sys_frametime; + if (self.punchangle_z < 0) + self.punchangle_z = 0; + } + else if (self.punchangle_z < 0) + { + self.punchangle_z = self.punchangle_z + 60 * sys_frametime; + if (self.punchangle_z > 0) + self.punchangle_z = 0; + } + self.angles_x = self.punchangle_x; self.angles_y = self.punchangle_y + self.mangle_y; self.angles_z = self.punchangle_z; - self.mangle_y = self.mangle_y + 1.5; + self.mangle_y = self.mangle_y + 45 * sys_frametime; - self.cp_bob_origin_z = 4 * PI * (1 - cos(self.cp_bob_spd / 8)); - self.cp_bob_spd = self.cp_bob_spd + 0.5; + self.cp_bob_origin_z = 4 * PI * (1 - cos(self.cp_bob_spd)); + self.cp_bob_spd = self.cp_bob_spd + 1.875 * sys_frametime; if(self.cp_bob_dmg_z > 0) - self.cp_bob_dmg_z = self.cp_bob_dmg_z - 0.1; + self.cp_bob_dmg_z = self.cp_bob_dmg_z - 3 * sys_frametime; else self.cp_bob_dmg_z = 0; setorigin(self,self.cp_origin + self.cp_bob_origin + self.cp_bob_dmg);