Browse Source

HL:Invasion Some more code clean-ups.

invasion
Roy Shapiro 2 years ago
parent
commit
e1ee7afe31
  1. 10
      cl_dll/clientbriquet.cpp
  2. 26
      cl_dll/clientlflammes.cpp
  3. 4
      cl_dll/hudrpg.cpp
  4. 12
      cl_dll/nvg.cpp
  5. 4
      cl_dll/vgui_soin.h
  6. 2
      dlls/fog.cpp
  7. 2
      dlls/irgun.cpp
  8. 4
      dlls/m16.cpp
  9. 6
      dlls/music.cpp
  10. 4
      dlls/music.h
  11. 4
      dlls/musicgstreamer.cpp
  12. 4
      dlls/musicgstreamer.h

10
cl_dll/clientbriquet.cpp

@ -35,7 +35,7 @@ extern vec3_t v_angles; // angles de la vue du joueur
//------------------------------------ //------------------------------------
// //
// déclaration du message : // d
// gmsgLFlammes // gmsgLFlammes
DECLARE_MESSAGE(m_Briquet, Briquet ); DECLARE_MESSAGE(m_Briquet, Briquet );
@ -80,7 +80,7 @@ int CHudBriquet :: Draw ( float flTime )
void CHudBriquet :: DrawFlamme ( void ) void CHudBriquet :: DrawFlamme ( void )
{ {
// hud éteint // hud
if ( ! (m_iFlags & HUD_ACTIVE)) if ( ! (m_iFlags & HUD_ACTIVE))
return; return;
@ -112,7 +112,7 @@ void CHudBriquet :: DrawFlamme ( void )
gEngfuncs.pTriAPI->Brightness( 0.8 ); gEngfuncs.pTriAPI->Brightness( 0.8 );
gEngfuncs.pTriAPI->Color4f( 1.0, 1.0, 1.0, 1.0 ); gEngfuncs.pTriAPI->Color4f( 1.0, 1.0, 1.0, 1.0 );
gEngfuncs.pTriAPI->Begin( TRI_QUADS ); //démarrage du tracé, en mode quads - carrés . gEngfuncs.pTriAPI->Begin( TRI_QUADS ); //d
gEngfuncs.pTriAPI->TexCoord2f( 0, 0 ); //premier vertex gEngfuncs.pTriAPI->TexCoord2f( 0, 0 ); //premier vertex
vertex = vecPos - right + up; vertex = vecPos - right + up;
@ -130,7 +130,7 @@ void CHudBriquet :: DrawFlamme ( void )
vertex = vecPos - right; vertex = vecPos - right;
gEngfuncs.pTriAPI->Vertex3f( vertex.x, vertex.y, vertex.z ); gEngfuncs.pTriAPI->Vertex3f( vertex.x, vertex.y, vertex.z );
gEngfuncs.pTriAPI->End(); //fin du tracé gEngfuncs.pTriAPI->End(); //fin du trac
} }
@ -152,7 +152,7 @@ int CHudBriquet :: Init( void )
//------------------------------------ //------------------------------------
// //
// initialisation après le chargement // initialisation apr
int CHudBriquet :: VidInit( void ) int CHudBriquet :: VidInit( void )

26
cl_dll/clientlflammes.cpp

