Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- freeslot("MT_PUNCH", "S_KNUXPUNCH1")
- mobjinfo[MT_PUNCH] = {
- spawnhealth = 1000
- spawnstate = S_KNUXPUNCH1,
- seestate = S_NULL,
- seesound = sfx_None,
- attacksound = sfx_None,
- painstate = S_NULL,
- painsound = sfx_None,
- meleestate = S_NULL,
- missilestate = S_NULL,
- deathstate = S_BPLD1,
- xdeathstate = S_NULL,
- deathsound = sfx_None,
- speed = 0,
- radius = 32*FRACUNIT,
- height = 32*FRACUNIT,
- mass = 100,
- damage = 1,
- activesound = sfx_None,
- flags = MF_NOBLOCKMAP|MF_MISSILE|MF_NOGRAVITY
- raisestate = S_NULL
- }
- states[S_KNUXPUNCH1] = {
- sprite = SPR_BOM2,
- frame = FF_FULLBRIGHT|TR_TRANS40|A,
- tics = 1,
- action = A_MoveRelative,
- var1 = 0,
- var2 = 5,
- nextstate = S_BPLD1
- }
- addHook("ThinkFrame", function()
- for player in players.iterate do
- if player.mo.skin ~= "knuckles" then
- continue
- end
- if not (player.cmd.buttons & BT_ATTACK) or weapondelay < 0 or player.mo.health ~= 1 then
- player.punchready = true
- player.punching = false
- elseif player.punchready then
- player.punching = true
- player.punchready = false
- else
- player.punching = false
- end
- if player.punching then
- player.spawnedpunch = P_SpawnMobj(player.mo.x+FixedMul(40*FRACUNIT, cos(player.mo.angle)),
- player.mo.y+FixedMul(40*FRACUNIT, sin(player.mo.angle)), player.mo.z, MT_PUNCH)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment