|
resonance 1.0.1
|
Arrow mesh that appears in the local view of up to four players for a limited time. More...
#include <tnlarrow.h>
Public Member Functions | |
| TnlArrow (int nIndex) | |
| Resolve "arrow<nIndex>.mesh" with every slot hidden. | |
| ~TnlArrow () | |
| Hide the arrow from every slot. | |
| void | Show (TnlPlayer *pPlayer, float flExpireFrame) |
| Show the arrow in the local view of one player until a frame. | |
| void | Hide (int nSlot) |
| Take the arrow out of the view of one slot. | |
| void | SetFrame (float flFrame) |
| Hide the arrow from every slot whose expiry frame is before flFrame. | |
Static Public Attributes | |
| static constexpr int | kSlotCount = 4 |
| Number of player slots the arrow can be shown to. | |
Arrow mesh that appears in the local view of up to four players for a limited time.
The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from the one object it drives, "arrow<n>.mesh".
The same mesh is drawn by the view of each player slot it is shown to, until the frame recorded for that slot passes.
AppTunnel allocates these in a loop, 0x24 bytes each, with the loop index as nIndex.
|
explicit |
Resolve "arrow<nIndex>.mesh" with every slot hidden.
| nIndex | The arrow. |
| TnlArrow::~TnlArrow | ( | ) |
Hide the arrow from every slot.
| void TnlArrow::Show | ( | TnlPlayer * | pPlayer, |
| float | flExpireFrame ) |
Show the arrow in the local view of one player until a frame.
The slot is the player number less 1. A slot that already shows the arrow is hidden first. AppTunnel's message handler inlines this at 0x004495e8, and the out-of-line copy has no caller.
| pPlayer | The player. |
| flExpireFrame | The frame after which the slot hides. |
| void TnlArrow::Hide | ( | int | nSlot | ) |
Take the arrow out of the view of one slot.
A slot the arrow is not shown to is unchanged. The expiry frame of the slot is not reset.
| nSlot | The player slot, from 0. |
| void TnlArrow::SetFrame | ( | float | flFrame | ) |
Hide the arrow from every slot whose expiry frame is before flFrame.
The expiry frame of such a slot returns to 1e9.
| flFrame | The current frame. |
|
staticconstexpr |
Number of player slots the arrow can be shown to.