home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 56 / CDPowerplay56Disc2.iso / demos / blade / data1.cab / Program_Executable_Files / Lib / Sparks.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2000-10-27  |  21.1 KB  |  460 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 1.5)
  3.  
  4. import Bladex
  5. import B3DLib
  6. import Reference
  7. import netgame
  8. import Damage
  9. import Water
  10. import whrandom
  11. import Breakings
  12. import Blood
  13.  
  14. def ThrowSparks(hit_entity, hitting_entity, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, wcx, wcy, wcz, wdx, wdy, wdz):
  15.     obj = Bladex.GetEntity(hitting_entity)
  16.     
  17.     try:
  18.         if obj and obj.Data.NoFXOnHit:
  19.             return None
  20.     except:
  21.         pass
  22.  
  23.     mod = B3DLib.Modulo(ximpulse, yimpulse, zimpulse)
  24.     if mod < 5000.0:
  25.         return None
  26.     
  27.     sparkdir = B3DLib.Normalize((-ximpulse, -yimpulse, -zimpulse))
  28.     chispa = Bladex.CreateSpark('Chispa', xhit_point, yhit_point, zhit_point, sparkdir[0], sparkdir[1], sparkdir[2], 0.5, 3000, 2000, 0, 100, 160, 120, 40, 30, 24, 0, 800, 10.0 / 60.0, 1.0 / 60.0, 1)
  29.  
  30.  
  31. def ThrowMetalSparks(hit_entity, hitting_entity, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, wcx, wcy, wcz, wdx, wdy, wdz):
  32.     obj = Bladex.GetEntity(hitting_entity)
  33.     
  34.     try:
  35.         if obj and obj.Data.NoFXOnHit:
  36.             return None
  37.     except:
  38.         pass
  39.  
  40.     mod = B3DLib.Modulo(ximpulse, yimpulse, zimpulse)
  41.     if mod < 5000.0:
  42.         return None
  43.     
  44.     sparkdir = B3DLib.Normalize((-ximpulse, -yimpulse, -zimpulse))
  45.     chispa = Bladex.CreateSpark('Chispa', xhit_point, yhit_point, zhit_point, sparkdir[0], sparkdir[1], sparkdir[2], 0.5, 3000, 2000, 0, 100, 160, 120, 40, 30, 24, 0, 800, 10.0 / 60.0, 1.0 / 60.0, 1)
  46.     on_hit_info = Reference.MaterialOnHitInfo['Metal']
  47.     sound = on_hit_info[0]
  48.     if sound:
  49.         sound.Stop()
  50.         sound.Play(xhit_point, yhit_point, zhit_point, 0)
  51.     
  52.  
  53.  
  54. def ThrowDustAndSparks(hit_entity, hitting_entity, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, wcx, wcy, wcz, wdx, wdy, wdz):
  55.     obj = Bladex.GetEntity(hitting_entity)
  56.     
  57.     try:
  58.         if obj and obj.Data.NoFXOnHit:
  59.             return None
  60.     except:
  61.         pass
  62.  
  63.     mod = B3DLib.Modulo(ximpulse, yimpulse, zimpulse)
  64.     if mod < 5000.0:
  65.         return None
  66.     
  67.     sparkdir = B3DLib.Normalize((-ximpulse, -yimpulse, -zimpulse))
  68.     chispa = Bladex.CreateSpark('Chispa', xhit_point, yhit_point, zhit_point, sparkdir[0], sparkdir[1], sparkdir[2], 0.5, 3000, 2000, 0, 100, 160, 120, 40, 30, 24, 0, 800, 10.0 / 60.0, 1.0 / 60.0, 1)
  69.     polvillo = Bladex.CreateEntity('PolvoGolpe', 'Entity Particle System D1', xhit_point, yhit_point, zhit_point)
  70.     polvillo.ParticleType = 'MediumDust'
  71.     polvillo.YGravity = 200
  72.     polvillo.Friction = 0.2
  73.     polvillo.PPS = 200
  74.     polvillo.DeathTime = Bladex.GetTime() + 2.0 / 60.0
  75.     polvillo.Velocity = (sparkdir[0] * 500, sparkdir[1] * 500, sparkdir[2] * 500)
  76.     polvillo.RandomVelocity = 40.0
  77.     polvillo.RandomVelocity_V = 1.0
  78.  
  79.  
  80. def ThrowWoodenSparks(hit_entity, hitting_entity, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, wcx, wcy, wcz, wdx, wdy, wdz):
  81.     obj = Bladex.GetEntity(hitting_entity)
  82.     
  83.     try:
  84.         if obj and obj.Data.NoFXOnHit:
  85.             return None
  86.     except:
  87.         pass
  88.  
  89.     mod = B3DLib.Modulo(ximpulse, yimpulse, zimpulse)
  90.     if mod < 5000.0:
  91.         return None
  92.     
  93.     sparkdir = B3DLib.Normalize((-ximpulse, -yimpulse, -zimpulse))
  94.     spark = Bladex.CreateSpark('Wood', xhit_point, yhit_point, zhit_point, sparkdir[0], sparkdir[1], sparkdir[2], 0.75, 2000, 60, 0, 80, 75, 46, 21, 6, 3, 2, 900, 15.0 / 60.0, 1.0 / 60.0, 0)
  95.     spark.RasterMode = 'BlendingAlpha'
  96.     polvillo = Bladex.CreateEntity('PolvoGolpe', 'Entity Particle System D1', xhit_point, yhit_point, zhit_point)
  97.     polvillo.ParticleType = 'MediumDust'
  98.     polvillo.YGravity = 200
  99.     polvillo.Friction = 0.2
  100.     polvillo.PPS = 250
  101.     polvillo.DeathTime = Bladex.GetTime() + 2.0 / 60.0
  102.     polvillo.Velocity = (sparkdir[0] * 500, sparkdir[1] * 500, sparkdir[2] * 500)
  103.     polvillo.RandomVelocity = 40.0
  104.     polvillo.RandomVelocity_V = 1.0
  105.     on_hit_info = Reference.MaterialOnHitInfo['MaderaTablas']
  106.     sound = on_hit_info[0]
  107.     if sound:
  108.         sound.Stop()
  109.         sound.Play(xhit_point, yhit_point, zhit_point, 0)
  110.     
  111.  
  112.  
  113. def SetSparkling(obj_name):
  114.     obj = Bladex.GetEntity(obj_name)
  115.     if obj.HitFunc:
  116.         print 'Este objeto ya es rompible o chispeante.'
  117.         return None
  118.     
  119.     obj.Static = 0
  120.     obj.HitFunc = ThrowSparks
  121.     return obj
  122.  
  123.  
  124. def SetDustySparkling(obj_name):
  125.     obj = Bladex.GetEntity(obj_name)
  126.     if obj.HitFunc:
  127.         print 'Este objeto ya es rompible o chispeante.'
  128.         return None
  129.     
  130.     obj.Static = 0
  131.     obj.HitFunc = ThrowDustAndSparks
  132.     return obj
  133.  
  134.  
  135. def SetWoodenSparkling(obj_name):
  136.     obj = Bladex.GetEntity(obj_name)
  137.     if obj.HitFunc:
  138.         print 'Este objeto ya es chispeante.'
  139.         return None
  140.     
  141.     obj.Static = 0
  142.     obj.HitFunc = ThrowWoodenSparks
  143.     return obj
  144.  
  145.  
  146. def SetMetalSparkling(obj_name):
  147.     obj = Bladex.GetEntity(obj_name)
  148.     if obj.HitFunc:
  149.         print 'Este objeto ya es rompible o chispeante.'
  150.         return None
  151.     
  152.     obj.Static = 0
  153.     obj.HitFunc = ThrowMetalSparks
  154.     return obj
  155.  
  156. import pdb
  157.  
  158. def ThrowSparksShield(hit_entity, hitting_entity, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, DamageType):
  159.     hitting_ent = Bladex.GetEntity(hitting_entity)
  160.     hitting_ent.MessageEvent(Reference.MESSAGE_STOP_WEAPON, 0, 0)
  161.     skip_sparks = 0
  162.     
  163.     try:
  164.         if hitting_ent.Data.NoFXOnHit:
  165.             skip_sparks = 1
  166.     except:
  167.         pass
  168.  
  169.     if not skip_sparks:
  170.         sparkdir = B3DLib.Normalize((-ximpulse, -yimpulse, -zimpulse))
  171.         chispa = Bladex.CreateSpark('Chispa', xhit_point, yhit_point, zhit_point, sparkdir[0], sparkdir[1], sparkdir[2], 0.5, 3000, 2000, 0, 100, 160, 120, 40, 30, 24, 0, 800, 10.0 / 60.0, 1.0 / 60.0, 1)
  172.     
  173.     hit_ent = Bladex.GetEntity(hit_entity)
  174.     datos_esc = Reference.DefaultObjectData[hit_ent.Kind]
  175.     if datos_esc[0] == Reference.OBJ_SHIELD:
  176.         Reference.DefaultObjectData[hit_ent.Kind][3].Play(xhit_point, yhit_point, zhit_point, 0)
  177.     elif datos_esc[0] == Reference.OBJ_WEAPON:
  178.         if Reference.GiveWeaponFlag(hit_entity) != Reference.W_FLAG_1H:
  179.             Reference.DefaultObjectData[hit_ent.Kind][5][6].Play(xhit_point, yhit_point, zhit_point, 0)
  180.         
  181.     
  182.     VictimName = hit_ent.Parent
  183.     AttackerName = hitting_ent.Parent
  184.     pj = Bladex.GetEntity(VictimName)
  185.     if hitting_ent.Arrow and hitting_ent.Parent:
  186.         pdb.set_trace()
  187.     
  188.     pj.DamageFunc(VictimName, AttackerName, hitting_entity, DamageType, 0, -1, xhit_point, yhit_point, zhit_point, 1)
  189.     if netgame.GetNetState() == 1:
  190.         netgame.CallEventSound(hit_entity, 4)
  191.     
  192.     if hitting_ent.Arrow and not (hitting_ent.Parent):
  193.         hitting_ent.Stop()
  194.         impact = hitting_ent.GraspPos('Impact')
  195.         centre = hitting_ent.Position
  196.         impact2centre = (centre[0] - impact[0], centre[1] - impact[1], centre[2] - impact[2])
  197.         abs_pos = (xhit_point + impact2centre[0], yhit_point + impact2centre[1], zhit_point + impact2centre[2])
  198.         rel_pos = hit_ent.Abs2RelPoint(abs_pos[0], abs_pos[1], abs_pos[2])
  199.         hitting_ent.Position = (rel_pos[0] * 0.8, rel_pos[1], rel_pos[2] * 0.8)
  200.         hit_ent.Link(hitting_ent)
  201.         sticktime = 1.0 / hitting_ent.Mass
  202.         Bladex.AddScheduledFunc(Bladex.GetTime() + sticktime, Damage.StuckWeaponFall, (hitting_ent.Name, hit_ent.Name), hitting_ent.Name + '_StuckWeaponFall')
  203.         if hitting_ent.StickFunc:
  204.             hitting_ent.StickFunc(hitting_entity, hit_entity)
  205.         
  206.     
  207.  
  208.  
  209. def SetShieldArea(obj_name, cone, height, radius):
  210.     esc = Bladex.GetEntity(obj_name)
  211.     if not (esc.Weapon):
  212.         esc.Static = 1
  213.     
  214.     esc.Weapon = 1
  215.     esc.Cone = cone
  216.     esc.Height = height
  217.     esc.Radius = radius
  218.     esc.HitShieldFunc = ThrowSparksShield
  219.     return esc
  220.  
  221.  
  222. def MakeShield(obj_name):
  223.     esc = Bladex.GetEntity(obj_name)
  224.     if not (esc.Weapon):
  225.         esc.Static = 1
  226.     
  227.     esc.Weapon = 1
  228.     datos_esc = Reference.DefaultObjectData[esc.Kind]
  229.     if datos_esc[0] == Reference.OBJ_SHIELD:
  230.         esc.Cone = datos_esc[4]
  231.         esc.Height = datos_esc[5]
  232.         esc.Radius = datos_esc[6]
  233.         if datos_esc[7]:
  234.             Breakings.SetBreakableWS(obj_name)
  235.         
  236.     else:
  237.         esc.Cone = 3.1416
  238.         esc.Height = 2000
  239.         esc.Radius = 750
  240.         if datos_esc[0] == Reference.OBJ_STANDARD or datos_esc[0] == Reference.OBJ_WEAPON:
  241.             if Reference.GiveWeaponFlag(obj_name) != Reference.W_FLAG_1H:
  242.                 esc.Cone = datos_esc[5][1]
  243.                 esc.Height = datos_esc[5][2]
  244.                 esc.Radius = datos_esc[5][3]
  245.                 if datos_esc[5][5]:
  246.                     Breakings.SetBreakableWS(obj_name)
  247.                 
  248.             else:
  249.                 print 'MakeShield. Unexpected weapon FLAG'
  250.         else:
  251.             print 'MakeShield. Unexpected type of object'
  252.     esc.HitShieldFunc = ThrowSparksShield
  253.     return esc
  254.  
  255. stones_active = 0
  256. max_stones_active = 4
  257.  
  258. def RemoveStone(obj_name):
  259.     global stones_active
  260.     Piedra = Bladex.GetEntity(obj_name)
  261.     if Piedra:
  262.         Piedra.SubscribeToList('Pin')
  263.         stones_active = stones_active - 1
  264.     
  265.  
  266.  
  267. def DropStone(x, y, z, dx = 1, dy = 1, dz = 1, Pname = 'Piedra_01'):
  268.     global stones_active
  269.     if stones_active < max_stones_active:
  270.         Piedra = Bladex.CreateEntity('Piedrita', Pname, x, y, z, 'Physic')
  271.         Piedra.Scale = 0.075 + whrandom.random() * 0.13
  272.         mod = B3DLib.Modulo(dx, dy, dz)
  273.         dx = dx / mod + whrandom.random() * 0.4 - whrandom.random() * 0.4
  274.         dy = dy / mod + whrandom.random() * 0.4 - whrandom.random() * 0.4
  275.         dz = dz / mod + whrandom.random() * 0.4 - whrandom.random() * 0.4
  276.         (dx, dy, dz) = B3DLib.Scale((dx, dy, dz), mod)
  277.         Piedra.ExclusionGroup = 1
  278.         Piedra.ImpulseC(x + (whrandom.random() * 200.0 - 100.0), y + whrandom.random() * -100.0, z + (whrandom.random() * 200.0 - 100.0), dx, dy, dz)
  279.         Piedra.OnStopFunc = RemoveStone
  280.         stones_active = stones_active + 1
  281.         return Piedra
  282.     else:
  283.         return None
  284.  
  285.  
  286. def SectorThrowSparks(sector_index, entity_name, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, x_norm, y_norm, z_norm, material):
  287.     D = B3DLib.Normalize((ximpulse, yimpulse, zimpulse))
  288.     TWO_NdotD = 2.0 * (D[0] * x_norm + D[1] * y_norm + D[2] * z_norm)
  289.     sparkdir = (D[0] - x_norm * TWO_NdotD, D[1] - y_norm * TWO_NdotD, D[2] - z_norm * TWO_NdotD)
  290.     spark = Bladex.CreateSpark('Chispa', xhit_point, yhit_point, zhit_point, sparkdir[0], sparkdir[1], sparkdir[2], 0.5, 3000, 2000, 0, 100, 160, 120, 40, 30, 24, 0, 800, 10.0 / 60.0, 1.0 / 60.0, 1)
  291.     polvillo = Bladex.CreateEntity('PolvoGolpe', 'Entity Particle System D1', xhit_point, yhit_point, zhit_point)
  292.     polvillo.ParticleType = 'MediumDust'
  293.     polvillo.YGravity = 200
  294.     polvillo.Friction = 0.2
  295.     polvillo.PPS = 200
  296.     polvillo.DeathTime = Bladex.GetTime() + 2.0 / 60.0
  297.     polvillo.Velocity = (sparkdir[0] * 500, sparkdir[1] * 500, sparkdir[2] * 500)
  298.     polvillo.RandomVelocity = 40.0
  299.     polvillo.RandomVelocity_V = 1.0
  300.     nstones = whrandom.randint(0, max_stones_active)
  301.     stone_startx = xhit_point + x_norm * 200.0
  302.     stone_starty = yhit_point + y_norm * 200.0
  303.     stone_startz = zhit_point + z_norm * 200.0
  304.     stone_impx = x_norm * 2000
  305.     stone_impy = y_norm * 2000
  306.     stone_impz = z_norm * 2000
  307.     for i in range(nstones):
  308.         DropStone(stone_startx, stone_starty, stone_startz, stone_impx, stone_impy, stone_impz)
  309.     
  310.  
  311.  
  312. def SectorThrowSnow(sector_index, entity_name, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, x_norm, y_norm, z_norm, material):
  313.     D = B3DLib.Normalize((ximpulse, yimpulse, zimpulse))
  314.     TWO_NdotD = 2.0 * (D[0] * x_norm + D[1] * y_norm + D[2] * z_norm)
  315.     sparkdir = (D[0] - x_norm * TWO_NdotD, D[1] - y_norm * TWO_NdotD, D[2] - z_norm * TWO_NdotD)
  316.     spark = Bladex.CreateSpark('Snow', xhit_point, yhit_point, zhit_point, sparkdir[0], sparkdir[1], sparkdir[2], 0.8, 400, 100, 10, 20, 200, 200, 200, 56, 56, 56, 600, 90.0 / 60.0, 1.0 / 60.0, 0)
  317.     spark.RasterMode = 'BlendingAlpha'
  318.     tierra1 = Bladex.CreateEntity('SnowDust', 'Entity Particle System D1', xhit_point, yhit_point, zhit_point)
  319.     tierra1.ParticleType = 'SnowDust'
  320.     tierra1.YGravity = 200.0
  321.     tierra1.Friction = 0.15
  322.     tierra1.PPS = 200
  323.     tierra1.Time2Live = 64
  324.     tierra1.Velocity = (sparkdir[0] * 2000.0, sparkdir[1] * 2000.0, sparkdir[2] * 2000.0)
  325.     tierra1.RandomVelocity = 10.0
  326.     tierra1.DeathTime = Bladex.GetTime() + 0.05
  327.  
  328.  
  329. def SectorThrowWood(sector_index, entity_name, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, x_norm, y_norm, z_norm, material):
  330.     D = B3DLib.Normalize((ximpulse, yimpulse, zimpulse))
  331.     TWO_NdotD = 2.0 * (D[0] * x_norm + D[1] * y_norm + D[2] * z_norm)
  332.     sparkdir = (D[0] - x_norm * TWO_NdotD, D[1] - y_norm * TWO_NdotD, D[2] - z_norm * TWO_NdotD)
  333.     spark = Bladex.CreateSpark('Wood', xhit_point, yhit_point, zhit_point, sparkdir[0], sparkdir[1], sparkdir[2], 0.75, 2000, 60, 0, 80, 75, 46, 21, 6, 3, 2, 900, 15.0 / 60.0, 1.0 / 60.0, 0)
  334.     spark.RasterMode = 'BlendingAlpha'
  335.     polvillo = Bladex.CreateEntity('PolvoGolpe', 'Entity Particle System D1', xhit_point, yhit_point, zhit_point)
  336.     polvillo.ParticleType = 'MediumDust'
  337.     polvillo.YGravity = 200
  338.     polvillo.Friction = 0.2
  339.     polvillo.PPS = 250
  340.     polvillo.DeathTime = Bladex.GetTime() + 2.0 / 60.0
  341.     polvillo.Velocity = (sparkdir[0] * 500, sparkdir[1] * 500, sparkdir[2] * 500)
  342.     polvillo.RandomVelocity = 40.0
  343.     polvillo.RandomVelocity_V = 1.0
  344.  
  345.  
  346. def SectorThrowWater(sector_index, entity_name, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, x_norm, y_norm, z_norm, material):
  347.     D = B3DLib.Normalize((ximpulse, yimpulse, zimpulse))
  348.     TWO_NdotD = 2.0 * (D[0] * x_norm + D[1] * y_norm + D[2] * z_norm)
  349.     reflectdir = (D[0] - x_norm * TWO_NdotD, D[1] - y_norm * TWO_NdotD, D[2] - z_norm * TWO_NdotD)
  350.     Aguita1 = Bladex.CreateEntity('Cristales', 'Entity Particle System D1', xhit_point, yhit_point, zhit_point)
  351.     Aguita1.ParticleType = 'Splash'
  352.     Aguita1.PPS = 1024
  353.     Aguita1.YGravity = 2500.0
  354.     Aguita1.Friction = 0
  355.     Aguita1.Velocity = (reflectdir[0] * 2500.0, reflectdir[1] * 2500.0, reflectdir[2] * 2500.0)
  356.     Aguita1.RandomVelocity = 15.0
  357.     Aguita1.Time2Live = 32
  358.     Aguita1.DeathTime = Bladex.GetTime() + 0.1
  359.     Aguita1.Reflects = 0
  360.     Aguita2 = Bladex.CreateEntity('Cristales', 'Entity Particle System Dobj', 0, 0, 0)
  361.     Aguita2.ObjectName = entity_name
  362.     Aguita2.ParticleType = 'Splash'
  363.     Aguita2.PPS = 1024
  364.     Aguita2.YGravity = 4500.0
  365.     Aguita2.Friction = 0.1
  366.     Aguita2.RandomVelocity = 13.0
  367.     Aguita2.Time2Live = 64
  368.     Aguita2.DeathTime = Bladex.GetTime() + 0.2
  369.     Aguita2.Reflects = 0
  370.  
  371.  
  372. def GenericSectorOnHit(sector_index, entity_name, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, x_norm, y_norm, z_norm, material):
  373.     
  374.     try:
  375.         obj = Bladex.GetEntity(entity_name)
  376.         if obj.Data.NoFXOnHit:
  377.             return None
  378.     except:
  379.         pass
  380.  
  381.     if Reference.MaterialOnHitInfo.has_key(material):
  382.         on_hit_info = Reference.MaterialOnHitInfo[material]
  383.     else:
  384.         on_hit_info = Reference.MaterialOnHitInfo['default']
  385.     sound = on_hit_info[0]
  386.     func = on_hit_info[1]
  387.     if sound:
  388.         sound.Stop()
  389.         sound.Play(xhit_point, yhit_point, zhit_point, 0)
  390.     
  391.     if func:
  392.         func(sector_index, entity_name, xhit_point, yhit_point, zhit_point, ximpulse, yimpulse, zimpulse, x_norm, y_norm, z_norm, material)
  393.     
  394.  
  395.  
  396. def SetSectorOnHitFuncs():
  397.     GolpeGrava = Bladex.CreateSound('..\\..\\sounds\\golpe_grava.wav', 'GolpeGrava')
  398.     GolpeGrava.SetPitchVar(1, -8000, 8000, 0, 0)
  399.     GolpeNieve = Bladex.CreateSound('..\\..\\sounds\\golpe-nieve.wav', 'GolpeNieve')
  400.     GolpeNieve.SetPitchVar(1, -8000, 8000, 0, 0)
  401.     GolpeTierra = Bladex.CreateSound('..\\..\\sounds\\golpe_hierba.wav', 'GolpeTierra')
  402.     GolpeTierra.SetPitchVar(1, -8000, 8000, 0, 0)
  403.     GolpeAgua = Bladex.CreateSound('..\\..\\sounds\\golpe_agua.wav', 'GolpeAgua')
  404.     GolpeAgua.SetPitchVar(1, -8000, 8000, 0, 0)
  405.     GolpeHierba = Bladex.CreateSound('..\\..\\sounds\\golpe_hierba2.wav', 'GolpeHierba')
  406.     GolpeHierba.SetPitchVar(1, -8000, 8000, 0, 0)
  407.     GolpeMaderaTablas = Bladex.CreateSound('..\\..\\sounds\\golpe_maderamed.wav', 'GolpeMaderaTablas')
  408.     GolpeMaderaTablas.SetPitchVar(1, -8000, 8000, 0, 0)
  409.     GolpeMaderaTablas = Bladex.CreateSound('..\\..\\sounds\\golpe_maderamed.wav', 'GolpeMaderaTablas')
  410.     GolpeMaderaTablas.SetPitchVar(1, -8000, 8000, 0, 0)
  411.     GolpeMadera = Bladex.CreateSound('..\\..\\sounds\\M-GOLPESHEAVY4.wav', 'GolpeMadera')
  412.     GolpeMadera.SetPitchVar(1, -8000, 8000, 0, 0)
  413.     GolpeMetal = Bladex.CreateSound('..\\..\\sounds\\GOLPE-ARMADUR-1.wav', 'GolpeMetal')
  414.     GolpeMetal.SetPitchVar(1, -8000, 8000, 0, 0)
  415.     GolpeCristal = Bladex.CreateSound('..\\..\\sounds\\golpe-cristal-4.wav', 'GolpeCristal')
  416.     GolpeCristal.SetPitchVar(1, -8000, 8000, 0, 0)
  417.     Reference.MaterialOnHitInfo['default'] = [
  418.         GolpeGrava,
  419.         SectorThrowSparks]
  420.     Reference.MaterialOnHitInfo['Grava'] = [
  421.         GolpeGrava,
  422.         SectorThrowSparks]
  423.     Reference.MaterialOnHitInfo['Piedra'] = [
  424.         GolpeGrava,
  425.         SectorThrowSparks]
  426.     Reference.MaterialOnHitInfo['Nieve'] = [
  427.         GolpeNieve,
  428.         SectorThrowSnow]
  429.     Reference.MaterialOnHitInfo['Hierba'] = [
  430.         GolpeHierba,
  431.         None]
  432.     Reference.MaterialOnHitInfo['Tierra'] = [
  433.         GolpeTierra,
  434.         None]
  435.     Reference.MaterialOnHitInfo['Madera'] = [
  436.         GolpeMadera,
  437.         SectorThrowWood]
  438.     Reference.MaterialOnHitInfo['MaderaTablas'] = [
  439.         GolpeMaderaTablas,
  440.         SectorThrowWood]
  441.     Reference.MaterialOnHitInfo['Barro'] = [
  442.         None,
  443.         None]
  444.     Reference.MaterialOnHitInfo['Water'] = [
  445.         GolpeAgua,
  446.         SectorThrowWater]
  447.     Reference.MaterialOnHitInfo['Metal'] = [
  448.         GolpeMetal,
  449.         SectorThrowSparks]
  450.     Reference.MaterialOnHitInfo['Cristal'] = [
  451.         GolpeCristal,
  452.         None]
  453.     if netgame.GetNetState() == 0:
  454.         for i in range(Bladex.nSectors()):
  455.             sector = Bladex.GetSector(i)
  456.         
  457.     
  458.  
  459. SetSectorOnHitFuncs()
  460.