MCPcopy Create free account
hub / github.com/demoth/jake2 / GetChaseTarget

Method GetChaseTarget

game/src/main/java/jake2/game/GameChase.java:175–189  ·  view source on GitHub ↗
(SubgameEntity ent, GameExportsImpl gameExports)

Source from the content-addressed store, hash-verified

173 }
174
175 static void GetChaseTarget(SubgameEntity ent, GameExportsImpl gameExports) {
176
177 for (int i = 1; i <= gameExports.game.maxclients; i++) {
178 SubgameEntity other = gameExports.g_edicts[i];
179 gclient_t otherClient = other.getClient();
180 if (other.inuse && !otherClient.resp.spectator) {
181 gclient_t client = ent.getClient();
182 client.chase_target = other;
183 client.update_chase = true;
184 UpdateChaseCam(ent, gameExports);
185 return;
186 }
187 }
188 gameExports.gameImports.centerprintf(ent, "No other players to chase.");
189 }
190}

Callers 1

ClientThinkMethod · 0.95

Calls 3

getClientMethod · 0.95
UpdateChaseCamMethod · 0.95
centerprintfMethod · 0.65

Tested by

no test coverage detected