summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHello TMW <hello@themanaworld.org>2024-12-08 17:30:11 +0000
committerLed Mitz <smoothshifter@tuta.io>2024-12-08 17:30:11 +0000
commit83afb367eb159050044585afea201416055d6eac (patch)
tree1c6f7180c28c01f659f205ace84199703d6606d5
parentcd262f7c6a7856289e7d6e3be3abacdb7b405378 (diff)
downloadserverdata-83afb367eb159050044585afea201416055d6eac.tar.gz
serverdata-83afb367eb159050044585afea201416055d6eac.tar.bz2
serverdata-83afb367eb159050044585afea201416055d6eac.tar.xz
serverdata-83afb367eb159050044585afea201416055d6eac.zip
2 small fixes to "teleports" thing
1) Fix check so sprite ID 325 (black ring) could be used. It was just some silly typo that prevented it. Corrected. 2) Attempt to take on visual bug where SC_SLOWMOVE effect icon could linger even after teleportation sequence completed. (harmless visual glitch - no real slowdown in effect)
-rw-r--r--world/map/npc/functions/teleport_manager.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/world/map/npc/functions/teleport_manager.txt b/world/map/npc/functions/teleport_manager.txt
index bb5441b6..529bd5e0 100644
--- a/world/map/npc/functions/teleport_manager.txt
+++ b/world/map/npc/functions/teleport_manager.txt
@@ -129,7 +129,7 @@ OnTouch:
if (.inactive) end; // If gate deactivated -> no interaction.
if ((.cookie) && (teleport_cookie != .cookie)) goto L_CantPass;
set teleport_cookie, 0; // Clear teleport cookie of player on teleport use.
- sc_start SC_SLOWMOVE, .fx_time+100, 100000; // Slow player temporarily to avoid movement VS warp DCs
+ sc_start SC_SLOWMOVE, .fx_time+200, 100000; // Slow player temporarily to avoid movement VS warp DCs
addtimer .fx_time, strnpcinfo(0)+"::OnTeleport"; // time before teleporting away
misceffect .fx; // Default .fx set in teleport_add, other code can override it.
end;
@@ -140,6 +140,12 @@ L_CantPass:
// Teleportation timer event (attached to player). Queued by OnTouch.
OnTeleport:
warp .dstmap$, .dst_x, .dst_y;
+ addtimer 3000, strnpcinfo(0)+"::OnWarpDone"; // Mostly to clean up SC icon
+ end;
+
+// Mostly used to remove slow icon that sticks in some cases.
+OnWarpDone:
+ sc_end SC_SLOWMOVE;
end;
// Invoked on timed teleport's NPC timer expired.
@@ -415,7 +421,7 @@ function|script|teleportadd_parseargs
if (@TIMEOUT > 0) set @TIMEOUT, (@TIMEOUT * 1000); // translate seconds -> ms to make more wieldy numbers
// NPC SPRITE configuration
if ((@NPCSPRITE != 424) && (@NPCSPRITE != 369) && (@NPCSPRITE != 368)
- && (NPCSPRITE != 325) && (@NPCSPRITE != 324)) set @NPCSPRITE, 424;
+ && (@NPCSPRITE != 325) && (@NPCSPRITE != 324)) set @NPCSPRITE, 424;
// All checks complete
return 1; // Everything OK