MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / FindPlayer

Method FindPlayer

engine/Poseidon/AI/ArcadeTemplateFind.cpp:72–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72ArcadeUnitInfo* ArcadeTemplate::FindPlayer()
73{
74 int i, n = groups.Size();
75 for (i = 0; i < n; i++)
76 {
77 ArcadeGroupInfo& gInfo = groups[i];
78
79 int j, m = gInfo.units.Size();
80 for (j = 0; j < m; j++)
81 {
82 ArcadeUnitInfo& uInfo = gInfo.units[j];
83 switch (uInfo.player)
84 {
85 case APPlayerCommander:
86 case APPlayerDriver:
87 case APPlayerGunner:
88 return &uInfo;
89 }
90 }
91 }
92
93 return nullptr;
94}
95
96ArcadeGroupInfo* ArcadeTemplate::FindPlayerGroup()
97{

Callers 9

InitVehiclesMethod · 0.80
ParseCutsceneFunction · 0.80
CenterMethod · 0.80
OnKeyDownMethod · 0.80
OnLButtonDblClickMethod · 0.80
DisplayArcadeMapMethod · 0.80
GetPositionMethod · 0.80
OnComboSelChangedMethod · 0.80
OnChildDestroyedMethod · 0.80

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected