Skip to content

Commit

Permalink
Make laptp and pizzatime tp go to floorz
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiskster committed Aug 22, 2024
1 parent dd6917e commit e0a0705
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/Lua/PlayerScripts/player_laptp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/Lua/PlayerScripts/pmo_pizzatimetrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand All @@ -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

Expand Down

0 comments on commit e0a0705

Please sign in to comment.