quake2ts 0.0.188 → 0.0.190
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
|
@@ -817,6 +817,80 @@ var applyPmove = (state, cmd, trace, pointContents2) => {
|
|
|
817
817
|
velocity: finalVelocity
|
|
818
818
|
};
|
|
819
819
|
};
|
|
820
|
+
var WeaponId = /* @__PURE__ */ ((WeaponId22) => {
|
|
821
|
+
WeaponId22["Blaster"] = "blaster";
|
|
822
|
+
WeaponId22["Shotgun"] = "shotgun";
|
|
823
|
+
WeaponId22["SuperShotgun"] = "super_shotgun";
|
|
824
|
+
WeaponId22["Machinegun"] = "machinegun";
|
|
825
|
+
WeaponId22["Chaingun"] = "chaingun";
|
|
826
|
+
WeaponId22["GrenadeLauncher"] = "grenade_launcher";
|
|
827
|
+
WeaponId22["RocketLauncher"] = "rocket_launcher";
|
|
828
|
+
WeaponId22["HyperBlaster"] = "hyperblaster";
|
|
829
|
+
WeaponId22["Railgun"] = "railgun";
|
|
830
|
+
WeaponId22["BFG10K"] = "bfg10k";
|
|
831
|
+
WeaponId22["Grapple"] = "grapple";
|
|
832
|
+
WeaponId22["ChainFist"] = "chainfist";
|
|
833
|
+
WeaponId22["EtfRifle"] = "etf_rifle";
|
|
834
|
+
WeaponId22["ProxLauncher"] = "prox_launcher";
|
|
835
|
+
WeaponId22["IonRipper"] = "ionripper";
|
|
836
|
+
WeaponId22["PlasmaBeam"] = "plasmabeam";
|
|
837
|
+
WeaponId22["Phalanx"] = "phalanx";
|
|
838
|
+
WeaponId22["Disruptor"] = "disruptor";
|
|
839
|
+
return WeaponId22;
|
|
840
|
+
})(WeaponId || {});
|
|
841
|
+
var AmmoType = /* @__PURE__ */ ((AmmoType22) => {
|
|
842
|
+
AmmoType22[AmmoType22["Bullets"] = 0] = "Bullets";
|
|
843
|
+
AmmoType22[AmmoType22["Shells"] = 1] = "Shells";
|
|
844
|
+
AmmoType22[AmmoType22["Rockets"] = 2] = "Rockets";
|
|
845
|
+
AmmoType22[AmmoType22["Grenades"] = 3] = "Grenades";
|
|
846
|
+
AmmoType22[AmmoType22["Cells"] = 4] = "Cells";
|
|
847
|
+
AmmoType22[AmmoType22["Slugs"] = 5] = "Slugs";
|
|
848
|
+
AmmoType22[AmmoType22["Trap"] = 6] = "Trap";
|
|
849
|
+
AmmoType22[AmmoType22["Tesla"] = 7] = "Tesla";
|
|
850
|
+
AmmoType22[AmmoType22["MagSlugs"] = 8] = "MagSlugs";
|
|
851
|
+
AmmoType22[AmmoType22["Flechettes"] = 9] = "Flechettes";
|
|
852
|
+
AmmoType22[AmmoType22["Prox"] = 10] = "Prox";
|
|
853
|
+
AmmoType22[AmmoType22["Nuke"] = 11] = "Nuke";
|
|
854
|
+
AmmoType22[AmmoType22["Rounds"] = 12] = "Rounds";
|
|
855
|
+
return AmmoType22;
|
|
856
|
+
})(AmmoType || {});
|
|
857
|
+
var AMMO_TYPE_COUNT = Object.keys(AmmoType).length / 2;
|
|
858
|
+
var AmmoItemId = /* @__PURE__ */ ((AmmoItemId22) => {
|
|
859
|
+
AmmoItemId22["Shells"] = "ammo_shells";
|
|
860
|
+
AmmoItemId22["Bullets"] = "ammo_bullets";
|
|
861
|
+
AmmoItemId22["Rockets"] = "ammo_rockets";
|
|
862
|
+
AmmoItemId22["Grenades"] = "ammo_grenades";
|
|
863
|
+
AmmoItemId22["Cells"] = "ammo_cells";
|
|
864
|
+
AmmoItemId22["Slugs"] = "ammo_slugs";
|
|
865
|
+
return AmmoItemId22;
|
|
866
|
+
})(AmmoItemId || {});
|
|
867
|
+
var PowerupId = /* @__PURE__ */ ((PowerupId22) => {
|
|
868
|
+
PowerupId22["QuadDamage"] = "quad";
|
|
869
|
+
PowerupId22["Invulnerability"] = "invulnerability";
|
|
870
|
+
PowerupId22["EnviroSuit"] = "enviro_suit";
|
|
871
|
+
PowerupId22["Rebreather"] = "rebreather";
|
|
872
|
+
PowerupId22["Silencer"] = "silencer";
|
|
873
|
+
PowerupId22["PowerScreen"] = "power_screen";
|
|
874
|
+
PowerupId22["PowerShield"] = "power_shield";
|
|
875
|
+
PowerupId22["QuadFire"] = "quad_fire";
|
|
876
|
+
PowerupId22["Invisibility"] = "invisibility";
|
|
877
|
+
PowerupId22["Bandolier"] = "bandolier";
|
|
878
|
+
PowerupId22["AmmoPack"] = "ammo_pack";
|
|
879
|
+
PowerupId22["IRGoggles"] = "ir_goggles";
|
|
880
|
+
PowerupId22["DoubleDamage"] = "double_damage";
|
|
881
|
+
PowerupId22["SphereVengeance"] = "sphere_vengeance";
|
|
882
|
+
PowerupId22["SphereHunter"] = "sphere_hunter";
|
|
883
|
+
PowerupId22["SphereDefender"] = "sphere_defender";
|
|
884
|
+
PowerupId22["Doppelganger"] = "doppelganger";
|
|
885
|
+
PowerupId22["TagToken"] = "tag_token";
|
|
886
|
+
PowerupId22["TechResistance"] = "tech_resistance";
|
|
887
|
+
PowerupId22["TechStrength"] = "tech_strength";
|
|
888
|
+
PowerupId22["TechHaste"] = "tech_haste";
|
|
889
|
+
PowerupId22["TechRegeneration"] = "tech_regeneration";
|
|
890
|
+
PowerupId22["Flashlight"] = "flashlight";
|
|
891
|
+
PowerupId22["Compass"] = "compass";
|
|
892
|
+
return PowerupId22;
|
|
893
|
+
})(PowerupId || {});
|
|
820
894
|
|
|
821
895
|
// src/combat/damageFlags.ts
|
|
822
896
|
var DamageFlags = /* @__PURE__ */ ((DamageFlags2) => {
|
|
@@ -930,39 +1004,13 @@ function applyPowerArmor(damage, flags, hitPoint, _hitNormal, state, options = {
|
|
|
930
1004
|
}
|
|
931
1005
|
|
|
932
1006
|
// src/inventory/ammo.ts
|
|
933
|
-
var AmmoType = /* @__PURE__ */ ((AmmoType3) => {
|
|
934
|
-
AmmoType3[AmmoType3["Bullets"] = 0] = "Bullets";
|
|
935
|
-
AmmoType3[AmmoType3["Shells"] = 1] = "Shells";
|
|
936
|
-
AmmoType3[AmmoType3["Rockets"] = 2] = "Rockets";
|
|
937
|
-
AmmoType3[AmmoType3["Grenades"] = 3] = "Grenades";
|
|
938
|
-
AmmoType3[AmmoType3["Cells"] = 4] = "Cells";
|
|
939
|
-
AmmoType3[AmmoType3["Slugs"] = 5] = "Slugs";
|
|
940
|
-
AmmoType3[AmmoType3["Trap"] = 6] = "Trap";
|
|
941
|
-
AmmoType3[AmmoType3["Tesla"] = 7] = "Tesla";
|
|
942
|
-
AmmoType3[AmmoType3["MagSlugs"] = 8] = "MagSlugs";
|
|
943
|
-
AmmoType3[AmmoType3["Flechettes"] = 9] = "Flechettes";
|
|
944
|
-
AmmoType3[AmmoType3["Prox"] = 10] = "Prox";
|
|
945
|
-
AmmoType3[AmmoType3["Nuke"] = 11] = "Nuke";
|
|
946
|
-
AmmoType3[AmmoType3["Rounds"] = 12] = "Rounds";
|
|
947
|
-
return AmmoType3;
|
|
948
|
-
})(AmmoType || {});
|
|
949
|
-
var AMMO_TYPE_COUNT = Object.keys(AmmoType).length / 2;
|
|
950
|
-
var AmmoItemId = /* @__PURE__ */ ((AmmoItemId4) => {
|
|
951
|
-
AmmoItemId4["Shells"] = "ammo_shells";
|
|
952
|
-
AmmoItemId4["Bullets"] = "ammo_bullets";
|
|
953
|
-
AmmoItemId4["Rockets"] = "ammo_rockets";
|
|
954
|
-
AmmoItemId4["Grenades"] = "ammo_grenades";
|
|
955
|
-
AmmoItemId4["Cells"] = "ammo_cells";
|
|
956
|
-
AmmoItemId4["Slugs"] = "ammo_slugs";
|
|
957
|
-
return AmmoItemId4;
|
|
958
|
-
})(AmmoItemId || {});
|
|
959
1007
|
var AMMO_ITEM_DEFINITIONS = {
|
|
960
|
-
[
|
|
961
|
-
[
|
|
962
|
-
[
|
|
963
|
-
[
|
|
964
|
-
[
|
|
965
|
-
[
|
|
1008
|
+
[AmmoItemId.Shells]: { id: AmmoItemId.Shells, ammoType: AmmoType.Shells, quantity: 10, weaponAmmo: false },
|
|
1009
|
+
[AmmoItemId.Bullets]: { id: AmmoItemId.Bullets, ammoType: AmmoType.Bullets, quantity: 50, weaponAmmo: false },
|
|
1010
|
+
[AmmoItemId.Rockets]: { id: AmmoItemId.Rockets, ammoType: AmmoType.Rockets, quantity: 5, weaponAmmo: false },
|
|
1011
|
+
[AmmoItemId.Grenades]: { id: AmmoItemId.Grenades, ammoType: AmmoType.Grenades, quantity: 5, weaponAmmo: true },
|
|
1012
|
+
[AmmoItemId.Cells]: { id: AmmoItemId.Cells, ammoType: AmmoType.Cells, quantity: 50, weaponAmmo: false },
|
|
1013
|
+
[AmmoItemId.Slugs]: { id: AmmoItemId.Slugs, ammoType: AmmoType.Slugs, quantity: 10, weaponAmmo: false }
|
|
966
1014
|
};
|
|
967
1015
|
function getAmmoItemDefinition(id) {
|
|
968
1016
|
return AMMO_ITEM_DEFINITIONS[id];
|
|
@@ -978,9 +1026,9 @@ function createAmmoInventory(caps = createBaseAmmoCaps(), seed) {
|
|
|
978
1026
|
}
|
|
979
1027
|
function createBaseAmmoCaps() {
|
|
980
1028
|
const caps = Array(AMMO_TYPE_COUNT).fill(50);
|
|
981
|
-
caps[
|
|
982
|
-
caps[
|
|
983
|
-
caps[
|
|
1029
|
+
caps[AmmoType.Bullets] = 200;
|
|
1030
|
+
caps[AmmoType.Shells] = 100;
|
|
1031
|
+
caps[AmmoType.Cells] = 200;
|
|
984
1032
|
return caps;
|
|
985
1033
|
}
|
|
986
1034
|
function clampAmmoCounts(counts, caps) {
|
|
@@ -1013,54 +1061,6 @@ function pickupAmmo(inventory, itemId, options = {}) {
|
|
|
1013
1061
|
}
|
|
1014
1062
|
|
|
1015
1063
|
// src/inventory/playerInventory.ts
|
|
1016
|
-
var WeaponId = /* @__PURE__ */ ((WeaponId3) => {
|
|
1017
|
-
WeaponId3["Blaster"] = "blaster";
|
|
1018
|
-
WeaponId3["Shotgun"] = "shotgun";
|
|
1019
|
-
WeaponId3["SuperShotgun"] = "super_shotgun";
|
|
1020
|
-
WeaponId3["Machinegun"] = "machinegun";
|
|
1021
|
-
WeaponId3["Chaingun"] = "chaingun";
|
|
1022
|
-
WeaponId3["GrenadeLauncher"] = "grenade_launcher";
|
|
1023
|
-
WeaponId3["RocketLauncher"] = "rocket_launcher";
|
|
1024
|
-
WeaponId3["HyperBlaster"] = "hyperblaster";
|
|
1025
|
-
WeaponId3["Railgun"] = "railgun";
|
|
1026
|
-
WeaponId3["BFG10K"] = "bfg10k";
|
|
1027
|
-
WeaponId3["Grapple"] = "grapple";
|
|
1028
|
-
WeaponId3["ChainFist"] = "chainfist";
|
|
1029
|
-
WeaponId3["EtfRifle"] = "etf_rifle";
|
|
1030
|
-
WeaponId3["ProxLauncher"] = "prox_launcher";
|
|
1031
|
-
WeaponId3["IonRipper"] = "ionripper";
|
|
1032
|
-
WeaponId3["PlasmaBeam"] = "plasmabeam";
|
|
1033
|
-
WeaponId3["Phalanx"] = "phalanx";
|
|
1034
|
-
WeaponId3["Disruptor"] = "disruptor";
|
|
1035
|
-
return WeaponId3;
|
|
1036
|
-
})(WeaponId || {});
|
|
1037
|
-
var PowerupId = /* @__PURE__ */ ((PowerupId3) => {
|
|
1038
|
-
PowerupId3["QuadDamage"] = "quad";
|
|
1039
|
-
PowerupId3["Invulnerability"] = "invulnerability";
|
|
1040
|
-
PowerupId3["EnviroSuit"] = "enviro_suit";
|
|
1041
|
-
PowerupId3["Rebreather"] = "rebreather";
|
|
1042
|
-
PowerupId3["Silencer"] = "silencer";
|
|
1043
|
-
PowerupId3["PowerScreen"] = "power_screen";
|
|
1044
|
-
PowerupId3["PowerShield"] = "power_shield";
|
|
1045
|
-
PowerupId3["QuadFire"] = "quad_fire";
|
|
1046
|
-
PowerupId3["Invisibility"] = "invisibility";
|
|
1047
|
-
PowerupId3["Bandolier"] = "bandolier";
|
|
1048
|
-
PowerupId3["AmmoPack"] = "ammo_pack";
|
|
1049
|
-
PowerupId3["IRGoggles"] = "ir_goggles";
|
|
1050
|
-
PowerupId3["DoubleDamage"] = "double_damage";
|
|
1051
|
-
PowerupId3["SphereVengeance"] = "sphere_vengeance";
|
|
1052
|
-
PowerupId3["SphereHunter"] = "sphere_hunter";
|
|
1053
|
-
PowerupId3["SphereDefender"] = "sphere_defender";
|
|
1054
|
-
PowerupId3["Doppelganger"] = "doppelganger";
|
|
1055
|
-
PowerupId3["TagToken"] = "tag_token";
|
|
1056
|
-
PowerupId3["TechResistance"] = "tech_resistance";
|
|
1057
|
-
PowerupId3["TechStrength"] = "tech_strength";
|
|
1058
|
-
PowerupId3["TechHaste"] = "tech_haste";
|
|
1059
|
-
PowerupId3["TechRegeneration"] = "tech_regeneration";
|
|
1060
|
-
PowerupId3["Flashlight"] = "flashlight";
|
|
1061
|
-
PowerupId3["Compass"] = "compass";
|
|
1062
|
-
return PowerupId3;
|
|
1063
|
-
})(PowerupId || {});
|
|
1064
1064
|
var KeyId = /* @__PURE__ */ ((KeyId2) => {
|
|
1065
1065
|
KeyId2["Blue"] = "blue";
|
|
1066
1066
|
KeyId2["Red"] = "red";
|
|
@@ -1210,27 +1210,27 @@ function pickupPowerup(client, item, time) {
|
|
|
1210
1210
|
let icon = "";
|
|
1211
1211
|
switch (item.id) {
|
|
1212
1212
|
case "item_quad":
|
|
1213
|
-
powerupId =
|
|
1213
|
+
powerupId = PowerupId.QuadDamage;
|
|
1214
1214
|
icon = "p_quad";
|
|
1215
1215
|
break;
|
|
1216
1216
|
case "item_invulnerability":
|
|
1217
|
-
powerupId =
|
|
1217
|
+
powerupId = PowerupId.Invulnerability;
|
|
1218
1218
|
icon = "p_invulnerability";
|
|
1219
1219
|
break;
|
|
1220
1220
|
case "item_silencer":
|
|
1221
|
-
powerupId =
|
|
1221
|
+
powerupId = PowerupId.Silencer;
|
|
1222
1222
|
icon = "p_silencer";
|
|
1223
1223
|
break;
|
|
1224
1224
|
case "item_rebreather":
|
|
1225
|
-
powerupId =
|
|
1225
|
+
powerupId = PowerupId.Rebreather;
|
|
1226
1226
|
icon = "p_rebreather";
|
|
1227
1227
|
break;
|
|
1228
1228
|
case "item_enviro":
|
|
1229
|
-
powerupId =
|
|
1229
|
+
powerupId = PowerupId.EnviroSuit;
|
|
1230
1230
|
icon = "p_envirosuit";
|
|
1231
1231
|
break;
|
|
1232
1232
|
case "item_double":
|
|
1233
|
-
powerupId =
|
|
1233
|
+
powerupId = PowerupId.DoubleDamage;
|
|
1234
1234
|
icon = "p_double";
|
|
1235
1235
|
break;
|
|
1236
1236
|
}
|
|
@@ -1238,9 +1238,9 @@ function pickupPowerup(client, item, time) {
|
|
|
1238
1238
|
const expiresAt = inventory.powerups.get(powerupId);
|
|
1239
1239
|
const newExpiresAt = expiresAt && expiresAt > time ? expiresAt + item.timer * 1e3 : time + item.timer * 1e3;
|
|
1240
1240
|
inventory.powerups.set(powerupId, newExpiresAt);
|
|
1241
|
-
if (powerupId ===
|
|
1241
|
+
if (powerupId === PowerupId.QuadDamage) {
|
|
1242
1242
|
client.quad_time = newExpiresAt / 1e3;
|
|
1243
|
-
} else if (powerupId ===
|
|
1243
|
+
} else if (powerupId === PowerupId.DoubleDamage) {
|
|
1244
1244
|
client.double_time = newExpiresAt / 1e3;
|
|
1245
1245
|
}
|
|
1246
1246
|
setPickup(inventory, icon, time);
|
|
@@ -1509,10 +1509,10 @@ var Entity = class {
|
|
|
1509
1509
|
return {
|
|
1510
1510
|
type,
|
|
1511
1511
|
get cellCount() {
|
|
1512
|
-
return ammo.counts[
|
|
1512
|
+
return ammo.counts[AmmoType.Cells] || 0;
|
|
1513
1513
|
},
|
|
1514
1514
|
set cellCount(v) {
|
|
1515
|
-
ammo.counts[
|
|
1515
|
+
ammo.counts[AmmoType.Cells] = v;
|
|
1516
1516
|
},
|
|
1517
1517
|
angles: this.angles,
|
|
1518
1518
|
origin: this.origin,
|
|
@@ -3932,7 +3932,7 @@ function chaingunThink(player, sys) {
|
|
|
3932
3932
|
if (!player.client) {
|
|
3933
3933
|
return;
|
|
3934
3934
|
}
|
|
3935
|
-
const weaponState = getWeaponState(player.client.weaponStates,
|
|
3935
|
+
const weaponState = getWeaponState(player.client.weaponStates, WeaponId.Chaingun);
|
|
3936
3936
|
if (!(player.client.buttons & BUTTON_ATTACK) && weaponState.spinupCount && weaponState.spinupCount > 0) {
|
|
3937
3937
|
sys.sound(player, 0, "weapons/chngnd1a.wav", 1, 0, 0);
|
|
3938
3938
|
weaponState.spinupCount = 0;
|
|
@@ -3945,7 +3945,7 @@ var WEAPON_ITEMS = {
|
|
|
3945
3945
|
type: "weapon",
|
|
3946
3946
|
id: "weapon_blaster",
|
|
3947
3947
|
name: "Blaster",
|
|
3948
|
-
weaponId:
|
|
3948
|
+
weaponId: WeaponId.Blaster,
|
|
3949
3949
|
ammoType: null,
|
|
3950
3950
|
initialAmmo: 0,
|
|
3951
3951
|
pickupAmmo: 0,
|
|
@@ -3955,8 +3955,8 @@ var WEAPON_ITEMS = {
|
|
|
3955
3955
|
type: "weapon",
|
|
3956
3956
|
id: "weapon_shotgun",
|
|
3957
3957
|
name: "Shotgun",
|
|
3958
|
-
weaponId:
|
|
3959
|
-
ammoType:
|
|
3958
|
+
weaponId: WeaponId.Shotgun,
|
|
3959
|
+
ammoType: AmmoType.Shells,
|
|
3960
3960
|
initialAmmo: 10,
|
|
3961
3961
|
pickupAmmo: 10,
|
|
3962
3962
|
fireRate: 1
|
|
@@ -3965,8 +3965,8 @@ var WEAPON_ITEMS = {
|
|
|
3965
3965
|
type: "weapon",
|
|
3966
3966
|
id: "weapon_supershotgun",
|
|
3967
3967
|
name: "Super Shotgun",
|
|
3968
|
-
weaponId:
|
|
3969
|
-
ammoType:
|
|
3968
|
+
weaponId: WeaponId.SuperShotgun,
|
|
3969
|
+
ammoType: AmmoType.Shells,
|
|
3970
3970
|
initialAmmo: 10,
|
|
3971
3971
|
pickupAmmo: 10,
|
|
3972
3972
|
fireRate: 1
|
|
@@ -3975,8 +3975,8 @@ var WEAPON_ITEMS = {
|
|
|
3975
3975
|
type: "weapon",
|
|
3976
3976
|
id: "weapon_machinegun",
|
|
3977
3977
|
name: "Machinegun",
|
|
3978
|
-
weaponId:
|
|
3979
|
-
ammoType:
|
|
3978
|
+
weaponId: WeaponId.Machinegun,
|
|
3979
|
+
ammoType: AmmoType.Bullets,
|
|
3980
3980
|
initialAmmo: 50,
|
|
3981
3981
|
pickupAmmo: 50,
|
|
3982
3982
|
fireRate: 0.1,
|
|
@@ -3986,8 +3986,8 @@ var WEAPON_ITEMS = {
|
|
|
3986
3986
|
type: "weapon",
|
|
3987
3987
|
id: "weapon_chaingun",
|
|
3988
3988
|
name: "Chaingun",
|
|
3989
|
-
weaponId:
|
|
3990
|
-
ammoType:
|
|
3989
|
+
weaponId: WeaponId.Chaingun,
|
|
3990
|
+
ammoType: AmmoType.Bullets,
|
|
3991
3991
|
initialAmmo: 50,
|
|
3992
3992
|
pickupAmmo: 50,
|
|
3993
3993
|
fireRate: 0.1
|
|
@@ -3996,8 +3996,8 @@ var WEAPON_ITEMS = {
|
|
|
3996
3996
|
type: "weapon",
|
|
3997
3997
|
id: "weapon_grenadelauncher",
|
|
3998
3998
|
name: "Grenade Launcher",
|
|
3999
|
-
weaponId:
|
|
4000
|
-
ammoType:
|
|
3999
|
+
weaponId: WeaponId.GrenadeLauncher,
|
|
4000
|
+
ammoType: AmmoType.Grenades,
|
|
4001
4001
|
initialAmmo: 10,
|
|
4002
4002
|
pickupAmmo: 10,
|
|
4003
4003
|
fireRate: 1
|
|
@@ -4006,8 +4006,8 @@ var WEAPON_ITEMS = {
|
|
|
4006
4006
|
type: "weapon",
|
|
4007
4007
|
id: "weapon_rocketlauncher",
|
|
4008
4008
|
name: "Rocket Launcher",
|
|
4009
|
-
weaponId:
|
|
4010
|
-
ammoType:
|
|
4009
|
+
weaponId: WeaponId.RocketLauncher,
|
|
4010
|
+
ammoType: AmmoType.Rockets,
|
|
4011
4011
|
initialAmmo: 5,
|
|
4012
4012
|
pickupAmmo: 5,
|
|
4013
4013
|
fireRate: 1
|
|
@@ -4016,8 +4016,8 @@ var WEAPON_ITEMS = {
|
|
|
4016
4016
|
type: "weapon",
|
|
4017
4017
|
id: "weapon_hyperblaster",
|
|
4018
4018
|
name: "HyperBlaster",
|
|
4019
|
-
weaponId:
|
|
4020
|
-
ammoType:
|
|
4019
|
+
weaponId: WeaponId.HyperBlaster,
|
|
4020
|
+
ammoType: AmmoType.Cells,
|
|
4021
4021
|
initialAmmo: 50,
|
|
4022
4022
|
pickupAmmo: 50,
|
|
4023
4023
|
fireRate: 0.1
|
|
@@ -4026,8 +4026,8 @@ var WEAPON_ITEMS = {
|
|
|
4026
4026
|
type: "weapon",
|
|
4027
4027
|
id: "weapon_railgun",
|
|
4028
4028
|
name: "Railgun",
|
|
4029
|
-
weaponId:
|
|
4030
|
-
ammoType:
|
|
4029
|
+
weaponId: WeaponId.Railgun,
|
|
4030
|
+
ammoType: AmmoType.Slugs,
|
|
4031
4031
|
initialAmmo: 10,
|
|
4032
4032
|
pickupAmmo: 10,
|
|
4033
4033
|
fireRate: 1.5
|
|
@@ -4036,8 +4036,8 @@ var WEAPON_ITEMS = {
|
|
|
4036
4036
|
type: "weapon",
|
|
4037
4037
|
id: "weapon_bfg",
|
|
4038
4038
|
name: "BFG10K",
|
|
4039
|
-
weaponId:
|
|
4040
|
-
ammoType:
|
|
4039
|
+
weaponId: WeaponId.BFG10K,
|
|
4040
|
+
ammoType: AmmoType.Cells,
|
|
4041
4041
|
initialAmmo: 50,
|
|
4042
4042
|
pickupAmmo: 50,
|
|
4043
4043
|
fireRate: 1
|
|
@@ -12936,20 +12936,20 @@ function createGame(imports, engine, options) {
|
|
|
12936
12936
|
const blend = [0, 0, 0, 0];
|
|
12937
12937
|
if (!player || !player.client) return blend;
|
|
12938
12938
|
const inventory = player.client.inventory;
|
|
12939
|
-
if (inventory.powerups.has(
|
|
12939
|
+
if (inventory.powerups.has(PowerupId.QuadDamage)) {
|
|
12940
12940
|
blend[2] = 1;
|
|
12941
12941
|
blend[3] = 0.08;
|
|
12942
12942
|
}
|
|
12943
|
-
if (inventory.powerups.has(
|
|
12943
|
+
if (inventory.powerups.has(PowerupId.Invulnerability)) {
|
|
12944
12944
|
blend[0] = 1;
|
|
12945
12945
|
blend[1] = 1;
|
|
12946
12946
|
blend[3] = 0.08;
|
|
12947
12947
|
}
|
|
12948
|
-
if (inventory.powerups.has(
|
|
12948
|
+
if (inventory.powerups.has(PowerupId.EnviroSuit)) {
|
|
12949
12949
|
blend[1] = 1;
|
|
12950
12950
|
blend[3] = 0.08;
|
|
12951
12951
|
}
|
|
12952
|
-
if (inventory.powerups.has(
|
|
12952
|
+
if (inventory.powerups.has(PowerupId.Rebreather)) {
|
|
12953
12953
|
blend[0] = 0.4;
|
|
12954
12954
|
blend[1] = 1;
|
|
12955
12955
|
blend[2] = 0.4;
|