frozenLake

Untitled

Jan 19th, 2017
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. freeslot("MT_PUNCH", "S_KNUXPUNCH1")
  2.  
  3. mobjinfo[MT_PUNCH] = {
  4. spawnhealth = 1000
  5. spawnstate = S_KNUXPUNCH1,
  6. seestate = S_NULL,
  7. seesound = sfx_None,
  8. attacksound = sfx_None,
  9. painstate = S_NULL,
  10. painsound = sfx_None,
  11. meleestate = S_NULL,
  12. missilestate = S_NULL,
  13. deathstate = S_BPLD1,
  14. xdeathstate = S_NULL,
  15. deathsound = sfx_None,
  16. speed = 0,
  17. radius = 32*FRACUNIT,
  18. height = 32*FRACUNIT,
  19. mass = 100,
  20. damage = 1,
  21. activesound = sfx_None,
  22. flags = MF_NOBLOCKMAP|MF_MISSILE|MF_NOGRAVITY
  23. raisestate = S_NULL
  24. }
  25.  
  26. states[S_KNUXPUNCH1] = {
  27. sprite = SPR_BOM2,
  28. frame = FF_FULLBRIGHT|TR_TRANS40|A,
  29. tics = 1,
  30. action = A_MoveRelative,
  31. var1 = 0,
  32. var2 = 5,
  33. nextstate = S_BPLD1
  34. }
  35.  
  36. addHook("ThinkFrame", function()
  37. for player in players.iterate do
  38. if player.mo.skin ~= "knuckles" then
  39. continue
  40. end
  41. if not (player.cmd.buttons & BT_ATTACK) or weapondelay < 0 or player.mo.health ~= 1 then
  42. player.punchready = true
  43. player.punching = false
  44. elseif player.punchready then
  45. player.punching = true
  46. player.punchready = false
  47. else
  48. player.punching = false
  49. end
  50. if player.punching then
  51. player.spawnedpunch = P_SpawnMobj(player.mo.x+FixedMul(40*FRACUNIT, cos(player.mo.angle)),
  52. player.mo.y+FixedMul(40*FRACUNIT, sin(player.mo.angle)), player.mo.z, MT_PUNCH)
  53. end
  54. end
  55. end)
Advertisement
Add Comment
Please, Sign In to add comment