@ -61,7 +61,7 @@ extern vec3_t v_angles, v_origin; // angles de la vue du joueur
//------------------------------------ //------------------------------------
// //
// déclaration du message : // d
// gmsgLFlammes // gmsgLFlammes
DECLARE_MESSAGE(m_LFlammes, LFlammes ); DECLARE_MESSAGE(m_LFlammes, LFlammes );
@ -88,7 +88,7 @@ int CHudLFlammes::MsgFunc_LFlammes( const char *pszName, int iSize, void *pbuf )
flammes_t *p = NULL; flammes_t *p = NULL;
p = new flammes_t; p = new flammes_t;
// paramètres // param
p->index = idx; p->index = idx;
p->flBirthTime = time; p->flBirthTime = time;
@ -129,7 +129,7 @@ int CHudLFlammes::MsgFunc_LFlammes( const char *pszName, int iSize, void *pbuf )
{ {
if ( q == NULL ) if ( q == NULL )
{ {
// première de la liste // premi
m_pFlammes = p->pNext, m_pFlammes = p->pNext,
@ -275,12 +275,12 @@ void CHudLFlammes :: DrawFlammes ( void )
flTrans = flTrans / (float)255; flTrans = flTrans / (float)255;
// tracé // trac
gEngfuncs.pTriAPI->Brightness( flTrans ); gEngfuncs.pTriAPI->Brightness( flTrans );
gEngfuncs.pTriAPI->Color4f( 1.0, 1.0, 1.0, flTrans ); gEngfuncs.pTriAPI->Color4f( 1.0, 1.0, 1.0, flTrans );
gEngfuncs.pTriAPI->SpriteTexture( (struct model_s *)mod, frame ); gEngfuncs.pTriAPI->SpriteTexture( (struct model_s *)mod, frame );
gEngfuncs.pTriAPI->Begin( TRI_QUADS ); //démarrage du tracé, en mode quads - carrés . gEngfuncs.pTriAPI->Begin( TRI_QUADS ); //d
gEngfuncs.pTriAPI->TexCoord2f( 0, 0 ); //premier vertex gEngfuncs.pTriAPI->TexCoord2f( 0, 0 ); //premier vertex
vertex = vecPos - right + up; vertex = vecPos - right + up;
@ -298,7 +298,7 @@ void CHudLFlammes :: DrawFlammes ( void )
vertex = vecPos - right - up; vertex = vecPos - right - up;
gEngfuncs.pTriAPI->Vertex3f( vertex.x, vertex.y, vertex.z ); gEngfuncs.pTriAPI->Vertex3f( vertex.x, vertex.y, vertex.z );
gEngfuncs.pTriAPI->End(); //fin du tracé gEngfuncs.pTriAPI->End(); //fin du trac
p = p->pNext; p = p->pNext;
@ -335,7 +335,7 @@ void CHudLFlammes :: DrawFlammes ( void )
{ {
if ( q == NULL ) if ( q == NULL )
{ {
// première de la liste // premi
m_pFlammes = p->pNext, m_pFlammes = p->pNext,
@ -402,12 +402,12 @@ void CHudLFlammes :: DrawFlammes ( void )
for ( int i=0; i<2; i++ ) for ( int i=0; i<2; i++ )
{ {
// génération d'une flamme // g
flammes_t *Q = NULL; flammes_t *Q = NULL;
Q = new flammes_t; Q = new flammes_t;
// paramètres // param
Q->index = p->index; Q->index = p->index;
Q->flBirthTime = gEngfuncs.GetClientTime (); Q->flBirthTime = gEngfuncs.GetClientTime ();
@ -542,12 +542,12 @@ void CHudLFlammes :: DrawFlammes ( void )
flTrans = flTrans / (float)255; flTrans = flTrans / (float)255;
// tracé // trac
gEngfuncs.pTriAPI->Brightness( flTrans ); gEngfuncs.pTriAPI->Brightness( flTrans );
gEngfuncs.pTriAPI->Color4f( 1.0, 1.0, 1.0, flTrans ); gEngfuncs.pTriAPI->Color4f( 1.0, 1.0, 1.0, flTrans );
gEngfuncs.pTriAPI->SpriteTexture( (struct model_s *)mod, frame ); gEngfuncs.pTriAPI->SpriteTexture( (struct model_s *)mod, frame );
gEngfuncs.pTriAPI->Begin( TRI_QUADS ); //démarrage du tracé, en mode quads - carrés . gEngfuncs.pTriAPI->Begin( TRI_QUADS ); //d
gEngfuncs.pTriAPI->TexCoord2f( 0, 0 ); //premier vertex gEngfuncs.pTriAPI->TexCoord2f( 0, 0 ); //premier vertex
vertex = vecPos - right + up; vertex = vecPos - right + up;
@ -565,7 +565,7 @@ void CHudLFlammes :: DrawFlammes ( void )
vertex = vecPos - right - up; vertex = vecPos - right - up;
gEngfuncs.pTriAPI->Vertex3f( vertex.x, vertex.y, vertex.z ); gEngfuncs.pTriAPI->Vertex3f( vertex.x, vertex.y, vertex.z );
gEngfuncs.pTriAPI->End(); //fin du tracé gEngfuncs.pTriAPI->End(); //fin du trac
@ -596,7 +596,7 @@ int CHudLFlammes :: Init( void )
//------------------------------------ //------------------------------------
// //
// initialisation après le chargement // initialisation apr
int CHudLFlammes :: VidInit( void ) int CHudLFlammes :: VidInit( void )

4
cl_dll/hudrpg.cpp

@ -206,7 +206,7 @@ int CHudRPG :: Draw ( float flTime )
//------------------------------------ //------------------------------------
// //
// déclaration des messages du serveur : // d
DECLARE_MESSAGE(m_RPG, RpgViseur); DECLARE_MESSAGE(m_RPG, RpgViseur);
DECLARE_MESSAGE(m_RPG, MenuRpg); DECLARE_MESSAGE(m_RPG, MenuRpg);
@ -243,7 +243,7 @@ int CHudRPG :: Init( void )
//------------------------------------ //------------------------------------
// //
// initialisation après le chargement // initialisation apr
int CHudRPG :: VidInit( void ) int CHudRPG :: VidInit( void )

12
cl_dll/nvg.cpp

@ -67,7 +67,7 @@ int CHudNVG :: Draw ( float flTime )
//------------------------------------ //------------------------------------
// //
// numéro de la frame à afficher // num
int CHudNVG :: Frame( void ) int CHudNVG :: Frame( void )
{ {
@ -88,7 +88,7 @@ int CHudNVG :: Frame( void )
//------------------------------------ //------------------------------------
// //
// déclaration du message : // d
// gmsgSwitchNVG // gmsgSwitchNVG
// gmsgInfosNVG // gmsgInfosNVG
@ -120,7 +120,7 @@ int CHudNVG :: Init( void )
//------------------------------------ //------------------------------------
// //
// initialisation après le chargement // initialisation apr
int CHudNVG :: VidInit( void ) int CHudNVG :: VidInit( void )
@ -200,7 +200,7 @@ int CHudNVG::MsgFunc_InfosNVG ( const char *pszName, int iSize, void *pbuf )
//------------------------------------ //------------------------------------
// //
// destruction du registre des // destruction du registre des
// entités visibles // entit
void CHudNVG :: ClearEnnemies ( void ) void CHudNVG :: ClearEnnemies ( void )
{ {
@ -215,7 +215,7 @@ void CHudNVG :: ClearEnnemies ( void )
} }
//------------------------------------ //------------------------------------
// cherche si l'entité est visible // cherche si l'entit
nvg_ennemy_t *CHudNVG :: IsEnnemy ( int index ) nvg_ennemy_t *CHudNVG :: IsEnnemy ( int index )
{ {
@ -233,7 +233,7 @@ nvg_ennemy_t *CHudNVG :: IsEnnemy ( int index )
} }
while ( p != NULL ); while ( p != NULL );
// sort de la boucle : aucune entité trouvée // sort de la boucle : aucune entit
return NULL; return NULL;
} }

4
cl_dll/vgui_soin.h

@ -5,7 +5,7 @@
//- --- //- ---
//--------------------------------------------------------- //---------------------------------------------------------
//--------------------------------------------------------- //---------------------------------------------------------
//- header du soin sélectif --- //- header du soin s
//--------------------------------------------------------- //---------------------------------------------------------
//--------------------------------------------------------- //---------------------------------------------------------
@ -25,7 +25,7 @@ public:
CSoin(int iTrans, int iRemoveMe, int x,int y,int wide,int tall); //constructeur CSoin(int iTrans, int iRemoveMe, int x,int y,int wide,int tall); //constructeur
virtual void Initialize( void ); //aucun intéret virtual void Initialize( void ); //aucun int
virtual void Reset( void ); //idem virtual void Reset( void ); //idem
}; };

2
dlls/fog.cpp

@ -23,7 +23,7 @@ int g_bFogUpdate;
//--------------------------------------------------------- //---------------------------------------------------------
// classe de l'entité dans les maps bsp // classe de l'entit

2
dlls/irgun.cpp

@ -160,7 +160,7 @@ void CIRgun::PrimaryAttack()
m_iClip--; m_iClip--;
// PLAYBACK_EVENT( 0, m_pPlayer->edict(), m_usFireIRgun ); // le full permet de préciser le param1 // PLAYBACK_EVENT( 0, m_pPlayer->edict(), m_usFireIRgun ); // le full permet de pr
PLAYBACK_EVENT_FULL( 0, m_pPlayer->edict(), m_usFireIRgun, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 ); PLAYBACK_EVENT_FULL( 0, m_pPlayer->edict(), m_usFireIRgun, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 );
m_pPlayer->m_iWeaponVolume = LOUD_GUN_VOLUME; m_pPlayer->m_iWeaponVolume = LOUD_GUN_VOLUME;

4
dlls/m16.cpp

@ -3,7 +3,7 @@
* Fichier m16 par Julien * * Fichier m16 par Julien *
* * * *
******************************************/ ******************************************/
//10/03/01 création de l'arme //10/03/01 cr
//11/03/01 force de recul et ralentissement / retrait du lance-grenades / ajout dans le hud //11/03/01 force de recul et ralentissement / retrait du lance-grenades / ajout dans le hud
@ -140,7 +140,7 @@ int CM16::AddToPlayer( CBasePlayer *pPlayer )
BOOL CM16::Deploy( ) BOOL CM16::Deploy( )
{ {
//modifié par Julien //modifi
BOOL bResult = DefaultDeploy( "models/v_m16.mdl", "models/p_9mmAR.mdl", M16_DEPLOY, "m16" ); BOOL bResult = DefaultDeploy( "models/v_m16.mdl", "models/p_9mmAR.mdl", M16_DEPLOY, "m16" );
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 60 / 70.0; m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 60 / 70.0;

6
dlls/music.cpp

@ -5,16 +5,14 @@
//- --- //- ---
//--------------------------------------------------------- //---------------------------------------------------------
//--------------------------------------------------------- //---------------------------------------------------------
//- by Roy, based on the code by ----------- //- by Roy, based on the code by JujU -----------
//- by JujU -----------
//- julien.lecorre@free.fr -----------
//--------------------------------------------------------- //---------------------------------------------------------
//- fake and null mp3 player code for HL mod ----------- //- fake and null mp3 player code for HL mod -----------
//--------------------------------------------------------- //---------------------------------------------------------
/*//--------------- /*//---------------
This code is a placeholder for system that support neither gstreamer nor fmod. This code is a placeholder for systems that support neither gstreamer nor fmod.
*///--------------- *///---------------

4
dlls/music.h

@ -5,9 +5,7 @@
//- --- //- ---
//--------------------------------------------------------- //---------------------------------------------------------
//--------------------------------------------------------- //---------------------------------------------------------
//- by Roy, based on the code by ----------- //- by Roy, based on the code by JujU -----------
//- by JujU -----------
//- julien.lecorre@free.fr -----------
//--------------------------------------------------------- //---------------------------------------------------------
//- tee file for null player //- tee file for null player
//--------------------------------------------------------- //---------------------------------------------------------

4
dlls/musicgstreamer.cpp

@ -5,9 +5,7 @@
//- --- //- ---
//--------------------------------------------------------- //---------------------------------------------------------
//--------------------------------------------------------- //---------------------------------------------------------
//- by Roy, based on the code by ----------- //- by Roy, based on the code by JujU -----------
//- by JujU -----------
//- julien.lecorre@free.fr -----------
//--------------------------------------------------------- //---------------------------------------------------------
//- mp3 player code for HL mod ----------- //- mp3 player code for HL mod -----------
//--------------------------------------------------------- //---------------------------------------------------------

4
dlls/musicgstreamer.h

@ -5,9 +5,7 @@
//- --- //- ---
//--------------------------------------------------------- //---------------------------------------------------------
//--------------------------------------------------------- //---------------------------------------------------------
//- by Roy, based on the code by ----------- //- by Roy, based on the code by JujU -----------
//- by JujU -----------
//- julien.lecorre@free.fr -----------
//--------------------------------------------------------- //---------------------------------------------------------
//- tee file //- tee file
//--------------------------------------------------------- //---------------------------------------------------------

Loading…
Cancel
Save