Odamex
Setting the Standard in Multiplayer Doom
server/src/sv_main.h
Go to the documentation of this file.
00001 // Emacs style mode select   -*- C++ -*-
00002 //-----------------------------------------------------------------------------
00003 //
00004 // $Id: sv_main.h 2066 2011-02-01 22:45:21Z russellrice $
00005 //
00006 // Copyright (C) 2000-2006 by Sergey Makovkin (CSDoom .62).
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 //      SV_MAIN
00021 //
00022 //-----------------------------------------------------------------------------
00023 
00024 
00025 #ifndef __I_SVMAIN_H__
00026 #define __I_SVMAIN_H__
00027 
00028 #include <string>
00029 
00030 #include "actor.h"
00031 #include "d_player.h"
00032 #include "i_net.h"
00033 
00034 #define GAME_NORMAL             1
00035 #define GAME_TEAMPLAY   2
00036 #define GAME_CTF                3
00037 
00038 extern int shotclock;
00039 
00040 extern bool     unnatural_level_progression;
00041 
00042 class client_c
00043 {
00044 public:
00045 
00046         size_t size() { return players.size(); }
00047         player_s::client_t &operator [](size_t n) { return players[n].client; }
00048         client_c() {}
00049 };
00050 
00051 extern client_c clients;
00052 
00053 void SV_InitNetwork (void);
00054 void SV_SendDisconnectSignal();
00055 void SV_SendReconnectSignal();
00056 void SV_ExitLevel();
00057 void SV_DrawScores();
00058 
00059 bool SV_IsPlayerAllowedToSee(player_t &pl, AActor *mobj);
00060 byte SV_PlayerHearingLoss(player_t &cl, fixed_t &x, fixed_t &y);
00061 
00062 void STACK_ARGS SV_BroadcastPrintf (int level, const char *fmt, ...);
00063 void STACK_ARGS SV_SpectatorPrintf (int level, const char *fmt, ...);
00064 void SV_CheckTimeouts (void);
00065 void SV_ConnectClient(void);
00066 void SV_WriteCommands(void);
00067 void SV_ClearClientsBPS(void);
00068 bool SV_SendPacket(player_t &pl);
00069 void SV_AcknowledgePacket(player_t &player);
00070 void SV_RunTics (void);
00071 void SV_ParseCommands(player_t &player);
00072 short SV_FindClientByAddr(void);
00073 void SV_UpdateFrags (player_t &player);
00074 void SV_RemoveCorpses (void);
00075 void SV_DropClient(player_t &who);
00076 void SV_PlayerTriedToCheat(player_t &player);
00077 void SV_ActorTarget(AActor *actor);
00078 void SV_ActorTracer(AActor *actor);
00079 void SV_Suicide(player_t &player);
00080 void SV_SpawnMobj(AActor *mo);
00081 void SV_TouchSpecial(AActor *special, player_t *player);
00082 
00083 void SV_Sound (AActor *mo, byte channel, const char *name, byte attenuation);
00084 void SV_Sound (client_t *cl, AActor *mo, byte channel, const char *name, byte attenuation);
00085 void SV_Sound (fixed_t x, fixed_t y, byte channel, const char *name, byte attenuation);
00086 void SV_SoundTeam (byte channel, const char* name, byte attenuation, int t);
00087 void SV_SoundAvoidCl (player_t &player, AActor *mo, byte channel, char *name, byte attenuation);
00088 
00089 void SV_MidPrint (const char *msg, player_t *p, int msgtime=0);
00090 
00091 int SV_CountTeamPlayers(int team);
00092 
00093 extern std::vector<std::string> wadnames;
00094 void MSG_WriteMarker (buf_t *b, svc_t c);
00095 
00096 void SV_SendKillMobj(AActor *source, AActor *target, AActor *inflictor, bool joinkill);
00097 void SV_SendDamagePlayer(player_t *player, int pain);
00098 void SV_SendDamageMobj(AActor *target, int pain);
00099 // Tells clients to remove an actor from the world as it doesn't exist anymore
00100 void SV_SendDestroyActor(AActor *mo);
00101 
00102 #endif
00103 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends