summary refs log tree commit diff stats
path: root/res/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'res/scripts')
-rw-r--r--res/scripts/common.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 8a9445b..2e6a7e2 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua
@@ -178,21 +178,15 @@ function ChangeMap(map, warp)
178 local playerId = getPlayerSprite() 178 local playerId = getPlayerSprite()
179 local playerSprite = getSprite(playerId) 179 local playerSprite = getSprite(playerId)
180 local direction = playerSprite.dir 180 local direction = playerSprite.dir
181 local oldState = playerSprite.characterState
182 181
183 playerSprite.controllable = false 182 playerSprite.controllable = false
184 FadeToBlack(150) 183 FadeToBlack(150)
185 loadMap(map, warp, direction) 184 loadMap(map)
186 185 character():transplantParty(playerId, getWarpPoint(warp), direction)
187 local newPlayerId = getPlayerSprite()
188 local newPlayerSprite = getSprite(newPlayerId)
189 if oldState == CharacterState.RUNNING then
190 character():startRunning(newPlayerId)
191 end
192 186
193 coroutine.yield() 187 coroutine.yield()
194 RemoveFadeout(150) 188 RemoveFadeout(150)
195 newPlayerSprite.controllable = true 189 playerSprite.controllable = true
196end 190end
197 191
198function CreateAnimatedSpriteAtPosition(alias, character, x, y, animName, direction, layer) 192function CreateAnimatedSpriteAtPosition(alias, character, x, y, animName, direction, layer)