![]() |
VR-Forces Developer's Guide
|
DtFireDetonationSender - Filters and delivers WeaponFire and MunitionDetonation interactions for one WebSocket connection.
Owns a DtFireDetonationEventSource that handles signal subscription and serialization. Applies the following filtering rules:
Fire: include if the attacker UUID is in session.knownObjects. When a fire event passes, its EventId is remembered so the matching detonation can follow.
Detonation: include if (a) the EventId matches a previously passed fire event OR (b) the target UUID is non-null and in session.knownObjects. When a detonation is included via rule (a), the EventId is removed from the tracking set.
mySentFireEventIds is private to this class and is not stored on DtWebLvcClientSession.

Public Member Functions | |
| DtFireDetonationSender () | |
| ~DtFireDetonationSender () override=default | |
| std::shared_ptr < DtIInteractionEventSource > | eventSource () const override |
| std::vector< Json::Value > | drainFiltered (DtWebLvcClientSession &session) override |
Public Member Functions inherited from DtIInteractionTypeSender | |
| virtual | ~DtIInteractionTypeSender ()=default |
Private Attributes | |
| std::shared_ptr < DtFireDetonationEventSource > | myEventSource |
| std::set< std::string > | mySentFireEventIds |
| DtFireDetonationSender::DtFireDetonationSender | ( | ) |
|
overridedefault |
|
inlineoverridevirtual |
Returns the event source for registration with DtInteractionProcessor.
Reimplemented from DtIInteractionTypeSender.
References myEventSource.
|
overridevirtual |
Drain events from the owned source, apply filtering against session, and return the JSON records that should be sent to this client.
| session | Per-connection session. Implementors must acquire session.mutex before reading session.knownObjects. |
Implements DtIInteractionTypeSender.
|
private |
Referenced by eventSource().
|
private |
EventIds of fire events forwarded to this client whose matching detonation has not yet been seen.