| 1 | /* |
|---|
| 2 | ================================================================================= |
|---|
| 3 | This file is part of Cafu, the open-source game engine and graphics engine |
|---|
| 4 | for multiplayer, cross-platform, real-time 3D action. |
|---|
| 5 | Copyright (C) 2002-2012 Carsten Fuchs Software. |
|---|
| 6 | |
|---|
| 7 | Cafu is free software: you can redistribute it and/or modify it under the terms |
|---|
| 8 | of the GNU General Public License as published by the Free Software Foundation, |
|---|
| 9 | either version 3 of the License, or (at your option) any later version. |
|---|
| 10 | |
|---|
| 11 | Cafu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
|---|
| 12 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|---|
| 13 | PURPOSE. See the GNU General Public License for more details. |
|---|
| 14 | |
|---|
| 15 | You should have received a copy of the GNU General Public License |
|---|
| 16 | along with Cafu. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | |
|---|
| 18 | For support and more information about Cafu, visit us at <http://www.cafu.de>. |
|---|
| 19 | ================================================================================= |
|---|
| 20 | */ |
|---|
| 21 | |
|---|
| 22 | /*****************************/ |
|---|
| 23 | /*** Net Message Constants ***/ |
|---|
| 24 | /*****************************/ |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | // Dieses Header-File definiert die Konstanten für die Kommunikation zwischen Server und Client. |
|---|
| 28 | // Die 0 wurde absichtlich freigehalten, um sie später evtl. als ErrorFlag verwenden zu können. |
|---|
| 29 | |
|---|
| 30 | // 'connection-less' Message-Types vom Client zum Server |
|---|
| 31 | const char CS0_NoOperation =1; |
|---|
| 32 | const char CS0_Ping =2; |
|---|
| 33 | const char CS0_Connect =3; |
|---|
| 34 | const char CS0_Info =4; |
|---|
| 35 | const char CS0_RemoteConsoleCommand=5; ///< A message consisting of a password and a command string that is to be executed by the server console interpreter. |
|---|
| 36 | |
|---|
| 37 | // 'connection-less' Message-Types vom Server zum Client |
|---|
| 38 | const char SC0_ACK =1; |
|---|
| 39 | const char SC0_NACK =2; |
|---|
| 40 | const char SC0_RccReply =3; ///< String reply to a CS0_RemoteConsoleCommand message. |
|---|
| 41 | |
|---|
| 42 | // 'connection-established' Message-Types vom Client zum Server |
|---|
| 43 | const char CS1_PlayerCommand =1; |
|---|
| 44 | const char CS1_Disconnect =2; |
|---|
| 45 | const char CS1_SayToAll =3; |
|---|
| 46 | const char CS1_WorldInfoACK =4; |
|---|
| 47 | const char CS1_FrameInfoACK =5; |
|---|
| 48 | |
|---|
| 49 | // 'connection-established' Message-Types vom Server zum Client |
|---|
| 50 | const char SC1_WorldInfo =1; |
|---|
| 51 | const char SC1_EntityBaseLine=2; |
|---|
| 52 | const char SC1_FrameInfo =3; |
|---|
| 53 | const char SC1_EntityUpdate =4; |
|---|
| 54 | const char SC1_EntityRemove =5; ///< A special case of the SC1_EntityUpdate message: No data follows, remove the entity from the frame instead. |
|---|
| 55 | const char SC1_DropClient =6; |
|---|
| 56 | const char SC1_ChatMsg =7; |
|---|