group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
DroppedWeaponSystem.hpp File Reference

Update system for player-dropped weapon pickups. More...

#include "ecs/components/WeaponState.hpp"
#include "ecs/registry/Registry.hpp"
#include <glm/vec3.hpp>
Include dependency graph for DroppedWeaponSystem.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  systems::PendingWeaponDrop
 A weapon drop queued during view iteration, spawned afterward. More...

Namespaces

namespace  systems
 Client-only input sampling system — split into two halves so mouse look can run every iterate() (smooth camera at any FPS) while movement keys run once per physics tick group (server-consistent).

Functions

void systems::spawnDroppedWeapon (Registry &registry, glm::vec3 pos, glm::vec3 initialVel, const GunInstance &gun, float pickupDelay)
 Spawn an in-world dropped-weapon pickup carrying a gun's ammo.
void systems::runDroppedWeapons (Registry &registry, float dt)
 Tick dropped weapons: handle pickup (overlap-refill or look+F replace) and despawn timer.

Variables

constexpr float systems::k_droppedWeaponLifetime = 30.0f
 Default lifetime (seconds) for a dropped weapon before it despawns.
constexpr float systems::k_swapDropPickupDelay = 0.8f
 Pickup-immunity applied to a weapon dropped during a swap, so the player can't instantly re-grab the gun they just replaced.

Detailed Description

Update system for player-dropped weapon pickups.