Introduction

If you slip into a block or a resource the player will not stop.

You do not slide in the direction chosen in the editor.

Server~Side

modPlayer

Find by:


' Slide

	 If .Type = TILE_TYPE_SLIDE Then

		 ForcePlayerMove Index, MOVING_WALKING, GetPlayerDir(Index)

		 Moved = YES

	 End If

Replace with:


' Slide

	 If .Type = TILE_TYPE_SLIDE Then

		 Select Case .Data1

			 Case DIR_UP

				 If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Type = TILE_TYPE_RESOURCE Or Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Type = TILE_TYPE_BLOCKED Then Exit Sub

			 Case DIR_LEFT

				 If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index) - 1, GetPlayerY(Index)).Type = TILE_TYPE_RESOURCE Or Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index) - 1, GetPlayerY(Index)).Type = TILE_TYPE_BLOCKED Then Exit Sub

			 Case DIR_DOWN

				 If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) + 1).Type = TILE_TYPE_RESOURCE Or Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) + 1).Type = TILE_TYPE_BLOCKED Then Exit Sub

			 Case DIR_RIGHT

				 If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index) + 1, GetPlayerY(Index)).Type = TILE_TYPE_RESOURCE Or Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index) + 1, GetPlayerY(Index)).Type = TILE_TYPE_BLOCKED Then Exit Sub

		 End Select

		 ForcePlayerMove Index, MOVING_WALKING, .Data1

		 Moved = YES

	 End If

Credits

  • iRicardo
  • ValentineBr