From 25f0fda2079937fde7f4a84e909be7a180344ebb Mon Sep 17 00:00:00 2001 From: Night Owl Date: Tue, 28 Mar 2017 22:01:23 +0500 Subject: [PATCH] Fix build. --- cl_dll/aghl/Agglobal.cpp | 6 ++++++ cl_dll/aghl/aghudctf.cpp | 12 +++++++++-- cl_dll/aghl/aghudcustomtimer.cpp | 2 +- cl_dll/aghl/aghudglobal.cpp | 30 ++++++++++++++-------------- cl_dll/aghl/aghudglobal.h | 4 ++-- cl_dll/aghl/aghudlongjump.cpp | 2 +- cl_dll/aghl/aghudsuddendeath.cpp | 2 +- cl_dll/aghl/aghudtimer.cpp | 8 +++++++- cl_dll/aghl/agmodelcheck.cpp | 4 ++-- cl_dll/cdll_int.cpp | 4 ++-- cl_dll/hud.cpp | 2 +- cl_dll/hud.h | 34 ++++++++++++++++---------------- cl_dll/hud_redraw.cpp | 2 +- cl_dll/input.cpp | 2 +- dlls/aghl/agclient.cpp | 8 ++++++-- dlls/aghl/aggamerules.h | 1 + dlls/cbase.h | 3 +++ dlls/gamerules.h | 2 +- dlls/player.h | 1 + dlls/teamplay_gamerules.cpp | 4 +++- pm_shared/pm_shared.c | 3 +++ 21 files changed, 85 insertions(+), 51 deletions(-) diff --git a/cl_dll/aghl/Agglobal.cpp b/cl_dll/aghl/Agglobal.cpp index 094b4f74..0097f79e 100644 --- a/cl_dll/aghl/Agglobal.cpp +++ b/cl_dll/aghl/Agglobal.cpp @@ -5,6 +5,10 @@ #include "agglobal.h" #include #include "agmodelcheck.h" +#ifndef _WIN32 +#include "unistd.h" +#define GetCurrentDirectory(size,buffer) getcwd(buffer,size) +#endif cvar_t* g_phud_spectatebar = NULL; cvar_t* g_phud_timer = NULL; @@ -423,6 +427,7 @@ void AgLog(const char* pszLog) void AgDirList(const AgString& sDir, AgStringSet& setFiles) { +/* #ifdef _WIN32 WIN32_FIND_DATA FindData; char szSearchDirectory[_MAX_PATH]; @@ -458,6 +463,7 @@ struct dirent* pFile = NULL; closedir(pDirectory); } #endif +*/ } void AgToLower(AgString& strLower) diff --git a/cl_dll/aghl/aghudctf.cpp b/cl_dll/aghl/aghudctf.cpp index 2ebc31e3..c68bc61a 100644 --- a/cl_dll/aghl/aghudctf.cpp +++ b/cl_dll/aghl/aghudctf.cpp @@ -6,8 +6,8 @@ #include #include #include "parsemsg.h" -#include "vgui_TeamFortressViewport.h" -#include "vgui_ScorePanel.h" +//#include "vgui_TeamFortressViewport.h" +//#include "vgui_ScorePanel.h" DECLARE_MESSAGE(m_CTF, CTF ) DECLARE_MESSAGE(m_CTF, CTFSound ) @@ -16,6 +16,14 @@ DECLARE_MESSAGE(m_CTF, CTFFlag ) int g_iPlayerFlag1 = 0; int g_iPlayerFlag2 = 0; +int iTeamColors[5][3] = +{ + { 255, 170, 0 }, // HL orange (default) + { 125, 165, 210 }, // Blue + { 200, 90, 70 }, // Red + { 225, 205, 45 }, // Yellow + { 145, 215, 140 }, // Green +}; int AgHudCTF::Init(void) { diff --git a/cl_dll/aghl/aghudcustomtimer.cpp b/cl_dll/aghl/aghudcustomtimer.cpp index e0fad18d..9d8e137b 100644 --- a/cl_dll/aghl/aghudcustomtimer.cpp +++ b/cl_dll/aghl/aghudcustomtimer.cpp @@ -7,7 +7,7 @@ #include #include "parsemsg.h" #include "agglobal.h" -#include "aghudCustomTimer.h" +#include "aghudcustomtimer.h" DECLARE_COMMAND(m_CustomTimer, CustomTimer); diff --git a/cl_dll/aghl/aghudglobal.cpp b/cl_dll/aghl/aghudglobal.cpp index 386c3a6b..81bdb6f2 100644 --- a/cl_dll/aghl/aghudglobal.cpp +++ b/cl_dll/aghl/aghudglobal.cpp @@ -22,11 +22,11 @@ #include "agcrc32enforcer.h" #endif -#include "AgVariableChecker.h" -#include "vgui_TeamFortressViewport.h" -#include "vgui_ScorePanel.h" -#include "AgVGuiMapBrowser.h" -#include "AgDownload.h" +#include "agvariablechecker.h" +//#include "vgui_TeamFortressViewport.h" +//#include "vgui_ScorePanel.h" +//#include "AgVGuiMapBrowser.h" +//#include "AgDownload.h" DECLARE_MESSAGE(m_Global, PlaySound ) DECLARE_MESSAGE(m_Global, CheatCheck ) @@ -44,7 +44,7 @@ DECLARE_COMMAND(m_Global, UnloadAuthID); DECLARE_COMMAND(m_Global, AgRecord); int g_iPure = 1; -BYTE g_GameType = STANDARD; +unsigned char g_GameType = STANDARD; typedef map > AgPlayerToAuthID; typedef map > AgAuthIDToRealName; @@ -94,7 +94,7 @@ int iOverLay = 0; int AgHudGlobal::Draw(float fTime) { - if (m_fCheckColor < gHUD.m_flTime) +/* if (m_fCheckColor < gHUD.m_flTime) { AgUpdateHudColor(); m_fCheckColor = gHUD.m_flTime + 1; //every second @@ -153,7 +153,7 @@ int AgHudGlobal::Draw(float fTime) iLines++; } } - } + }*/ return 1; } @@ -274,8 +274,8 @@ int AgHudGlobal::MsgFunc_AuthID(const char *pszName, int iSize, void *pbuf) int AgHudGlobal::MsgFunc_MapList( const char *pszName, int iSize, void *pbuf ) { - if (gViewPort && gViewPort->m_pMapBrowser) - return gViewPort->m_pMapBrowser->MsgFunc_MapList( pszName, iSize, pbuf ); + //if (gViewPort && gViewPort->m_pMapBrowser) + //return gViewPort->m_pMapBrowser->MsgFunc_MapList( pszName, iSize, pbuf ); return 1; } @@ -293,17 +293,17 @@ int AgHudGlobal::MsgFunc_CRC32( const char *pszName, int iSize, void *pbuf ) void AgHudGlobal::UserCmd_Winamp() { - gViewPort->UserCmd_Winamp(); + //gViewPort->UserCmd_Winamp(); } void AgHudGlobal::UserCmd_ToggleWinamp() { - gViewPort->ToggleWinamp(); + //gViewPort->ToggleWinamp(); } void AgHudGlobal::UserCmd_ToggleMapBrowser() { - gViewPort->ToggleMapBrowser(); + //gViewPort->ToggleMapBrowser(); } void AgHudGlobal::UserCmd_LoadAuthID() @@ -315,8 +315,8 @@ void AgHudGlobal::UserCmd_LoadAuthID() AgString sUrl = gEngfuncs.Cmd_Argv(1); sprintf(szSaveAs,"%s/%s",AgGetDirectory(),pszFileName); sUrl = "http://" + sUrl; - AgDownload download; - download.DownloadFile(sUrl.c_str(), szSaveAs); + //AgDownload download; + //download.DownloadFile(sUrl.c_str(), szSaveAs); } int iFilePos = 0, iFileSize = 0; diff --git a/cl_dll/aghl/aghudglobal.h b/cl_dll/aghl/aghudglobal.h index a1a8fc23..0922eef4 100644 --- a/cl_dll/aghl/aghudglobal.h +++ b/cl_dll/aghl/aghudglobal.h @@ -29,8 +29,8 @@ protected: }; enum enumGameType { STANDARD = 0, ARENA = 1, LMS = 2, CTF = 3, ARCADE = 4, SGBOW = 5, INSTAGIB = 6}; -extern BYTE g_GameType; -inline BYTE AgGametype() +extern unsigned char g_GameType; +inline unsigned char AgGametype() { return g_GameType; }; diff --git a/cl_dll/aghl/aghudlongjump.cpp b/cl_dll/aghl/aghudlongjump.cpp index 5cdb4f82..c0574bac 100644 --- a/cl_dll/aghl/aghudlongjump.cpp +++ b/cl_dll/aghl/aghudlongjump.cpp @@ -7,7 +7,7 @@ #include #include "parsemsg.h" #include "agglobal.h" -#include "aghudLongjump.h" +#include "aghudlongjump.h" DECLARE_MESSAGE(m_Longjump, Longjump ) diff --git a/cl_dll/aghl/aghudsuddendeath.cpp b/cl_dll/aghl/aghudsuddendeath.cpp index 46192548..8645b030 100644 --- a/cl_dll/aghl/aghudsuddendeath.cpp +++ b/cl_dll/aghl/aghudsuddendeath.cpp @@ -7,7 +7,7 @@ #include #include "parsemsg.h" #include "agglobal.h" -#include "aghudSuddenDeath.h" +#include "aghudsuddendeath.h" DECLARE_MESSAGE(m_SuddenDeath, SuddenDeath ) diff --git a/cl_dll/aghl/aghudtimer.cpp b/cl_dll/aghl/aghudtimer.cpp index 8da50c27..06b45013 100644 --- a/cl_dll/aghl/aghudtimer.cpp +++ b/cl_dll/aghl/aghudtimer.cpp @@ -55,7 +55,13 @@ int AgHudTimer::Draw(float fTime) long lTime = 0; if (3 == g_phud_timer->value) { - _strtime(m_szTime); +#ifdef _WIN32 + _strtime( m_szTime ); +#else + struct tm time; + mktime( &time ); + strftime( m_szTime, 64, "%H:%M:%S", &time ); +#endif } else { diff --git a/cl_dll/aghl/agmodelcheck.cpp b/cl_dll/aghl/agmodelcheck.cpp index 8a490345..16f7260e 100644 --- a/cl_dll/aghl/agmodelcheck.cpp +++ b/cl_dll/aghl/agmodelcheck.cpp @@ -12,8 +12,8 @@ #include "studio_util.h" #include "r_studioint.h" #include "parsemsg.h" -#include "AgModel.h" -#include "AgModelCheck.h" +#include "agmodel.h" +#include "agmodelcheck.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction diff --git a/cl_dll/cdll_int.cpp b/cl_dll/cdll_int.cpp index 9653d87a..014bda37 100644 --- a/cl_dll/cdll_int.cpp +++ b/cl_dll/cdll_int.cpp @@ -22,8 +22,8 @@ #include "cl_util.h" #include "netadr.h" //++ BulliT -#include "AgVariableChecker.h" -#include "AgGlobal.h" +#include "agvariableChecker.h" +#include "agglobal.h" //#include "irc.h" #include "agwallhack.h" //-- Martin Webrant diff --git a/cl_dll/hud.cpp b/cl_dll/hud.cpp index 7492521d..608d8396 100644 --- a/cl_dll/hud.cpp +++ b/cl_dll/hud.cpp @@ -432,7 +432,7 @@ void CHud::VidInit( void ) m_Vote.VidInit(); m_Nextmap.VidInit(); m_Location.VidInit(); - m_IRC.VidInit(); + //m_IRC.VidInit(); m_CTF.VidInit(); m_Scoreboard.VidInit(); //-- Martin Webrant diff --git a/cl_dll/hud.h b/cl_dll/hud.h index 2036f715..19ab0cd4 100644 --- a/cl_dll/hud.h +++ b/cl_dll/hud.h @@ -560,23 +560,23 @@ private: }; //++ BulliT -#include "AgGlobal.h" -#include "AgHudSplash.h" -#include "AgHudCountdown.h" -#include "AgHudTimer.h" -#include "AgHudPlayerId.h" -#include "AgHudSettings.h" -#include "AgHudSuddenDeath.h" -#include "AgHudLongjump.h" -#include "AgHudCustomTimer.h" -#include "AgHudTimeout.h" -#include "AgHudGlobal.h" -#include "AgHudVote.h" -#include "AgHudNextmap.h" -#include "AgHudLocation.h" -//#include "AgHudIRC.h" -#include "AgHudCTF.h" -#include "AgHudScoreboard.h" +#include "agglobal.h" +#include "aghudsplash.h" +#include "aghudcountdown.h" +#include "aghudtimer.h" +#include "aghudplayerid.h" +#include "aghudsettings.h" +#include "aghudsuddendeath.h" +#include "aghudlongjump.h" +#include "aghudcustomtimer.h" +#include "aghudtimeout.h" +#include "aghudglobal.h" +#include "aghudvote.h" +#include "aghudnextmap.h" +#include "aghudlocation.h" +//#include "aghudirc.h" +#include "aghudctf.h" +#include "aghudscoreboard.h" //-- Martin Webrant // //----------------------------------------------------- diff --git a/cl_dll/hud_redraw.cpp b/cl_dll/hud_redraw.cpp index 6df37d82..ee1d186d 100644 --- a/cl_dll/hud_redraw.cpp +++ b/cl_dll/hud_redraw.cpp @@ -22,7 +22,7 @@ //++ BulliT #include -#include "AgMatchReport.h" +#include "agmatchreport.h" //-- Martin Webrant #define MAX_LOGO_FRAMES 56 diff --git a/cl_dll/input.cpp b/cl_dll/input.cpp index 97816619..16efcb63 100644 --- a/cl_dll/input.cpp +++ b/cl_dll/input.cpp @@ -24,7 +24,7 @@ extern "C" #include "const.h" #include "camera.h" //++ BulliT -#include "AgVariableChecker.h" +#include "agvariablechecker.h" //-- Martin Webrant #include "in_defs.h" //#include "view.h" diff --git a/dlls/aghl/agclient.cpp b/dlls/aghl/agclient.cpp index 7584aba0..05e6bc52 100644 --- a/dlls/aghl/agclient.cpp +++ b/dlls/aghl/agclient.cpp @@ -12,8 +12,10 @@ #include "aggamerules.h" #include "agclient.h" +#ifndef NO_VOICEGAMEMGR #include "voice_gamemgr.h" extern CVoiceGameMgr g_VoiceGameMgr; +#endif #ifdef AGMSGSTAT #include "agmsgstat.h" @@ -647,10 +649,11 @@ void AgClient::Say(CBasePlayer* pPlayer, say_type Type ) CBasePlayer* pPlayerLoop = AgPlayerByIndex(i); if (pPlayerLoop && pPlayerLoop->IsNetClient()) { +#ifndef NO_VOICEGAMEMGR // can the receiver hear the sender? or has he muted him? if ( g_VoiceGameMgr.PlayerHasBlockedPlayer( pPlayerLoop, pPlayer ) ) continue; - +#endif //Sort team messages. Only talk to team m8's that are spectators if ( (Team == Type || Close == Type ) && !pPlayerLoop->IsSpectator() && pPlayer != pPlayerLoop) @@ -697,10 +700,11 @@ void AgClient::Say(CBasePlayer* pPlayer, say_type Type ) CBasePlayer* pPlayerLoop = AgPlayerByIndex(i); if (pPlayerLoop && pPlayerLoop->IsNetClient()) { +#ifndef NO_VOICEGAMEMGR // can the receiver hear the sender? or has he muted him? if ( g_VoiceGameMgr.PlayerHasBlockedPlayer( pPlayerLoop, pPlayer ) ) continue; - +#endif if (Close == Type && pPlayer != pPlayerLoop) { //Check if team m8 is close enough. diff --git a/dlls/aghl/aggamerules.h b/dlls/aghl/aggamerules.h index f01030a3..fe4027e3 100644 --- a/dlls/aghl/aggamerules.h +++ b/dlls/aghl/aggamerules.h @@ -7,6 +7,7 @@ #pragma once #endif // _MSC_VER > 1000 +#include "cbase.h" #include "agscorecache.h" #include "agadmincache.h" #include "agglobal.h" diff --git a/dlls/cbase.h b/dlls/cbase.h index 273ce2b4..d52be105 100644 --- a/dlls/cbase.h +++ b/dlls/cbase.h @@ -12,6 +12,8 @@ * without written permission from Valve LLC. * ****/ +#ifndef CBASE_H +#define CBASE_H /* Class Hierachy @@ -793,3 +795,4 @@ public: void Precache( void ); void KeyValue( KeyValueData *pkvd ); }; +#endif //CBASE_H diff --git a/dlls/gamerules.h b/dlls/gamerules.h index 37f85153..83785ab2 100644 --- a/dlls/gamerules.h +++ b/dlls/gamerules.h @@ -171,7 +171,7 @@ public: }; //++ BulliT -extern CGameRules *InstallGameRules( void ); +//extern CGameRules *InstallGameRules( void ); //-- Martin Webrant //========================================================= diff --git a/dlls/player.h b/dlls/player.h index 37704645..cc52485b 100644 --- a/dlls/player.h +++ b/dlls/player.h @@ -317,6 +317,7 @@ public: char m_SbarString0[ SBAR_STRING_SIZE ]; char m_SbarString1[ SBAR_STRING_SIZE ]; + float m_flNextChatTime; //++ BulliT protected: bool m_bAdmin; //Player gained admin status. diff --git a/dlls/teamplay_gamerules.cpp b/dlls/teamplay_gamerules.cpp index 9b40b0f9..651cd53c 100644 --- a/dlls/teamplay_gamerules.cpp +++ b/dlls/teamplay_gamerules.cpp @@ -33,6 +33,9 @@ extern int g_teamplay; static char team_names[MAX_TEAMS][MAX_TEAMNAME_LENGTH]; static int team_scores[MAX_TEAMS]; static int num_teams = 0; +//++ BulliT +static char s_szLeastPlayers[MAX_TEAMNAME_LENGTH]; +//-- Martin Webrant extern DLL_GLOBAL BOOL g_fGameOver; @@ -772,7 +775,6 @@ void CHalfLifeTeamplay::RecountTeams() team_scores[tm] += plr->pev->frags; } - if( bResendInfo ) //Someone's info changed, let's send the team info again. //++ BulliT plr->edict()->v.team = tm + 1; //-- Martin Webrant diff --git a/pm_shared/pm_shared.c b/pm_shared/pm_shared.c index d78d591c..4c7e4647 100644 --- a/pm_shared/pm_shared.c +++ b/pm_shared/pm_shared.c @@ -2459,6 +2459,9 @@ void PM_Jump( void ) //qboolean tfc = false; //-- BulliT qboolean cansuperjump = false; +//++ BulliT + qboolean bBunnyJump = false; +//-- BulliT if( pmove->dead ) {