]> git.lizzy.rs Git - dragonfireclient.git/blob - src/client.h
GenericCAO: Fix light position for non-players, remove deprecated initialisation...
[dragonfireclient.git] / src / client.h
1 /*
2 Minetest
3 Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #pragma once
21
22 #include "network/connection.h"
23 #include "clientenvironment.h"
24 #include "irrlichttypes_extrabloated.h"
25 #include <ostream>
26 #include <map>
27 #include <set>
28 #include <vector>
29 #include <unordered_set>
30 #include "clientobject.h"
31 #include "gamedef.h"
32 #include "inventorymanager.h"
33 #include "localplayer.h"
34 #include "hud.h"
35 #include "particles.h"
36 #include "mapnode.h"
37 #include "tileanimation.h"
38 #include "mesh_generator_thread.h"
39 #include <fstream>
40
41 #define CLIENT_CHAT_MESSAGE_LIMIT_PER_10S 10.0f
42
43 struct MeshMakeData;
44 struct ChatMessage;
45 class MapBlockMesh;
46 class IWritableTextureSource;
47 class IWritableShaderSource;
48 class IWritableItemDefManager;
49 class IWritableNodeDefManager;
50 //class IWritableCraftDefManager;
51 class ClientMediaDownloader;
52 struct MapDrawControl;
53 class MtEventManager;
54 struct PointedThing;
55 class MapDatabase;
56 class Minimap;
57 struct MinimapMapblock;
58 class Camera;
59 class NetworkPacket;
60
61 enum LocalClientState {
62         LC_Created,
63         LC_Init,
64         LC_Ready
65 };
66
67 enum ClientEventType
68 {
69         CE_NONE,
70         CE_PLAYER_DAMAGE,
71         CE_PLAYER_FORCE_MOVE,
72         CE_DEATHSCREEN,
73         CE_SHOW_FORMSPEC,
74         CE_SHOW_LOCAL_FORMSPEC,
75         CE_SPAWN_PARTICLE,
76         CE_ADD_PARTICLESPAWNER,
77         CE_DELETE_PARTICLESPAWNER,
78         CE_HUDADD,
79         CE_HUDRM,
80         CE_HUDCHANGE,
81         CE_SET_SKY,
82         CE_OVERRIDE_DAY_NIGHT_RATIO,
83         CE_CLOUD_PARAMS,
84 };
85
86 struct ClientEvent
87 {
88         ClientEventType type;
89         union{
90                 //struct{
91                 //} none;
92                 struct{
93                         u8 amount;
94                 } player_damage;
95                 struct{
96                         f32 pitch;
97                         f32 yaw;
98                 } player_force_move;
99                 struct{
100                         bool set_camera_point_target;
101                         f32 camera_point_target_x;
102                         f32 camera_point_target_y;
103                         f32 camera_point_target_z;
104                 } deathscreen;
105                 struct{
106                         std::string *formspec;
107                         std::string *formname;
108                 } show_formspec;
109                 //struct{
110                 //} textures_updated;
111                 struct{
112                         v3f *pos;
113                         v3f *vel;
114                         v3f *acc;
115                         f32 expirationtime;
116                         f32 size;
117                         bool collisiondetection;
118                         bool collision_removal;
119                         bool vertical;
120                         std::string *texture;
121                         struct TileAnimationParams animation;
122                         u8 glow;
123                 } spawn_particle;
124                 struct{
125                         u16 amount;
126                         f32 spawntime;
127                         v3f *minpos;
128                         v3f *maxpos;
129                         v3f *minvel;
130                         v3f *maxvel;
131                         v3f *minacc;
132                         v3f *maxacc;
133                         f32 minexptime;
134                         f32 maxexptime;
135                         f32 minsize;
136                         f32 maxsize;
137                         bool collisiondetection;
138                         bool collision_removal;
139                         u16 attached_id;
140                         bool vertical;
141                         std::string *texture;
142                         u32 id;
143                         struct TileAnimationParams animation;
144                         u8 glow;
145                 } add_particlespawner;
146                 struct{
147                         u32 id;
148                 } delete_particlespawner;
149                 struct{
150                         u32 id;
151                         u8 type;
152                         v2f *pos;
153                         std::string *name;
154                         v2f *scale;
155                         std::string *text;
156                         u32 number;
157                         u32 item;
158                         u32 dir;
159                         v2f *align;
160                         v2f *offset;
161                         v3f *world_pos;
162                         v2s32 * size;
163                 } hudadd;
164                 struct{
165                         u32 id;
166                 } hudrm;
167                 struct{
168                         u32 id;
169                         HudElementStat stat;
170                         v2f *v2fdata;
171                         std::string *sdata;
172                         u32 data;
173                         v3f *v3fdata;
174                         v2s32 * v2s32data;
175                 } hudchange;
176                 struct{
177                         video::SColor *bgcolor;
178                         std::string *type;
179                         std::vector<std::string> *params;
180                         bool clouds;
181                 } set_sky;
182                 struct{
183                         bool do_override;
184                         float ratio_f;
185                 } override_day_night_ratio;
186                 struct {
187                         f32 density;
188                         u32 color_bright;
189                         u32 color_ambient;
190                         f32 height;
191                         f32 thickness;
192                         f32 speed_x;
193                         f32 speed_y;
194                 } cloud_params;
195         };
196 };
197
198 /*
199         Packet counter
200 */
201
202 class PacketCounter
203 {
204 public:
205         PacketCounter() = default;
206
207         void add(u16 command)
208         {
209                 std::map<u16, u16>::iterator n = m_packets.find(command);
210                 if(n == m_packets.end())
211                 {
212                         m_packets[command] = 1;
213                 }
214                 else
215                 {
216                         n->second++;
217                 }
218         }
219
220         void clear()
221         {
222                 for (auto &m_packet : m_packets) {
223                         m_packet.second = 0;
224                 }
225         }
226
227         void print(std::ostream &o)
228         {
229                 for (const auto &m_packet : m_packets) {
230                         o << "cmd "<< m_packet.first <<" count "<< m_packet.second << std::endl;
231                 }
232         }
233
234 private:
235         // command, count
236         std::map<u16, u16> m_packets;
237 };
238
239 class ClientScripting;
240 struct GameUIFlags;
241
242 class Client : public con::PeerHandler, public InventoryManager, public IGameDef
243 {
244 public:
245         /*
246                 NOTE: Nothing is thread-safe here.
247         */
248
249         Client(
250                         const char *playername,
251                         const std::string &password,
252                         const std::string &address_name,
253                         MapDrawControl &control,
254                         IWritableTextureSource *tsrc,
255                         IWritableShaderSource *shsrc,
256                         IWritableItemDefManager *itemdef,
257                         IWritableNodeDefManager *nodedef,
258                         ISoundManager *sound,
259                         MtEventManager *event,
260                         bool ipv6,
261                         GameUIFlags *game_ui_flags
262         );
263
264         ~Client();
265         DISABLE_CLASS_COPY(Client);
266
267         // Load local mods into memory
268         void loadMods();
269         void scanModSubfolder(const std::string &mod_name, const std::string &mod_path,
270                                 std::string mod_subpath);
271         inline void scanModIntoMemory(const std::string &mod_name, const std::string &mod_path)
272         {
273                 scanModSubfolder(mod_name, mod_path, "");
274         }
275
276         // Initizle the mods
277         void initMods();
278
279         /*
280          request all threads managed by client to be stopped
281          */
282         void Stop();
283
284
285         bool isShutdown();
286
287         /*
288                 The name of the local player should already be set when
289                 calling this, as it is sent in the initialization.
290         */
291         void connect(Address address, bool is_local_server);
292
293         /*
294                 Stuff that references the environment is valid only as
295                 long as this is not called. (eg. Players)
296                 If this throws a PeerNotFoundException, the connection has
297                 timed out.
298         */
299         void step(float dtime);
300
301         /*
302          * Command Handlers
303          */
304
305         void handleCommand(NetworkPacket* pkt);
306
307         void handleCommand_Null(NetworkPacket* pkt) {};
308         void handleCommand_Deprecated(NetworkPacket* pkt);
309         void handleCommand_Hello(NetworkPacket* pkt);
310         void handleCommand_AuthAccept(NetworkPacket* pkt);
311         void handleCommand_AcceptSudoMode(NetworkPacket* pkt);
312         void handleCommand_DenySudoMode(NetworkPacket* pkt);
313         void handleCommand_InitLegacy(NetworkPacket* pkt);
314         void handleCommand_AccessDenied(NetworkPacket* pkt);
315         void handleCommand_RemoveNode(NetworkPacket* pkt);
316         void handleCommand_AddNode(NetworkPacket* pkt);
317         void handleCommand_BlockData(NetworkPacket* pkt);
318         void handleCommand_Inventory(NetworkPacket* pkt);
319         void handleCommand_TimeOfDay(NetworkPacket* pkt);
320         void handleCommand_ChatMessageOld(NetworkPacket *pkt);
321         void handleCommand_ChatMessage(NetworkPacket *pkt);
322         void handleCommand_ActiveObjectRemoveAdd(NetworkPacket* pkt);
323         void handleCommand_ActiveObjectMessages(NetworkPacket* pkt);
324         void handleCommand_Movement(NetworkPacket* pkt);
325         void handleCommand_HP(NetworkPacket* pkt);
326         void handleCommand_Breath(NetworkPacket* pkt);
327         void handleCommand_MovePlayer(NetworkPacket* pkt);
328         void handleCommand_DeathScreen(NetworkPacket* pkt);
329         void handleCommand_AnnounceMedia(NetworkPacket* pkt);
330         void handleCommand_Media(NetworkPacket* pkt);
331         void handleCommand_NodeDef(NetworkPacket* pkt);
332         void handleCommand_ItemDef(NetworkPacket* pkt);
333         void handleCommand_PlaySound(NetworkPacket* pkt);
334         void handleCommand_StopSound(NetworkPacket* pkt);
335         void handleCommand_FadeSound(NetworkPacket *pkt);
336         void handleCommand_Privileges(NetworkPacket* pkt);
337         void handleCommand_InventoryFormSpec(NetworkPacket* pkt);
338         void handleCommand_DetachedInventory(NetworkPacket* pkt);
339         void handleCommand_ShowFormSpec(NetworkPacket* pkt);
340         void handleCommand_SpawnParticle(NetworkPacket* pkt);
341         void handleCommand_AddParticleSpawner(NetworkPacket* pkt);
342         void handleCommand_DeleteParticleSpawner(NetworkPacket* pkt);
343         void handleCommand_HudAdd(NetworkPacket* pkt);
344         void handleCommand_HudRemove(NetworkPacket* pkt);
345         void handleCommand_HudChange(NetworkPacket* pkt);
346         void handleCommand_HudSetFlags(NetworkPacket* pkt);
347         void handleCommand_HudSetParam(NetworkPacket* pkt);
348         void handleCommand_HudSetSky(NetworkPacket* pkt);
349         void handleCommand_CloudParams(NetworkPacket* pkt);
350         void handleCommand_OverrideDayNightRatio(NetworkPacket* pkt);
351         void handleCommand_LocalPlayerAnimations(NetworkPacket* pkt);
352         void handleCommand_EyeOffset(NetworkPacket* pkt);
353         void handleCommand_UpdatePlayerList(NetworkPacket* pkt);
354         void handleCommand_SrpBytesSandB(NetworkPacket* pkt);
355         void handleCommand_CSMFlavourLimits(NetworkPacket *pkt);
356
357         void ProcessData(NetworkPacket *pkt);
358
359         void Send(NetworkPacket* pkt);
360
361         void interact(u8 action, const PointedThing& pointed);
362
363         void sendNodemetaFields(v3s16 p, const std::string &formname,
364                 const StringMap &fields);
365         void sendInventoryFields(const std::string &formname,
366                 const StringMap &fields);
367         void sendInventoryAction(InventoryAction *a);
368         void sendChatMessage(const std::wstring &message);
369         void clearOutChatQueue();
370         void sendChangePassword(const std::string &oldpassword,
371                 const std::string &newpassword);
372         void sendDamage(u8 damage);
373         void sendBreath(u16 breath);
374         void sendRespawn();
375         void sendReady();
376
377         ClientEnvironment& getEnv() { return m_env; }
378         ITextureSource *tsrc() { return getTextureSource(); }
379         ISoundManager *sound() { return getSoundManager(); }
380         static const std::string &getBuiltinLuaPath();
381         static const std::string &getClientModsLuaPath();
382
383         virtual const std::vector<ModSpec> &getMods() const;
384         virtual const ModSpec* getModSpec(const std::string &modname) const;
385
386         // Causes urgent mesh updates (unlike Map::add/removeNodeWithEvent)
387         void removeNode(v3s16 p);
388
389         /**
390          * Helper function for Client Side Modding
391          * Flavour is applied there, this should not be used for core engine
392          * @param p
393          * @param is_valid_position
394          * @return
395          */
396         MapNode getNode(v3s16 p, bool *is_valid_position);
397         void addNode(v3s16 p, MapNode n, bool remove_metadata = true);
398
399         void setPlayerControl(PlayerControl &control);
400
401         void selectPlayerItem(u16 item);
402         u16 getPlayerItem() const
403         { return m_playeritem; }
404
405         // Returns true if the inventory of the local player has been
406         // updated from the server. If it is true, it is set to false.
407         bool getLocalInventoryUpdated();
408         // Copies the inventory of the local player to parameter
409         void getLocalInventory(Inventory &dst);
410
411         /* InventoryManager interface */
412         Inventory* getInventory(const InventoryLocation &loc);
413         void inventoryAction(InventoryAction *a);
414
415         const std::list<std::string> &getConnectedPlayerNames()
416         {
417                 return m_env.getPlayerNames();
418         }
419
420         float getAnimationTime();
421
422         int getCrackLevel();
423         v3s16 getCrackPos();
424         void setCrack(int level, v3s16 pos);
425
426         u16 getHP();
427
428         bool checkPrivilege(const std::string &priv) const
429         { return (m_privileges.count(priv) != 0); }
430
431         const std::unordered_set<std::string> &getPrivilegeList() const
432         { return m_privileges; }
433
434         bool getChatMessage(std::wstring &message);
435         void typeChatMessage(const std::wstring& message);
436
437         u64 getMapSeed(){ return m_map_seed; }
438
439         void addUpdateMeshTask(v3s16 blockpos, bool ack_to_server=false, bool urgent=false);
440         // Including blocks at appropriate edges
441         void addUpdateMeshTaskWithEdge(v3s16 blockpos, bool ack_to_server=false, bool urgent=false);
442         void addUpdateMeshTaskForNode(v3s16 nodepos, bool ack_to_server=false, bool urgent=false);
443
444         void updateCameraOffset(v3s16 camera_offset)
445         { m_mesh_update_thread.m_camera_offset = camera_offset; }
446
447         bool hasClientEvents() const { return !m_client_event_queue.empty(); }
448         // Get event from queue. If queue is empty, it triggers an assertion failure.
449         ClientEvent getClientEvent();
450
451         bool accessDenied() const { return m_access_denied; }
452
453         bool reconnectRequested() const { return m_access_denied_reconnect; }
454
455         void setFatalError(const std::string &reason)
456         {
457                 m_access_denied = true;
458                 m_access_denied_reason = reason;
459         }
460
461         // Renaming accessDeniedReason to better name could be good as it's used to
462         // disconnect client when CSM failed.
463         const std::string &accessDeniedReason() const { return m_access_denied_reason; }
464
465         bool itemdefReceived()
466         { return m_itemdef_received; }
467         bool nodedefReceived()
468         { return m_nodedef_received; }
469         bool mediaReceived()
470         { return !m_media_downloader; }
471
472         u8 getProtoVersion()
473         { return m_proto_ver; }
474
475         bool connectedToServer()
476         { return m_con.Connected(); }
477
478         float mediaReceiveProgress();
479
480         void afterContentReceived();
481
482         float getRTT();
483         float getCurRate();
484
485         Minimap* getMinimap() { return m_minimap; }
486         void setCamera(Camera* camera) { m_camera = camera; }
487
488         Camera* getCamera () { return m_camera; }
489
490         bool shouldShowMinimap() const;
491
492         // IGameDef interface
493         virtual IItemDefManager* getItemDefManager();
494         virtual INodeDefManager* getNodeDefManager();
495         virtual ICraftDefManager* getCraftDefManager();
496         ITextureSource* getTextureSource();
497         virtual IShaderSource* getShaderSource();
498         IShaderSource *shsrc() { return getShaderSource(); }
499         virtual u16 allocateUnknownNodeId(const std::string &name);
500         virtual ISoundManager* getSoundManager();
501         virtual MtEventManager* getEventManager();
502         virtual ParticleManager* getParticleManager();
503         bool checkLocalPrivilege(const std::string &priv)
504         { return checkPrivilege(priv); }
505         virtual scene::IAnimatedMesh* getMesh(const std::string &filename);
506         const std::string* getModFile(const std::string &filename);
507
508         virtual std::string getModStoragePath() const;
509         virtual bool registerModStorage(ModMetadata *meta);
510         virtual void unregisterModStorage(const std::string &name);
511
512         // The following set of functions is used by ClientMediaDownloader
513         // Insert a media file appropriately into the appropriate manager
514         bool loadMedia(const std::string &data, const std::string &filename);
515         // Send a request for conventional media transfer
516         void request_media(const std::vector<std::string> &file_requests);
517
518         LocalClientState getState() { return m_state; }
519
520         void makeScreenshot();
521
522         inline void pushToChatQueue(ChatMessage *cec)
523         {
524                 m_chat_queue.push(cec);
525         }
526
527         ClientScripting *getScript() { return m_script; }
528         const bool moddingEnabled() const { return m_modding_enabled; }
529
530         inline void pushToEventQueue(const ClientEvent &event)
531         {
532                 m_client_event_queue.push(event);
533         }
534
535         void showGameChat(bool show = true);
536         void showGameHud(bool show = true);
537         void showMinimap(bool show = true);
538         void showProfiler(bool show = true);
539         void showGameFog(bool show = true);
540         void showGameDebug(bool show = true);
541
542         const Address getServerAddress()
543         {
544                 return m_con.GetPeerAddress(PEER_ID_SERVER);
545         }
546
547         const std::string &getAddressName() const
548         {
549                 return m_address_name;
550         }
551
552         inline bool checkCSMFlavourLimit(CSMFlavourLimit flag) const
553         {
554                 return m_csm_flavour_limits & flag;
555         }
556
557         u32 getCSMNodeRangeLimit() const
558         {
559                 return m_csm_noderange_limit;
560         }
561
562 private:
563
564         // Virtual methods from con::PeerHandler
565         void peerAdded(con::Peer *peer);
566         void deletingPeer(con::Peer *peer, bool timeout);
567
568         void initLocalMapSaving(const Address &address,
569                         const std::string &hostname,
570                         bool is_local_server);
571
572         void ReceiveAll();
573         void Receive();
574
575         void sendPlayerPos();
576         // Send the item number 'item' as player item to the server
577         void sendPlayerItem(u16 item);
578
579         void deleteAuthData();
580         // helper method shared with clientpackethandler
581         static AuthMechanism choseAuthMech(const u32 mechs);
582
583         void sendLegacyInit(const char* playerName, const char* playerPassword);
584         void sendInit(const std::string &playerName);
585         void startAuth(AuthMechanism chosen_auth_mechanism);
586         void sendDeletedBlocks(std::vector<v3s16> &blocks);
587         void sendGotBlocks(v3s16 block);
588         void sendRemovedSounds(std::vector<s32> &soundList);
589
590         // Helper function
591         inline std::string getPlayerName()
592         { return m_env.getLocalPlayer()->getName(); }
593
594         bool canSendChatMessage() const;
595
596         float m_packetcounter_timer = 0.0f;
597         float m_connection_reinit_timer = 0.1f;
598         float m_avg_rtt_timer = 0.0f;
599         float m_playerpos_send_timer = 0.0f;
600         float m_ignore_damage_timer = 0.0f; // Used after server moves player
601         IntervalLimiter m_map_timer_and_unload_interval;
602
603         IWritableTextureSource *m_tsrc;
604         IWritableShaderSource *m_shsrc;
605         IWritableItemDefManager *m_itemdef;
606         IWritableNodeDefManager *m_nodedef;
607         ISoundManager *m_sound;
608         MtEventManager *m_event;
609
610
611         MeshUpdateThread m_mesh_update_thread;
612         ClientEnvironment m_env;
613         ParticleManager m_particle_manager;
614         con::Connection m_con;
615         std::string m_address_name;
616         Camera *m_camera = nullptr;
617         Minimap *m_minimap = nullptr;
618         bool m_minimap_disabled_by_server = false;
619         // Server serialization version
620         u8 m_server_ser_ver;
621
622         // Used version of the protocol with server
623         // Values smaller than 25 only mean they are smaller than 25,
624         // and aren't accurate. We simply just don't know, because
625         // the server didn't send the version back then.
626         // If 0, server init hasn't been received yet.
627         u8 m_proto_ver = 0;
628
629         u16 m_playeritem = 0;
630         bool m_inventory_updated = false;
631         Inventory *m_inventory_from_server = nullptr;
632         float m_inventory_from_server_age = 0.0f;
633         PacketCounter m_packetcounter;
634         // Block mesh animation parameters
635         float m_animation_time = 0.0f;
636         int m_crack_level = -1;
637         v3s16 m_crack_pos;
638         // 0 <= m_daynight_i < DAYNIGHT_CACHE_COUNT
639         //s32 m_daynight_i;
640         //u32 m_daynight_ratio;
641         std::queue<std::wstring> m_out_chat_queue;
642         u32 m_last_chat_message_sent;
643         float m_chat_message_allowance = 5.0f;
644         std::queue<ChatMessage *> m_chat_queue;
645
646         // The authentication methods we can use to enter sudo mode (=change password)
647         u32 m_sudo_auth_methods;
648
649         // The seed returned by the server in TOCLIENT_INIT is stored here
650         u64 m_map_seed = 0;
651
652         // Auth data
653         std::string m_playername;
654         std::string m_password;
655         // If set, this will be sent (and cleared) upon a TOCLIENT_ACCEPT_SUDO_MODE
656         std::string m_new_password;
657         // Usable by auth mechanisms.
658         AuthMechanism m_chosen_auth_mech;
659         void *m_auth_data = nullptr;
660
661
662         bool m_access_denied = false;
663         bool m_access_denied_reconnect = false;
664         std::string m_access_denied_reason = "";
665         std::queue<ClientEvent> m_client_event_queue;
666         bool m_itemdef_received = false;
667         bool m_nodedef_received = false;
668         ClientMediaDownloader *m_media_downloader;
669
670         // time_of_day speed approximation for old protocol
671         bool m_time_of_day_set = false;
672         float m_last_time_of_day_f = -1.0f;
673         float m_time_of_day_update_timer = 0.0f;
674
675         // An interval for generally sending object positions and stuff
676         float m_recommended_send_interval = 0.1f;
677
678         // Sounds
679         float m_removed_sounds_check_timer = 0.0f;
680         // Mapping from server sound ids to our sound ids
681         std::unordered_map<s32, int> m_sounds_server_to_client;
682         // And the other way!
683         std::unordered_map<int, s32> m_sounds_client_to_server;
684         // And relations to objects
685         std::unordered_map<int, u16> m_sounds_to_objects;
686
687         // Privileges
688         std::unordered_set<std::string> m_privileges;
689
690         // Detached inventories
691         // key = name
692         std::unordered_map<std::string, Inventory*> m_detached_inventories;
693
694         // Storage for mesh data for creating multiple instances of the same mesh
695         StringMap m_mesh_data;
696
697         StringMap m_mod_files;
698
699         // own state
700         LocalClientState m_state;
701
702         // Used for saving server map to disk client-side
703         MapDatabase *m_localdb = nullptr;
704         IntervalLimiter m_localdb_save_interval;
705         u16 m_cache_save_interval;
706
707         ClientScripting *m_script = nullptr;
708         bool m_modding_enabled;
709         std::unordered_map<std::string, ModMetadata *> m_mod_storages;
710         float m_mod_storage_save_timer = 10.0f;
711         std::vector<ModSpec> m_mods;
712         GameUIFlags *m_game_ui_flags;
713
714         bool m_shutdown = false;
715
716         // CSM flavour limits byteflag
717         u64 m_csm_flavour_limits = CSMFlavourLimit::CSM_FL_NONE;
718         u32 m_csm_noderange_limit = 8;
719 };