|
Odamex
Setting the Standard in Multiplayer Doom
|
00001 // Emacs style mode select -*- C++ -*- 00002 //----------------------------------------------------------------------------- 00003 // 00004 // $Id: d_ticcmd.h 1788 2010-08-24 04:42:57Z russellrice $ 00005 // 00006 // Copyright (C) 1993-1996 by id Software, Inc. 00007 // Copyright (C) 2006-2010 by The Odamex Team. 00008 // 00009 // This program is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU General Public License 00011 // as published by the Free Software Foundation; either version 2 00012 // of the License, or (at your option) any later version. 00013 // 00014 // This program is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // DESCRIPTION: 00020 // System specific interface stuff. 00021 // 00022 //----------------------------------------------------------------------------- 00023 00024 00025 #ifndef __D_TICCMD_H__ 00026 #define __D_TICCMD_H__ 00027 00028 #include "doomtype.h" 00029 #include "d_protocol.h" 00030 00031 // The data sampled per tick (single player) 00032 // and transmitted to other peers (multiplayer). 00033 // Mainly movements/button commands per game tick, 00034 // plus a checksum for internal state consistency. 00035 struct ticcmd_t 00036 { 00037 usercmd_t ucmd; 00038 /* 00039 char forwardmove; // *2048 for move 00040 char sidemove; // *2048 for move 00041 short angleturn; // <<16 for angle delta 00042 */ 00043 // SWORD consistancy; // checks for net game 00044 }; 00045 00046 00047 inline FArchive &operator<< (FArchive &arc, ticcmd_t &cmd) 00048 { 00049 return arc << cmd.ucmd; 00050 } 00051 00052 inline FArchive &operator>> (FArchive &arc, ticcmd_t &cmd) 00053 { 00054 return arc >> cmd.ucmd; 00055 } 00056 00057 00058 #endif // __D_TICCMD_H__ 00059 00060