quake2ts 0.0.211 → 0.0.212

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.
@@ -4177,32 +4177,6 @@ var Init_Hud = async (renderer, assets) => {
4177
4177
  await Init_Damage(renderer, assets);
4178
4178
  };
4179
4179
 
4180
- // src/hud/subtitles.ts
4181
- var SUBTITLE_DURATION = 3e3;
4182
- var SubtitleSystem = class {
4183
- constructor() {
4184
- this.subtitle = null;
4185
- }
4186
- addSubtitle(text, now) {
4187
- this.subtitle = {
4188
- text,
4189
- startTime: now,
4190
- duration: SUBTITLE_DURATION
4191
- };
4192
- }
4193
- drawSubtitles(renderer, now) {
4194
- if (!this.subtitle) {
4195
- return;
4196
- }
4197
- if (now > this.subtitle.startTime + this.subtitle.duration) {
4198
- this.subtitle = null;
4199
- return;
4200
- }
4201
- const y = renderer.height - 40;
4202
- renderer.drawCenterString(y, this.subtitle.text);
4203
- }
4204
- };
4205
-
4206
4180
  // src/demo/handler.ts
4207
4181
  var import_cgame = require("@quake2ts/cgame");
4208
4182
 
@@ -6043,7 +6017,6 @@ function buildRenderableEntities(latestEntities, previousEntities, alpha, config
6043
6017
  function createClient(imports) {
6044
6018
  const prediction = new import_cgame2.ClientPrediction(imports.engine.trace);
6045
6019
  const view = new import_cgame3.ViewEffects();
6046
- const subtitleSystem = new SubtitleSystem();
6047
6020
  const demoPlayback = new DemoPlaybackController();
6048
6021
  const demoHandler = new ClientNetworkHandler(imports);
6049
6022
  const menuSystem = new MenuSystem();
@@ -6394,7 +6367,6 @@ function createClient(imports) {
6394
6367
  // playernum
6395
6368
  playerState
6396
6369
  );
6397
- subtitleSystem.drawSubtitles(renderer, timeMs);
6398
6370
  renderer.end2D();
6399
6371
  }
6400
6372
  if (menuSystem.isActive()) {
@@ -6445,8 +6417,7 @@ function createClient(imports) {
6445
6417
  cg.NotifyMessage(0, msg, false);
6446
6418
  },
6447
6419
  showSubtitle(text, soundName) {
6448
- const timeMs = latestFrame?.timeMs ?? 0;
6449
- subtitleSystem.addSubtitle(text, timeMs);
6420
+ cg.ShowSubtitle(text, soundName);
6450
6421
  },
6451
6422
  ParseConfigString(index, value) {
6452
6423
  configStrings.set(index, value);