quake2ts 0.0.206 → 0.0.207

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.206",
3
+ "version": "0.0.207",
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",
@@ -230,8 +230,7 @@ var Draw_StatusBar = (cgi3, ps, hudNumberPics2, numberWidth2, timeMs, layout) =>
230
230
  const health = ps.stats[shared.PlayerStat.STAT_HEALTH] || 0;
231
231
  const armor = ps.stats[shared.PlayerStat.STAT_ARMOR] || 0;
232
232
  const ammo = ps.stats[shared.PlayerStat.STAT_AMMO] || 0;
233
- ps.stats[shared.PlayerStat.STAT_ARMOR_ICON] || 0;
234
- ps.stats[shared.PlayerStat.STAT_AMMO_ICON] || 0;
233
+ const armorIconIdx = ps.stats[shared.PlayerStat.STAT_ARMOR_ICON] || 0;
235
234
  let healthColor = void 0;
236
235
  if (health <= 25) {
237
236
  {
@@ -243,11 +242,31 @@ var Draw_StatusBar = (cgi3, ps, hudNumberPics2, numberWidth2, timeMs, layout) =>
243
242
  Draw_Number(cgi3, layout.ARMOR_X, layout.ARMOR_Y, armor, hudNumberPics2, numberWidth2);
244
243
  Draw_Number(cgi3, layout.AMMO_X, layout.AMMO_Y, ammo, hudNumberPics2, numberWidth2);
245
244
  }
245
+ if (armorIconIdx > 0) {
246
+ const iconName = cgi3.get_configstring(shared.ConfigStringIndex.Images + armorIconIdx);
247
+ if (iconName) {
248
+ const icon = cgi3.Draw_RegisterPic(iconName);
249
+ if (icon) {
250
+ cgi3.SCR_DrawPic(layout.ARMOR_X - 24, layout.ARMOR_Y - 2, icon);
251
+ }
252
+ }
253
+ }
246
254
  if (ps.pickupIcon) {
247
255
  const icon = cgi3.Draw_RegisterPic(ps.pickupIcon);
248
256
  if (icon) {
249
257
  cgi3.SCR_DrawPic(layout.WEAPON_ICON_X, layout.WEAPON_ICON_Y, icon);
250
258
  }
259
+ } else {
260
+ const selectedIconIdx = ps.stats[shared.PlayerStat.STAT_SELECTED_ICON] || 0;
261
+ if (selectedIconIdx > 0) {
262
+ const iconName = cgi3.get_configstring(shared.ConfigStringIndex.Images + selectedIconIdx);
263
+ if (iconName) {
264
+ const icon = cgi3.Draw_RegisterPic(iconName);
265
+ if (icon) {
266
+ cgi3.SCR_DrawPic(layout.WEAPON_ICON_X, layout.WEAPON_ICON_Y, icon);
267
+ }
268
+ }
269
+ }
251
270
  }
252
271
  };
253
272