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

Function serverSpawnMiscParticlesAtLocation

src/net.cpp:873–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

871-------------------------------------------------------------------------------*/
872
873void serverSpawnMiscParticlesAtLocation(Sint16 x, Sint16 y, Sint16 z, int particleType,
874 int particleSprite, Uint32 duration, Uint32 optionalData, Uint32 optionalUID)
875{
876 int c;
877 if ( multiplayer != SERVER )
878 {
879 return;
880 }
881 for ( c = 1; c < MAXPLAYERS; c++ )
882 {
883 if ( client_disconnected[c] || players[c]->isLocalPlayer() )
884 {
885 continue;
886 }
887 strcpy((char*)net_packet->data, "SPPL");
888 SDLNet_Write16(x, &net_packet->data[4]);
889 SDLNet_Write16(y, &net_packet->data[6]);
890 SDLNet_Write16(z, &net_packet->data[8]);
891 net_packet->data[10] = particleType;
892 SDLNet_Write16(particleSprite, &net_packet->data[11]);
893 SDLNet_Write32(duration, &net_packet->data[13]);
894 SDLNet_Write32(optionalData, &net_packet->data[17]);
895 SDLNet_Write32(optionalUID, &net_packet->data[21]);
896 net_packet->len = 25;
897 net_packet->address.host = net_clients[c - 1].host;
898 net_packet->address.port = net_clients[c - 1].port;
899 sendPacketSafe(net_sock, -1, net_packet, c - 1);
900 }
901}
902
903/*-------------------------------------------------------------------------------
904

Callers 15

devilSummonMonsterMethod · 0.85
earthElementalDieFunction · 0.85
duckDieFunction · 0.85
spawnMiscPuddleFunction · 0.85
actThrownFunction · 0.85
bombDoEffectFunction · 0.85
lichIceSummonMonsterMethod · 0.85
lichFireSummonMonsterMethod · 0.85
attackMethod · 0.85
castSpellFunction · 0.85

Calls 2

sendPacketSafeFunction · 0.85
isLocalPlayerMethod · 0.80

Tested by

no test coverage detected