1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-10 15:17:57 -05:00

Meat powerup: take 50 damage per second if stationary while holding

This commit is contained in:
Jbleezy
2023-12-04 00:48:56 -08:00
parent ef0fa9bdd8
commit 4b5e3d548d
2 changed files with 23 additions and 4 deletions

View File

@ -245,13 +245,32 @@ meat_damage_over_time()
self endon("disconnect");
self endon("player_downed");
wait 0.05;
time_zero_speed = 0;
while (1)
{
wait 1;
velocity = self getVelocity() * (1, 1, 0);
speed = length(velocity);
radiusDamage(self.origin + (0, 0, 5), 10, 10, 10);
if (speed == 0)
{
time_zero_speed++;
}
else
{
if (time_zero_speed > 0)
{
time_zero_speed--;
}
}
if (time_zero_speed >= 20)
{
time_zero_speed = 0;
radiusDamage(self.origin + (0, 0, 5), 10, 50, 50);
}
wait 0.05;
}
}