diff --git a/packages/frontend/src/game/weapons/functions/renderWeapon.tsx b/packages/frontend/src/game/weapons/functions/renderWeapon.tsx index e46dc8a..c7e5327 100644 --- a/packages/frontend/src/game/weapons/functions/renderWeapon.tsx +++ b/packages/frontend/src/game/weapons/functions/renderWeapon.tsx @@ -5,6 +5,7 @@ import type { GamePlayerState } from "../../utils/geckos/geckos"; // Import Weapons Below: import { AK47 } from "../weapons/primary/AK47/AK47"; import { AWP } from "../weapons/primary/AWP/AWP"; +import { Famas } from "../weapons/primary/Famas/Famas"; import { FiveSeven } from "../weapons/secondary/FiveSeven/FiveSeven"; import { Knife } from "../weapons/melee/Knife"; import { M203 } from "../weapons/secondary/M203/M203"; @@ -27,6 +28,8 @@ export const RenderWeapon: React.FC = ({ playerStateRef }) => // Assault Rifles case "AK47": return ; + case "Famas": + return ; case "Saiga": return ; // SMGs diff --git a/packages/frontend/src/game/weapons/weapons/primary/Famas/Famas.tsx b/packages/frontend/src/game/weapons/weapons/primary/Famas/Famas.tsx new file mode 100644 index 0000000..3dccba9 --- /dev/null +++ b/packages/frontend/src/game/weapons/weapons/primary/Famas/Famas.tsx @@ -0,0 +1,59 @@ +import React from "react"; +import { GamePlayerState } from "../../../../utils/geckos/geckos"; +import { PUBLIC_PATHS } from "../../../../constants/publicPaths"; +import { useGLTF } from "@react-three/drei"; +import { Vector3 } from "three"; +import { WeaponChild } from "../../../WeaponChild"; +import { WEAPONS } from "@fps/lib"; + +interface FamasProps { + playerStateRef: React.MutableRefObject; +} + +export const Famas: React.FC = ({ playerStateRef }) => { + return ( + + ); +}; + +useGLTF.preload(PUBLIC_PATHS.weapons.Saiga); // TODO: https://app.clickup.com/t/86b5vk9q1 diff --git a/packages/lib/src/objects/weapon.ts b/packages/lib/src/objects/weapon.ts index b70037c..992214b 100644 --- a/packages/lib/src/objects/weapon.ts +++ b/packages/lib/src/objects/weapon.ts @@ -68,6 +68,29 @@ export const WEAPONS = { weaponType: "Primary", weight: 1, }, + Famas: { + adsTimeMs: 0, + bulletSpread: 0, + bulletsPerMagazine: 30, + bulletsPerShot: 1, + damageType: "Ballistic", + displayName: "Famas", + fireRateMs: 100, + firingMode: "Burst", + maxDamagePerBullet: 35, + recoil: { + horizontal: 0.01, + kickback: 0.1, + vertical: 0.008, + }, + reloadTimeMs: 3000, + reserveAmmo: 150, + sprintToFireTimeMs: 250, + shotsPerBurst: 3, + weaponClass: "Assault Rifle", + weaponType: "Primary", + weight: 1, + }, Saiga: { adsTimeMs: 0, bulletSpread: 0, @@ -251,52 +274,6 @@ export const WEAPONS = { weaponType: "Melee", weight: 1, }, - - // TODO: Remove this, its just here to get the linter to stop yelling about unnecessary checks https://app.clickup.com/t/86b5v1xmm - Test: { - adsTimeMs: 0, - bulletSpread: 0, - bulletsPerMagazine: 30, - bulletsPerShot: 1, - damageType: "Ballistic", - displayName: "AK-47", - fireRateMs: 100, - firingMode: "Single", - maxDamagePerBullet: 35, - recoil: { - horizontal: 0.01, - kickback: 0.1, - vertical: 0.008, - }, - reloadTimeMs: 3000, - reserveAmmo: 150, - sprintToFireTimeMs: 250, - weaponClass: "Assault Rifle", - weaponType: "Primary", - weight: 1, - }, - Test2: { - adsTimeMs: 0, - bulletSpread: 0, - bulletsPerMagazine: 30, - bulletsPerShot: 1, - damageType: "Ballistic", - displayName: "AK-47", - fireRateMs: 100, - firingMode: "Burst", - maxDamagePerBullet: 35, - recoil: { - horizontal: 0.01, - kickback: 0.1, - vertical: 0.008, - }, - reloadTimeMs: 3000, - reserveAmmo: 150, - sprintToFireTimeMs: 250, - weaponClass: "Assault Rifle", - weaponType: "Primary", - weight: 1, - }, } satisfies Record; // All weapons in the game