quake2ts 0.0.188 → 0.0.189
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 +256 -0
- package/packages/cgame/dist/index.cjs.map +1 -0
- package/packages/cgame/dist/index.d.cts +101 -0
- package/packages/cgame/dist/index.d.ts +99 -1
- package/packages/cgame/dist/index.js +250 -28
- package/packages/cgame/dist/index.js.map +1 -0
- package/packages/client/dist/browser/index.global.js +5 -5
- package/packages/client/dist/browser/index.global.js.map +1 -1
- package/packages/client/dist/cjs/index.cjs +34 -0
- package/packages/client/dist/cjs/index.cjs.map +1 -1
- package/packages/client/dist/esm/index.js +48 -14
- package/packages/client/dist/esm/index.js.map +1 -1
- package/packages/client/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/engine/dist/browser/index.global.js +9 -9
- package/packages/engine/dist/browser/index.global.js.map +1 -1
- package/packages/engine/dist/cjs/index.cjs +17 -0
- package/packages/engine/dist/cjs/index.cjs.map +1 -1
- package/packages/engine/dist/esm/index.js +17 -0
- package/packages/engine/dist/esm/index.js.map +1 -1
- package/packages/engine/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/game/dist/browser/index.global.js +2 -2
- package/packages/game/dist/browser/index.global.js.map +1 -1
- package/packages/game/dist/cjs/index.cjs +117 -117
- package/packages/game/dist/cjs/index.cjs.map +1 -1
- package/packages/game/dist/esm/index.js +117 -117
- package/packages/game/dist/esm/index.js.map +1 -1
- package/packages/game/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/game/dist/types/inventory/ammo.d.ts +2 -24
- package/packages/game/dist/types/inventory/ammo.d.ts.map +1 -1
- package/packages/game/dist/types/inventory/playerInventory.d.ts +2 -47
- package/packages/game/dist/types/inventory/playerInventory.d.ts.map +1 -1
- package/packages/shared/dist/browser/index.global.js +1 -1
- package/packages/shared/dist/browser/index.global.js.map +1 -1
- package/packages/shared/dist/cjs/index.cjs +153 -0
- package/packages/shared/dist/cjs/index.cjs.map +1 -1
- package/packages/shared/dist/esm/index.js +142 -0
- package/packages/shared/dist/esm/index.js.map +1 -1
- package/packages/shared/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/shared/dist/types/index.d.ts +1 -0
- package/packages/shared/dist/types/index.d.ts.map +1 -1
- package/packages/shared/dist/types/items/ammo.d.ts +33 -0
- package/packages/shared/dist/types/items/ammo.d.ts.map +1 -0
- package/packages/shared/dist/types/items/index.d.ts +7 -0
- package/packages/shared/dist/types/items/index.d.ts.map +1 -0
- package/packages/shared/dist/types/items/powerups.d.ts +31 -0
- package/packages/shared/dist/types/items/powerups.d.ts.map +1 -0
- package/packages/shared/dist/types/items/weapons.d.ts +25 -0
- package/packages/shared/dist/types/items/weapons.d.ts.map +1 -0
- package/packages/shared/dist/types/protocol/index.d.ts +2 -0
- package/packages/shared/dist/types/protocol/index.d.ts.map +1 -1
- package/packages/tools/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cgame/dist/index.d.mts +0 -3
- package/packages/cgame/dist/index.mjs +0 -7
|
@@ -983,6 +983,80 @@ var applyPmove = (state, cmd, trace, pointContents2) => {
|
|
|
983
983
|
velocity: finalVelocity
|
|
984
984
|
};
|
|
985
985
|
};
|
|
986
|
+
var WeaponId = /* @__PURE__ */ ((WeaponId22) => {
|
|
987
|
+
WeaponId22["Blaster"] = "blaster";
|
|
988
|
+
WeaponId22["Shotgun"] = "shotgun";
|
|
989
|
+
WeaponId22["SuperShotgun"] = "super_shotgun";
|
|
990
|
+
WeaponId22["Machinegun"] = "machinegun";
|
|
991
|
+
WeaponId22["Chaingun"] = "chaingun";
|
|
992
|
+
WeaponId22["GrenadeLauncher"] = "grenade_launcher";
|
|
993
|
+
WeaponId22["RocketLauncher"] = "rocket_launcher";
|
|
994
|
+
WeaponId22["HyperBlaster"] = "hyperblaster";
|
|
995
|
+
WeaponId22["Railgun"] = "railgun";
|
|
996
|
+
WeaponId22["BFG10K"] = "bfg10k";
|
|
997
|
+
WeaponId22["Grapple"] = "grapple";
|
|
998
|
+
WeaponId22["ChainFist"] = "chainfist";
|
|
999
|
+
WeaponId22["EtfRifle"] = "etf_rifle";
|
|
1000
|
+
WeaponId22["ProxLauncher"] = "prox_launcher";
|
|
1001
|
+
WeaponId22["IonRipper"] = "ionripper";
|
|
1002
|
+
WeaponId22["PlasmaBeam"] = "plasmabeam";
|
|
1003
|
+
WeaponId22["Phalanx"] = "phalanx";
|
|
1004
|
+
WeaponId22["Disruptor"] = "disruptor";
|
|
1005
|
+
return WeaponId22;
|
|
1006
|
+
})(WeaponId || {});
|
|
1007
|
+
var AmmoType = /* @__PURE__ */ ((AmmoType22) => {
|
|
1008
|
+
AmmoType22[AmmoType22["Bullets"] = 0] = "Bullets";
|
|
1009
|
+
AmmoType22[AmmoType22["Shells"] = 1] = "Shells";
|
|
1010
|
+
AmmoType22[AmmoType22["Rockets"] = 2] = "Rockets";
|
|
1011
|
+
AmmoType22[AmmoType22["Grenades"] = 3] = "Grenades";
|
|
1012
|
+
AmmoType22[AmmoType22["Cells"] = 4] = "Cells";
|
|
1013
|
+
AmmoType22[AmmoType22["Slugs"] = 5] = "Slugs";
|
|
1014
|
+
AmmoType22[AmmoType22["Trap"] = 6] = "Trap";
|
|
1015
|
+
AmmoType22[AmmoType22["Tesla"] = 7] = "Tesla";
|
|
1016
|
+
AmmoType22[AmmoType22["MagSlugs"] = 8] = "MagSlugs";
|
|
1017
|
+
AmmoType22[AmmoType22["Flechettes"] = 9] = "Flechettes";
|
|
1018
|
+
AmmoType22[AmmoType22["Prox"] = 10] = "Prox";
|
|
1019
|
+
AmmoType22[AmmoType22["Nuke"] = 11] = "Nuke";
|
|
1020
|
+
AmmoType22[AmmoType22["Rounds"] = 12] = "Rounds";
|
|
1021
|
+
return AmmoType22;
|
|
1022
|
+
})(AmmoType || {});
|
|
1023
|
+
var AMMO_TYPE_COUNT = Object.keys(AmmoType).length / 2;
|
|
1024
|
+
var AmmoItemId = /* @__PURE__ */ ((AmmoItemId22) => {
|
|
1025
|
+
AmmoItemId22["Shells"] = "ammo_shells";
|
|
1026
|
+
AmmoItemId22["Bullets"] = "ammo_bullets";
|
|
1027
|
+
AmmoItemId22["Rockets"] = "ammo_rockets";
|
|
1028
|
+
AmmoItemId22["Grenades"] = "ammo_grenades";
|
|
1029
|
+
AmmoItemId22["Cells"] = "ammo_cells";
|
|
1030
|
+
AmmoItemId22["Slugs"] = "ammo_slugs";
|
|
1031
|
+
return AmmoItemId22;
|
|
1032
|
+
})(AmmoItemId || {});
|
|
1033
|
+
var PowerupId = /* @__PURE__ */ ((PowerupId22) => {
|
|
1034
|
+
PowerupId22["QuadDamage"] = "quad";
|
|
1035
|
+
PowerupId22["Invulnerability"] = "invulnerability";
|
|
1036
|
+
PowerupId22["EnviroSuit"] = "enviro_suit";
|
|
1037
|
+
PowerupId22["Rebreather"] = "rebreather";
|
|
1038
|
+
PowerupId22["Silencer"] = "silencer";
|
|
1039
|
+
PowerupId22["PowerScreen"] = "power_screen";
|
|
1040
|
+
PowerupId22["PowerShield"] = "power_shield";
|
|
1041
|
+
PowerupId22["QuadFire"] = "quad_fire";
|
|
1042
|
+
PowerupId22["Invisibility"] = "invisibility";
|
|
1043
|
+
PowerupId22["Bandolier"] = "bandolier";
|
|
1044
|
+
PowerupId22["AmmoPack"] = "ammo_pack";
|
|
1045
|
+
PowerupId22["IRGoggles"] = "ir_goggles";
|
|
1046
|
+
PowerupId22["DoubleDamage"] = "double_damage";
|
|
1047
|
+
PowerupId22["SphereVengeance"] = "sphere_vengeance";
|
|
1048
|
+
PowerupId22["SphereHunter"] = "sphere_hunter";
|
|
1049
|
+
PowerupId22["SphereDefender"] = "sphere_defender";
|
|
1050
|
+
PowerupId22["Doppelganger"] = "doppelganger";
|
|
1051
|
+
PowerupId22["TagToken"] = "tag_token";
|
|
1052
|
+
PowerupId22["TechResistance"] = "tech_resistance";
|
|
1053
|
+
PowerupId22["TechStrength"] = "tech_strength";
|
|
1054
|
+
PowerupId22["TechHaste"] = "tech_haste";
|
|
1055
|
+
PowerupId22["TechRegeneration"] = "tech_regeneration";
|
|
1056
|
+
PowerupId22["Flashlight"] = "flashlight";
|
|
1057
|
+
PowerupId22["Compass"] = "compass";
|
|
1058
|
+
return PowerupId22;
|
|
1059
|
+
})(PowerupId || {});
|
|
986
1060
|
|
|
987
1061
|
// src/combat/damageFlags.ts
|
|
988
1062
|
var DamageFlags = /* @__PURE__ */ ((DamageFlags2) => {
|
|
@@ -1096,39 +1170,13 @@ function applyPowerArmor(damage, flags, hitPoint, _hitNormal, state, options = {
|
|
|
1096
1170
|
}
|
|
1097
1171
|
|
|
1098
1172
|
// src/inventory/ammo.ts
|
|
1099
|
-
var AmmoType = /* @__PURE__ */ ((AmmoType3) => {
|
|
1100
|
-
AmmoType3[AmmoType3["Bullets"] = 0] = "Bullets";
|
|
1101
|
-
AmmoType3[AmmoType3["Shells"] = 1] = "Shells";
|
|
1102
|
-
AmmoType3[AmmoType3["Rockets"] = 2] = "Rockets";
|
|
1103
|
-
AmmoType3[AmmoType3["Grenades"] = 3] = "Grenades";
|
|
1104
|
-
AmmoType3[AmmoType3["Cells"] = 4] = "Cells";
|
|
1105
|
-
AmmoType3[AmmoType3["Slugs"] = 5] = "Slugs";
|
|
1106
|
-
AmmoType3[AmmoType3["Trap"] = 6] = "Trap";
|
|
1107
|
-
AmmoType3[AmmoType3["Tesla"] = 7] = "Tesla";
|
|
1108
|
-
AmmoType3[AmmoType3["MagSlugs"] = 8] = "MagSlugs";
|
|
1109
|
-
AmmoType3[AmmoType3["Flechettes"] = 9] = "Flechettes";
|
|
1110
|
-
AmmoType3[AmmoType3["Prox"] = 10] = "Prox";
|
|
1111
|
-
AmmoType3[AmmoType3["Nuke"] = 11] = "Nuke";
|
|
1112
|
-
AmmoType3[AmmoType3["Rounds"] = 12] = "Rounds";
|
|
1113
|
-
return AmmoType3;
|
|
1114
|
-
})(AmmoType || {});
|
|
1115
|
-
var AMMO_TYPE_COUNT = Object.keys(AmmoType).length / 2;
|
|
1116
|
-
var AmmoItemId = /* @__PURE__ */ ((AmmoItemId4) => {
|
|
1117
|
-
AmmoItemId4["Shells"] = "ammo_shells";
|
|
1118
|
-
AmmoItemId4["Bullets"] = "ammo_bullets";
|
|
1119
|
-
AmmoItemId4["Rockets"] = "ammo_rockets";
|
|
1120
|
-
AmmoItemId4["Grenades"] = "ammo_grenades";
|
|
1121
|
-
AmmoItemId4["Cells"] = "ammo_cells";
|
|
1122
|
-
AmmoItemId4["Slugs"] = "ammo_slugs";
|
|
1123
|
-
return AmmoItemId4;
|
|
1124
|
-
})(AmmoItemId || {});
|
|
1125
1173
|
var AMMO_ITEM_DEFINITIONS = {
|
|
1126
|
-
[
|
|
1127
|
-
[
|
|
1128
|
-
[
|
|
1129
|
-
[
|
|
1130
|
-
[
|
|
1131
|
-
[
|
|
1174
|
+
[AmmoItemId.Shells]: { id: AmmoItemId.Shells, ammoType: AmmoType.Shells, quantity: 10, weaponAmmo: false },
|
|
1175
|
+
[AmmoItemId.Bullets]: { id: AmmoItemId.Bullets, ammoType: AmmoType.Bullets, quantity: 50, weaponAmmo: false },
|
|
1176
|
+
[AmmoItemId.Rockets]: { id: AmmoItemId.Rockets, ammoType: AmmoType.Rockets, quantity: 5, weaponAmmo: false },
|
|
1177
|
+
[AmmoItemId.Grenades]: { id: AmmoItemId.Grenades, ammoType: AmmoType.Grenades, quantity: 5, weaponAmmo: true },
|
|
1178
|
+
[AmmoItemId.Cells]: { id: AmmoItemId.Cells, ammoType: AmmoType.Cells, quantity: 50, weaponAmmo: false },
|
|
1179
|
+
[AmmoItemId.Slugs]: { id: AmmoItemId.Slugs, ammoType: AmmoType.Slugs, quantity: 10, weaponAmmo: false }
|
|
1132
1180
|
};
|
|
1133
1181
|
function getAmmoItemDefinition(id) {
|
|
1134
1182
|
return AMMO_ITEM_DEFINITIONS[id];
|
|
@@ -1144,9 +1192,9 @@ function createAmmoInventory(caps = createBaseAmmoCaps(), seed) {
|
|
|
1144
1192
|
}
|
|
1145
1193
|
function createBaseAmmoCaps() {
|
|
1146
1194
|
const caps = Array(AMMO_TYPE_COUNT).fill(50);
|
|
1147
|
-
caps[
|
|
1148
|
-
caps[
|
|
1149
|
-
caps[
|
|
1195
|
+
caps[AmmoType.Bullets] = 200;
|
|
1196
|
+
caps[AmmoType.Shells] = 100;
|
|
1197
|
+
caps[AmmoType.Cells] = 200;
|
|
1150
1198
|
return caps;
|
|
1151
1199
|
}
|
|
1152
1200
|
function clampAmmoCounts(counts, caps) {
|
|
@@ -1179,54 +1227,6 @@ function pickupAmmo(inventory, itemId, options = {}) {
|
|
|
1179
1227
|
}
|
|
1180
1228
|
|
|
1181
1229
|
// src/inventory/playerInventory.ts
|
|
1182
|
-
var WeaponId = /* @__PURE__ */ ((WeaponId3) => {
|
|
1183
|
-
WeaponId3["Blaster"] = "blaster";
|
|
1184
|
-
WeaponId3["Shotgun"] = "shotgun";
|
|
1185
|
-
WeaponId3["SuperShotgun"] = "super_shotgun";
|
|
1186
|
-
WeaponId3["Machinegun"] = "machinegun";
|
|
1187
|
-
WeaponId3["Chaingun"] = "chaingun";
|
|
1188
|
-
WeaponId3["GrenadeLauncher"] = "grenade_launcher";
|
|
1189
|
-
WeaponId3["RocketLauncher"] = "rocket_launcher";
|
|
1190
|
-
WeaponId3["HyperBlaster"] = "hyperblaster";
|
|
1191
|
-
WeaponId3["Railgun"] = "railgun";
|
|
1192
|
-
WeaponId3["BFG10K"] = "bfg10k";
|
|
1193
|
-
WeaponId3["Grapple"] = "grapple";
|
|
1194
|
-
WeaponId3["ChainFist"] = "chainfist";
|
|
1195
|
-
WeaponId3["EtfRifle"] = "etf_rifle";
|
|
1196
|
-
WeaponId3["ProxLauncher"] = "prox_launcher";
|
|
1197
|
-
WeaponId3["IonRipper"] = "ionripper";
|
|
1198
|
-
WeaponId3["PlasmaBeam"] = "plasmabeam";
|
|
1199
|
-
WeaponId3["Phalanx"] = "phalanx";
|
|
1200
|
-
WeaponId3["Disruptor"] = "disruptor";
|
|
1201
|
-
return WeaponId3;
|
|
1202
|
-
})(WeaponId || {});
|
|
1203
|
-
var PowerupId = /* @__PURE__ */ ((PowerupId3) => {
|
|
1204
|
-
PowerupId3["QuadDamage"] = "quad";
|
|
1205
|
-
PowerupId3["Invulnerability"] = "invulnerability";
|
|
1206
|
-
PowerupId3["EnviroSuit"] = "enviro_suit";
|
|
1207
|
-
PowerupId3["Rebreather"] = "rebreather";
|
|
1208
|
-
PowerupId3["Silencer"] = "silencer";
|
|
1209
|
-
PowerupId3["PowerScreen"] = "power_screen";
|
|
1210
|
-
PowerupId3["PowerShield"] = "power_shield";
|
|
1211
|
-
PowerupId3["QuadFire"] = "quad_fire";
|
|
1212
|
-
PowerupId3["Invisibility"] = "invisibility";
|
|
1213
|
-
PowerupId3["Bandolier"] = "bandolier";
|
|
1214
|
-
PowerupId3["AmmoPack"] = "ammo_pack";
|
|
1215
|
-
PowerupId3["IRGoggles"] = "ir_goggles";
|
|
1216
|
-
PowerupId3["DoubleDamage"] = "double_damage";
|
|
1217
|
-
PowerupId3["SphereVengeance"] = "sphere_vengeance";
|
|
1218
|
-
PowerupId3["SphereHunter"] = "sphere_hunter";
|
|
1219
|
-
PowerupId3["SphereDefender"] = "sphere_defender";
|
|
1220
|
-
PowerupId3["Doppelganger"] = "doppelganger";
|
|
1221
|
-
PowerupId3["TagToken"] = "tag_token";
|
|
1222
|
-
PowerupId3["TechResistance"] = "tech_resistance";
|
|
1223
|
-
PowerupId3["TechStrength"] = "tech_strength";
|
|
1224
|
-
PowerupId3["TechHaste"] = "tech_haste";
|
|
1225
|
-
PowerupId3["TechRegeneration"] = "tech_regeneration";
|
|
1226
|
-
PowerupId3["Flashlight"] = "flashlight";
|
|
1227
|
-
PowerupId3["Compass"] = "compass";
|
|
1228
|
-
return PowerupId3;
|
|
1229
|
-
})(PowerupId || {});
|
|
1230
1230
|
var KeyId = /* @__PURE__ */ ((KeyId2) => {
|
|
1231
1231
|
KeyId2["Blue"] = "blue";
|
|
1232
1232
|
KeyId2["Red"] = "red";
|
|
@@ -1376,27 +1376,27 @@ function pickupPowerup(client, item, time) {
|
|
|
1376
1376
|
let icon = "";
|
|
1377
1377
|
switch (item.id) {
|
|
1378
1378
|
case "item_quad":
|
|
1379
|
-
powerupId =
|
|
1379
|
+
powerupId = PowerupId.QuadDamage;
|
|
1380
1380
|
icon = "p_quad";
|
|
1381
1381
|
break;
|
|
1382
1382
|
case "item_invulnerability":
|
|
1383
|
-
powerupId =
|
|
1383
|
+
powerupId = PowerupId.Invulnerability;
|
|
1384
1384
|
icon = "p_invulnerability";
|
|
1385
1385
|
break;
|
|
1386
1386
|
case "item_silencer":
|
|
1387
|
-
powerupId =
|
|
1387
|
+
powerupId = PowerupId.Silencer;
|
|
1388
1388
|
icon = "p_silencer";
|
|
1389
1389
|
break;
|
|
1390
1390
|
case "item_rebreather":
|
|
1391
|
-
powerupId =
|
|
1391
|
+
powerupId = PowerupId.Rebreather;
|
|
1392
1392
|
icon = "p_rebreather";
|
|
1393
1393
|
break;
|
|
1394
1394
|
case "item_enviro":
|
|
1395
|
-
powerupId =
|
|
1395
|
+
powerupId = PowerupId.EnviroSuit;
|
|
1396
1396
|
icon = "p_envirosuit";
|
|
1397
1397
|
break;
|
|
1398
1398
|
case "item_double":
|
|
1399
|
-
powerupId =
|
|
1399
|
+
powerupId = PowerupId.DoubleDamage;
|
|
1400
1400
|
icon = "p_double";
|
|
1401
1401
|
break;
|
|
1402
1402
|
}
|
|
@@ -1404,9 +1404,9 @@ function pickupPowerup(client, item, time) {
|
|
|
1404
1404
|
const expiresAt = inventory.powerups.get(powerupId);
|
|
1405
1405
|
const newExpiresAt = expiresAt && expiresAt > time ? expiresAt + item.timer * 1e3 : time + item.timer * 1e3;
|
|
1406
1406
|
inventory.powerups.set(powerupId, newExpiresAt);
|
|
1407
|
-
if (powerupId ===
|
|
1407
|
+
if (powerupId === PowerupId.QuadDamage) {
|
|
1408
1408
|
client.quad_time = newExpiresAt / 1e3;
|
|
1409
|
-
} else if (powerupId ===
|
|
1409
|
+
} else if (powerupId === PowerupId.DoubleDamage) {
|
|
1410
1410
|
client.double_time = newExpiresAt / 1e3;
|
|
1411
1411
|
}
|
|
1412
1412
|
setPickup(inventory, icon, time);
|
|
@@ -1675,10 +1675,10 @@ var Entity = class {
|
|
|
1675
1675
|
return {
|
|
1676
1676
|
type,
|
|
1677
1677
|
get cellCount() {
|
|
1678
|
-
return ammo.counts[
|
|
1678
|
+
return ammo.counts[AmmoType.Cells] || 0;
|
|
1679
1679
|
},
|
|
1680
1680
|
set cellCount(v) {
|
|
1681
|
-
ammo.counts[
|
|
1681
|
+
ammo.counts[AmmoType.Cells] = v;
|
|
1682
1682
|
},
|
|
1683
1683
|
angles: this.angles,
|
|
1684
1684
|
origin: this.origin,
|
|
@@ -4098,7 +4098,7 @@ function chaingunThink(player, sys) {
|
|
|
4098
4098
|
if (!player.client) {
|
|
4099
4099
|
return;
|
|
4100
4100
|
}
|
|
4101
|
-
const weaponState = getWeaponState(player.client.weaponStates,
|
|
4101
|
+
const weaponState = getWeaponState(player.client.weaponStates, WeaponId.Chaingun);
|
|
4102
4102
|
if (!(player.client.buttons & BUTTON_ATTACK) && weaponState.spinupCount && weaponState.spinupCount > 0) {
|
|
4103
4103
|
sys.sound(player, 0, "weapons/chngnd1a.wav", 1, 0, 0);
|
|
4104
4104
|
weaponState.spinupCount = 0;
|
|
@@ -4111,7 +4111,7 @@ var WEAPON_ITEMS = {
|
|
|
4111
4111
|
type: "weapon",
|
|
4112
4112
|
id: "weapon_blaster",
|
|
4113
4113
|
name: "Blaster",
|
|
4114
|
-
weaponId:
|
|
4114
|
+
weaponId: WeaponId.Blaster,
|
|
4115
4115
|
ammoType: null,
|
|
4116
4116
|
initialAmmo: 0,
|
|
4117
4117
|
pickupAmmo: 0,
|
|
@@ -4121,8 +4121,8 @@ var WEAPON_ITEMS = {
|
|
|
4121
4121
|
type: "weapon",
|
|
4122
4122
|
id: "weapon_shotgun",
|
|
4123
4123
|
name: "Shotgun",
|
|
4124
|
-
weaponId:
|
|
4125
|
-
ammoType:
|
|
4124
|
+
weaponId: WeaponId.Shotgun,
|
|
4125
|
+
ammoType: AmmoType.Shells,
|
|
4126
4126
|
initialAmmo: 10,
|
|
4127
4127
|
pickupAmmo: 10,
|
|
4128
4128
|
fireRate: 1
|
|
@@ -4131,8 +4131,8 @@ var WEAPON_ITEMS = {
|
|
|
4131
4131
|
type: "weapon",
|
|
4132
4132
|
id: "weapon_supershotgun",
|
|
4133
4133
|
name: "Super Shotgun",
|
|
4134
|
-
weaponId:
|
|
4135
|
-
ammoType:
|
|
4134
|
+
weaponId: WeaponId.SuperShotgun,
|
|
4135
|
+
ammoType: AmmoType.Shells,
|
|
4136
4136
|
initialAmmo: 10,
|
|
4137
4137
|
pickupAmmo: 10,
|
|
4138
4138
|
fireRate: 1
|
|
@@ -4141,8 +4141,8 @@ var WEAPON_ITEMS = {
|
|
|
4141
4141
|
type: "weapon",
|
|
4142
4142
|
id: "weapon_machinegun",
|
|
4143
4143
|
name: "Machinegun",
|
|
4144
|
-
weaponId:
|
|
4145
|
-
ammoType:
|
|
4144
|
+
weaponId: WeaponId.Machinegun,
|
|
4145
|
+
ammoType: AmmoType.Bullets,
|
|
4146
4146
|
initialAmmo: 50,
|
|
4147
4147
|
pickupAmmo: 50,
|
|
4148
4148
|
fireRate: 0.1,
|
|
@@ -4152,8 +4152,8 @@ var WEAPON_ITEMS = {
|
|
|
4152
4152
|
type: "weapon",
|
|
4153
4153
|
id: "weapon_chaingun",
|
|
4154
4154
|
name: "Chaingun",
|
|
4155
|
-
weaponId:
|
|
4156
|
-
ammoType:
|
|
4155
|
+
weaponId: WeaponId.Chaingun,
|
|
4156
|
+
ammoType: AmmoType.Bullets,
|
|
4157
4157
|
initialAmmo: 50,
|
|
4158
4158
|
pickupAmmo: 50,
|
|
4159
4159
|
fireRate: 0.1
|
|
@@ -4162,8 +4162,8 @@ var WEAPON_ITEMS = {
|
|
|
4162
4162
|
type: "weapon",
|
|
4163
4163
|
id: "weapon_grenadelauncher",
|
|
4164
4164
|
name: "Grenade Launcher",
|
|
4165
|
-
weaponId:
|
|
4166
|
-
ammoType:
|
|
4165
|
+
weaponId: WeaponId.GrenadeLauncher,
|
|
4166
|
+
ammoType: AmmoType.Grenades,
|
|
4167
4167
|
initialAmmo: 10,
|
|
4168
4168
|
pickupAmmo: 10,
|
|
4169
4169
|
fireRate: 1
|
|
@@ -4172,8 +4172,8 @@ var WEAPON_ITEMS = {
|
|
|
4172
4172
|
type: "weapon",
|
|
4173
4173
|
id: "weapon_rocketlauncher",
|
|
4174
4174
|
name: "Rocket Launcher",
|
|
4175
|
-
weaponId:
|
|
4176
|
-
ammoType:
|
|
4175
|
+
weaponId: WeaponId.RocketLauncher,
|
|
4176
|
+
ammoType: AmmoType.Rockets,
|
|
4177
4177
|
initialAmmo: 5,
|
|
4178
4178
|
pickupAmmo: 5,
|
|
4179
4179
|
fireRate: 1
|
|
@@ -4182,8 +4182,8 @@ var WEAPON_ITEMS = {
|
|
|
4182
4182
|
type: "weapon",
|
|
4183
4183
|
id: "weapon_hyperblaster",
|
|
4184
4184
|
name: "HyperBlaster",
|
|
4185
|
-
weaponId:
|
|
4186
|
-
ammoType:
|
|
4185
|
+
weaponId: WeaponId.HyperBlaster,
|
|
4186
|
+
ammoType: AmmoType.Cells,
|
|
4187
4187
|
initialAmmo: 50,
|
|
4188
4188
|
pickupAmmo: 50,
|
|
4189
4189
|
fireRate: 0.1
|
|
@@ -4192,8 +4192,8 @@ var WEAPON_ITEMS = {
|
|
|
4192
4192
|
type: "weapon",
|
|
4193
4193
|
id: "weapon_railgun",
|
|
4194
4194
|
name: "Railgun",
|
|
4195
|
-
weaponId:
|
|
4196
|
-
ammoType:
|
|
4195
|
+
weaponId: WeaponId.Railgun,
|
|
4196
|
+
ammoType: AmmoType.Slugs,
|
|
4197
4197
|
initialAmmo: 10,
|
|
4198
4198
|
pickupAmmo: 10,
|
|
4199
4199
|
fireRate: 1.5
|
|
@@ -4202,8 +4202,8 @@ var WEAPON_ITEMS = {
|
|
|
4202
4202
|
type: "weapon",
|
|
4203
4203
|
id: "weapon_bfg",
|
|
4204
4204
|
name: "BFG10K",
|
|
4205
|
-
weaponId:
|
|
4206
|
-
ammoType:
|
|
4205
|
+
weaponId: WeaponId.BFG10K,
|
|
4206
|
+
ammoType: AmmoType.Cells,
|
|
4207
4207
|
initialAmmo: 50,
|
|
4208
4208
|
pickupAmmo: 50,
|
|
4209
4209
|
fireRate: 1
|
|
@@ -13102,20 +13102,20 @@ function createGame(imports, engine, options) {
|
|
|
13102
13102
|
const blend = [0, 0, 0, 0];
|
|
13103
13103
|
if (!player || !player.client) return blend;
|
|
13104
13104
|
const inventory = player.client.inventory;
|
|
13105
|
-
if (inventory.powerups.has(
|
|
13105
|
+
if (inventory.powerups.has(PowerupId.QuadDamage)) {
|
|
13106
13106
|
blend[2] = 1;
|
|
13107
13107
|
blend[3] = 0.08;
|
|
13108
13108
|
}
|
|
13109
|
-
if (inventory.powerups.has(
|
|
13109
|
+
if (inventory.powerups.has(PowerupId.Invulnerability)) {
|
|
13110
13110
|
blend[0] = 1;
|
|
13111
13111
|
blend[1] = 1;
|
|
13112
13112
|
blend[3] = 0.08;
|
|
13113
13113
|
}
|
|
13114
|
-
if (inventory.powerups.has(
|
|
13114
|
+
if (inventory.powerups.has(PowerupId.EnviroSuit)) {
|
|
13115
13115
|
blend[1] = 1;
|
|
13116
13116
|
blend[3] = 0.08;
|
|
13117
13117
|
}
|
|
13118
|
-
if (inventory.powerups.has(
|
|
13118
|
+
if (inventory.powerups.has(PowerupId.Rebreather)) {
|
|
13119
13119
|
blend[0] = 0.4;
|
|
13120
13120
|
blend[1] = 1;
|
|
13121
13121
|
blend[2] = 0.4;
|