Difference between revisions of "Dynamite Sapper/zh-hans"

From Team Fortress Wiki
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:Dynamite Sapper}} {{beta|experimental}} {{stub}} {{Item infobox | name = | type = weapon | unused = yes | image = Unknownw...")
 
Line 14: Line 14:
  
 
'''Dynamite Sapper''' 是间谍已被废弃的电子工兵武器,通过查阅部分代码可知。该武器与其他电子工兵大致相同,但会在被引爆时,对范围内的敌人造成大量伤害。
 
'''Dynamite Sapper''' 是间谍已被废弃的电子工兵武器,通过查阅部分代码可知。该武器与其他电子工兵大致相同,但会在被引爆时,对范围内的敌人造成大量伤害。
 
<!--Begin-->#ifdef STAGING_ONLY
 
  PrecacheScriptSound( "WeaponDynamiteSapper.TickTock" );
 
  PrecacheScriptSound( "WeaponDynamiteSapper.BellRing" );
 
#endif<!--End-->
 
 
<!--Begin-->#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<!--End-->
 
 
<!--Begin-->#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<!--End-->
 
  
 
{{Unused Content Nav}}
 
{{Unused Content Nav}}

Revision as of 13:14, 22 July 2021

Warning: Display title "爆破工兵" overrides earlier display title "Dynamite Sapper".

Dynamite Sapper 是间谍已被废弃的电子工兵武器,通过查阅部分代码可知。该武器与其他电子工兵大致相同,但会在被引爆时,对范围内的敌人造成大量伤害。