|
group2 0.1.0
CSE 125 Group 2
|
Update system for player-dropped weapon pickups. More...
#include "ecs/components/WeaponState.hpp"#include "ecs/registry/Registry.hpp"#include <glm/vec3.hpp>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 ®istry, 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 ®istry, 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. | |
Update system for player-dropped weapon pickups.