SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
EntitiesResponse.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2019 SEGS Team (see AUTHORS.md)
5  * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
6  */
7 
8 #pragma once
9 //#include "MapLink.h"
10 #include "MapEventTypes.h"
11 #include "BitStream.h"
12 //#include "MapRef.h"
13 //#include "CRUD_Events.h"
14 #include <vector>
15 #include <string>
16 
17 struct MapClientSession;
18 namespace SEGSEvents
19 {
20 using MapLinkEvent = CRUDLink_Event; //<MapLink>
21 
22 // [[ev_def:type]]
24 {
25 public:
26 explicit EntitiesResponse();
27  void is_incremental(bool v) {m_incremental=v;}
28  void serializefrom(BitStream &) override;
29  void serializeto(BitStream &tgt) const override;
30  const char *info() override { return m_incremental ? "Entities_Incremental" : "Entities_Full"; }
33  mutable
34  // [[ev_def:field]]
36  // [[ev_def:field]]
37  bool m_incremental=false; // if true then this is incremental update
38  // [[ev_def:field]]
40  // [[ev_def:field]]
42  // [[ev_def:field]]
43  bool debug_info=true;
44  // [[ev_def:field]]
45  uint32_t abs_time=0;
46  // [[ev_def:field]]
47  uint32_t db_time=0;
48  // [[ev_def:field]]
49  uint16_t m_debug_idx;
50  // [[ev_def:field]]
52  // [[ev_def:field]]
55 };
56 } // end of SEGSEvents namespace
57 
uint8_t g_interpolation_level
Definition: EntitiesResponse.h:51
uint32_t abs_time
Definition: EntitiesResponse.h:45
Definition: MapClientSession.h:32
EntitiesResponse()
EntitiesResponse is sent to a client to inform it about the current world state.
Definition: EntitiesResponse.cpp:40
const char * info() override
Definition: EntitiesResponse.h:30
float m_map_time_of_day
Definition: EntitiesResponse.h:41
uint32_t db_time
Definition: EntitiesResponse.h:47
bool debug_info
Definition: EntitiesResponse.h:43
uint16_t m_debug_idx
Definition: EntitiesResponse.h:49
Definition: BitStream.h:34
Definition: LinkLevelEvent.h:13
uint8_t g_interpolation_bits
Definition: EntitiesResponse.h:53
void serializeto(BitStream &tgt) const override
Definition: EntitiesResponse.cpp:53
#define EVENT_IMPL(name)
Definition: SEGSEvent.h:77
bool ent_major_update
Definition: EntitiesResponse.h:39
void is_incremental(bool v)
Definition: EntitiesResponse.h:27
void serializefrom(BitStream &) override
Definition: EntitiesResponse.cpp:47
bool m_incremental
Definition: EntitiesResponse.h:37
BitStream blob_of_death
Definition: EntitiesResponse.h:35
Definition: EntitiesResponse.h:23