mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-11 15:38:12 +00:00
Fix build.
This commit is contained in:
parent
d9d2db6538
commit
25f0fda207
@ -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)
|
||||
|
||||
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)
|
||||
|
@ -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 )
|
||||
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)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <time.h>
|
||||
#include "parsemsg.h"
|
||||
#include "agglobal.h"
|
||||
#include "aghudCustomTimer.h"
|
||||
#include "aghudcustomtimer.h"
|
||||
|
||||
DECLARE_COMMAND(m_CustomTimer, CustomTimer);
|
||||
|
||||
|
@ -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<int, AgString, less<int> > AgPlayerToAuthID;
|
||||
typedef map<AgString, AgString, less<AgString> > 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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <time.h>
|
||||
#include "parsemsg.h"
|
||||
#include "agglobal.h"
|
||||
#include "aghudLongjump.h"
|
||||
#include "aghudlongjump.h"
|
||||
|
||||
DECLARE_MESSAGE(m_Longjump, Longjump )
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <time.h>
|
||||
#include "parsemsg.h"
|
||||
#include "agglobal.h"
|
||||
#include "aghudSuddenDeath.h"
|
||||
#include "aghudsuddendeath.h"
|
||||
|
||||
DECLARE_MESSAGE(m_SuddenDeath, SuddenDeath )
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
34
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
|
||||
//
|
||||
//-----------------------------------------------------
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
//++ BulliT
|
||||
#include <demo_api.h>
|
||||
#include "AgMatchReport.h"
|
||||
#include "agmatchreport.h"
|
||||
//-- Martin Webrant
|
||||
|
||||
#define MAX_LOGO_FRAMES 56
|
||||
|
@ -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"
|
||||
|
@ -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.
|
||||
|
@ -7,6 +7,7 @@
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "cbase.h"
|
||||
#include "agscorecache.h"
|
||||
#include "agadmincache.h"
|
||||
#include "agglobal.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
|
||||
|
@ -171,7 +171,7 @@ public:
|
||||
};
|
||||
|
||||
//++ BulliT
|
||||
extern CGameRules *InstallGameRules( void );
|
||||
//extern CGameRules *InstallGameRules( void );
|
||||
//-- Martin Webrant
|
||||
|
||||
//=========================================================
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -2459,6 +2459,9 @@ void PM_Jump( void )
|
||||
//qboolean tfc = false;
|
||||
//-- BulliT
|
||||
qboolean cansuperjump = false;
|
||||
//++ BulliT
|
||||
qboolean bBunnyJump = false;
|
||||
//-- BulliT
|
||||
|
||||
if( pmove->dead )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user