Remove redundant initialization in nanoSummonHandler().

This commit is contained in:
dongresource 2020-08-23 19:46:51 +02:00
parent 51a8cc8bdf
commit 756074cc62

View File

@ -93,14 +93,13 @@ void NanoManager::nanoSummonHandler(CNSocket* sock, CNPacketData* data) {
sNano nano = plr.plr.Nanos[nanoId];
// Send to other players
for (CNSocket *s : PlayerManager::players[sock].viewable) {
INITSTRUCT(sP_FE2CL_NANO_ACTIVE, pkt);
INITSTRUCT(sP_FE2CL_NANO_ACTIVE, pkt1);
pkt.iPC_ID = plr.plr.iID;
pkt.Nano = nano;
pkt1.iPC_ID = plr.plr.iID;
pkt1.Nano = nano;
s->sendPacket((void*)&pkt, P_FE2CL_NANO_ACTIVE, sizeof(sP_FE2CL_NANO_ACTIVE));
}
for (CNSocket *s : PlayerManager::players[sock].viewable)
s->sendPacket((void*)&pkt1, P_FE2CL_NANO_ACTIVE, sizeof(sP_FE2CL_NANO_ACTIVE));
// update player
plr.plr.nano = nanoId;