New API for assigning unique network ids to objects
This commit is contained in:
parent
4d1590ad82
commit
e37c19b5b4
11 changed files with 233 additions and 1 deletions
|
|
@ -62,6 +62,7 @@
|
|||
#include "fragglescript/t_script.h"
|
||||
#include "s_music.h"
|
||||
#include "model.h"
|
||||
#include "d_net.h"
|
||||
|
||||
EXTERN_CVAR(Bool, save_formatted)
|
||||
|
||||
|
|
@ -653,6 +654,15 @@ void FLevelLocals::SerializePlayers(FSerializer &arc, bool skipload)
|
|||
ReadMultiplePlayers(arc, numPlayers, numPlayersNow, skipload);
|
||||
}
|
||||
arc.EndArray();
|
||||
|
||||
if (!skipload)
|
||||
{
|
||||
for (unsigned int i = 0u; i < MAXPLAYERS; ++i)
|
||||
{
|
||||
if (PlayerInGame(i) && Players[i]->mo != nullptr)
|
||||
NetworkEntityManager::SetClientNetworkEntity(Players[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!skipload && numPlayersNow > numPlayers)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue