mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Make players check inventory modification properly
This commit is contained in:
parent
8b3135a643
commit
e9c9b66ae9
6 changed files with 39 additions and 9 deletions
|
@ -5039,13 +5039,16 @@ PlayerSAO* Server::emergePlayer(const char *name, u16 peer_id)
|
|||
if (!player) {
|
||||
newplayer = true;
|
||||
player = new RemotePlayer(this, name);
|
||||
/* Set player position */
|
||||
// Set player position
|
||||
infostream<<"Server: Finding spawn place for player \""
|
||||
<<name<<"\""<<std::endl;
|
||||
v3f pos = findSpawnPos(m_env->getServerMap());
|
||||
player->setPosition(pos);
|
||||
|
||||
/* Add player to environment */
|
||||
// Make sure the player is saved
|
||||
player->setModified(true);
|
||||
|
||||
// Add player to environment
|
||||
m_env->addPlayer(player);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue