Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- freeslot("MT_GLUB")
- states[MT_GLUB] = {MT_REDRING, 0, 4, nil, 0, 0}
- addHook("ThinkFrame", do
- for player in players.iterate
- if player.mo and player.mo.skin == "chaos"
- if not (player.mo.firenormaldown)
- player.mo.firenormaldown = 0
- end
- if (player.cmd.buttons & BT_FIRENORMAL)
- and not (player.pflags & PF_NIGHTSMODE) //no shooting when NiGHTS Super Sonic!
- and not (player.pflags & PF_ROPEHANG) //rope hangs use spin for letting go
- and not (player.pflags & PF_MACESPIN) //control chains use spin for shifting angle I think?
- and not (player.pflags & PF_TAGGED) //no shooting when tagged
- and not (player.pflags & PF_STASIS) //no shooting when in stasis in tag mode either
- and not (player.mo.tracer and player.mo.tracer.type == MT_TUBEWAYPOINT)
- and player.mo.firenormaldown == 0
- player.mo.firenormaldown = 1
- local an = player.mo.angle
- local slope = player.aiming
- S_StartSound(player.mo, sfx_cannon)
- local th = P_SpawnMobj(player.mo.x + (1*cos(an)), player.mo.y + (1*sin(an)), player.mo.z+6*FRACUNIT, MT_REDRING)
- //Missile copies player's scale
- th.scale = player.mo.scale
- // missiles can't hurt their targets, note
- th.target = player.mo
- //Determine speed
- local speed = 70*FRACUNIT
- if player.mo.eflags & MFE_VERTICALFLIP then
- th.flags2 = $1|MF2_OBJECTFLIP // flip gravity!
- th.z = $1 - th.height - player.mo.height/3
- end
- th.angle = an
- th.momx = FixedMul(speed, cos(an))
- th.momy = FixedMul(speed, sin(an))
- th.momx = FixedMul(th.momx, cos(slope))
- th.momy = FixedMul(th.momy, cos(slope))
- th.momz = FixedMul(speed, sin(slope))
- end
- if not (player.cmd.buttons & BT_FIRENORMAL)
- player.mo.firenormaldown = 0
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment