I don't know these things are bugs or features.
So, I write them here.
There are 2 simple functions.
So, I write them here.
There are 2 simple functions.
Quote:addEventHandler("onPlayerJoin", root, function(playerId)
outputDebugString("onPlayerJoin Start")
spawnPlayer(playerId, 12.0, 24.0, 2.0, 90)
outputDebugString("onPlayerJoin End")
end)
addCommandHandler("default", function(playerId, commandName)
spawnPlayer(playerId, 12.0, 24.0, 2.0, 90)
end)
- If a player join to the server, the player should be spawned on that position. ( x= 12.0, y = 24.0, z = 2.0)
But it doesn't work. I have seen the 2 debug logs, but the player are still on the default position, where we start the game.
- If you the /default command, it is fine.
But I see similar messages in the server log:
Quote:[security] movement snapshot held player=2 violation=4 score=0.00 horizontal=4313.8/240.0 vertical=399.1/400.0 authorityGrace=1TRAFFIC_GUARD acceptedConnections=2 rejectedConnections=0 droppedPackets=4 disconnectedPeers=1 blockedAddresses=0 invalidPackets=0 oversizedPackets=0 trackedAddresses=1
- If I spawn the player another places like in the Gomez's castle, the game is loading and I get a new player id. (x= 1116.75, y = -1007.51, z = -36.66)
And I see similar messages in the server log:
Quote:[security] movement snapshot held player=1 violation=4 score=0.00 horizontal=43267.8/240.0 vertical=6120.6/400.0 authorityGrace=1
CONNECT_PENDING player=2 address=xxx.xxx.xxx.xxx peer=0000020538CEE540
- If I use setPlayerPosition instead of spawnPlayer, I get the same results.
