resonance 1.0.1
Loading...
Searching...
No Matches
CripplePacket Class Reference

Network packet the game sends between game systems. More...

#include <cripplepacket.h>

Inheritance diagram for CripplePacket:
Collaboration diagram for CripplePacket:

Public Member Functions

 CripplePacket ()
 Construct a packet with no references.
 CripplePacket (Player *pAttacker, std::vector< Player * > victims)
 Report a crippler deployed on a set of players.
virtual Message * Clone ()
 Produce a heap copy of this packet.
virtual int Type ()
 Report this packet's registered identity.
virtual const char * GetName () const
 Report this packet's class name.
virtual void PrintExtra (std::ostream &stream) const
 Write the first player's address and then every other player's address in parentheses, each followed by a space, to a diagnostic stream.
virtual void saveGuts (OBStream &stream) const
 Write the Packet words, the first player's identifier, the vector's count, and every other player's identifier to a stream.
virtual void restoreGuts (IBStream &stream)
 Read the Packet words, the first identifier, and the count, resize the vector, and read every other identifier in place.
Public Member Functions inherited from ToAllOtherGameSystemsPacket
 ToAllOtherGameSystemsPacket ()
 Route the packet with the pair 2 and 3.
Public Member Functions inherited from Message
void * operator new (size_t nSize)
 Allocate a message from the tagged heap under the tag MSG.
void operator delete (void *pBlock)
 Release a message to the tagged heap under the tag MSG.
virtual ~Message ()
 Vtable slot 1.
std::ostream & Print (std::ostream &stream) const
 Write this message to a diagnostic stream as {GetName() PrintExtra()}.

Static Public Member Functions

static Message * New ()
 Produce a packet with no references on the heap.
Static Public Member Functions inherited from Message
static Message * NewMessage (int nType)
 Produce a message of the identified class through the factory list.

Public Attributes

std::vector< IDablePtr< Player > > mTargets
 The players the crippler strikes.

Additional Inherited Members

Protected Member Functions inherited from Packet
 Packet (int nDestination, int nDestinationSystem)
 Set the two routing words and mark the remaining two as unset.
Protected Attributes inherited from Packet
int mDestination
int mDestinationSystem
int mClientId
 The client the packet concerns, or -1 until set.
int mTargetClientId
 A second client identifier, -1 until set.

Detailed Description

Network packet the game sends between game systems.

Its RTTI descriptor is at 0x008f0940. It has ToAllOtherGameSystemsPacket as its one base. The object is 0x28 bytes and its vtable is at 0x008144e8. The payload comes from the copy constructor at 0x003f3938. Clone() delegates to it, and the payload accounts for the allocation exactly. The four words Packet provides are declared there rather than here.

The packet includes one player reference and a vector of further references. restoreGuts() resizes the vector with a default reference of a null pointer and -1 as the fill value, which is the same pair New() stores in the single reference and what identifies the element type. PrintExtra() writes the players' addresses, not their identifiers.

The destructor at 0x003ee2d8 is compiler-generated and has no declaration here.

Constructor & Destructor Documentation

◆ CripplePacket() [1/2]

CripplePacket::CripplePacket ( )
inline

Construct a packet with no references.

Inline. New() expands it. A declaration is required because the class declares a second constructor.

◆ CripplePacket() [2/2]

CripplePacket::CripplePacket ( Player * pAttacker,
std::vector< Player * > victims )

Report a crippler deployed on a set of players.

The body stores the attacker, then appends one reference per victim, taking the victims' size again on every pass. The victims arrive by value, and the body releases their storage on the way out. Gamer's crippler handler at 0x00111578 is the one caller.

Parameters
pAttackerThe player who deployed the crippler.
victimsThe players it strikes.
Ghidra address:
NTSC-U/C: 0x003e7668
Ghidra address:
PAL: 0x0041f948

Member Function Documentation

◆ New()

Message * CripplePacket::New ( )
static

Produce a packet with no references on the heap.

The registry the translation unit at 0x003ed2e0 builds stores this address against g_nCripplePacketType.

Returns
The packet.
Ghidra address:
NTSC-U/C: 0x003e53a0
Ghidra address:
PAL: 0x0041d638

◆ Clone()

virtual Message * CripplePacket::Clone ( )
virtual

Produce a heap copy of this packet.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003f0c60
Ghidra address:
PAL: 0x00429268

Implements Message.

◆ Type()

virtual int CripplePacket::Type ( )
virtual

Report this packet's registered identity.

Returns
g_nCripplePacketType.
Ghidra address:
NTSC-U/C: 0x003f0cd8
Ghidra address:
PAL: 0x004292e0

Implements Message.

◆ GetName()

virtual const char * CripplePacket::GetName ( ) const
virtual

Report this packet's class name.

Returns
The literal CripplePacket.
Ghidra address:
NTSC-U/C: 0x003f0ce8
Ghidra address:
PAL: 0x004292f0

Implements Message.

◆ PrintExtra()

virtual void CripplePacket::PrintExtra ( std::ostream & stream) const
virtual

Write the first player's address and then every other player's address in parentheses, each followed by a space, to a diagnostic stream.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x003e7c38
Ghidra address:
PAL: 0x0041ff18

Reimplemented from Message.

◆ saveGuts()

virtual void CripplePacket::saveGuts ( OBStream & stream) const
virtual

Write the Packet words, the first player's identifier, the vector's count, and every other player's identifier to a stream.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x003e7938
Ghidra address:
PAL: 0x0041fc18

Reimplemented from Packet.

◆ restoreGuts()

virtual void CripplePacket::restoreGuts ( IBStream & stream)
virtual

Read the Packet words, the first identifier, and the count, resize the vector, and read every other identifier in place.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x003e7aa0
Ghidra address:
PAL: 0x0041fd80

Reimplemented from Packet.

Member Data Documentation

◆ mTargets

std::vector<IDablePtr<Player> > CripplePacket::mTargets

The players the crippler strikes.

+0x1c

Public because AppTunnel's crippler handler at 0x004486f8 walks it directly with no accessor in the image.


The documentation for this class was generated from the following file: