Browse Source

Fix build.

coldice
Night Owl 8 years ago
parent
commit
95b0702daf
  1. 2
      cl_dll/ammo.cpp
  2. 5
      cl_dll/hl/hl_baseentity.cpp
  3. 34
      cl_dll/hl/hl_weapons.cpp
  4. 4
      dlls/client.cpp
  5. 6
      dlls/coldice/boltgun.cpp
  6. 2
      dlls/coldice/chaingun.cpp
  7. 8
      dlls/coldice/chumtoad.cpp
  8. 2
      dlls/coldice/cluster_grenade.cpp
  9. 4
      dlls/coldice/knife.cpp
  10. 8
      dlls/coldice/nukelauncher.cpp
  11. 4
      dlls/coldice/ppk.cpp
  12. 6
      dlls/coldice/pulse_rifle.cpp
  13. 4
      dlls/coldice/railgun.cpp
  14. 10
      dlls/coldice/rocketl.cpp
  15. 8
      dlls/coldice/runes.cpp
  16. 4
      dlls/coldice/sword.cpp
  17. 2
      dlls/coldice/tnt.cpp
  18. 1
      dlls/gamerules.h
  19. 13
      dlls/ggrenade.cpp
  20. 159
      dlls/multiplay_gamerules.cpp
  21. 5
      dlls/player.cpp
  22. 4
      dlls/weapons.cpp
  23. 13
      dlls/weapons.h

2
cl_dll/ammo.cpp

@ -1280,7 +1280,7 @@ int CHudAmmo::DrawWList( float flTime ) @@ -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;

5
cl_dll/hl/hl_baseentity.cpp

@ -301,6 +301,11 @@ const char *CBasePlayer::TeamID( void ) { return ""; } @@ -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 ) { }

34
cl_dll/hl/hl_weapons.cpp

@ -53,8 +53,9 @@ int g_irunninggausspred = 0; @@ -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; @@ -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 ) @@ -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 ) @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 );

4
dlls/client.cpp

@ -1650,11 +1650,11 @@ void UpdateClientData( const struct edict_s *ent, int sendweapons, struct client @@ -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;
}
}*/
}
}
}

6
dlls/coldice/boltgun.cpp

@ -61,8 +61,8 @@ void CCrossbowBolt::Spawn( ) @@ -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 ) @@ -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" ) )

2
dlls/coldice/chaingun.cpp

@ -225,7 +225,7 @@ void CChaingun::Reload( void ) @@ -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;
}
}

8
dlls/coldice/chumtoad.cpp

@ -126,8 +126,8 @@ void CChumtoadGrenade :: Spawn( void ) @@ -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 ) @@ -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( ) @@ -505,7 +505,7 @@ void CChumtoad::Holster( )
if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
{
m_pPlayer->pev->weapons &= ~(1<<WEAPON_CHUMTOAD);
SetThink( DestroyItem );
SetThink( &CChumtoad::DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
return;
}

2
dlls/coldice/cluster_grenade.cpp

@ -122,7 +122,7 @@ void CClusterGrenade::Holster( ) @@ -122,7 +122,7 @@ void CClusterGrenade::Holster( )
else
{
m_pPlayer->pev->weapons &= ~(1<<WEAPON_CLUSTERGRENADE);
SetThink( DestroyItem );
SetThink( &CClusterGrenade::DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
}

4
dlls/coldice/knife.cpp

@ -167,7 +167,7 @@ void CKnife::PrimaryAttack() @@ -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 ) @@ -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;

8
dlls/coldice/nukelauncher.cpp

@ -105,7 +105,7 @@ CNukeRocket *CNukeRocket::CreateNukeRocket( Vector vecOrigin, Vector vecAngles, @@ -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 ) @@ -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 ) @@ -262,7 +262,7 @@ void CNukeRocket :: IgniteThink( void )
m_flIgniteTime = gpGlobals->time;
SetThink( FollowThink );
SetThink( &CNukeRocket::FollowThink );
pev->nextthink = gpGlobals->time + 0.1;
}

4
dlls/coldice/ppk.cpp

@ -188,7 +188,7 @@ void CWalterppk::SecondaryAttack( void ) @@ -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 ) @@ -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 );

6
dlls/coldice/pulse_rifle.cpp

@ -51,8 +51,8 @@ void CBlasterBeam::Spawn( ) @@ -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 ) @@ -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" ) )

4
dlls/coldice/railgun.cpp

@ -216,11 +216,11 @@ void CRailgun::UpdateTrail() @@ -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;

10
dlls/coldice/rocketl.cpp

