Plugin work
This commit is contained in:
parent
257fb07e94
commit
149555fb02
@ -107,11 +107,17 @@ func (m *Match) MatchJoin(ctx context.Context, logger runtime.Logger, db *sql.DB
|
||||
player, loadPlayerErr := entities.LoadPlayer(ctx, nk, precense)
|
||||
if loadPlayerErr != nil {
|
||||
logger.Error(loadPlayerErr.Error())
|
||||
player.X = 16
|
||||
player.Y = 16
|
||||
} else {
|
||||
player = entities.PlayerEntity{
|
||||
X: 16,
|
||||
Y: 16,
|
||||
Name: "ERROR",
|
||||
Presence: precense,
|
||||
}
|
||||
}
|
||||
|
||||
player.X = 16
|
||||
player.Y = 16
|
||||
|
||||
if jsonObj, err := player.GetPosJSON(); err != nil {
|
||||
logger.Error(err.Error())
|
||||
} else {
|
||||
|
@ -80,6 +80,8 @@ func LoadPlayer(ctx context.Context, nk runtime.NakamaModule, presence runtime.P
|
||||
}
|
||||
player.Name = responseData.Name
|
||||
player.Faction = gameworld.Faction(responseData.Faction)
|
||||
player.X = 16.0
|
||||
player.Y = 16.0
|
||||
}
|
||||
}
|
||||
return player, nil
|
||||
|
Reference in New Issue
Block a user