multiplayer entity troubleshooting

multiplayer entity troubleshooting

Hey coders,

At the EntityManager::handleNewMap function it looks like this is where the entities for get loaded and tracked for later rendering onscreen. The issue I ran into was if I introduced this code snip for (multiplayer mode),the program seg faults:

 for(int y = 0; y < eset->misc.net_pc_count; y++){

Entity *nete;
    nete->stats.pos = pc->stats.net_pc[y].pos;
    nete->stats.direction = pc->stats.net_pc[y].dir;
    entities.push_back(nete);

}

-----gdb bt----------

Entity::getRenderBounds (this=0x55555c5c5da0, cam=...) at /game/src/Entity.cpp:578
578       unsigned index = stats.layer_def[ff][i];
(gdb) bt
#0  0x00005555555d0b8c in Entity::getRenderBounds (
    this=0x55555c5c5da0, cam=...)
    at /throne/pro/stealthcavern/src/Entity.cpp:578
#1  0x00005555555e0507 in EntityManager::entityFocus (
    this=0x55555bc707b0, mouse=..., cam=..., alive_only=true)
    at /game/src/EntityManager.cpp:300
#2  0x000055555560f93d in GameStatePlay::checkEnemyFocus (
    this=0x555558ab6770)
    at /game/src/GameStatePlay.cpp:185
#3  0x0000555555612399 in GameStatePlay::logic (
    this=0x555558ab6770)
    at /game/src/GameStatePlay.cpp:625
#4  0x000055555562265f in GameSwitcher::logic (this=0x5555559d3c40)
    at /game/src/GameSwitcher.cpp:161
--------end bt---------

It looks like entityFocus is trying to determine the renderbounds,but the variable is going out of bound? I have reached brick wall on this logic. if anyone is able to overcome please elaborate.