quake2ts 0.0.205 → 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 +1 -1
- package/packages/cgame/dist/index.cjs +21 -2
- package/packages/cgame/dist/index.cjs.map +1 -1
- package/packages/cgame/dist/index.js +21 -2
- package/packages/cgame/dist/index.js.map +1 -1
- package/packages/client/dist/browser/index.global.js +6 -6
- package/packages/client/dist/browser/index.global.js.map +1 -1
- package/packages/client/dist/cjs/index.cjs +11 -2
- package/packages/client/dist/cjs/index.cjs.map +1 -1
- package/packages/client/dist/esm/index.js +11 -2
- package/packages/client/dist/esm/index.js.map +1 -1
- package/packages/client/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/client/dist/types/demo/handler.d.ts +1 -0
- package/packages/client/dist/types/demo/handler.d.ts.map +1 -1
- package/packages/client/dist/types/index.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quake2ts",
|
|
3
|
-
"version": "0.0.
|
|
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
|
|