diff options
author | ANAND <ClobberXD@gmail.com> | 2019-08-04 10:23:59 +0530 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2019-08-07 19:21:14 +0200 |
commit | e788ee283fe7eb8151898916f72c2cf803255fa4 (patch) | |
tree | 29e03adb9208c5371f969dd2c12535f2fe490e72 /src/network/networkprotocol.h | |
parent | e462a9a5ef46776d974203bb44e0b89e8c980b29 (diff) | |
download | hax-minetest-server-e788ee283fe7eb8151898916f72c2cf803255fa4.tar.gz hax-minetest-server-e788ee283fe7eb8151898916f72c2cf803255fa4.zip |
Client::Interact: Use InteractAction enum instead of numeric constants
This replaces the magic numbers used as interaction modes both client-side and server-side, primarily for the sake of ease-of-readability.
Diffstat (limited to '')
-rw-r--r-- | src/network/networkprotocol.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index 85436068f..0ab11ee7e 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -954,10 +954,20 @@ enum CSMRestrictionFlags : u64 { // When those are complete, this should return to only being a restriction on the // loading of client mods. CSM_RF_LOAD_CLIENT_MODS = 0x00000001, // Don't load client-provided mods or 'builtin' - CSM_RF_CHAT_MESSAGES = 0x00000002, // Disable chat message sending from CSM - CSM_RF_READ_ITEMDEFS = 0x00000004, // Disable itemdef lookups - CSM_RF_READ_NODEDEFS = 0x00000008, // Disable nodedef lookups - CSM_RF_LOOKUP_NODES = 0x00000010, // Limit node lookups - CSM_RF_READ_PLAYERINFO = 0x00000020, // Disable player info lookups + CSM_RF_CHAT_MESSAGES = 0x00000002, // Disable chat message sending from CSM + CSM_RF_READ_ITEMDEFS = 0x00000004, // Disable itemdef lookups + CSM_RF_READ_NODEDEFS = 0x00000008, // Disable nodedef lookups + CSM_RF_LOOKUP_NODES = 0x00000010, // Limit node lookups + CSM_RF_READ_PLAYERINFO = 0x00000020, // Disable player info lookups CSM_RF_ALL = 0xFFFFFFFF, }; + +enum InteractAction : u8 +{ + INTERACT_START_DIGGING, // 0: start digging (from undersurface) or use + INTERACT_STOP_DIGGING, // 1: stop digging (all parameters ignored) + INTERACT_DIGGING_COMPLETED, // 2: digging completed + INTERACT_PLACE, // 3: place block or item (to abovesurface) + INTERACT_USE, // 4: use item + INTERACT_ACTIVATE // 5: rightclick air ("activate") +}; |