Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Suppress drowning music
- addHook("ThinkFrame", do
- --if not (mapheaderinfo[gamemap] and mapheaderinfo[gamemap].nodrown) then return end -- Uncomment out this line to only make this happen on maps with LUA.nodrown = yes in their level header (disclaimer: I didn't test this particular line)
- for p in players.iterate do
- if p.powers[pw_underwater] == 11*TICRATE+2 then
- p.powers[pw_underwater] = 11*TICRATE
- local height
- if p.mo.eflags & MFE_VERTICALFLIP then
- height = p.mo.z - FixedMul(8*FRACUNIT - mobjinfo[MT_DROWNNUMBERS].height, p.mo.scale)
- else
- height = p.mo.z + p.mo.height + (8*p.mo.scale)
- end
- local numbermobj = P_SpawnMobj(p.mo.x, p.mo.y, height, MT_DROWNNUMBERS)
- numbermobj.state = numbermobj.info.spawnstate+5
- numbermobj.target = p.mo
- numbermobj.threshold = 40
- S_StartSound(p.mo, sfx_dwnind)
- numbermobj.scale = p.mo.scale
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement