|
Odamex
Setting the Standard in Multiplayer Doom
|
00001 // Emacs style mode select -*- C++ -*- 00002 //----------------------------------------------------------------------------- 00003 // 00004 // $Id: cl_main.h 2121 2011-02-23 23:22:58Z russellrice $ 00005 // 00006 // Copyright (C) 1998-2006 by Randy Heit (ZDoom). 00007 // Copyright (C) 2000-2006 by Sergey Makovkin (CSDoom .62). 00008 // Copyright (C) 2006-2010 by The Odamex Team. 00009 // 00010 // This program is free software; you can redistribute it and/or 00011 // modify it under the terms of the GNU General Public License 00012 // as published by the Free Software Foundation; either version 2 00013 // of the License, or (at your option) any later version. 00014 // 00015 // This program is distributed in the hope that it will be useful, 00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 // GNU General Public License for more details. 00019 // 00020 // DESCRIPTION: 00021 // CL_MAIN 00022 // 00023 //----------------------------------------------------------------------------- 00024 00025 #ifndef __I_CLMAIN_H__ 00026 #define __I_CLMAIN_H__ 00027 00028 #include "i_net.h" 00029 #include "d_ticcmd.h" 00030 #include "r_defs.h" 00031 00032 extern netadr_t serveraddr; 00033 extern BOOL connected; 00034 extern int connecttimeout; 00035 00036 extern bool noservermsgs; 00037 extern int last_received; 00038 00039 extern buf_t net_buffer; 00040 00041 #define MAXSAVETICS 70 00042 extern ticcmd_t localcmds[MAXSAVETICS]; 00043 00044 extern bool predicting; 00045 00046 typedef struct 00047 { 00048 fixed_t m_Speed; 00049 fixed_t m_Low; 00050 fixed_t m_High; 00051 int m_Wait; 00052 int m_Count; 00053 int m_Status; 00054 int m_OldStatus; 00055 bool m_Crush; 00056 int m_Tag; 00057 int m_Type; 00058 bool m_PostWait; 00059 00060 int m_Direction; 00061 short m_NewSpecial; 00062 short m_Texture; 00063 fixed_t m_FloorDestHeight; 00064 00065 int m_ResetCount; 00066 int m_OrgHeight; 00067 int m_Delay; 00068 int m_PauseTime; 00069 int m_StepTime; 00070 int m_PerStepTime; 00071 } pred_floor_t; 00072 00073 typedef struct 00074 { 00075 int m_Type; 00076 fixed_t m_TopHeight; 00077 fixed_t m_Speed; 00078 00079 int m_Direction; 00080 int m_TopWait; 00081 int m_TopCountdown; 00082 00083 fixed_t m_BottomHeight; 00084 fixed_t m_Speed1; // [RH] dnspeed of crushers 00085 fixed_t m_Speed2; // [RH] upspeed of crushers 00086 bool m_Crush; 00087 int m_Silent; 00088 00089 // [RH] Need these for BOOM-ish transferring ceilings 00090 int m_Texture; 00091 int m_NewSpecial; 00092 00093 // ID 00094 int m_Tag; 00095 int m_OldDirection; 00096 00097 line_t *m_Line; 00098 } pred_ceiling_t; 00099 00100 typedef struct 00101 { 00102 int m_Type; 00103 int m_Direction; 00104 fixed_t m_FloorDestHeight; 00105 fixed_t m_CeilingDestHeight; 00106 fixed_t m_Speed; 00107 00108 fixed_t m_FloorSpeed; 00109 fixed_t m_CeilingSpeed; 00110 fixed_t m_FloorTarget; 00111 fixed_t m_CeilingTarget; 00112 bool m_Crush; 00113 } pred_both_t; 00114 00115 struct plat_pred_t 00116 { 00117 size_t secnum; 00118 int tic; 00119 00120 fixed_t floorheight; 00121 fixed_t ceilingheight; 00122 00123 pred_floor_t Floor; 00124 pred_ceiling_t Ceiling; 00125 pred_both_t Both; 00126 }; 00127 00128 extern TArray <plat_pred_t> real_plats; 00129 00130 void CL_QuitNetGame(void); 00131 void CL_InitNetwork (void); 00132 void CL_RequestConnectInfo(void); 00133 bool CL_PrepareConnect(void); 00134 void CL_ParseCommands(void); 00135 void CL_ReadPacketHeader(void); 00136 void CL_SendCmd(void); 00137 void CL_SaveCmd(void); 00138 void CL_MoveThing(AActor *mobj, fixed_t x, fixed_t y, fixed_t z); 00139 void CL_PredictMove (void); 00140 void CL_SendUserInfo(void); 00141 bool CL_Connect(void); 00142 00143 #endif 00144 00145