Hello guys maybe you could help me a bit.
I do have a method which should destroy given client's projectiles.
Code:
new ent = -1;
while ((ent = FindEntityByClassname(ent, "tf_projectile_*")) != -1) {
if (GetEntPropEnt(ent, Prop_Send, "m_hOwnerEntity") == client) {
AcceptEntityInput(ent, "Kill");
}
// WARNING: next code block will cause issues!
if (GetEntPropEnt(ent, Prop_Send, "m_hThrower") == client) {
AcceptEntityInput(ent, "Kill");
}
}
I would like to write the code once and support any further game updates which may add new projectiles. The problem is that some projectiles (rockets, arrows, bolts) store their owner inside m_hOwnerEntity prop but other projectiles (pipes, stickies) uses m_hThrower prop for that.
How could I check if entity do have one of the properties that I may need without running into `Native "GetEntPropEnt" reported: Property "m_hThrower" not found` error?
__________________