quake2ts 0.0.449 → 0.0.452

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.
@@ -2543,6 +2543,7 @@ __export(index_exports, {
2543
2543
  addKey: () => addKey,
2544
2544
  addPowerup: () => addPowerup,
2545
2545
  ai_charge: () => ai_charge,
2546
+ ai_checkattack: () => ai_checkattack,
2546
2547
  ai_face: () => ai_face,
2547
2548
  ai_move: () => ai_move,
2548
2549
  ai_run: () => ai_run,
@@ -3597,6 +3598,13 @@ function findTarget(self, level, context, trace, hearability = {}) {
3597
3598
  }
3598
3599
  return true;
3599
3600
  }
3601
+ function ai_checkattack(self, dist, context) {
3602
+ if (!self.enemy) {
3603
+ return false;
3604
+ }
3605
+ const checkAttack = self.monsterinfo.checkattack || M_CheckAttack;
3606
+ return checkAttack(self, context);
3607
+ }
3600
3608
 
3601
3609
  // src/ai/movement.ts
3602
3610
  var STEPSIZE = 18;
@@ -26443,6 +26451,7 @@ function createGame(imports, engine, options) {
26443
26451
  addKey,
26444
26452
  addPowerup,
26445
26453
  ai_charge,
26454
+ ai_checkattack,
26446
26455
  ai_face,
26447
26456
  ai_move,
26448
26457
  ai_run,