Code:
bool IsShootableBreakable (edict_t *pent) // KWo - 08.02.2006
{
if (pent == NULL)
return (false);
return ( ( (FStrEq ("func_breakable", STRING (pent->v.classname))
&& ( (pent->v.playerclass == 1) || (pent->v.health == 0)
|| ( (pent->v.health > 1) && (pent->v.health < 1000))
|| (pent->v.rendermode == 4) ) // KWo - 21.02.2006 - br. crates has rendermode 4
|| (FStrEq ("func_pushable", STRING (pent->v.classname))
&& (pent->v.spawnflags & SF_PUSH_BREAKABLE))))
&& (pent->v.impulse == 0)
&& (pent->v.takedamage > 0)
&& !(pent->v.spawnflags & SF_BREAK_TRIGGER_ONLY) );
}
Here is the code in C++ from podbot mm to recognize breakable "func_breakable". Another thing is this - in info key values You can also check the material, the breakable is created based on - and there is something like unbreakable glass - which makes the "func_breakable" despite its name as unbreakable. Hope it can help You somehow.
__________________
The Fullpack of podbot mm
V3B22 - 24 apr 2012!!! is available
here.
The All-In-One 3.2a package - 02 jun 2013 (
AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available
here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available
here.