|
group2 0.1.0
CSE 125 Group 2
|
Update system for player-dropped weapon pickups. More...
#include "DroppedWeaponSystem.hpp"#include "ecs/components/CollisionShape.hpp"#include "ecs/components/DroppedWeapon.hpp"#include "ecs/components/GrenadeConfig.hpp"#include "ecs/components/InputSnapshot.hpp"#include "ecs/components/Player.hpp"#include "ecs/components/PlayerVisState.hpp"#include "ecs/components/Position.hpp"#include "ecs/components/RigidBody.hpp"#include "ecs/components/Velocity.hpp"#include "ecs/components/WeaponConfig.hpp"#include "ecs/components/WeaponState.hpp"#include "ecs/systems/PickupGeometry.hpp"#include <algorithm>#include <cmath>#include <vector>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. | |
| bool | systems::tryPickup (Registry ®istry, Position dropPos, CollisionShape dropShape, const DroppedWeapon &dw, std::vector< PendingWeaponDrop > &pendingDrops) |
| Try to grant the dropped weapon to a player. | |
| void | systems::runDroppedWeapons (Registry ®istry, float dt) |
| Tick dropped weapons: handle pickup (overlap-refill or look+F replace) and despawn timer. | |
Update system for player-dropped weapon pickups.