From f3d596f5d84bd5fb24b85032412ee33779430efa Mon Sep 17 00:00:00 2001 From: Gelmo Date: Fri, 1 Mar 2024 16:22:42 -0700 Subject: [PATCH 1/2] Add support for boost pads in maps --- .../progs/gametypes/legacy/quake1.as | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/assets/data0_21pure/progs/gametypes/legacy/quake1.as b/assets/data0_21pure/progs/gametypes/legacy/quake1.as index 97b337dd04..8a6b4233d7 100644 --- a/assets/data0_21pure/progs/gametypes/legacy/quake1.as +++ b/assets/data0_21pure/progs/gametypes/legacy/quake1.as @@ -377,3 +377,42 @@ void ambient_swamp2( Entity @ent ) AmbientSound( ent, "sound/ambience/swamp2.wav" ); } +// Boost pads from futsball +void target_boost( Entity @boost ) +{ + @boost.use = WF_Boost_Use; + boost.linkEntity(); +} + +// Boost pads from futsball +void WF_Boost_Use( Entity @ent, Entity @other, Entity @activator ) +{ + /*G_Print("other = " + other.classname + "\n"); + G_Print("activator = " + activator.classname + "\n");*/ + if ( @activator.client == null ) + return; + + Vec3 mins, maxs; + other.getSize( mins, maxs ); + + Vec3 origin = other.origin + ( mins + maxs ) * 0.5; + + G_PositionedSound( origin, CHAN_AUTO, G_SoundIndex("sounds/world/launchpad.wav"), 1.0 ); + + Vec3 fwd, right, up; + ent.angles.angleVectors( fwd, right, up ); + + @activator.groundEntity = null; + + Vec3 vel = activator.velocity; + /*vel = fwd * 2000; + vel.z = 300;*/ + + float len = vel.length(); + len += 1000; + vel.normalize(); + vel *= len; + + activator.velocity = vel; +} + From 6ddd8f78522cca94fc49c2323d7c58e178deffec Mon Sep 17 00:00:00 2001 From: Gelmo Date: Fri, 1 Mar 2024 16:25:11 -0700 Subject: [PATCH 2/2] Improved support for unofficial maps in Rekt --- assets/data0_21pure/progs/gametypes/rekt.gt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/data0_21pure/progs/gametypes/rekt.gt b/assets/data0_21pure/progs/gametypes/rekt.gt index 5c77c07d1e..d1c11994a2 100644 --- a/assets/data0_21pure/progs/gametypes/rekt.gt +++ b/assets/data0_21pure/progs/gametypes/rekt.gt @@ -9,3 +9,5 @@ generic/bots.as; generic/awards.as; rekt.as; + +legacy/quake1.as;