MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / MultiAddObjTurretUpdate

Function MultiAddObjTurretUpdate

Descent3/multi.cpp:7063–7089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7061}
7062
7063void MultiAddObjTurretUpdate(int objnum) {
7064
7065 MULTI_ASSERT_NOMESSAGE(Netgame.local_role == LR_SERVER);
7066 ASSERT(Objects[objnum].flags & OF_CLIENT_KNOWS);
7067
7068 for (int i = 0; i < MAX_NET_PLAYERS; i++) {
7069 if (i == Player_num)
7070 continue;
7071 bool skip_this_obj = false;
7072 if ((NetPlayers[i].flags & NPF_CONNECTED) && (NetPlayers[i].sequence == NETSEQ_PLAYING)) {
7073 skip_this_obj = false;
7074 // Check to see if this robot is on the list already
7075 for (int b = 0; b < Num_changed_turret[i]; b++) {
7076 if (Changed_turret[b][i] == Objects[objnum].handle) {
7077 skip_this_obj = true;
7078 break;
7079 }
7080 }
7081 if (skip_this_obj == false) {
7082 if (Num_changed_turret[i] < MAX_CHANGED_OBJECTS) {
7083 Changed_turret[Num_changed_turret[i]][i] = Objects[objnum].handle;
7084 Num_changed_turret[i]++;
7085 }
7086 }
7087 }
7088 }
7089}
7090
7091int MultiStuffTurretUpdate(uint16_t objnum, uint8_t *data) {
7092 int count = 0;

Callers 1

ai_fireFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected