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. 8
      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 @@
#include "agglobal.h" #include "agglobal.h"
#include <time.h> #include <time.h>
#include "agmodelcheck.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_spectatebar = NULL;
cvar_t* g_phud_timer = NULL; cvar_t* g_phud_timer = NULL;
@ -423,6 +427,7 @@ void AgLog(const char* pszLog)
void AgDirList(const AgString& sDir, AgStringSet& setFiles) void AgDirList(const AgString& sDir, AgStringSet& setFiles)
{ {
/*
#ifdef _WIN32 #ifdef _WIN32
WIN32_FIND_DATA FindData; WIN32_FIND_DATA FindData;
char szSearchDirectory[_MAX_PATH]; char szSearchDirectory[_MAX_PATH];
@ -458,6 +463,7 @@ struct dirent* pFile = NULL;
closedir(pDirectory); closedir(pDirectory);
} }
#endif #endif
*/
} }
void AgToLower(AgString& strLower) void AgToLower(AgString& strLower)

12
cl_dll/aghl/aghudctf.cpp

@ -6,8 +6,8 @@
#include <stdio.h> #include <stdio.h>
#include <demo_api.h> #include <demo_api.h>
#include "parsemsg.h" #include "parsemsg.h"
#include "vgui_TeamFortressViewport.h" //#include "vgui_TeamFortressViewport.h"
#include "vgui_ScorePanel.h" //#include "vgui_ScorePanel.h"
DECLARE_MESSAGE(m_CTF, CTF ) DECLARE_MESSAGE(m_CTF, CTF )
DECLARE_MESSAGE(m_CTF, CTFSound ) DECLARE_MESSAGE(m_CTF, CTFSound )
@ -16,6 +16,14 @@ DECLARE_MESSAGE(m_CTF, CTFFlag )
int g_iPlayerFlag1 = 0; int g_iPlayerFlag1 = 0;
int g_iPlayerFlag2 = 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) int AgHudCTF::Init(void)
{ {

2
cl_dll/aghl/aghudcustomtimer.cpp

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

30
cl_dll/aghl/aghudglobal.cpp

@ -22,11 +22,11 @@
#include "agcrc32enforcer.h" #include "agcrc32enforcer.h"
#endif #endif
#include "AgVariableChecker.h" #include "agvariablechecker.h"
#include "vgui_TeamFortressViewport.h" //#include "vgui_TeamFortressViewport.h"
#include "vgui_ScorePanel.h" //#include "vgui_ScorePanel.h"
#include "AgVGuiMapBrowser.h" //#include "AgVGuiMapBrowser.h"
#include "AgDownload.h" //#include "AgDownload.h"
DECLARE_MESSAGE(m_Global, PlaySound ) DECLARE_MESSAGE(m_Global, PlaySound )
DECLARE_MESSAGE(m_Global, CheatCheck ) DECLARE_MESSAGE(m_Global, CheatCheck )
@ -44,7 +44,7 @@ DECLARE_COMMAND(m_Global, UnloadAuthID);
DECLARE_COMMAND(m_Global, AgRecord); DECLARE_COMMAND(m_Global, AgRecord);
int g_iPure = 1; int g_iPure = 1;
BYTE g_GameType = STANDARD; unsigned char g_GameType = STANDARD;
typedef map<int, AgString, less<int> > AgPlayerToAuthID; typedef map<int, AgString, less<int> > AgPlayerToAuthID;
typedef map<AgString, AgString, less<AgString> > AgAuthIDToRealName; typedef map<AgString, AgString, less<AgString> > AgAuthIDToRealName;
@ -94,7 +94,7 @@ int iOverLay = 0;
int AgHudGlobal::Draw(float fTime) int AgHudGlobal::Draw(float fTime)
{ {
if (m_fCheckColor < gHUD.m_flTime) /* if (m_fCheckColor < gHUD.m_flTime)
{ {
AgUpdateHudColor(); AgUpdateHudColor();
m_fCheckColor = gHUD.m_flTime + 1; //every second m_fCheckColor = gHUD.m_flTime + 1; //every second
@ -153,7 +153,7 @@ int AgHudGlobal::Draw(float fTime)
iLines++; iLines++;
} }
} }
} }*/
return 1; 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 ) int AgHudGlobal::MsgFunc_MapList( const char *pszName, int iSize, void *pbuf )
{ {
if (gViewPort && gViewPort->m_pMapBrowser) //if (gViewPort && gViewPort->m_pMapBrowser)
return gViewPort->m_pMapBrowser->MsgFunc_MapList( pszName, iSize, pbuf ); //return gViewPort->m_pMapBrowser->MsgFunc_MapList( pszName, iSize, pbuf );
return 1; return 1;
} }
@ -293,17 +293,17 @@ int AgHudGlobal::MsgFunc_CRC32( const char *pszName, int iSize, void *pbuf )
void AgHudGlobal::UserCmd_Winamp() void AgHudGlobal::UserCmd_Winamp()
{ {
gViewPort->UserCmd_Winamp(); //gViewPort->UserCmd_Winamp();
} }
void AgHudGlobal::UserCmd_ToggleWinamp() void AgHudGlobal::UserCmd_ToggleWinamp()
{ {
gViewPort->ToggleWinamp(); //gViewPort->ToggleWinamp();
} }
void AgHudGlobal::UserCmd_ToggleMapBrowser() void AgHudGlobal::UserCmd_ToggleMapBrowser()
{ {
gViewPort->ToggleMapBrowser(); //gViewPort->ToggleMapBrowser();
} }
void AgHudGlobal::UserCmd_LoadAuthID() void AgHudGlobal::UserCmd_LoadAuthID()
@ -315,8 +315,8 @@ void AgHudGlobal::UserCmd_LoadAuthID()
AgString sUrl = gEngfuncs.Cmd_Argv(1); AgString sUrl = gEngfuncs.Cmd_Argv(1);
sprintf(szSaveAs,"%s/%s",AgGetDirectory(),pszFileName); sprintf(szSaveAs,"%s/%s",AgGetDirectory(),pszFileName);
sUrl = "http://" + sUrl; sUrl = "http://" + sUrl;
AgDownload download; //AgDownload download;
download.DownloadFile(sUrl.c_str(), szSaveAs); //download.DownloadFile(sUrl.c_str(), szSaveAs);
} }
int iFilePos = 0, iFileSize = 0; int iFilePos = 0, iFileSize = 0;

4
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}; enum enumGameType { STANDARD = 0, ARENA = 1, LMS = 2, CTF = 3, ARCADE = 4, SGBOW = 5, INSTAGIB = 6};
extern BYTE g_GameType; extern unsigned char g_GameType;
inline BYTE AgGametype() inline unsigned char AgGametype()
{ {
return g_GameType; return g_GameType;
}; };

2
cl_dll/aghl/aghudlongjump.cpp

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

2
cl_dll/aghl/aghudsuddendeath.cpp

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

8
cl_dll/aghl/aghudtimer.cpp

@ -55,7 +55,13 @@ int AgHudTimer::Draw(float fTime)
long lTime = 0; long lTime = 0;
if (3 == g_phud_timer->value) 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 else
{ {

4
cl_dll/aghl/agmodelcheck.cpp

@ -12,8 +12,8 @@
#include "studio_util.h" #include "studio_util.h"
#include "r_studioint.h" #include "r_studioint.h"
#include "parsemsg.h" #include "parsemsg.h"
#include "AgModel.h" #include "agmodel.h"
#include "AgModelCheck.h" #include "agmodelcheck.h"
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Construction/Destruction // Construction/Destruction

4
cl_dll/cdll_int.cpp

@ -22,8 +22,8 @@
#include "cl_util.h" #include "cl_util.h"
#include "netadr.h" #include "netadr.h"
//++ BulliT //++ BulliT
#include "AgVariableChecker.h" #include "agvariableChecker.h"
#include "AgGlobal.h" #include "agglobal.h"
//#include "irc.h" //#include "irc.h"
#include "agwallhack.h" #include "agwallhack.h"
//-- Martin Webrant //-- Martin Webrant

2
cl_dll/hud.cpp

@ -432,7 +432,7 @@ void CHud::VidInit( void )
m_Vote.VidInit(); m_Vote.VidInit();
m_Nextmap.VidInit(); m_Nextmap.VidInit();
m_Location.VidInit(); m_Location.VidInit();
m_IRC.VidInit(); //m_IRC.VidInit();
m_CTF.VidInit(); m_CTF.VidInit();
m_Scoreboard.VidInit(); m_Scoreboard.VidInit();
//-- Martin Webrant //-- Martin Webrant

34
cl_dll/hud.h

@ -560,23 +560,23 @@ private:
}; };
//++ BulliT //++ BulliT
#include "AgGlobal.h" #include "agglobal.h"
#include "AgHudSplash.h" #include "aghudsplash.h"
#include "AgHudCountdown.h" #include "aghudcountdown.h"
#include "AgHudTimer.h" #include "aghudtimer.h"
#include "AgHudPlayerId.h" #include "aghudplayerid.h"
#include "AgHudSettings.h" #include "aghudsettings.h"
#include "AgHudSuddenDeath.h" #include "aghudsuddendeath.h"
#include "AgHudLongjump.h" #include "aghudlongjump.h"
#include "AgHudCustomTimer.h" #include "aghudcustomtimer.h"
#include "AgHudTimeout.h" #include "aghudtimeout.h"
#include "AgHudGlobal.h" #include "aghudglobal.h"
#include "AgHudVote.h" #include "aghudvote.h"
#include "AgHudNextmap.h" #include "aghudnextmap.h"
#include "AgHudLocation.h" #include "aghudlocation.h"
//#include "AgHudIRC.h" //#include "aghudirc.h"
#include "AgHudCTF.h" #include "aghudctf.h"
#include "AgHudScoreboard.h" #include "aghudscoreboard.h"
//-- Martin Webrant //-- Martin Webrant
// //
//----------------------------------------------------- //-----------------------------------------------------

2
cl_dll/hud_redraw.cpp

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

2
cl_dll/input.cpp

@ -24,7 +24,7 @@ extern "C"
#include "const.h" #include "const.h"
#include "camera.h" #include "camera.h"
//++ BulliT //++ BulliT
#include "AgVariableChecker.h" #include "agvariablechecker.h"
//-- Martin Webrant //-- Martin Webrant
#include "in_defs.h" #include "in_defs.h"
//#include "view.h" //#include "view.h"

8
dlls/aghl/agclient.cpp

@ -12,8 +12,10 @@
#include "aggamerules.h" #include "aggamerules.h"
#include "agclient.h" #include "agclient.h"
#ifndef NO_VOICEGAMEMGR
#include "voice_gamemgr.h" #include "voice_gamemgr.h"
extern CVoiceGameMgr g_VoiceGameMgr; extern CVoiceGameMgr g_VoiceGameMgr;
#endif
#ifdef AGMSGSTAT #ifdef AGMSGSTAT
#include "agmsgstat.h" #include "agmsgstat.h"
@ -647,10 +649,11 @@ void AgClient::Say(CBasePlayer* pPlayer, say_type Type )
CBasePlayer* pPlayerLoop = AgPlayerByIndex(i); CBasePlayer* pPlayerLoop = AgPlayerByIndex(i);
if (pPlayerLoop && pPlayerLoop->IsNetClient()) if (pPlayerLoop && pPlayerLoop->IsNetClient())
{ {
#ifndef NO_VOICEGAMEMGR
// can the receiver hear the sender? or has he muted him? // can the receiver hear the sender? or has he muted him?
if ( g_VoiceGameMgr.PlayerHasBlockedPlayer( pPlayerLoop, pPlayer ) ) if ( g_VoiceGameMgr.PlayerHasBlockedPlayer( pPlayerLoop, pPlayer ) )
continue; continue;
#endif
//Sort team messages. Only talk to team m8's that are spectators //Sort team messages. Only talk to team m8's that are spectators
if ( (Team == Type || Close == Type ) if ( (Team == Type || Close == Type )
&& !pPlayerLoop->IsSpectator() && pPlayer != pPlayerLoop) && !pPlayerLoop->IsSpectator() && pPlayer != pPlayerLoop)
@ -697,10 +700,11 @@ void AgClient::Say(CBasePlayer* pPlayer, say_type Type )
CBasePlayer* pPlayerLoop = AgPlayerByIndex(i); CBasePlayer* pPlayerLoop = AgPlayerByIndex(i);
if (pPlayerLoop && pPlayerLoop->IsNetClient()) if (pPlayerLoop && pPlayerLoop->IsNetClient())
{ {
#ifndef NO_VOICEGAMEMGR
// can the receiver hear the sender? or has he muted him? // can the receiver hear the sender? or has he muted him?
if ( g_VoiceGameMgr.PlayerHasBlockedPlayer( pPlayerLoop, pPlayer ) ) if ( g_VoiceGameMgr.PlayerHasBlockedPlayer( pPlayerLoop, pPlayer ) )
continue; continue;
#endif
if (Close == Type && pPlayer != pPlayerLoop) if (Close == Type && pPlayer != pPlayerLoop)
{ {
//Check if team m8 is close enough. //Check if team m8 is close enough.

1
dlls/aghl/aggamerules.h

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

3
dlls/cbase.h

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

2
dlls/gamerules.h

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

1
dlls/player.h

@ -317,6 +317,7 @@ public:
char m_SbarString0[ SBAR_STRING_SIZE ]; char m_SbarString0[ SBAR_STRING_SIZE ];
char m_SbarString1[ SBAR_STRING_SIZE ]; char m_SbarString1[ SBAR_STRING_SIZE ];
float m_flNextChatTime;
//++ BulliT //++ BulliT
protected: protected:
bool m_bAdmin; //Player gained admin status. bool m_bAdmin; //Player gained admin status.

4
dlls/teamplay_gamerules.cpp

@ -33,6 +33,9 @@ extern int g_teamplay;
static char team_names[MAX_TEAMS][MAX_TEAMNAME_LENGTH]; static char team_names[MAX_TEAMS][MAX_TEAMNAME_LENGTH];
static int team_scores[MAX_TEAMS]; static int team_scores[MAX_TEAMS];
static int num_teams = 0; static int num_teams = 0;
//++ BulliT
static char s_szLeastPlayers[MAX_TEAMNAME_LENGTH];
//-- Martin Webrant
extern DLL_GLOBAL BOOL g_fGameOver; extern DLL_GLOBAL BOOL g_fGameOver;
@ -772,7 +775,6 @@ void CHalfLifeTeamplay::RecountTeams()
team_scores[tm] += plr->pev->frags; team_scores[tm] += plr->pev->frags;
} }
if( bResendInfo ) //Someone's info changed, let's send the team info again.
//++ BulliT //++ BulliT
plr->edict()->v.team = tm + 1; plr->edict()->v.team = tm + 1;
//-- Martin Webrant //-- Martin Webrant

3
pm_shared/pm_shared.c

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

Loading…
Cancel
Save