Hello @bruhmoment21,
first of all: thank you for you nicely written CS2 SDK.
I am using it, to learn more about the Source2 world.
Back to my "issues":
To get all available entities, I first extended the CEntityIdentity class using this dump:
https://github.com/Rebirator/CS2/blob/main/Schemes%20Dump.txt#L436
Now it looks like this:
class CEntityIdentity {
public:
SCHEMA_FIELD(m_designerName, "CEntityIdentity", "m_designerName",
const char*);
SCHEMA_FIELD(m_name, "CEntityIdentity", "m_name",
const char*);
SCHEMA_FIELD(m_pPrev, "CEntityIdentity", "m_pPrev",
CEntityIdentity*);
SCHEMA_FIELD(m_pNext, "CEntityIdentity", "m_pNext",
CEntityIdentity*);
SCHEMA_FIELD(m_pPrevByClass, "CEntityIdentity", "m_pPrevByClass",
CEntityIdentity*);
SCHEMA_FIELD(m_pNextByClass, "CEntityIdentity", "m_pNextByClass",
CEntityIdentity*);
};
In esp::Render() we get a CCSPlayerController* (basically CBasePlayerController -> C_BaseEntity -> CEntityInstance -> CEntityIdentity*)
Adapting your bool C_BaseEntity::IsPlayerController(), we should be able to just cast the BaseEntity to CEntityIdentity* and be able to check all the pIdentity->m_designerName().
Due to the fact that there are more Entities than just the Player entities, we need to "break out" and get the full list of entities.
void C_BaseEntity::checkAllEntities() {
CEntityIdentity* pIdentity = m_pEntity();
int o = 0;
if (pIdentity) {
while (pIdentity->m_pPrev() != nullptr) {
pIdentity = pIdentity->m_pPrev();
}
while (pIdentity != nullptr) {
if (pIdentity->m_designerName()) //like C_BaseEntitiy::IsPlayerControlled()
{
LOG("%i %s\n", ++o, pIdentity->m_designerName());
}
pIdentity = pIdentity->m_pNext();
}
}
}
result is this list:
1 weapon_ak47
2 weapon_ak47
3 weapon_sg556
4 weapon_famas
5 weapon_galilar
6 weapon_scar20
7 weapon_p250
8 weapon_scar20
9 weapon_m4a1
10 weapon_p250
11 weapon_galilar
12 info_particle_system
13 weapon_m249
14 weapon_fiveseven
15 viewmodel_attachment_model
16 viewmodel_attachment_model
17 cs_player_controller
18 cs_player_controller
19 cs_player_controller
20 cs_player_controller
21 cs_player_controller
22 cs_player_controller
23 cs_player_controller
24 cs_player_controller
25 cs_player_controller
26 csgo_viewmodel
27 point_worldtext
28 post_processing_volume
29 point_camera
30 point_camera
31 point_camera
32 point_camera
33 point_camera
34 basemodelentity
35 basemodelentity
36 basemodelentity
37 basemodelentity
38 basemodelentity
39 basemodelentity
40 basemodelentity
41 basemodelentity
42 basemodelentity
43 basemodelentity
44 basemodelentity
45 basemodelentity
46 basemodelentity
47 basemodelentity
48 basemodelentity
49 basemodelentity
50 basemodelentity
51 basemodelentity
52 basemodelentity
53 basemodelentity
54 basemodelentity
55 basemodelentity
56 basemodelentity
57 basemodelentity
58 basemodelentity
59 basemodelentity
60 basemodelentity
61 basemodelentity
62 basemodelentity
63 basemodelentity
64 basemodelentity
65 basemodelentity
66 basemodelentity
67 basemodelentity
68 basemodelentity
69 basemodelentity
70 basemodelentity
71 basemodelentity
72 basemodelentity
73 basemodelentity
74 basemodelentity
75 basemodelentity
76 basemodelentity
77 weapon_knife
78 c_cs_observer_for_precache
79 c_cs_player_for_precache
80 weapon_knife
81 weapon_glock
82 c_cs_observer_for_precache
83 c_cs_player_for_precache
84 weapon_knife
85 weapon_glock
86 c_cs_observer_for_precache
87 c_cs_player_for_precache
88 weapon_knife
89 c_cs_observer_for_precache
90 c_cs_player_for_precache
91 weapon_knife
92 weapon_glock
93 c_cs_observer_for_precache
94 c_cs_player_for_precache
95 weapon_knife
96 weapon_hkp2000
97 c_cs_observer_for_precache
98 c_cs_player_for_precache
99 weapon_knife
100 weapon_glock
101 c_cs_observer_for_precache
102 c_cs_player_for_precache
103 weapon_knife
104 c_cs_observer_for_precache
105 c_cs_player_for_precache
106 weapon_knife
107 weapon_hkp2000
108 c_cs_observer_for_precache
109 c_cs_player_for_precache
110 weapon_knife
111 weapon_glock
112 map_preview_camera_path
113 point_camera_vertical_fov
114 csgo_previewplayer
115 light_environment
116 env_cubemap_box
117 env_combined_light_probe_volume
118 info_particle_system
119 info_particle_system
120 info_particle_system
121 point_camera
122 light_environment
123 point_camera
124 light_environment
125 point_camera
126 light_environment
127 point_camera
128 light_environment
129 terrorist_team_intro_camera
130 map_preview_camera_path_node
131 map_preview_camera_path_node
132 map_preview_camera_path_node
133 counterterrorist_team_intro_camera
134 map_preview_camera_path_node
135 map_preview_camera_path_node
136 map_preview_camera_path_node
137 end_of_match_lineup_start
138 end_of_match_lineup_end
139 end_of_match_camera
140 map_preview_camera_path_node
141 map_preview_camera_path_node
142 map_preview_camera_path_node
143 team_select_camera
144 map_preview_camera_path_node
145 map_preview_camera_path_node
146 env_combined_light_probe_volume
147 light_environment
148 path_particle_rope
149 path_particle_rope
150 path_particle_rope
151 path_particle_rope
152 path_particle_rope
153 path_particle_rope
154 path_particle_rope
155 path_particle_rope
156 path_particle_rope
157 path_particle_rope
158 path_particle_rope
159 path_particle_rope
160 path_particle_rope
161 path_particle_rope
162 path_particle_rope
163 path_particle_rope
164 path_particle_rope
165 path_particle_rope
166 path_particle_rope
167 path_particle_rope
168 path_particle_rope
169 path_particle_rope
170 path_particle_rope
171 path_particle_rope
172 path_particle_rope
173 path_particle_rope
174 path_particle_rope
175 path_particle_rope
176 path_particle_rope
177 path_particle_rope
178 path_particle_rope
179 path_particle_rope
180 path_particle_rope
181 path_particle_rope
182 path_particle_rope
183 path_particle_rope
184 path_particle_rope
185 path_particle_rope
186 path_particle_rope
187 path_particle_rope
188 path_particle_rope
189 path_particle_rope
190 path_particle_rope
191 path_particle_rope
192 path_particle_rope
193 path_particle_rope
194 path_particle_rope
195 path_particle_rope
196 path_particle_rope
197 path_particle_rope
198 path_particle_rope
199 path_particle_rope
200 path_particle_rope
201 path_particle_rope
202 path_particle_rope
203 path_particle_rope
204 path_particle_rope
205 path_particle_rope
206 path_particle_rope
207 path_particle_rope
208 env_combined_light_probe_volume
209 env_combined_light_probe_volume
210 env_combined_light_probe_volume
211 env_combined_light_probe_volume
212 env_combined_light_probe_volume
213 env_combined_light_probe_volume
214 env_combined_light_probe_volume
215 env_combined_light_probe_volume
216 env_combined_light_probe_volume
217 env_combined_light_probe_volume
218 env_combined_light_probe_volume
219 env_combined_light_probe_volume
220 env_combined_light_probe_volume
221 env_combined_light_probe_volume
222 env_combined_light_probe_volume
223 env_combined_light_probe_volume
224 env_combined_light_probe_volume
225 env_combined_light_probe_volume
226 env_combined_light_probe_volume
227 env_combined_light_probe_volume
228 env_combined_light_probe_volume
229 env_combined_light_probe_volume
230 env_combined_light_probe_volume
231 env_combined_light_probe_volume
232 env_combined_light_probe_volume
233 env_combined_light_probe_volume
234 env_combined_light_probe_volume
235 env_combined_light_probe_volume
236 env_combined_light_probe_volume
237 env_combined_light_probe_volume
238 env_combined_light_probe_volume
239 env_combined_light_probe_volume
240 env_combined_light_probe_volume
241 env_combined_light_probe_volume
242 env_combined_light_probe_volume
243 env_combined_light_probe_volume
244 env_combined_light_probe_volume
245 env_combined_light_probe_volume
246 env_combined_light_probe_volume
247 env_combined_light_probe_volume
248 env_combined_light_probe_volume
249 env_combined_light_probe_volume
250 env_combined_light_probe_volume
251 env_combined_light_probe_volume
252 path_particle_rope
253 path_particle_rope
254 path_particle_rope
255 path_particle_rope
256 path_particle_rope
257 path_particle_rope
258 path_particle_rope
259 path_particle_rope
260 path_particle_rope
261 path_particle_rope
262 path_particle_rope
263 path_particle_rope
264 path_particle_rope
265 path_particle_rope
266 path_particle_rope
267 path_particle_rope
268 path_particle_rope
269 path_particle_rope
270 path_particle_rope
271 path_particle_rope
272 path_particle_rope
273 path_particle_rope
274 path_particle_rope
275 path_particle_rope
276 path_particle_rope
277 path_particle_rope
278 path_particle_rope
279 path_particle_rope
280 path_particle_rope
281 path_particle_rope
282 path_particle_rope
283 path_particle_rope
284 path_particle_rope
285 path_particle_rope
286 path_particle_rope
287 path_particle_rope
288 path_particle_rope
289 path_particle_rope
290 path_particle_rope
291 path_particle_rope
292 path_particle_rope
293 path_particle_rope
294 path_particle_rope
295 path_particle_rope
296 path_particle_rope
297 path_particle_rope
298 path_particle_rope
299 path_particle_rope
300 path_particle_rope
301 path_particle_rope
302 path_particle_rope
303 path_particle_rope
304 path_particle_rope
305 path_particle_rope
306 path_particle_rope
307 path_particle_rope
308 path_particle_rope
309 path_particle_rope
310 light_omni2
311 light_omni2
312 light_rect
313 light_rect
314 light_omni2
315 light_rect
316 light_rect
317 light_rect
318 light_rect
319 light_rect
320 light_rect
321 light_rect
322 light_rect
323 light_rect
324 light_rect
325 light_rect
326 light_rect
327 light_rect
328 light_omni2
329 light_rect
330 light_omni2
331 light_rect
332 light_rect
333 light_omni2
334 light_rect
335 light_rect
336 light_rect
337 light_rect
338 light_rect
339 light_rect
340 light_environment
341 light_rect
342 light_rect
343 worldent
344 cs_player_controller
345 cs_player_manager
346 cs_gamerules
347 vote_controller
348 vote_controller
349 vote_controller
350 env_cubemap_fog
351 env_sky
352 env_sky
353 sky_camera
354 env_sky
355 team_select_terrorist
356 team_select_terrorist
357 team_select_terrorist
358 team_select_terrorist
359 team_select_terrorist
360 team_select_terrorist
361 team_select_terrorist
362 team_select_terrorist
363 team_select_terrorist
364 team_select_counterterrorist
365 team_select_counterterrorist
366 team_select_counterterrorist
367 team_select_counterterrorist
368 team_select_counterterrorist
369 team_select_counterterrorist
370 team_select_counterterrorist
371 team_select_counterterrorist
372 team_select_counterterrorist
373 team_select_counterterrorist
374 team_select_terrorist
375 team_intro_counterterrorist
376 team_intro_counterterrorist
377 team_intro_counterterrorist
378 team_intro_counterterrorist
379 team_intro_counterterrorist
380 team_intro_terrorist
381 team_intro_terrorist
382 team_intro_terrorist
383 team_intro_terrorist
384 team_intro_terrorist
385 c_cs_observer_for_precache
386 c_cs_player_for_precache
I suspect, that (for example), chickens reside inside a basemodelentity (because: CChicken -> CDynamicProp -> C_BreakableProp -> CBaseProp -> CBaseAnimGraph -> C_BaseModelEntity).
How can I confirm, that a BaseModelEntity is in fact a Chicken?
Is there a better/faster solution to get all Entities without the cs_player_controller detour?
I am thankful for all suggestions leading in the right direction.