MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getLocalPlayer

Function getLocalPlayer

src/clientbase/Roster.cpp:132–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130
131
132BaseLocalPlayer* getLocalPlayer(PlayerId id) {
133 LocalPlayer* myTank = LocalPlayer::getMyTank();
134 if (myTank->getId() == id) { return myTank; }
135#ifdef ROBOT
136 for (int i = 0; i < numRobots; i++) {
137 if (robots[i] && robots[i]->getId() == id) {
138 return robots[i];
139 }
140 }
141#endif
142 return NULL;
143}
144
145
146TeamColor PlayerIdToTeam(PlayerId id) {

Callers 4

handleShotEndFunction · 0.85
handleKilledMessageFunction · 0.85
gotBlowedUpFunction · 0.85
handleKilledMessageFunction · 0.85

Calls 1

getIdMethod · 0.80

Tested by

no test coverage detected