bool autowall::is_breakable_entity(IClientEntity* e) {
if (!e || !e->EntIndex())
return false;
static auto is_breakable = util::FindSignature(crypt_str("client.dll"), crypt_str("55 8B EC 51 56 8B F1 85 F6 74 68"));
auto take_damage = *(uintptr_t*)((uintptr_t)e + 0x280);
auto client_class = e->GetClientClass();
auto network_name = client_class->m_pNetworkName;
if (!strcmp(network_name, "CBreakableSurface"))
*(uint8_t*)((uintptr_t)e + 0x280) = DAMAGE_YES;
else if (!strcmp(network_name, "CBaseDoor") || !strcmp(network_name, "CDynamicProp"))
*(uint8_t*)((uintptr_t)e + 0x280) = DAMAGE_NO;
using Fn = bool(__thiscall*)(IClientEntity*);
auto result = ((Fn)is_breakable)(e);
*(uint8_t*)((uintptr_t)e + 0x280) = take_damage;
return result;
}