fix assumption
This commit is contained in:
parent
e2c9880a15
commit
53d5229391
@ -448,9 +448,10 @@ bool ToxTransferManager::onToxEvent(const Tox_Event_Friend_Connection_Status* e)
|
|||||||
|
|
||||||
std::vector<Object> to_destory;
|
std::vector<Object> to_destory;
|
||||||
_os.registry().view<ObjComp::Ephemeral::ToxTransferFriend>().each([&](const Object ov, const auto& ttf) {
|
_os.registry().view<ObjComp::Ephemeral::ToxTransferFriend>().each([&](const Object ov, const auto& ttf) {
|
||||||
assert(ttf.friend_number == friend_number);
|
if (ttf.friend_number == friend_number) {
|
||||||
to_destory.push_back(ov);
|
to_destory.push_back(ov);
|
||||||
std::cerr << "TTM warning: friend disconnected, forcefully removing e:" << entt::to_integral(ov) << " frd:" << friend_number << " fnb:" << ttf.transfer_number << "\n";
|
std::cerr << "TTM warning: friend disconnected, forcefully removing e:" << entt::to_integral(ov) << " frd:" << friend_number << " fnb:" << ttf.transfer_number << "\n";
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const auto ov : to_destory) {
|
for (const auto ov : to_destory) {
|
||||||
|
Loading…
Reference in New Issue
Block a user