addHook("PlayerThink",function(player) // GRAVITY CHANGES if not (player.mo.flags & MF_NOGRAVITY) and not (player.mo.flags & MF_NOTHINK) and not P_PlayerInPain(player) and abs(player.mo.momz) --and not P_IsObjectOnGround(player.mo) player.mo.momz = $+FixedMul(P_GetMobjGravity(player.mo), 3*FRACUNIT/4) -- current grav + 0.75 = 1 -- -- -- 9/20 = 0.45 end if player.jumpfactor == skins[player.mo.skin].jumpfactor player.jumpfactor = FixedMul($, 3*FRACUNIT / 2) -- current jump * 1.5 end --this whole spring thing has been relocated --if (player.mo.eflags & MFE_SPRUNG) -- vertical boost has been relocated --player.mo.momz = $*67/50 -- current spring * 1.34 -- horizontal boost has been relocated -- player.mo.momx = $*13/10 -- 1.3 -- player.mo.momy = $*13/10 -- 1.3 --end if (player.prevCarry and player.prevCarry == CR_MACESPIN) then player.mo.momz = FixedMul($, 27*FRACUNIT / 20) -- current mace * 1.35 player.mo.momx = FixedMul($, 11*FRACUNIT / 4) -- 2.75 player.mo.momy = FixedMul($, 11*FRACUNIT / 4) -- 2.75 --print("MACESPIN boost") end player.prevCarry = player.powers[pw_carry] if (player.prevCarry and player.prevCarry == CR_DUSTDEVIL) then player.mo.momz = FixedMul($, 7*FRACUNIT / 5)-- current dustdevil * 1.4 --print("DUSTDEVIL boost") end /*if player.powers[pw_carry] == CR_MACESPIN then if player.powers[pw_carry] ~= CR_MACESPIN then player.mo.momz = $*23/20 -- current mace * 1.15 --print("work") end end*/ /*if player.powers[pw_carry] and prevCarry == CR_MACESPIN then player.mo.momz = $*23/10 --print("i should work 2") end*/ //airwalk dumb /*if not(P_IsObjectOnGround(player.mo)) and (player.mo.state == S_PLAY_WALK or player.mo.state == S_PLAY_RUN) and not player.powers[pw_carry] then player.mo.state = S_PLAY_FALL end*/ // ROLL JUMP LOCK REMOVAL if (player.pflags & PF_JUMPED) and (player.pflags & PF_SPINNING) player.pflags = $&~PF_SPINNING --print("ROLL JUMP LOCK REMOVAL") end // FIX SPINNING SUCKING if (player.pflags & PF_SPINNING) and not P_IsObjectOnGround(player.mo) player.pflags = $|PF_JUMPED --print("FIX SPINNING SUCKING") end // FIX HALFPIPES if (player.pflags & PF_SPINNING) and (player.pflags & PF_THOKKED) and not P_IsObjectOnGround(player.mo) player.pflags = $&~PF_THOKKED --print("FIX HALFPIPES") end // FIX DSZ2 if (player.mo.state == S_PLAY_ROLL) and player.powers[pw_justlaunched] --and (FixedHypot(player.rmomx, player.rmomy) >= 20*FRACUNIT) player.powers[pw_strong] = STR_ANIM|STR_WALL player.mo.momz = FixedMul($, 11*FRACUNIT / 10) -- current launch * 1.1 --print("FIX DSZ2") end // ACCELERATION CHANGES -- working on this lol /*if player.acceleration == skins[player.mo.skin].acceleration and not player.powers[pw_sneakers] and not player.powers[pw_super] player.acceleration = 30 -- current acceleration end if player.acceleration == skins[player.mo.skin].acceleration and player.powers[pw_sneakers] or player.powers[pw_super] player.acceleration = 60 -- current acceleration end*/ -- yeah its not working // MOMENTUM PRESERVATION /*if FixedHypot(player.rmomx, player.rmomy) > 36*FU player.normalspeed = FixedHypot(player.rmomx, player.rmomy)*FRACUNIT end if FixedHypot(player.rmomx, player.rmomy) < 36*FU player.normalspeed = 36*FRACUNIT end*/ /*if FixedHypot(player.rmomx, player.rmomy) > player.normalspeed*FU player.normalspeed = ($+1)*FU end if FixedHypot(player.rmomx, player.rmomy) < player.normalspeed*FU and FixedHypot(player.rmomx, player.rmomy) > 36*FU player.normalspeed = ($-1)*FU end if FixedHypot(player.rmomx, player.rmomy) < 36*FU player.normalspeed = 36*FU end*/ end) -- wall breaking --hopefully wall check /*local function CheckAndCrumble(mo, sec) for fof in sec.ffloors() if not (fof.flags & FF_EXISTS) continue end -- Does it exist? if not (fof.flags & FF_BUSTUP) continue end -- Is it bustable? if (fof.flags & FF_STRONGBUST) then continue end --is it too tough for us? if mo.z + mo.height < fof.bottomheight continue end -- Are we too low? if mo.z > fof.topheight continue end -- Are we too high? -- Check for whatever else you may want to EV_CrumbleChain(fof) -- Crumble end end addHook("MobjLineCollide", function(mo, line) if not mo.player return end for _, sec in ipairs({line.frontsector, line.backsector}) if (FixedHypot(player.rmomx, player.rmomy) >= 30*FRACUNIT) and player.mo.state == (S_PLAY_ROLL) CheckAndCrumble(mo, sec) end end end, MT_PLAYER) addHook("PlayerThink", function(player) for player in players.iterate() if not player.mo return end if (FixedHypot(player.rmomx, player.rmomy) >= 30*FRACUNIT) and player.mo.state == (S_PLAY_ROLL) CheckAndCrumble(player.mo, player.mo.subsector.sector) end end end)*/ -- spring check -- code by maril <3 addHook("MobjMoveCollide", function(mo, spring) if not (mo and mo.valid) then return end if not mo.health then return end if not (spring and spring.valid) then return end if mo.z + mo.height < spring.z or spring.z + spring.height < mo.z then return end if not (spring.flags & MF_SPRING) then return end if spring.type ~= MT_YELLOWSPRING and spring.type ~= MT_REDSPRING and spring.type ~= MT_BLUESPRING then mo.player.horizboost = true --print("spring check [not a vertical spring]") end if spring.type ~= MT_YELLOWHORIZ and spring.type ~= MT_REDHORIZ and spring.type ~= MT_BLUEHORIZ then mo.player.vertiboost = true --print("spring check [not a horizontal spring]") end end, MT_PLAYER) -- uses Fixed Multiplayer now --spring check 2 [checks if its NOT a spring] --also thanks amperbee <3 addHook("MobjMoveCollide", function(mo, spring) if not (mo and mo.valid) then return end if not mo.health then return end --if (spring and spring.valid) then return end --if mo.z + mo.height < spring.z or spring.z + spring.height < mo.z then return end if not (spring.flags & MF_SPRING) mo.player.vertiboost = true --print("spring check 2 [checks if its NOT a spring]") end end, MT_PLAYER) addHook("ThinkFrame", do for player in players.iterate do if (player.mo.eflags & MFE_SPRUNG) and player.horizboost then player.mo.momx = FixedMul($, 13*FRACUNIT / 10) -- 1.3 player.mo.momy = FixedMul($, 13*FRACUNIT / 10) -- 1.3 --print("horizontal boost") player.horizboost = false end if (player.mo.eflags & MFE_SPRUNG) and player.vertiboost then player.mo.momz = FixedMul($, 27*FRACUNIT / 20) -- 1.35 --print("vertical boost") player.vertiboost = false end end end)