Fix build.

This commit is contained in:
Night Owl 2017-06-12 21:37:46 +05:00
parent 4f7f23ea2c
commit a2e6f71412
11 changed files with 37 additions and 39 deletions

View File

@ -51,7 +51,6 @@ set (CLDLL_SOURCES
../dlls/hs/fotns.cpp
../dlls/hs/goldengun.cpp
../dlls/hs/jackal.cpp
../dlls/hs/jason.cpp
../dlls/hs/jihad.cpp
../dlls/hs/modman.cpp
../dlls/hs/mw2.cpp

View File

@ -21,7 +21,7 @@
#include "hud.h"
#include "cl_util.h"
#include "netadr.h"
#include "mp3.h"
//#include "mp3.h"
extern "C"
{
@ -32,7 +32,7 @@ extern "C"
cl_enginefunc_t gEngfuncs;
CHud gHUD;
CMP3 gMP3;
//CMP3 gMP3;
mobile_engfuncs_t *gMobileEngfuncs = NULL;
void InitInput( void );
void EV_HookEvents( void );

View File

@ -1837,7 +1837,7 @@ void EV_TrainPitchAdjust( event_args_t *args )
}
else
{
gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_STATIC, sz, m_flVolume, ATTN_NORM, SND_CHANGE_PITCH, pitch );
//gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_STATIC, sz, m_flVolume, ATTN_NORM, SND_CHANGE_PITCH, pitch );
}
}

View File

@ -18,9 +18,9 @@
// implementation of CHudCOD class
//
#include "STDIO.H"
#include "STDLIB.H"
#include "MATH.H"
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "hud.h"
#include "cl_util.h"
@ -65,11 +65,8 @@ int CHudCOD::VidInit(void)
{
if (dev)
{
char cod[12] = "FOUND: ";
char lvl[3] = "";
itoa(i, lvl, 10);
strcat(cod, lvl);
strcat(cod, "\n");
char cod[12];
sprintf( cod, "FOUND: %d\n", i );
ConsolePrint( cod );
}
Ranks[i] = TRUE;
@ -119,18 +116,15 @@ int CHudCOD:: MsgFunc_COD(const char *pszName, int iSize, void *pbuf )
m_fFade = gHUD.m_flTime + RANK_DELAY;
m_iRank = x;
char lvl[3] = "";
sprintf(lvl, "%i", m_iRank);
if (Ranks[m_iRank])
{
char temp[256];
sprintf(temp, "cod/cod%s.wav", lvl);
sprintf(temp, "cod/cod%d.wav", m_iRank);
PlaySound( temp, 1 );
}
char temp2[256];
sprintf(temp2, "cod%s", lvl);
sprintf(temp2, "cod%d", m_iRank);
charSpriteName = temp2;
m_HUD_codrank = gHUD.GetSpriteIndex(charSpriteName);
}
@ -140,13 +134,11 @@ int CHudCOD:: MsgFunc_COD(const char *pszName, int iSize, void *pbuf )
int CHudCOD::RankExists(int rank)
{
char cod[6] = "cod";
char lvl[3] = "";
itoa(rank, lvl, 10);
strcat(cod, lvl);
char cod[6];
sprintf( cod, "cod%d", rank );
if (gHUD.GetSpriteIndex( cod ) > -1)
return 1;
else
return 0;
}
}

View File

@ -12,7 +12,7 @@
#include "parsemsg.h"
#include <string.h>
#include <stdio.h>
#include "mp3.h"
//#include "mp3.h"
int g_iRoundtime;
int smbSoundCounter = 0; //This will count up, where when it hits 5 it'll play a sound.
@ -61,7 +61,7 @@ int CHudTimer::Draw( float flTime )
if (smbSoundCounter == 5) //Note: the counter will still continue until 120 seconds turns into 119.
{
char * songchoice = "media/hurryup.mp3";
gMP3.PlayMP3NL( songchoice );
//gMP3.PlayMP3NL( songchoice );
}
//Draw BG
SPR_Set(gHUD.GetSprite(g_hud_timerbg), 255, 255, 255 );
@ -85,4 +85,4 @@ int CHudTimer::Draw( float flTime )
}
return 1;
}
}

View File

