Difference between revisions of "Dynamite Sapper"
(Creating stub article) |
m (Better functionality snippet) |
||
Line 30: | Line 30: | ||
#endif<!--End--> | #endif<!--End--> | ||
− | <!--Begin--> #ifdef STAGING_ONLY | + | <!--Begin-->#ifdef STAGING_ONLY |
− | if ( | + | CTFPlayer *pBuilder = GetBuilder(); |
+ | if ( pBuilder && pParent->GetHealth() < 0 ) | ||
{ | { | ||
− | + | // Attr on Det | |
− | + | float flExplodeOnTimer = 0; | |
− | if ( | + | CALL_ATTRIB_HOOK_FLOAT_ON_OTHER( pBuilder, flExplodeOnTimer, sapper_explodes_on_det ); |
+ | |||
+ | if ( flExplodeOnTimer ) | ||
{ | { | ||
− | + | float flDamage = pParent->GetMaxHealth() * 1.5; | |
− | + | Vector vecOrigin = GetAbsOrigin(); | |
− | |||
− | |||
− | + | // Use the building as the det position | |
− | + | CTakeDamageInfo detInfo; | |
+ | detInfo.SetDamage( flDamage ); | ||
+ | detInfo.SetAttacker( this ); | ||
+ | detInfo.SetInflictor( this ); | ||
+ | detInfo.SetDamageType( DMG_BLAST ); | ||
− | + | // Generate Large Radius Damage | |
− | + | float flRadius = 200.0f; | |
− | + | CTFRadiusDamageInfo radiusinfo( &detInfo, vecOrigin, flRadius, NULL, flRadius ); | |
− | + | TFGameRules()->RadiusDamage( radiusinfo ); | |
− | |||
− | |||
− | + | DispatchParticleEffect( "explosionTrail_seeds_mvm", vecOrigin, GetAbsAngles() ); | |
− | + | } | |
− | + | } | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
#endif<!--End--> | #endif<!--End--> | ||
{{Unused Content Nav}} | {{Unused Content Nav}} |
Revision as of 03:37, 25 April 2020
“Ok guys, bad news: we lost that last one.” This article documents experimental content for Team Fortress 2. It may contain speculation, broken links or errors. |
“You are so small! Is funny to me!” This article is a stub. As such, it is not complete. You can help Team Fortress Wiki by expanding it. |
The Dynamite Sapper is a scrapped Spy sapper, referenced in code in some places.
#ifdef STAGING_ONLY PrecacheScriptSound( "WeaponDynamiteSapper.TickTock" ); PrecacheScriptSound( "WeaponDynamiteSapper.BellRing" ); #endif
#ifdef STAGING_ONLY // // Attr on Det float flExplodeOnTimer = 0; CALL_ATTRIB_HOOK_FLOAT_ON_OTHER( GetBuilder(), flExplodeOnTimer, sapper_explodes_on_det ); if ( flExplodeOnTimer ) { EmitSound( "Weapon_Sapper.Timer" ); return "WeaponDynamiteSapper.TickTock"; } #endif
#ifdef STAGING_ONLY CTFPlayer *pBuilder = GetBuilder(); if ( pBuilder && pParent->GetHealth() < 0 ) { // Attr on Det float flExplodeOnTimer = 0; CALL_ATTRIB_HOOK_FLOAT_ON_OTHER( pBuilder, flExplodeOnTimer, sapper_explodes_on_det ); if ( flExplodeOnTimer ) { float flDamage = pParent->GetMaxHealth() * 1.5; Vector vecOrigin = GetAbsOrigin(); // Use the building as the det position CTakeDamageInfo detInfo; detInfo.SetDamage( flDamage ); detInfo.SetAttacker( this ); detInfo.SetInflictor( this ); detInfo.SetDamageType( DMG_BLAST ); // Generate Large Radius Damage float flRadius = 200.0f; CTFRadiusDamageInfo radiusinfo( &detInfo, vecOrigin, flRadius, NULL, flRadius ); TFGameRules()->RadiusDamage( radiusinfo ); DispatchParticleEffect( "explosionTrail_seeds_mvm", vecOrigin, GetAbsAngles() ); } } #endif
|