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

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

Include dependency graph for DroppedWeaponSystem.cpp:

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.
bool systems::tryPickup (Registry &registry, Position dropPos, CollisionShape dropShape, const DroppedWeapon &dw, std::vector< PendingWeaponDrop > &pendingDrops)
 Try to grant the dropped weapon to a player.
void systems::runDroppedWeapons (Registry &registry, float dt)
 Tick dropped weapons: handle pickup (overlap-refill or look+F replace) and despawn timer.

Detailed Description

Update system for player-dropped weapon pickups.