|
group2 0.1.0
CSE 125 Group 2
|
PR-27: transient component placed on the shooter entity for the duration of one runWeapon invocation when the matching SHOT_INTENT packet was received from that client. More...
#include <AnimSnapshot.hpp>
Public Attributes | |
| bool | received = false |
| std::uint16_t | targetClientId = 0xFFFFu |
| AnimSnapshot | targetAnim {} |
PR-27: transient component placed on the shooter entity for the duration of one runWeapon invocation when the matching SHOT_INTENT packet was received from that client.
The server's tick path looks up the intent map by (shooterClientId, shotInputTick) BEFORE calling runWeapon; if a hit, it emplaces this component. WeaponSystem::handleFire reads it (via registry.try_get<PendingShotIntent>) to populate the ShotResolution's client-intent + anim-delta columns. The component is removed after runWeapon returns so it never stays around — only the current tick's shot can read it.
received == false means "no SHOT_INTENT for this tick's shot" (UDP loss, or client wasn't shooting); the component might still be present but the consumer should treat it as absent.
| bool PendingShotIntent::received = false |
| AnimSnapshot PendingShotIntent::targetAnim {} |
| std::uint16_t PendingShotIntent::targetClientId = 0xFFFFu |