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.
@@ -8935,6 +8935,7 @@ function registerLightSpawns(registry) {
8935
8935
  init_esm();
8936
8936
 
8937
8937
  // src/ai/monster.ts
8938
+ init_esm();
8938
8939
  function M_MoveFrame(self, context) {
8939
8940
  const move = self.monsterinfo.current_move;
8940
8941
  if (!move) {
@@ -8969,8 +8970,20 @@ function M_MoveFrame(self, context) {
8969
8970
  }
8970
8971
  }
8971
8972
  function monster_think(self, context) {
8973
+ if (self.monsterinfo.freeze_time) {
8974
+ if (self.monsterinfo.freeze_time > context.timeSeconds) {
8975
+ self.renderfx |= RenderFx.ShellBlue | RenderFx.ShellGreen;
8976
+ self.nextthink = context.timeSeconds + 0.1;
8977
+ return;
8978
+ } else {
8979
+ self.monsterinfo.freeze_time = 0;
8980
+ self.renderfx &= ~(RenderFx.ShellBlue | RenderFx.ShellGreen);
8981
+ }
8982
+ }
8972
8983
  M_MoveFrame(self, context);
8973
- self.nextthink = context.timeSeconds + 0.1;
8984
+ if (self.nextthink <= context.timeSeconds) {
8985
+ self.nextthink = context.timeSeconds + 0.1;
8986
+ }
8974
8987
  }
8975
8988
 
8976
8989
  // src/entities/monsters/berserk.ts