quake2ts 0.0.302 → 0.0.303

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.
@@ -8776,6 +8776,7 @@ function registerLightSpawns(registry) {
8776
8776
  init_esm();
8777
8777
 
8778
8778
  // src/ai/monster.ts
8779
+ init_esm();
8779
8780
  function M_MoveFrame(self, context) {
8780
8781
  const move = self.monsterinfo.current_move;
8781
8782
  if (!move) {
@@ -8810,8 +8811,20 @@ function M_MoveFrame(self, context) {
8810
8811
  }
8811
8812
  }
8812
8813
  function monster_think(self, context) {
8814
+ if (self.monsterinfo.freeze_time) {
8815
+ if (self.monsterinfo.freeze_time > context.timeSeconds) {
8816
+ self.renderfx |= RenderFx.ShellBlue | RenderFx.ShellGreen;
8817
+ self.nextthink = context.timeSeconds + 0.1;
8818
+ return;
8819
+ } else {
8820
+ self.monsterinfo.freeze_time = 0;
8821
+ self.renderfx &= ~(RenderFx.ShellBlue | RenderFx.ShellGreen);
8822
+ }
8823
+ }
8813
8824
  M_MoveFrame(self, context);
8814
- self.nextthink = context.timeSeconds + 0.1;
8825
+ if (self.nextthink <= context.timeSeconds) {
8826
+ self.nextthink = context.timeSeconds + 0.1;
8827
+ }
8815
8828
  }
8816
8829
 
8817
8830
  // src/entities/monsters/berserk.ts