diff --git a/cl_dll/ammo.cpp b/cl_dll/ammo.cpp index ad49d1a3..13775c07 100644 --- a/cl_dll/ammo.cpp +++ b/cl_dll/ammo.cpp @@ -1280,7 +1280,7 @@ int CHudAmmo::DrawWList( float flTime ) // Draw Ammo Bar //DrawAmmoBar( p, x + giABWidth / 2, y, giABWidth, giABHeight ); - y += 14 + y += 14; } x += iWidth + 5; diff --git a/cl_dll/hl/hl_baseentity.cpp b/cl_dll/hl/hl_baseentity.cpp index 9a47110f..19c4ccde 100644 --- a/cl_dll/hl/hl_baseentity.cpp +++ b/cl_dll/hl/hl_baseentity.cpp @@ -301,6 +301,11 @@ const char *CBasePlayer::TeamID( void ) { return ""; } int CBasePlayer::GiveAmmo( int iCount, char *szName, int iMax ) { return 0; } void CBasePlayer::AddPoints( int score, BOOL bAllowNegativeScore ) { } void CBasePlayer::AddPointsToTeam( int score, BOOL bAllowNegativeScore ) { } +void CBasePlayer::StartSpectator( void ) { } +void CBasePlayer::SpectatorMove( void ) { } +void CBasePlayer::StopSpectator( void ) { } +void CBasePlayer::StartMenu( void ) { } +void CBasePlayer::FireHook( void ) { } void ClearMultiDamage( void ) { } void ApplyMultiDamage( entvars_t *pevInflictor, entvars_t *pevAttacker ) { } diff --git a/cl_dll/hl/hl_weapons.cpp b/cl_dll/hl/hl_weapons.cpp index 6d555b4c..b3858920 100644 --- a/cl_dll/hl/hl_weapons.cpp +++ b/cl_dll/hl/hl_weapons.cpp @@ -53,8 +53,9 @@ int g_irunninggausspred = 0; vec3_t previousorigin; // HLDM Weapon placeholder entities. -CGlock g_Glock; +//CGlock g_Glock; CCrowbar g_Crowbar; +/* CPython g_Python; CMP5 g_Mp5; CCrossbow g_Crossbow; @@ -65,8 +66,9 @@ CEgon g_Egon; CHgun g_HGun; CHandGrenade g_HandGren; CSatchel g_Satchel; +*/ CTripmine g_Tripmine; -CSqueak g_Snark; +//CSqueak g_Snark; /* ====================== @@ -623,9 +625,9 @@ void HUD_InitClientWeapons( void ) HUD_PrepEntity( &player, NULL ); // Allocate slot(s) for each weapon that we are going to be predicting - HUD_PrepEntity( &g_Glock, &player ); + //HUD_PrepEntity( &g_Glock, &player ); HUD_PrepEntity( &g_Crowbar, &player ); - HUD_PrepEntity( &g_Python, &player ); + /*HUD_PrepEntity( &g_Python, &player ); HUD_PrepEntity( &g_Mp5, &player ); HUD_PrepEntity( &g_Crossbow, &player ); HUD_PrepEntity( &g_Shotgun, &player ); @@ -634,9 +636,9 @@ void HUD_InitClientWeapons( void ) HUD_PrepEntity( &g_Egon, &player ); HUD_PrepEntity( &g_HGun, &player ); HUD_PrepEntity( &g_HandGren, &player ); - HUD_PrepEntity( &g_Satchel, &player ); + HUD_PrepEntity( &g_Satchel, &player );*/ HUD_PrepEntity( &g_Tripmine, &player ); - HUD_PrepEntity( &g_Snark, &player ); + //HUD_PrepEntity( &g_Snark, &player ); } /* @@ -703,7 +705,7 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm case WEAPON_CROWBAR: pWeapon = &g_Crowbar; break; - case WEAPON_GLOCK: + /*case WEAPON_GLOCK: pWeapon = &g_Glock; break; case WEAPON_PYTHON: @@ -735,13 +737,13 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm break; case WEAPON_SATCHEL: pWeapon = &g_Satchel; - break; + break;*/ case WEAPON_TRIPMINE: pWeapon = &g_Tripmine; break; - case WEAPON_SNARK: + /*case WEAPON_SNARK: pWeapon = &g_Snark; - break; + break;*/ } // Store pointer to our destination entity_state_t so we can get our origin, etc. from it @@ -846,11 +848,11 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm player.m_pActiveItem = g_pWpns[from->client.m_iId]; } - if( player.m_pActiveItem->m_iId == WEAPON_RPG ) + /*if( player.m_pActiveItem->m_iId == WEAPON_RPG ) { ( (CRpg *)player.m_pActiveItem )->m_fSpotActive = (int)from->client.vuser2[1]; ( (CRpg *)player.m_pActiveItem )->m_cActiveRockets = (int)from->client.vuser2[2]; - } + }*/ // Don't go firing anything if we have died. // Or if we don't have a weapon model deployed @@ -914,11 +916,11 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm to->client.vuser2[0] = player.ammo_hornets; to->client.ammo_rockets = player.ammo_rockets; - if( player.m_pActiveItem->m_iId == WEAPON_RPG ) + /*if( player.m_pActiveItem->m_iId == WEAPON_RPG ) { from->client.vuser2[1] = ( (CRpg *)player.m_pActiveItem)->m_fSpotActive; from->client.vuser2[2] = ( (CRpg *)player.m_pActiveItem)->m_cActiveRockets; - } + }*/ // Make sure that weapon animation matches what the game .dll is telling us // over the wire ( fixes some animation glitches ) @@ -931,8 +933,8 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm body = 0; //Show laser sight/scope combo - if( pWeapon == &g_Python && bIsMultiplayer() ) - body = 1; + /*if( pWeapon == &g_Python && bIsMultiplayer() ) + body = 1;*/ // Force a fixed anim down to viewmodel HUD_SendWeaponAnim( to->client.weaponanim, body, 1 ); diff --git a/dlls/client.cpp b/dlls/client.cpp index 6dc447c1..268fb86b 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -1650,11 +1650,11 @@ void UpdateClientData( const struct edict_s *ent, int sendweapons, struct client cd->vuser4.y = pl->m_rgAmmo[gun->m_iPrimaryAmmoType]; cd->vuser4.z = pl->m_rgAmmo[gun->m_iSecondaryAmmoType]; - if( pl->m_pActiveItem->m_iId == WEAPON_RPG ) + /*if( pl->m_pActiveItem->m_iId == WEAPON_RPG ) { cd->vuser2.y = ( (CRpg *)pl->m_pActiveItem )->m_fSpotActive; cd->vuser2.z = ( (CRpg *)pl->m_pActiveItem )->m_cActiveRockets; - } + }*/ } } } diff --git a/dlls/coldice/boltgun.cpp b/dlls/coldice/boltgun.cpp index fb1773dc..3a414b97 100644 --- a/dlls/coldice/boltgun.cpp +++ b/dlls/coldice/boltgun.cpp @@ -61,8 +61,8 @@ void CCrossbowBolt::Spawn( ) UTIL_SetOrigin( pev, pev->origin ); UTIL_SetSize(pev, Vector(0, 0, 0), Vector(0, 0, 0)); - SetTouch( BoltTouch ); - SetThink( BubbleThink ); + SetTouch( &CCrossbowBolt::BoltTouch ); + SetThink( &CCrossbowBolt::BubbleThink ); pev->nextthink = gpGlobals->time + 0.2; } @@ -124,7 +124,7 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther ) { EMIT_SOUND_DYN(ENT(pev), CHAN_WEAPON, "weapons/xbow_hit1.wav", RANDOM_FLOAT(0.95, 1.0), ATTN_NORM, 0, 98 + RANDOM_LONG(0,7)); - SetThink( SUB_Remove ); + SetThink( &CCrossbowBolt::SUB_Remove ); pev->nextthink = gpGlobals->time; if ( FClassnameIs( pOther->pev, "worldspawn" ) ) diff --git a/dlls/coldice/chaingun.cpp b/dlls/coldice/chaingun.cpp index c8568686..32447294 100644 --- a/dlls/coldice/chaingun.cpp +++ b/dlls/coldice/chaingun.cpp @@ -225,7 +225,7 @@ void CChaingun::Reload( void ) return; DefaultReload( CHAINGUN_MAX_CLIP, CHAINGUN_HOLSTER, 1.5 ); - SetThink( BringUp ); + SetThink( &CChaingun::BringUp ); pev->nextthink = gpGlobals->time + 1.5; } } @@ -301,4 +301,4 @@ class CChaingunBox : public CBasePlayerAmmo return bResult; } }; -LINK_ENTITY_TO_CLASS( ammo_chaingunbox, CChaingunBox ); \ No newline at end of file +LINK_ENTITY_TO_CLASS( ammo_chaingunbox, CChaingunBox ); diff --git a/dlls/coldice/chumtoad.cpp b/dlls/coldice/chumtoad.cpp index 784f221f..1629e296 100644 --- a/dlls/coldice/chumtoad.cpp +++ b/dlls/coldice/chumtoad.cpp @@ -126,8 +126,8 @@ void CChumtoadGrenade :: Spawn( void ) UTIL_SetSize(pev, Vector( -4, -4, 0), Vector(4, 4, 8)); UTIL_SetOrigin( pev, pev->origin ); - SetTouch( SuperBounceTouch ); - SetThink( HuntThink ); + SetTouch( &CChumtoadGrenade::SuperBounceTouch ); + SetThink( &CChumtoadGrenade::HuntThink ); pev->nextthink = gpGlobals->time + 0.1; m_flNextHunt = gpGlobals->time + 1E6; @@ -168,7 +168,7 @@ void CChumtoadGrenade::Precache( void ) void CChumtoadGrenade :: Killed( entvars_t *pevAttacker, int iGib ) { pev->model = iStringNull;// make invisible - SetThink( SUB_Remove ); + SetThink( &CChumtoadGrenade::SUB_Remove ); SetTouch( NULL ); pev->nextthink = gpGlobals->time + 0.1; @@ -505,7 +505,7 @@ void CChumtoad::Holster( ) if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]) { m_pPlayer->pev->weapons &= ~(1<nextthink = gpGlobals->time + 0.1; return; } diff --git a/dlls/coldice/cluster_grenade.cpp b/dlls/coldice/cluster_grenade.cpp index 86ed8e6d..82ce742f 100644 --- a/dlls/coldice/cluster_grenade.cpp +++ b/dlls/coldice/cluster_grenade.cpp @@ -122,7 +122,7 @@ void CClusterGrenade::Holster( ) else { m_pPlayer->pev->weapons &= ~(1<nextthink = gpGlobals->time + 0.1; } @@ -226,4 +226,4 @@ void CClusterGrenade::WeaponIdle( void ) //SendWeaponAnim( iAnim ); } -} \ No newline at end of file +} diff --git a/dlls/coldice/knife.cpp b/dlls/coldice/knife.cpp index 5c863ab2..b10e0ac3 100644 --- a/dlls/coldice/knife.cpp +++ b/dlls/coldice/knife.cpp @@ -167,7 +167,7 @@ void CKnife::PrimaryAttack() { if (! Swing( 1 )) { - SetThink( SwingAgain ); + SetThink( &CKnife::SwingAgain ); pev->nextthink = gpGlobals->time + 0.1; } } @@ -327,7 +327,7 @@ int CKnife::Swing( int fFirst ) // delay the decal a bit m_trHit = tr; - SetThink( Smack ); + SetThink( &CKnife::Smack ); pev->nextthink = gpGlobals->time + 0.2; m_pPlayer->m_iWeaponVolume = flVol * KNIFE_WALLHIT_VOLUME; diff --git a/dlls/coldice/nukelauncher.cpp b/dlls/coldice/nukelauncher.cpp index 02d4781b..97747bba 100644 --- a/dlls/coldice/nukelauncher.cpp +++ b/dlls/coldice/nukelauncher.cpp @@ -105,7 +105,7 @@ CNukeRocket *CNukeRocket::CreateNukeRocket( Vector vecOrigin, Vector vecAngles, UTIL_SetOrigin( pNuke->pev, vecOrigin ); pNuke->pev->angles = vecAngles; pNuke->Spawn(); - pNuke->SetTouch( CNukeRocket::RocketTouch ); + pNuke->SetTouch( &CNukeRocket::RocketTouch ); pNuke->m_pLauncher = pLauncher; pNuke->pev->owner = pOwner->edict(); @@ -127,8 +127,8 @@ void CNukeRocket :: Spawn( void ) pev->classname = MAKE_STRING("nuke"); - SetThink( IgniteThink ); - SetTouch( ExplodeTouch ); + SetThink( &CNukeRocket::IgniteThink ); + SetTouch( &CNukeRocket::ExplodeTouch ); pev->angles.x -= 30; UTIL_MakeVectors( pev->angles ); @@ -262,7 +262,7 @@ void CNukeRocket :: IgniteThink( void ) m_flIgniteTime = gpGlobals->time; - SetThink( FollowThink ); + SetThink( &CNukeRocket::FollowThink ); pev->nextthink = gpGlobals->time + 0.1; } diff --git a/dlls/coldice/ppk.cpp b/dlls/coldice/ppk.cpp index 5334fe23..1265fbd6 100644 --- a/dlls/coldice/ppk.cpp +++ b/dlls/coldice/ppk.cpp @@ -188,7 +188,7 @@ void CWalterppk::SecondaryAttack( void ) { m_flNextPrimaryAttack = m_flNextSecondaryAttack = gpGlobals->time + 2.4; m_flTimeWeaponIdle = gpGlobals->time + 2.4; - SetThink( AddSilencer ); + SetThink( &CWalterppk::AddSilencer ); pev->nextthink = gpGlobals->time + 1.5; SendWeaponAnim( PPK_HOLSTER ); } @@ -196,7 +196,7 @@ void CWalterppk::SecondaryAttack( void ) { m_flNextPrimaryAttack = m_flNextSecondaryAttack = gpGlobals->time + 2.4; m_flTimeWeaponIdle = gpGlobals->time + 2.4; - SetThink( AddSilencer ); + SetThink( &CWalterppk::AddSilencer ); EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_VOICE, "weapons/ppkbond.wav", RANDOM_FLOAT(0.9, 1.0), ATTN_NORM); pev->nextthink = gpGlobals->time + 1.5; SendWeaponAnim( PPK_HOLSTER ); diff --git a/dlls/coldice/pulse_rifle.cpp b/dlls/coldice/pulse_rifle.cpp index 72c19aa8..ea629ad2 100644 --- a/dlls/coldice/pulse_rifle.cpp +++ b/dlls/coldice/pulse_rifle.cpp @@ -51,8 +51,8 @@ void CBlasterBeam::Spawn( ) UTIL_SetOrigin( pev, pev->origin ); UTIL_SetSize( pev, Vector( -4, -4, -4 ), Vector( 4, 4, 4 ) ); - SetTouch( PulseTouch ); - SetThink( BubbleThink ); + SetTouch( &CBlasterBeam::PulseTouch ); + SetThink( &CBlasterBeam::BubbleThink ); pev->nextthink = gpGlobals->time + 0.1; } @@ -113,7 +113,7 @@ void CBlasterBeam::PulseTouch( CBaseEntity *pOther ) { //EMIT_SOUND_DYN(ENT(pev), CHAN_WEAPON, "weapons/hblaster_hit.wav", RANDOM_FLOAT(0.95, 1.0), ATTN_NORM, 0, 98 + RANDOM_LONG(0,7)); - SetThink( SUB_Remove ); + SetThink( &CBlasterBeam::SUB_Remove ); pev->nextthink = gpGlobals->time; if ( FClassnameIs( pOther->pev, "worldspawn" ) ) @@ -546,4 +546,4 @@ void CPulseRifle::WeaponIdle( void ) SendWeaponAnim( iAnim ); } -*/ \ No newline at end of file +*/ diff --git a/dlls/coldice/railgun.cpp b/dlls/coldice/railgun.cpp index 2fec8909..f11a2b7f 100644 --- a/dlls/coldice/railgun.cpp +++ b/dlls/coldice/railgun.cpp @@ -216,11 +216,11 @@ void CRailgun::UpdateTrail() if(current_phase == 8) { - SetThink(DestroyTrail); + SetThink(&CRailgun::DestroyTrail); } else { - SetThink(UpdateTrail); + SetThink(&CRailgun::UpdateTrail); } pev->nextthink=gpGlobals->time + 0.1; diff --git a/dlls/coldice/rocketl.cpp b/dlls/coldice/rocketl.cpp index b3d536d6..6c749def 100644 --- a/dlls/coldice/rocketl.cpp +++ b/dlls/coldice/rocketl.cpp @@ -129,7 +129,7 @@ void CLaserSpot::Suspend( float flSuspendTime ) { pev->effects |= EF_NODRAW; - SetThink( Revive ); + SetThink( &CLaserSpot::Revive ); pev->nextthink = gpGlobals->time + flSuspendTime; } @@ -187,7 +187,7 @@ CRpgRocket *CRpgRocket::CreateRpgRocket( Vector vecOrigin, Vector vecAngles, CBa UTIL_SetOrigin( pRocket->pev, vecOrigin ); pRocket->pev->angles = vecAngles; pRocket->Spawn(); - pRocket->SetTouch( CRpgRocket::RocketTouch ); + pRocket->SetTouch( &CRpgRocket::RocketTouch ); pRocket->m_pLauncher = pLauncher;// remember what RPG fired me. pRocket->m_pLauncher->m_cActiveRockets++;// register this missile as active for the launcher pRocket->pev->owner = pOwner->edict(); @@ -210,8 +210,8 @@ void CRpgRocket :: Spawn( void ) pev->classname = MAKE_STRING("rocket"); - SetThink( IgniteThink ); - SetTouch( ExplodeTouch ); + SetThink( &CRpgRocket::IgniteThink ); + SetTouch( &CRpgRocket::ExplodeTouch ); pev->angles.x -= 30; UTIL_MakeVectors( pev->angles ); @@ -274,7 +274,7 @@ void CRpgRocket :: IgniteThink( void ) m_flIgniteTime = gpGlobals->time; - SetThink( FollowThink ); + SetThink( &CRpgRocket::FollowThink ); pev->nextthink = gpGlobals->time + 0.1; } diff --git a/dlls/coldice/runes.cpp b/dlls/coldice/runes.cpp index 8155afa8..f68ca6ba 100644 --- a/dlls/coldice/runes.cpp +++ b/dlls/coldice/runes.cpp @@ -77,8 +77,8 @@ void CBaseRune::Spawn( ) UTIL_SetOrigin( pev, pev->origin ); pev->classname = MAKE_STRING( m_szClassName ); - SetThink( RuneThink ); - SetTouch( RuneTouch ); + SetThink( &CBaseRune::RuneThink ); + SetTouch( &CBaseRune::RuneTouch ); pev->velocity.z = RANDOM_LONG( 100,500 ); pev->velocity.x = RANDOM_LONG( 100,500 ); @@ -263,7 +263,7 @@ void CWorldRunes::Spawn( ) m_pSpot = NULL; Precache( ); - SetThink( SpawnRunes ); + SetThink( &CWorldRunes::SpawnRunes ); pev->nextthink = gpGlobals->time + 5.0; @@ -331,7 +331,7 @@ void CWorldRunes::SpawnRunes( ) } m_iNextRespawn++; - SetThink( SpawnRunes ); + SetThink( &CWorldRunes::SpawnRunes ); if ( m_iNextRespawn < 2 ) pev->nextthink = gpGlobals->time + 75.0; @@ -348,4 +348,4 @@ CWorldRunes *CWorldRunes::Create( ) CWorldRunes* WorldRunes = GetClassPtr( (CWorldRunes*)NULL ); WorldRunes->Spawn( ); return WorldRunes; -} \ No newline at end of file +} diff --git a/dlls/coldice/sword.cpp b/dlls/coldice/sword.cpp index 6234d05e..ff4e5308 100644 --- a/dlls/coldice/sword.cpp +++ b/dlls/coldice/sword.cpp @@ -167,7 +167,7 @@ void CSword::PrimaryAttack() { if (! Swing( 1 )) { - SetThink( SwingAgain ); + SetThink( &CSword::SwingAgain ); pev->nextthink = gpGlobals->time + 0.1; } } @@ -327,7 +327,7 @@ int CSword::Swing( int fFirst ) // delay the decal a bit m_trHit = tr; - SetThink( Smack ); + SetThink( &CSword::Smack ); pev->nextthink = gpGlobals->time + 0.2; m_pPlayer->m_iWeaponVolume = flVol * SWORD_WALLHIT_VOLUME; diff --git a/dlls/coldice/tnt.cpp b/dlls/coldice/tnt.cpp index 05333e0d..d3646f75 100644 --- a/dlls/coldice/tnt.cpp +++ b/dlls/coldice/tnt.cpp @@ -104,7 +104,7 @@ void CKamikaze::Holster( ) if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]) { m_pPlayer->pev->weapons &= ~(1<nextthink = gpGlobals->time + 0.1; } diff --git a/dlls/gamerules.h b/dlls/gamerules.h index 4934792d..d50de6ef 100644 --- a/dlls/gamerules.h +++ b/dlls/gamerules.h @@ -304,7 +304,6 @@ public: virtual edict_t *GetPlayerSpawnSpot( CBasePlayer *pPlayer ); virtual BOOL AllowAutoTargetCrosshair( void ); - virtual BOOL ClientCommand( CBasePlayer *pPlayer, const char *pcmd ); // Client kills/scoring virtual int IPointsForKill( CBasePlayer *pAttacker, CBasePlayer *pKilled ); diff --git a/dlls/ggrenade.cpp b/dlls/ggrenade.cpp index d2c91a1a..cdf32f80 100644 --- a/dlls/ggrenade.cpp +++ b/dlls/ggrenade.cpp @@ -492,10 +492,10 @@ CGrenade *CGrenade::ShootCluster( entvars_t *pevOwner, Vector vecStart, Vector v pGrenade->pev->angles = UTIL_VecToAngles( pGrenade->pev->velocity ); pGrenade->pev->owner = ENT( pevOwner ); - pGrenade->SetTouch( BounceTouch ); + pGrenade->SetTouch( &CGrenade::BounceTouch ); pGrenade->pev->dmgtime = gpGlobals->time + time; - pGrenade->SetThink( TumbleThink ); + pGrenade->SetThink( &CGrenade::TumbleThink ); pGrenade->pev->nextthink = gpGlobals->time + 0.1; if( time < 0.1 ) @@ -527,10 +527,10 @@ CGrenade *CGrenade::ShootClusterGrenade( entvars_t *pevOwner, Vector vecStart, V pGrenade->clusterOwner = pevOwner; - pGrenade->SetTouch( BounceTouch ); + pGrenade->SetTouch( &CGrenade::BounceTouch ); pGrenade->pev->dmgtime = gpGlobals->time + time; - pGrenade->SetThink( ClusterTumbleThink ); + pGrenade->SetThink( &CGrenade::ClusterTumbleThink ); pGrenade->pev->nextthink = gpGlobals->time + 0.1; if( time < 0.1 ) @@ -566,11 +566,12 @@ void CGrenade::ClusterTumbleThink( void ) CSoundEnt::InsertSound( bits_SOUND_DANGER, pev->origin + pev->velocity * ( pev->dmgtime - gpGlobals->time ), 400, 0.1 ); } - if (pev->dmgtime <= gpGlobals->time) + if( pev->dmgtime <= gpGlobals->time ) { - SetThink( ClusterLaunch); + SetThink( &CGrenade::ClusterLaunch ); } - if (pev->waterlevel != 0) + + if( pev->waterlevel != 0 ) { pev->velocity = pev->velocity * 0.5; pev->framerate = 0.2; @@ -622,7 +623,7 @@ void CGrenade::ClusterLaunch( void ) pev->dmg = 60; - SetThink( ClusterDetonate ); + SetThink( &CGrenade::ClusterDetonate ); pev->nextthink = gpGlobals->time + 1.2; } diff --git a/dlls/multiplay_gamerules.cpp b/dlls/multiplay_gamerules.cpp index 36e99e0a..c78bd9bb 100644 --- a/dlls/multiplay_gamerules.cpp +++ b/dlls/multiplay_gamerules.cpp @@ -125,6 +125,81 @@ BOOL CHalfLifeMultiplay::ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) if( g_VoiceGameMgr.ClientCommand( pPlayer, pcmd ) ) return TRUE; #endif + if( FStrEq( pcmd, "menuselect" ) ) + { + int slot = atoi( CMD_ARGV( 1 ) ); + + //============================================================= + //============================================================= + switch( pPlayer->m_nMenu ) + { + case Menu_Spec: + if( slot == 1 ) + pPlayer->StopSpectator(); + else if( slot == 2 ) + { + pPlayer->StartSpectator(); + ShowMenu( pPlayer, 0x1, 0, 0, "Currently In Spectator Mode:\n\nHit Key 1 to exit and join the game. " ); + } + break; + //============================================================= + //============================================================= + case Menu_Wep: + if( slot == 1 ) + pPlayer->m_cWeapon1 = "weapon_knife"; + else if( slot == 2 ) + pPlayer->m_cWeapon1 = "weapon_crowbar"; + else if( slot == 3 ) + pPlayer->m_cWeapon1 = "weapon_sword"; + + pPlayer->m_nMenu = Menu_Spec; + ShowMenu( pPlayer, 0x3, 0, 0,"Choose a play option:\n\n1. Join Game\n2. Observe Game" ); + break; + //============================================================= + //============================================================= + case Menu_Change: + if( slot == 1 ) + pPlayer->m_cWeapon1 = "weapon_knife"; + else if( slot == 2 ) + pPlayer->m_cWeapon1 = "weapon_crowbar"; + else if( slot == 3 ) + pPlayer->m_cWeapon1 = "weapon_sword"; + + ShowMenu( pPlayer, 0x7, 3, 0,"Your manual weapon choice will be changed on\nthe next respawn" ); + break; + //============================================================= + //============================================================= + } + return TRUE; + } + //============================================================= + //============================================================= + if( FStrEq( pcmd, "rune_status" ) ) + { + if( pPlayer->m_iPlayerRune == RUNE_SPEED ) + ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Speed" ); + else if( pPlayer->m_iPlayerRune == RUNE_RESIST ) + ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Resist" ); + else if( pPlayer->m_iPlayerRune == RUNE_STRENGTH ) + ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Strength" ); + else if( pPlayer->m_iPlayerRune == RUNE_HEALTH ) + ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Regeneration" ); + else if( pPlayer->m_iPlayerRune == RUNE_ROCKETARENA ) + ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Rocket Arena Special" ); + else + ShowMenu( pPlayer, 0x1, 5, 0, "You Have No Runes." ); + + return TRUE; + } + //============================================================= + //============================================================= + if( FStrEq( pcmd, "changeweapons" ) ) + { + pPlayer->m_nMenu = Menu_Change; + ShowMenu( pPlayer, 0x7, 0, 0,"Weapons Change:\n\nPlease choose a weapon.\n1. Knife\n2. Crowbar\n3. Sword" ); + + return TRUE; + } return CGameRules::ClientCommand( pPlayer, pcmd ); } @@ -568,90 +643,6 @@ void CHalfLifeMultiplay::PlayerThink( CBasePlayer *pPlayer ) } } -//========================================================= -//========================================================= -BOOL CHalfLifeMultiplay::ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) -{ - if( FStrEq( pcmd, "menuselect" ) ) - { - int slot = atoi( CMD_ARGV( 1 ) ); - - //============================================================= - //============================================================= - switch( pPlayer->m_nMenu ) - { - case Menu_Spec: - if( slot == 1 ) - pPlayer->StopSpectator(); - else if( slot == 2 ) - { - pPlayer->StartSpectator(); - ShowMenu( pPlayer, 0x1, 0, 0, "Currently In Spectator Mode:\n\nHit Key 1 to exit and join the game. " ); - } - break; - //============================================================= - //============================================================= - case Menu_Wep: - if( slot == 1 ) - pPlayer->m_cWeapon1 = "weapon_knife"; - else if( slot == 2 ) - pPlayer->m_cWeapon1 = "weapon_crowbar"; - else if( slot == 3 ) - pPlayer->m_cWeapon1 = "weapon_sword"; - - pPlayer->m_nMenu = Menu_Spec; - ShowMenu( pPlayer, 0x3, 0, 0,"Choose a play option:\n\n1. Join Game\n2. Observe Game" ); - break; - //============================================================= - //============================================================= - case Menu_Change: - if( slot == 1 ) - pPlayer->m_cWeapon1 = "weapon_knife"; - else if( slot == 2 ) - pPlayer->m_cWeapon1 = "weapon_crowbar"; - else if( slot == 3 ) - pPlayer->m_cWeapon1 = "weapon_sword"; - - ShowMenu( pPlayer, 0x7, 3, 0,"Your manual weapon choice will be changed on\nthe next respawn" ); - break; - //============================================================= - //============================================================= - } - return TRUE; - } - //============================================================= - //============================================================= - if( FStrEq( pcmd, "rune_status" ) ) - { - - if( pPlayer->m_iPlayerRune == RUNE_SPEED ) - ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Speed" ); - else if( pPlayer->m_iPlayerRune == RUNE_RESIST ) - ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Resist" ); - else if( pPlayer->m_iPlayerRune == RUNE_STRENGTH ) - ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Strength" ); - else if( pPlayer->m_iPlayerRune == RUNE_HEALTH ) - ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Regeneration" ); - else if( pPlayer->m_iPlayerRune == RUNE_ROCKETARENA ) - ShowMenu( pPlayer, 0x1, 5, 0, "You Have Rune: Rocket Arena Special" ); - else - ShowMenu( pPlayer, 0x1, 5, 0, "You Have No Runes." ); - - return TRUE; - } - //============================================================= - //============================================================= - if( FStrEq( pcmd, "changeweapons" ) ) - { - pPlayer->m_nMenu = Menu_Change; - ShowMenu( pPlayer, 0x7, 0, 0,"Weapons Change:\n\nPlease choose a weapon.\n1. Knife\n2. Crowbar\n3. Sword" ); - - return TRUE; - } - - return FALSE; -} - //========================================================= //========================================================= void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer ) diff --git a/dlls/player.cpp b/dlls/player.cpp index c3f5f8d4..8c9f8bdf 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -4598,10 +4598,9 @@ void CHook::Spawn() UTIL_SetOrigin( pev, pev->origin ); UTIL_SetSize( pev, Vector( 0, 0, 0 ), Vector( 0, 0, 0 ) ); - SetTouch( CHook::HookTouch ); + SetTouch( &CHook::HookTouch ); } - void CHook::Precache() { PRECACHE_MODEL( "models/bolt.mdl" ); @@ -4669,7 +4668,7 @@ void CHook::HookTouch( CBaseEntity *pOther ) pev->velocity = Vector( 0, 0, 0 ); pev->avelocity.z = 0; pev->angles.z = RANDOM_LONG( 0, 360 ); - SetThink( CHook::Think ); + SetThink( &CHook::Think ); pev->nextthink = gpGlobals->time + 0.01; pevOwner->m_fHookInWall = TRUE; diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index da285296..0d5563fa 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -1611,7 +1611,7 @@ void CBasePlayerWeapon::PrintState( void ) ALERT( at_console, "m_iclip: %i\n", m_iClip ); } - +/* TYPEDESCRIPTION CRpg::m_SaveData[] = { DEFINE_FIELD( CRpg, m_fSpotActive, FIELD_INTEGER ), @@ -1669,4 +1669,4 @@ TYPEDESCRIPTION CSatchel::m_SaveData[] = DEFINE_FIELD( CSatchel, m_chargeReady, FIELD_INTEGER ), }; -IMPLEMENT_SAVERESTORE( CSatchel, CBasePlayerWeapon ) +IMPLEMENT_SAVERESTORE( CSatchel, CBasePlayerWeapon )*/ diff --git a/dlls/weapons.h b/dlls/weapons.h index b9f8535d..4d060ee9 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -492,7 +492,7 @@ public: bool bIsMultiplayer ( void ); void LoadVModel ( char *szViewModel, CBasePlayer *m_pPlayer ); #endif - +/* class CGlock : public CBasePlayerWeapon { public: @@ -523,7 +523,7 @@ private: unsigned short m_usFireGlock1; unsigned short m_usFireGlock2; }; - +*/ class CCrowbar : public CBasePlayerWeapon { public: @@ -534,6 +534,7 @@ public: void EXPORT Smack( void ); int GetItemInfo(ItemInfo *p); + int AddToPlayer( CBasePlayer *pPlayer ); void PrimaryAttack( void ); int Swing( int fFirst ); BOOL Deploy( void ); @@ -552,7 +553,7 @@ public: private: unsigned short m_usCrowbar; }; - +/* class CPython : public CBasePlayerWeapon { public: @@ -964,7 +965,7 @@ public: #endif } }; - +*/ class CTripmine : public CBasePlayerWeapon { public: @@ -996,7 +997,7 @@ public: private: unsigned short m_usTripFire; }; - +/* class CSqueak : public CBasePlayerWeapon { public: @@ -1023,5 +1024,5 @@ public: private: unsigned short m_usSnarkFire; -}; +};*/ #endif // WEAPONS_H