quake2ts 0.0.223 → 0.0.224

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quake2ts",
3
- "version": "0.0.223",
3
+ "version": "0.0.224",
4
4
  "description": "Quake II re-release port to TypeScript with WebGL renderer - A complete game engine with physics, networking, and BSP rendering",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@8.15.7",
@@ -587,6 +587,47 @@ function writeServerCommand(writer, event, ...args) {
587
587
  writer.writeString(text);
588
588
  break;
589
589
  }
590
+ case import_shared3.ServerCommand.centerprint: {
591
+ const text = args[0];
592
+ writer.writeString(text);
593
+ break;
594
+ }
595
+ case import_shared3.ServerCommand.stufftext: {
596
+ const text = args[0];
597
+ writer.writeString(text);
598
+ break;
599
+ }
600
+ case import_shared3.ServerCommand.sound: {
601
+ const flags = args[0];
602
+ const soundNum = args[1];
603
+ const volume = args[2];
604
+ const attenuation = args[3];
605
+ const offset = args[4];
606
+ const ent = args[5];
607
+ const pos = args[6];
608
+ writer.writeByte(flags);
609
+ writer.writeByte(soundNum);
610
+ if (flags & 1) {
611
+ writer.writeByte(volume || 0);
612
+ }
613
+ if (flags & 2) {
614
+ writer.writeByte(attenuation || 0);
615
+ }
616
+ if (flags & 16) {
617
+ writer.writeByte(offset || 0);
618
+ }
619
+ if (flags & 8) {
620
+ writer.writeShort(ent || 0);
621
+ }
622
+ if (flags & 4) {
623
+ if (pos) {
624
+ writer.writePos(pos);
625
+ } else {
626
+ writer.writePos({ x: 0, y: 0, z: 0 });
627
+ }
628
+ }
629
+ break;
630
+ }
590
631
  case import_shared3.ServerCommand.muzzleflash: {
591
632
  const entIndex = args[0];
592
633
  const flashType = args[1];
@@ -547,6 +547,47 @@ function writeServerCommand(writer, event, ...args) {
547
547
  writer.writeString(text);
548
548
  break;
549
549
  }
550
+ case ServerCommand.centerprint: {
551
+ const text = args[0];
552
+ writer.writeString(text);
553
+ break;
554
+ }
555
+ case ServerCommand.stufftext: {
556
+ const text = args[0];
557
+ writer.writeString(text);
558
+ break;
559
+ }
560
+ case ServerCommand.sound: {
561
+ const flags = args[0];
562
+ const soundNum = args[1];
563
+ const volume = args[2];
564
+ const attenuation = args[3];
565
+ const offset = args[4];
566
+ const ent = args[5];
567
+ const pos = args[6];
568
+ writer.writeByte(flags);
569
+ writer.writeByte(soundNum);
570
+ if (flags & 1) {
571
+ writer.writeByte(volume || 0);
572
+ }
573
+ if (flags & 2) {
574
+ writer.writeByte(attenuation || 0);
575
+ }
576
+ if (flags & 16) {
577
+ writer.writeByte(offset || 0);
578
+ }
579
+ if (flags & 8) {
580
+ writer.writeShort(ent || 0);
581
+ }
582
+ if (flags & 4) {
583
+ if (pos) {
584
+ writer.writePos(pos);
585
+ } else {
586
+ writer.writePos({ x: 0, y: 0, z: 0 });
587
+ }
588
+ }
589
+ break;
590
+ }
550
591
  case ServerCommand.muzzleflash: {
551
592
  const entIndex = args[0];
552
593
  const flashType = args[1];