mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
fixed some players being invisible if they join while other players are joining
This commit is contained in:
parent
aa39b77156
commit
26516699c7
2 changed files with 3 additions and 3 deletions
|
|
@ -215,8 +215,8 @@ class EntityAPI{
|
|||
|
||||
public function spawnToAll(Entity $e){
|
||||
foreach($this->server->api->player->getAll($e->level) as $player){
|
||||
if($player->eid != false and $player->eid != $e->eid and $e->class != ENTITY_PLAYER and $e instanceof Entity){
|
||||
if($e->closed !== false or ($player->level !== $e->level and $e->class !== ENTITY_PLAYER)){
|
||||
if($player->spawned && $player->eid != false && $player->eid != $e->eid && $e->class != ENTITY_PLAYER && $e instanceof Entity){
|
||||
if($e->closed !== false || ($player->level !== $e->level && $e->class !== ENTITY_PLAYER)){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ class PlayerAPI{
|
|||
|
||||
public function spawnToAllPlayers(Player $player){
|
||||
foreach($this->getAll() as $p){
|
||||
if($p !== $player and ($p->entity instanceof Entity) and ($player->entity instanceof Entity)){
|
||||
if($p->spawned && $p !== $player && ($p->entity instanceof Entity) && ($player->entity instanceof Entity)){
|
||||
$player->entity->spawn($p);
|
||||
if($p->level !== $player->level){
|
||||
$pk = new MoveEntityPacket_PosRot;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue