Skip to content

Commit 4b5e3d5

Browse files
committed
Meat powerup: take 50 damage per second if stationary while holding
1 parent ef0fa9b commit 4b5e3d5

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@
416416
### Meat
417417
* All zombies go after player holding the meat
418418
* 75% move speed while holding the meat
419-
* Take 10 damage per second while holding the meat
419+
* Take 50 damage per second if stationary while holding the meat
420420
* Player who threw the meat can meat themself
421421
* Attracts zombies more consistently on ground
422422
* Decreased attract radius on ground by 50%

scripts/zm/replaced/zgrief.gsc

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,32 @@ meat_damage_over_time()
245245
self endon("disconnect");
246246
self endon("player_downed");
247247

248-
wait 0.05;
248+
time_zero_speed = 0;
249249

250250
while (1)
251251
{
252-
wait 1;
252+
velocity = self getVelocity() * (1, 1, 0);
253+
speed = length(velocity);
253254

254-
radiusDamage(self.origin + (0, 0, 5), 10, 10, 10);
255+
if (speed == 0)
256+
{
257+
time_zero_speed++;
258+
}
259+
else
260+
{
261+
if (time_zero_speed > 0)
262+
{
263+
time_zero_speed--;
264+
}
265+
}
266+
267+
if (time_zero_speed >= 20)
268+
{
269+
time_zero_speed = 0;
270+
radiusDamage(self.origin + (0, 0, 5), 10, 50, 50);
271+
}
272+
273+
wait 0.05;
255274
}
256275
}
257276

0 commit comments

Comments
 (0)