MCPcopy Create free account
hub / github.com/TurningWheel/Barony / serverUpdateEntityFSkill

Function serverUpdateEntityFSkill

src/net.cpp:806–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

804-------------------------------------------------------------------------------*/
805
806void serverUpdateEntityFSkill(Entity* entity, int fskill)
807{
808 int c;
809 if ( multiplayer != SERVER )
810 {
811 return;
812 }
813 for ( c = 1; c < MAXPLAYERS; c++ )
814 {
815 if ( client_disconnected[c] || players[c]->isLocalPlayer() )
816 {
817 continue;
818 }
819 strcpy((char*)net_packet->data, "ENFS");
820 SDLNet_Write32(entity->getUID(), &net_packet->data[4]);
821 net_packet->data[8] = fskill;
822 SDLNet_Write16(static_cast<Sint16>(entity->fskill[fskill] * 256), &net_packet->data[9]);
823 net_packet->address.host = net_clients[c - 1].host;
824 net_packet->address.port = net_clients[c - 1].port;
825 net_packet->len = 11;
826 sendPacketSafe(net_sock, -1, net_packet, c - 1);
827 }
828}
829
830/*-------------------------------------------------------------------------------
831

Callers 9

actPlayerFunction · 0.85
actArrowFunction · 0.85
actColliderMushroomCapFunction · 0.85
attackMethod · 0.85
castSpellFunction · 0.85
actMagicMissileFunction · 0.85
actParticleTimerFunction · 0.85
actParticleFloorMagicFunction · 0.85
actParticleWaveFunction · 0.85

Calls 3

sendPacketSafeFunction · 0.85
isLocalPlayerMethod · 0.80
getUIDMethod · 0.80

Tested by

no test coverage detected