forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMsgTypesCMU.py
More file actions
29 lines (24 loc) · 1.18 KB
/
MsgTypesCMU.py
File metadata and controls
29 lines (24 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
""" MsgTypesCMU module: defines the various message type codes as used
by the CMU ServerRepository/ClientRepository code in this directory.
It replaces the MsgTypes module, which is not used by the CMU
implementation. """
from direct.showbase.PythonUtil import invertDictLossless
MsgName2Id = {
'SET_DOID_RANGE_CMU' : 9001,
'CLIENT_OBJECT_GENERATE_CMU' : 9002,
'OBJECT_GENERATE_CMU' : 9003,
'OBJECT_UPDATE_FIELD_CMU' : 9004,
'OBJECT_DISABLE_CMU' : 9005,
'OBJECT_DELETE_CMU' : 9006,
'REQUEST_GENERATES_CMU' : 9007,
'CLIENT_DISCONNECT_CMU' : 9008,
'CLIENT_SET_INTEREST_CMU' : 9009,
'OBJECT_SET_ZONE_CMU' : 9010,
'CLIENT_HEARTBEAT_CMU' : 9011,
'CLIENT_OBJECT_UPDATE_FIELD_TARGETED_CMU' : 9011,
'CLIENT_OBJECT_UPDATE_FIELD' : 120, # Matches MsgTypes.CLIENT_OBJECT_SET_FIELD
}
# create id->name table for debugging
MsgId2Names = invertDictLossless(MsgName2Id)
# put msg names in module scope, assigned to msg value
globals().update(MsgName2Id)