@quake2ts/game 0.0.780 → 0.0.781
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/dist/browser/index.global.js +2 -2
- package/dist/browser/index.global.js.map +1 -1
- package/dist/cjs/index.cjs +14 -11
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +14 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/combat/weapons/firing.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/esm/index.js
CHANGED
|
@@ -7279,7 +7279,8 @@ function setPlayerAttackAnim(player) {
|
|
|
7279
7279
|
}
|
|
7280
7280
|
function checkAmmo(game, player, ammoType, count) {
|
|
7281
7281
|
if (!player.client) return false;
|
|
7282
|
-
|
|
7282
|
+
const ammoCount = player.client.inventory.ammo.counts[ammoType];
|
|
7283
|
+
if (ammoCount === void 0 || ammoCount < count) {
|
|
7283
7284
|
game.sound(player, 0, "weapons/noammo.wav", 1, ATTN_NORM$1, 0);
|
|
7284
7285
|
NoAmmoWeaponChange(player);
|
|
7285
7286
|
return false;
|
|
@@ -25342,16 +25343,18 @@ function createGame(imports, engine, options) {
|
|
|
25342
25343
|
});
|
|
25343
25344
|
const linkentity = imports.linkentity;
|
|
25344
25345
|
const wrappedLinkEntity = (ent) => {
|
|
25345
|
-
ent.
|
|
25346
|
-
|
|
25347
|
-
|
|
25348
|
-
|
|
25349
|
-
|
|
25350
|
-
|
|
25351
|
-
|
|
25352
|
-
|
|
25353
|
-
|
|
25354
|
-
|
|
25346
|
+
if (ent.mins && ent.maxs && ent.origin) {
|
|
25347
|
+
ent.absmin = {
|
|
25348
|
+
x: ent.origin.x + ent.mins.x,
|
|
25349
|
+
y: ent.origin.y + ent.mins.y,
|
|
25350
|
+
z: ent.origin.z + ent.mins.z
|
|
25351
|
+
};
|
|
25352
|
+
ent.absmax = {
|
|
25353
|
+
x: ent.origin.x + ent.maxs.x,
|
|
25354
|
+
y: ent.origin.y + ent.maxs.y,
|
|
25355
|
+
z: ent.origin.z + ent.maxs.z
|
|
25356
|
+
};
|
|
25357
|
+
}
|
|
25355
25358
|
if (linkentity) {
|
|
25356
25359
|
linkentity(ent);
|
|
25357
25360
|
}
|