@ -129,7 +129,7 @@ void CLaserSpot::Suspend( float flSuspendTime ) @@ -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 @@ -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 ) @@ -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 ) @@ -274,7 +274,7 @@ void CRpgRocket :: IgniteThink( void )
m_flIgniteTime = gpGlobals->time;
SetThink( FollowThink );
SetThink( &CRpgRocket::FollowThink );
pev->nextthink = gpGlobals->time + 0.1;
}

8
dlls/coldice/runes.cpp

@ -77,8 +77,8 @@ void CBaseRune::Spawn( ) @@ -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( ) @@ -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( ) @@ -331,7 +331,7 @@ void CWorldRunes::SpawnRunes( )
}
m_iNextRespawn++;
SetThink( SpawnRunes );
SetThink( &CWorldRunes::SpawnRunes );
if ( m_iNextRespawn < 2 )
pev->nextthink = gpGlobals->time + 75.0;

4
dlls/coldice/sword.cpp

@ -167,7 +167,7 @@ void CSword::PrimaryAttack() @@ -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 ) @@ -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;

2
dlls/coldice/tnt.cpp

@ -104,7 +104,7 @@ void CKamikaze::Holster( ) @@ -104,7 +104,7 @@ void CKamikaze::Holster( )
if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
{
m_pPlayer->pev->weapons &= ~(1<<WEAPON_TNT);
SetThink( DestroyItem );
SetThink( &CKamikaze::DestroyItem );
pev->nextthink = gpGlobals->time + 0.1;
}

1
dlls/gamerules.h

@ -304,7 +304,6 @@ public: @@ -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 );

13
dlls/ggrenade.cpp

@ -492,10 +492,10 @@ CGrenade *CGrenade::ShootCluster( entvars_t *pevOwner, Vector vecStart, Vector v @@ -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 @@ -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 )
@ -568,8 +568,9 @@ void CGrenade::ClusterTumbleThink( void ) @@ -568,8 +568,9 @@ void CGrenade::ClusterTumbleThink( void )
if( pev->dmgtime <= gpGlobals->time )
{
SetThink( ClusterLaunch);
SetThink( &CGrenade::ClusterLaunch );
}
if( pev->waterlevel != 0 )
{
pev->velocity = pev->velocity * 0.5;
@ -622,7 +623,7 @@ void CGrenade::ClusterLaunch( void ) @@ -622,7 +623,7 @@ void CGrenade::ClusterLaunch( void )
pev->dmg = 60;
SetThink( ClusterDetonate );
SetThink( &CGrenade::ClusterDetonate );
pev->nextthink = gpGlobals->time + 1.2;
}

159
dlls/multiplay_gamerules.cpp

@ -125,6 +125,81 @@ BOOL CHalfLifeMultiplay::ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) @@ -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 ) @@ -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 )

5
dlls/player.cpp

@ -4598,10 +4598,9 @@ void CHook::Spawn() @@ -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 ) @@ -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;

4
dlls/weapons.cpp

@ -1611,7 +1611,7 @@ void CBasePlayerWeapon::PrintState( void ) @@ -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[] = @@ -1669,4 +1669,4 @@ TYPEDESCRIPTION CSatchel::m_SaveData[] =
DEFINE_FIELD( CSatchel, m_chargeReady, FIELD_INTEGER ),
};
IMPLEMENT_SAVERESTORE( CSatchel, CBasePlayerWeapon )
IMPLEMENT_SAVERESTORE( CSatchel, CBasePlayerWeapon )*/

13
dlls/weapons.h

@ -492,7 +492,7 @@ public: @@ -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: @@ -523,7 +523,7 @@ private:
unsigned short m_usFireGlock1;
unsigned short m_usFireGlock2;
};
*/
class CCrowbar : public CBasePlayerWeapon
{
public:
@ -534,6 +534,7 @@ 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: @@ -552,7 +553,7 @@ public:
private:
unsigned short m_usCrowbar;
};
/*
class CPython : public CBasePlayerWeapon
{
public:
@ -964,7 +965,7 @@ public: @@ -964,7 +965,7 @@ public:
#endif
}
};
*/
class CTripmine : public CBasePlayerWeapon
{
public:
@ -996,7 +997,7 @@ public: @@ -996,7 +997,7 @@ public:
private:
unsigned short m_usTripFire;
};
/*
class CSqueak : public CBasePlayerWeapon
{
public:
@ -1023,5 +1024,5 @@ public: @@ -1023,5 +1024,5 @@ public:
private:
unsigned short m_usSnarkFire;
};
};*/
#endif // WEAPONS_H

Loading…
Cancel
Save