From e0a0705a19d7ee8eb173898904e356579fac6358 Mon Sep 17 00:00:00 2001 From: Blur Date: Wed, 21 Aug 2024 20:37:30 -0500 Subject: [PATCH] Make laptp and pizzatime tp go to floorz --- src/Lua/PlayerScripts/player_laptp.lua | 5 ++++- src/Lua/PlayerScripts/pmo_pizzatimetrigger.lua | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Lua/PlayerScripts/player_laptp.lua b/src/Lua/PlayerScripts/player_laptp.lua index d90e700..0a6ab48 100644 --- a/src/Lua/PlayerScripts/player_laptp.lua +++ b/src/Lua/PlayerScripts/player_laptp.lua @@ -2,7 +2,10 @@ PTSR.LapTP = function(player, invincibility) if not player and not player.mo and not player.mo.valid then return end -- safety player.ptsr.outofgame = 0 - P_SetOrigin(player.mo, PTSR.end_location.x,PTSR.end_location.y, PTSR.end_location.z) + + local floorz = P_FloorzAtPos(PTSR.end_location.x, PTSR.end_location.y, PTSR.end_location.z, player.mo.height) + P_SetOrigin(player.mo, PTSR.end_location.x,PTSR.end_location.y, floorz) + player.mo.angle = PTSR.end_location.angle - ANGLE_90 if invincibility then diff --git a/src/Lua/PlayerScripts/pmo_pizzatimetrigger.lua b/src/Lua/PlayerScripts/pmo_pizzatimetrigger.lua index f3810ab..ded7d34 100644 --- a/src/Lua/PlayerScripts/pmo_pizzatimetrigger.lua +++ b/src/Lua/PlayerScripts/pmo_pizzatimetrigger.lua @@ -120,7 +120,10 @@ PTSR.PizzaTimeTrigger = function(mobj) local pmo = player.mo if not (pmo and pmo.valid) then continue end player.ptsr.laps = 1 - P_SetOrigin(pmo, PTSR.end_location.x,PTSR.end_location.y, PTSR.end_location.z) + + local floorz = P_FloorzAtPos(PTSR.end_location.x, PTSR.end_location.y, PTSR.end_location.z, pmo.height) + P_SetOrigin(pmo, PTSR.end_location.x,PTSR.end_location.y, floorz) + pmo.angle = PTSR.end_location.angle - ANGLE_90 PTSR:AddComboTime(player, player.ptsr.combo_maxtime) -- give everyone combo time cause IM NICE! @@ -134,8 +137,6 @@ PTSR.PizzaTimeTrigger = function(mobj) player.powers[pw_invulnerability] = CV_PTSR.tpinv.value*TICRATE+20 --player.powers[pw_nocontrol] = 20 L_SpeedCap(player.mo, 0) - local thrust = FixedHypot(player.mo.momx, player.mo.momy)*2 - P_InstaThrust(player.mo, player.mo.angle, thrust) end end