@ -77,7 +77,7 @@ int __MsgFunc_GameMode( const char *pszName, int iSize, void *pbuf )
{
return gHUD.MsgFunc_GameMode( pszName, iSize, pbuf );
}
/*
int __MsgFunc_PlayMP3(const char *pszName, int iSize, void *pbuf )
{
return gHUD.MsgFunc_PlayMP3( pszName, iSize, pbuf );
@ -92,7 +92,7 @@ int __MsgFunc_StopMP3(const char *pszName, int iSize, void *pbuf )
{
return gHUD.MsgFunc_StopMP3( pszName, iSize, pbuf );
}
*/
int __MsgFunc_AddELight(const char *pszName, int iSize, void *pbuf )
{
return gHUD.MsgFunc_AddELight( pszName, iSize, pbuf );
@ -191,14 +191,14 @@ void CHud::Init( void )
//HOOK_MESSAGE( PlayMP3 );
//gMP3.Initialize();
//KILLAR: MP3
/* //KILLAR: MP3
if( gMP3.Initialize() )
{
HOOK_MESSAGE( PlayMP3 );
HOOK_MESSAGE( PlayBGM );
HOOK_MESSAGE( StopMP3 );
HOOK_COMMAND( "stopaudio", StopMP3 );
}
}*/
// TFFree CommandMenu
HOOK_COMMAND( "+commandmenu", OpenCommandMenu );

View File

@ -773,7 +773,7 @@ void ClientUserInfoChanged( edict_t *pEntity, char *infobuffer )
MESSAGE_END();
// team match?
if( g_teamplay )
if( g_gameplay )
{
UTIL_LogPrintf( "\"%s<%i><%s><%s>\" DEFECTED, just kidding, he wants to be called \"%s\"\n",
STRING( pEntity->v.netname ),

View File

@ -21,7 +21,9 @@
#include "player.h"
#include "weapons.h"
#include "gamerules.h"
#ifndef NO_VOICEGAMEMGR
#include "voice_gamemgr.h"
#endif
#include "monhunt_gamerules.h"
#include "game.h"
//#include "mp3.h"
@ -39,11 +41,13 @@ void CMonsterplay::Think( void )
{
// longest the intermission can last, in seconds
#define MAX_INTERMISSION_TIME 120
#ifndef NO_VOICEGAMEMGR
CVoiceGameMgr g_VoiceGameMgr;
#endif
float g_flIntermissionStartTime = 0;
#ifndef NO_VOICEGAMEMGR
g_VoiceGameMgr.Update(gpGlobals->frametime);
#endif
///// Check game rules /////
static int last_frags;
static int last_time;
@ -358,4 +362,4 @@ const char *CMonsterplay::PrepareMonsterName( const char *monster_name )
monster_name = grinman;
return monster_name;
}
}

View File

@ -75,8 +75,10 @@ CHalfLifeShytplay :: CHalfLifeShytplay()
extern cvar_t timeleft, fragsleft;
#ifndef NO_VOICEGAMEMGR
#include "voice_gamemgr.h"
extern CVoiceGameMgr g_VoiceGameMgr;
#endif
void CHalfLifeShytplay :: Think ( void )
{
@ -86,9 +88,9 @@ void CHalfLifeShytplay :: Think ( void )
int frags_remaining = 0;
int time_remaining = 0;
#ifndef NO_VOICEGAMEMGR
g_VoiceGameMgr.Update(gpGlobals->frametime);
#endif
if ( g_fGameOver ) // someone else quit the game already
{
CHalfLifeMultiplay::Think();
@ -152,9 +154,10 @@ void CHalfLifeShytplay :: Think ( void )
//=========================================================
BOOL CHalfLifeShytplay :: ClientCommand( CBasePlayer *pPlayer, const char *pcmd )
{
#ifndef NO_VOICEGAMEMGR
if(g_VoiceGameMgr.ClientCommand(pPlayer, pcmd))
return TRUE;
#endif
if ( FStrEq( pcmd, "menuselect" ) )
{
if ( CMD_ARGC() < 2 )

View File

@ -589,7 +589,7 @@ void CHalfLifeMultiplay::ClientDisconnected( edict_t *pClient )
FireTargets( "game_playerleave", pPlayer, pPlayer, USE_TOGGLE, 0 );
// team match?
if( g_teamplay )
if( g_gameplay )
{
UTIL_LogPrintf( "\"%s<%i><%s><%s>\" just fucking ran\n",
STRING( pPlayer->pev->netname ),

View File

@ -25,7 +25,7 @@ typedef struct
string_t startspot;
float deathmatch;
float coop;
float teamplay;
float gameplay;
float serverflags;
float found_secrets;
vec3_t v_forward;
@ -215,4 +215,4 @@ typedef struct entvars_s
edict_t *euser4;
} entvars_t;
#endif//PROGDEFS_H
#endif//PROGDEFS_H