Browse Source

Fix build.

aghl
Night Owl 8 years ago
parent
commit
25f0fda207
  1. 6
      cl_dll/aghl/Agglobal.cpp
  2. 12
      cl_dll/aghl/aghudctf.cpp
  3. 2
      cl_dll/aghl/aghudcustomtimer.cpp
  4. 30
      cl_dll/aghl/aghudglobal.cpp
  5. 4
      cl_dll/aghl/aghudglobal.h
  6. 2
      cl_dll/aghl/aghudlongjump.cpp
  7. 2
      cl_dll/aghl/aghudsuddendeath.cpp
  8. 6
      cl_dll/aghl/aghudtimer.cpp
  9. 4
      cl_dll/aghl/agmodelcheck.cpp
  10. 4
      cl_dll/cdll_int.cpp
  11. 2
      cl_dll/hud.cpp
  12. 34
      cl_dll/hud.h
  13. 2
      cl_dll/hud_redraw.cpp
  14. 2
      cl_dll/input.cpp
  15. 8
      dlls/aghl/agclient.cpp
  16. 1
      dlls/aghl/aggamerules.h
  17. 3
      dlls/cbase.h
  18. 2
      dlls/gamerules.h
  19. 1
      dlls/player.h
  20. 4
      dlls/teamplay_gamerules.cpp
  21. 3
      pm_shared/pm_shared.c

6
cl_dll/aghl/Agglobal.cpp

@ -5,6 +5,10 @@ @@ -5,6 +5,10 @@
#include "agglobal.h"
#include <time.h>
#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) @@ -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; @@ -458,6 +463,7 @@ struct dirent* pFile = NULL;
closedir(pDirectory);
}
#endif
*/
}
void AgToLower(AgString& strLower)

12
cl_dll/aghl/aghudctf.cpp

@ -6,8 +6,8 @@ @@ -6,8 +6,8 @@
#include <stdio.h>
#include <demo_api.h>
#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 ) @@ -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)
{

2
cl_dll/aghl/aghudcustomtimer.cpp

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
#include <time.h>
#include "parsemsg.h"
#include "agglobal.h"
#include "aghudCustomTimer.h"
#include "aghudcustomtimer.h"
DECLARE_COMMAND(m_CustomTimer, CustomTimer);

30
cl_dll/aghl/aghudglobal.cpp

@ -22,11 +22,11 @@ @@ -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); @@ -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<int, AgString, less<int> > AgPlayerToAuthID;
typedef map<AgString, AgString, less<AgString> > AgAuthIDToRealName;
@ -94,7 +94,7 @@ int iOverLay = 0; @@ -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) @@ -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) @@ -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 ) @@ -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() @@ -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;

4
cl_dll/aghl/aghudglobal.h

@ -29,8 +29,8 @@ protected: @@ -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;
};

2
cl_dll/aghl/aghudlongjump.cpp

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
#include <time.h>
#include "parsemsg.h"
#include "agglobal.h"
#include "aghudLongjump.h"
#include "aghudlongjump.h"
DECLARE_MESSAGE(m_Longjump, Longjump )

2
cl_dll/aghl/aghudsuddendeath.cpp

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
#include <time.h>
#include "parsemsg.h"
#include "agglobal.h"
#include "aghudSuddenDeath.h"
#include "aghudsuddendeath.h"
DECLARE_MESSAGE(m_SuddenDeath, SuddenDeath )

6
cl_dll/aghl/aghudtimer.cpp

@ -55,7 +55,13 @@ int AgHudTimer::Draw(float fTime) @@ -55,7 +55,13 @@ int AgHudTimer::Draw(float fTime)
long lTime = 0;
if (3 == g_phud_timer->value)
{
#ifdef _WIN32
_strtime( m_szTime );
#else
struct tm time;
mktime( &time );
strftime( m_szTime, 64, "%H:%M:%S", &time );
#endif
}
else
{

4
cl_dll/aghl/agmodelcheck.cpp

@ -12,8 +12,8 @@ @@ -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

4
cl_dll/cdll_int.cpp

@ -22,8 +22,8 @@ @@ -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

2
cl_dll/hud.cpp

@ -432,7 +432,7 @@ void CHud::VidInit( void ) @@ -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

34
cl_dll/hud.h

@ -560,23 +560,23 @@ private: @@ -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
//
//-----------------------------------------------------

2
cl_dll/hud_redraw.cpp

@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
//++ BulliT
#include <demo_api.h>
#include "AgMatchReport.h"
#include "agmatchreport.h"
//-- Martin Webrant
#define MAX_LOGO_FRAMES 56

2
cl_dll/input.cpp

@ -24,7 +24,7 @@ extern "C" @@ -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"

8
dlls/aghl/agclient.cpp

@ -12,8 +12,10 @@ @@ -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 ) @@ -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 ) @@ -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.

1
dlls/aghl/aggamerules.h

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
#pragma once
#endif // _MSC_VER > 1000
#include "cbase.h"
#include "agscorecache.h"
#include "agadmincache.h"
#include "agglobal.h"

3
dlls/cbase.h

@ -12,6 +12,8 @@ @@ -12,6 +12,8 @@
* without written permission from Valve LLC.
*
****/
#ifndef CBASE_H
#define CBASE_H
/*
Class Hierachy
@ -793,3 +795,4 @@ public: @@ -793,3 +795,4 @@ public:
void Precache( void );
void KeyValue( KeyValueData *pkvd );
};
#endif //CBASE_H

2
dlls/gamerules.h

@ -171,7 +171,7 @@ public: @@ -171,7 +171,7 @@ public:
};
//++ BulliT
extern CGameRules *InstallGameRules( void );
//extern CGameRules *InstallGameRules( void );
//-- Martin Webrant
//=========================================================

1
dlls/player.h

@ -317,6 +317,7 @@ public: @@ -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.

4
dlls/teamplay_gamerules.cpp

@ -33,6 +33,9 @@ extern int g_teamplay; @@ -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() @@ -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

3
pm_shared/pm_shared.c

@ -2459,6 +2459,9 @@ void PM_Jump( void ) @@ -2459,6 +2459,9 @@ void PM_Jump( void )
//qboolean tfc = false;
//-- BulliT
qboolean cansuperjump = false;
//++ BulliT
qboolean bBunnyJump = false;
//-- BulliT
if( pmove->dead )
{

Loading…
Cancel
Save