Leviathan game engine
Leviathan::Sendable Class Reference

Entity is sendable to clients. More...

#include <Components.h>

+ Inheritance diagram for Leviathan::Sendable:


class  ActiveConnection

Public Member Functions

 Sendable ()
- Public Member Functions inherited from Leviathan::Component
 Component (COMPONENT_TYPE type)
 Component (const Component &)=delete
Componentoperator= (const Component &)=delete

Public Attributes

std::vector< ActiveConnectionUpdateReceivers
 Clients we have already sent a state to. More...
- Public Attributes inherited from Leviathan::Component
bool Marked
 Type of this component, used for network serialization. More...

Static Public Attributes

static constexpr auto TYPE = COMPONENT_TYPE::Sendable

Detailed Description

Entity is sendable to clients.

This will only be in the entity on the server

It can get pretty expensive to remove closed connections from all Sendable objects

The world needs to clean ActiveConnection objects from all Sendables related to a closed connection

Definition at line 112 of file Components.h.

Constructor & Destructor Documentation

◆ Sendable()

Leviathan::Sendable::Sendable ( )

Definition at line 154 of file Components.h.

154 : Component(TYPE) {}
Component(COMPONENT_TYPE type)
Definition: Component.h:54
static constexpr auto TYPE
Definition: Components.h:161

Member Function Documentation


Leviathan::Sendable::REFERENCE_HANDLE_UNCOUNTED_TYPE ( Sendable  )

Member Data Documentation


constexpr auto Leviathan::Sendable::TYPE = COMPONENT_TYPE::Sendable

Definition at line 161 of file Components.h.

◆ UpdateReceivers

std::vector<ActiveConnection> Leviathan::Sendable::UpdateReceivers

Clients we have already sent a state to.

Definition at line 159 of file Components.h.

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