quake2ts 0.0.176 → 0.0.178

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12372,6 +12372,15 @@ function player_die(self, inflictor, attacker, damage, point, mod, sys) {
12372
12372
  function player_think(self, sys) {
12373
12373
  if (!self.client) return;
12374
12374
  const nowMs = sys.timeSeconds * 1e3;
12375
+ const quadTime = self.client.quad_time || 0;
12376
+ const doubleTime = self.client.double_time || 0;
12377
+ const soundTime = self.client.quadsound_time || 0;
12378
+ if (quadTime > sys.timeSeconds || doubleTime > sys.timeSeconds) {
12379
+ if (soundTime < sys.timeSeconds) {
12380
+ self.client.quadsound_time = sys.timeSeconds + 1;
12381
+ sys.sound(self, 2, "items/damage3.wav", 1, 1, 0);
12382
+ }
12383
+ }
12375
12384
  for (const [id, expiresAt] of self.client.inventory.powerups.entries()) {
12376
12385
  if (expiresAt === null) continue;
12377
12386
  const remaining = (expiresAt - nowMs) / 1e3;