Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LeftGame Fix
#1
I'm not sure if this has been posted yet but it seems to be a small bug with the vanilla MSE1.

Basically what happens is when more than one person is online, on the same map, and someone logs off or gets booted, the map stops processing npc movement.

So, server side, find this:

Code:
Sub LeftGame(ByVal Index As Long)
Dim n As Long

    If Player(Index).InGame = True Then
        Player(Index).InGame = False
        
        ' Check if player was the only player on the map and stop npc processing if so
        If GetTotalMapPlayers(GetPlayerMap(Index)) = 1 Then
            PlayersOnMap(GetPlayerMap(Index)) = NO
        End If

and change it to this:

Code:
Sub LeftGame(ByVal Index As Long)
Dim n As Long

    If Player(Index).InGame = True Then
        Player(Index).InGame = False
        
        ' Check if player was the only player on the map and stop npc processing if so
        If GetTotalMapPlayers(GetPlayerMap(Index)) < 1 Then
            PlayersOnMap(GetPlayerMap(Index)) = NO
        End If

In the first block of code, the server stops processing npc movement if there is only 1 person on the map. Obviously, we want to keep processing them for that 1 person. All I've done here is changed the = to a < so that if there is less than one person on the map it stops processing movement. Some people may have noticed this, however I couldn't find anything on it and this stumped me for about 5 minutes.

More info here: viewtopic.php?f=7&t=1867
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)