mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-09 03:24:52 +00:00
Merge df174c271c
into 0565403b15
This commit is contained in:
commit
6a5f589734
2 changed files with 21 additions and 16 deletions
|
@ -648,7 +648,6 @@ BEGIN_ENT_SCRIPTDESC( CTFPlayer, CBaseMultiplayerPlayer , "Team Fortress 2 Playe
|
|||
DEFINE_SCRIPTFUNC( AddCurrency, "Kaching! Give the player some cash for game modes with upgrades, ie. MvM" )
|
||||
DEFINE_SCRIPTFUNC( RemoveCurrency, "Take away money from a player for reasons such as ie. spending." )
|
||||
|
||||
DEFINE_SCRIPTFUNC( IgnitePlayer, "" )
|
||||
DEFINE_SCRIPTFUNC( SetCustomModel, "" )
|
||||
DEFINE_SCRIPTFUNC( SetCustomModelWithClassAnimations, "" )
|
||||
DEFINE_SCRIPTFUNC( SetCustomModelOffset, "" )
|
||||
|
@ -709,6 +708,7 @@ BEGIN_ENT_SCRIPTDESC( CTFPlayer, CBaseMultiplayerPlayer , "Team Fortress 2 Playe
|
|||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetCustomAttribute, "GetCustomAttribute", "Get a custom attribute float from the player" )
|
||||
|
||||
DEFINE_SCRIPTFUNC_WRAPPED( StunPlayer, "" )
|
||||
DEFINE_SCRIPTFUNC_WRAPPED( IgnitePlayer, "" )
|
||||
END_SCRIPTDESC();
|
||||
|
||||
|
||||
|
@ -20247,12 +20247,16 @@ static ConCommand sv_debug_stuck_particles( "sv_debug_stuck_particles", DebugPar
|
|||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Debug concommand to set the player on fire
|
||||
//-----------------------------------------------------------------------------
|
||||
void IgnitePlayer()
|
||||
void TestIgnitePlayer( const CCommand &args )
|
||||
{
|
||||
CTFPlayer *pPlayer = ToTFPlayer( ToTFPlayer( UTIL_PlayerByIndex( 1 ) ) );
|
||||
pPlayer->m_Shared.Burn( pPlayer, pPlayer->GetActiveTFWeapon() );
|
||||
CTFPlayer *pPlayer = ToTFPlayer( UTIL_GetCommandClient() );
|
||||
if ( !pPlayer )
|
||||
return;
|
||||
|
||||
float flBurningTime = args.ArgC() >= 2 ? atof(args[1]) : TF_BURNING_FLAME_LIFE;
|
||||
pPlayer->m_Shared.Burn( pPlayer, pPlayer->GetActiveTFWeapon(), flBurningTime );
|
||||
}
|
||||
static ConCommand cc_IgnitePlayer( "tf_ignite_player", IgnitePlayer, "Sets you on fire", FCVAR_CHEAT | FCVAR_DEVELOPMENTONLY );
|
||||
static ConCommand cc_IgnitePlayer( "tf_ignite_player", TestIgnitePlayer, "Sets you on fire", FCVAR_CHEAT | FCVAR_DEVELOPMENTONLY );
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
|
@ -20646,11 +20650,10 @@ void CTFPlayer::Internal_HandleMapEvent( inputdata_t &inputdata )
|
|||
BaseClass::Internal_HandleMapEvent( inputdata );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CTFPlayer::IgnitePlayer()
|
||||
void CTFPlayer::InputIgnitePlayer( inputdata_t &inputdata )
|
||||
{
|
||||
// doomsday uses this input for the exhaust area at end of round
|
||||
// (it should probably be changed to use trigger_ignite)
|
||||
if ( FStrEq( "sd_doomsday", STRING( gpGlobals->mapname ) ) )
|
||||
{
|
||||
CTFPlayer *pRecentDamager = TFGameRules()->GetRecentDamager( this, 0, 5.0 );
|
||||
|
@ -20660,12 +20663,7 @@ void CTFPlayer::IgnitePlayer()
|
|||
}
|
||||
}
|
||||
|
||||
m_Shared.Burn( this, NULL );
|
||||
}
|
||||
|
||||
void CTFPlayer::InputIgnitePlayer( inputdata_t &inputdata )
|
||||
{
|
||||
IgnitePlayer();
|
||||
m_Shared.Burn( this, NULL, inputdata.value.Float() > 0 ? inputdata.value.Float() : TF_BURNING_FLAME_LIFE );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -23074,3 +23072,10 @@ void CTFPlayer::ScriptStunPlayer( float flTime, float flReductionAmount, int iSt
|
|||
{
|
||||
m_Shared.StunPlayer( flTime, flReductionAmount, iStunFlags, ScriptToEntClass< CTFPlayer >( hAttacker ) );
|
||||
}
|
||||
|
||||
void CTFPlayer::ScriptIgnitePlayer( float flBurningTime, HSCRIPT hAttacker /* = NULL */, HSCRIPT hWeapon /* = NULL */ )
|
||||
{
|
||||
CTFPlayer *pAttacker = ScriptToEntClass< CTFPlayer >( hAttacker );
|
||||
CTFWeaponBase *pWeapon = ScriptToEntClass< CTFWeaponBase >( hWeapon );
|
||||
m_Shared.Burn( pAttacker ? pAttacker : this, pWeapon, flBurningTime );
|
||||
}
|
||||
|
|
|
@ -523,7 +523,6 @@ public:
|
|||
|
||||
void PlayerUse( void );
|
||||
|
||||
void IgnitePlayer();
|
||||
void SetCustomModel( const char *pszModel );
|
||||
void SetCustomModelWithClassAnimations( const char *pszModel );
|
||||
void SetCustomModelOffset( const Vector &offset );
|
||||
|
@ -823,6 +822,7 @@ public:
|
|||
bool ScriptIsBotOfType(int nType) const { return this->IsBotOfType(nType); }
|
||||
|
||||
void ScriptStunPlayer( float flTime, float flReductionAmount, int iStunFlags = TF_STUN_MOVEMENT, HSCRIPT hAttacker = NULL );
|
||||
void ScriptIgnitePlayer( float flBurningTime, HSCRIPT hAttacker = NULL, HSCRIPT hWeapon = NULL );
|
||||
|
||||
private:
|
||||
void GetReadyToTauntWithPartner( void );
|
||||
|
|
Loading…
Reference in a new issue