void destroyGUIOverlay(CGUIOverlay *pOverlay) {m_lGUIOverlays.remove(pOverlay); delete pOverlay;}
void FilterTargets(std::list<WorldObject*>& targets) { if (GetExplTargetUnit()) targets.remove(GetExplTargetUnit()); }
void FilterTargets(std::list<WorldObject*>& unitList) { if (GetCaster()) unitList.remove(GetCaster()); }
void CurveTree::MakeOffsets2() { // make offsets if(CArea::m_please_abort)return; CArea smaller; smaller.m_curves.push_back(curve); smaller.Offset(pocket_params->stepover); if(CArea::m_please_abort)return; // test islands for(std::list<const IslandAndOffset*>::iterator It = offset_islands.begin(); It != offset_islands.end();) { const IslandAndOffset* island_and_offset = *It; if(GetOverlapType(island_and_offset->offset, smaller) == eInside) It++; // island is still inside else { inners.push_back(new CurveTree(*island_and_offset->island)); islands_added.push_back(inners.back()); inners.back()->point_on_parent = curve.NearestPoint(*island_and_offset->island); if(CArea::m_please_abort)return; Point island_point = island_and_offset->island->NearestPoint(inners.back()->point_on_parent); if(CArea::m_please_abort)return; inners.back()->curve.ChangeStart(island_point); if(CArea::m_please_abort)return; // add the island offset's inner curves for(std::list<CCurve>::const_iterator It2 = island_and_offset->island_inners.begin(); It2 != island_and_offset->island_inners.end(); It2++) { const CCurve& island_inner = *It2; inners.back()->inners.push_back(new CurveTree(island_inner)); inners.back()->inners.back()->point_on_parent = inners.back()->curve.NearestPoint(island_inner); if(CArea::m_please_abort)return; Point island_point = island_inner.NearestPoint(inners.back()->inners.back()->point_on_parent); if(CArea::m_please_abort)return; inners.back()->inners.back()->curve.ChangeStart(island_point); to_do_list_for_MakeOffsets.push_back(inners.back()->inners.back()); // do it later, in a while loop if(CArea::m_please_abort)return; } smaller.Subtract(island_and_offset->offset); std::set<const IslandAndOffset*> added; std::list<IslandAndOffsetLink> touching_list; for(std::list<IslandAndOffset*>::const_iterator It2 = island_and_offset->touching_offsets.begin(); It2 != island_and_offset->touching_offsets.end(); It2++) { const IslandAndOffset* touching = *It2; touching_list.push_back(IslandAndOffsetLink(touching, inners.back())); added.insert(touching); } while(touching_list.size() > 0) { IslandAndOffsetLink touching = touching_list.front(); touching_list.pop_front(); touching.add_to->inners.push_back(new CurveTree(*touching.island_and_offset->island)); islands_added.push_back(touching.add_to->inners.back()); touching.add_to->inners.back()->point_on_parent = touching.add_to->curve.NearestPoint(*touching.island_and_offset->island); Point island_point = touching.island_and_offset->island->NearestPoint(touching.add_to->inners.back()->point_on_parent); touching.add_to->inners.back()->curve.ChangeStart(island_point); smaller.Subtract(touching.island_and_offset->offset); // add the island offset's inner curves for(std::list<CCurve>::const_iterator It2 = touching.island_and_offset->island_inners.begin(); It2 != touching.island_and_offset->island_inners.end(); It2++) { const CCurve& island_inner = *It2; touching.add_to->inners.back()->inners.push_back(new CurveTree(island_inner)); touching.add_to->inners.back()->inners.back()->point_on_parent = touching.add_to->inners.back()->curve.NearestPoint(island_inner); if(CArea::m_please_abort)return; Point island_point = island_inner.NearestPoint(touching.add_to->inners.back()->inners.back()->point_on_parent); if(CArea::m_please_abort)return; touching.add_to->inners.back()->inners.back()->curve.ChangeStart(island_point); to_do_list_for_MakeOffsets.push_back(touching.add_to->inners.back()->inners.back()); // do it later, in a while loop if(CArea::m_please_abort)return; } for(std::list<IslandAndOffset*>::const_iterator It2 = touching.island_and_offset->touching_offsets.begin(); It2 != touching.island_and_offset->touching_offsets.end(); It2++) { if(added.find(*It2)==added.end() && ((*It2) != island_and_offset)) { touching_list.push_back(IslandAndOffsetLink(*It2, touching.add_to->inners.back())); added.insert(*It2); } } } if(CArea::m_please_abort)return; It = offset_islands.erase(It); for(std::set<const IslandAndOffset*>::iterator It2 = added.begin(); It2 != added.end(); It2++) { const IslandAndOffset* i = *It2; offset_islands.remove(i); } if(offset_islands.size() == 0)break; It = offset_islands.begin(); } } CArea::m_processing_done += CArea::m_MakeOffsets_increment; if(CArea::m_processing_done > CArea::m_after_MakeOffsets_length)CArea::m_processing_done = CArea::m_after_MakeOffsets_length; std::list<CArea> separate_areas; smaller.Split(separate_areas); if(CArea::m_please_abort)return; for(std::list<CArea>::iterator It = separate_areas.begin(); It != separate_areas.end(); It++) { CArea& separate_area = *It; CCurve& first_curve = separate_area.m_curves.front(); CurveTree* nearest_curve_tree = NULL; Point near_point = GetNearestPoint(this, islands_added, first_curve, &nearest_curve_tree); nearest_curve_tree->inners.push_back(new CurveTree(first_curve)); for(std::list<const IslandAndOffset*>::iterator It = offset_islands.begin(); It != offset_islands.end(); It++) { const IslandAndOffset* island_and_offset = *It; if(GetOverlapType(island_and_offset->offset, separate_area) == eInside) nearest_curve_tree->inners.back()->offset_islands.push_back(island_and_offset); if(CArea::m_please_abort)return; } nearest_curve_tree->inners.back()->point_on_parent = near_point; if(CArea::m_please_abort)return; Point first_curve_point = first_curve.NearestPoint(nearest_curve_tree->inners.back()->point_on_parent); if(CArea::m_please_abort)return; nearest_curve_tree->inners.back()->curve.ChangeStart(first_curve_point); if(CArea::m_please_abort)return; to_do_list_for_MakeOffsets.push_back(nearest_curve_tree->inners.back()); // do it later, in a while loop if(CArea::m_please_abort)return; } }
void removeCollider(Collider* collider) { PS_ColliderSet::removeCollider(collider->_getImplementation()); mCollider.remove(collider); }
void del_aux_barrier(gc::WriteBarrier* wb) { aux_barriers_.remove(wb); }
bool removeRegTainted(REG reg) { switch(reg){ case REG_EAX: regsTainted.remove(REG_EAX); case REG_AX: regsTainted.remove(REG_AX); case REG_AH: regsTainted.remove(REG_AH); case REG_AL: regsTainted.remove(REG_AL); break; case REG_EBX: regsTainted.remove(REG_EBX); case REG_BX: regsTainted.remove(REG_BX); case REG_BH: regsTainted.remove(REG_BH); case REG_BL: regsTainted.remove(REG_BL); break; case REG_ECX: regsTainted.remove(REG_ECX); case REG_CX: regsTainted.remove(REG_CX); case REG_CH: regsTainted.remove(REG_CH); case REG_CL: regsTainted.remove(REG_CL); break; case REG_EDX: regsTainted.remove(REG_EDX); case REG_DX: regsTainted.remove(REG_DX); case REG_DH: regsTainted.remove(REG_DH); case REG_DL: regsTainted.remove(REG_DL); break; case REG_EDI: regsTainted.remove(REG_EDI); case REG_DI: regsTainted.remove(REG_DI); break; case REG_ESI: regsTainted.remove(REG_ESI); case REG_SI: regsTainted.remove(REG_SI); break; default: return false; } std::cout << "\t\t\t" << REG_StringShort(reg) << " is now freed" << std::endl; return true; }
void DeleteSocket(SOCKET *s) { socketlistmtx.lock(); activeSocket.remove(s); socketlistmtx.unlock(); }
void removeTrigger(Trigger *t) { boost::recursive_mutex::scoped_lock scoped_lock(trigger_list_mutex); all_triggers.remove(t); }
void FilterTargets(std::list<WorldObject*>& targets) { targets.remove(GetExplTargetUnit()); // The target of this spell should _not_ be in this list }
void dlgWaypointSelectAddToLastUsed(const Waypoint &waypoint) { last_used_waypoint_ids.remove(waypoint.id); last_used_waypoint_ids.push_back(waypoint.id); }
void full_unlink(bt_swarm_full_t *full) throw() { full_db.remove(full); }
LRESULT APIENTRY WndProc_Hook(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { bool bFocused = (GetForegroundWindow() == hWnd); // Are we focused? if(bFocused) { if(uMsg == WM_KILLFOCUS || (uMsg == WM_ACTIVATE && LOWORD(wParam) == WA_INACTIVE)) { return true; } if(uMsg == WM_KEYUP) { switch(wParam) { case VK_F12: { TerminateProcess(GetCurrentProcess(), 0); } case VK_F8: { // Take a screen shot if(CSnapShot::Take()) g_pCore->GetChat()->Outputf(false, "Screen shot captured."); else { g_pCore->GetChat()->Outputf(false, "Screen shot capture failed (%s).", CSnapShot::GetError().Get()); CSnapShot::Reset(); } } } } if(g_pCore->GetChat()) g_pCore->GetChat()->HandleUserInput(uMsg, (DWORD)wParam); // Is the chat input not visible? if(g_pCore->GetChat() && !g_pCore->GetChat()->IsInputVisible()) { // Get the key code string CString strCode = GetKeyNameByCode((DWORD)wParam); // Was something presses? if(!strCode.IsEmpty()) { CString strState; // Get the key state if(uMsg == WM_KEYUP) { // Check if key was pressed beforehand if(std::find(pressedKeys.begin(), pressedKeys.end(), strCode) != pressedKeys.end()) { pressedKeys.remove(strCode); strState = "up"; } } else if(uMsg == WM_KEYDOWN) { // Check if key was pressed beforehand if(std::find(pressedKeys.begin(), pressedKeys.end(), strCode) == pressedKeys.end()) { pressedKeys.push_back(strCode); strState = "down"; } } // Is the state valid? if(!strState.IsEmpty()) { /*// Call the script event CSquirrelArguments pArguments; pArguments.push(strCode); pArguments.push(strState); pGame->GetClientScriptingManager()->GetEvents()->Call("onClientKeyPress", &pArguments); */ } } } } return CallWindowProc(m_wWndProc, hWnd, uMsg, wParam, lParam); }
void removeInterpolator(shared_ptr<IInterpolator> &interpolator){ g_interpolators.remove(interpolator); }
void remove(Component* child) { list.remove(child); }
~Renderable( ) { renderables.remove( this ); }
__declspec(dllexport) void __stdcall WH_KEYBOARD_LL_Unblock(unsigned long virtualkeycode) { mWH_KEYBOARD_LL_Keys.Lock(true); sWH_KEYBOARD_LL_Keys.remove(virtualkeycode); mWH_KEYBOARD_LL_Keys.Unlock(); }
void CheckTargets(std::list<WorldObject*>& targets) { targets.remove(GetCaster()); }
VOID removeMemTainted(UINT64 addr) { addressTainted.remove(addr); std::cout << std::hex << "\t\t\t" << addr << " is now freed" << std::endl; }
void remove_child(Window &child) { children.remove(&child); if (active_child == &child) active_child = NULL; }
void AccountHandler::handleLoginMessage(AccountClient &client, MessageIn &msg) { MessageOut reply(APMSG_LOGIN_RESPONSE); if (client.status != CLIENT_LOGIN) { reply.writeInt8(ERRMSG_FAILURE); client.send(reply); return; } const int clientVersion = msg.readInt32(); if (clientVersion < PROTOCOL_VERSION) { reply.writeInt8(LOGIN_INVALID_VERSION); client.send(reply); return; } // Check whether the last login attempt for this IP is still too fresh const int address = client.getIP(); const time_t now = time(NULL); IPsToTime::const_iterator it = mLastLoginAttemptForIP.find(address); if (it != mLastLoginAttemptForIP.end()) { const time_t lastAttempt = it->second; if (now < lastAttempt + 1) { reply.writeInt8(LOGIN_INVALID_TIME); client.send(reply); return; } } mLastLoginAttemptForIP[address] = now; const std::string username = msg.readString(); const std::string password = msg.readString(); if (stringFilter->findDoubleQuotes(username)) { reply.writeInt8(ERRMSG_INVALID_ARGUMENT); client.send(reply); return; } const unsigned maxClients = (unsigned) Configuration::getValue("net_maxClients", 1000); if (getClientCount() >= maxClients) { reply.writeInt8(ERRMSG_SERVER_FULL); client.send(reply); return; } // Check if the account exists Account *acc = 0; std::list<Account*>::iterator ita; for ( ita = mPendingAccounts.begin() ; ita != mPendingAccounts.end(); ita++ ) if ((*ita)->getName() == username) acc = *ita; mPendingAccounts.remove(acc); if (!acc || sha256(acc->getPassword() + acc->getRandomSalt()) != password) { reply.writeInt8(ERRMSG_INVALID_ARGUMENT); client.send(reply); delete acc; return; } if (acc->getLevel() == AL_BANNED) { reply.writeInt8(LOGIN_BANNED); client.send(reply); delete acc; return; } // The client successfully logged in... // Set lastLogin date of the account. time_t login; time(&login); acc->setLastLogin(login); storage->updateLastLogin(acc); // Associate account with connection. client.setAccount(acc); client.status = CLIENT_CONNECTED; reply.writeInt8(ERRMSG_OK); addServerInfo(&reply); client.send(reply); // Acknowledge login // Return information about available characters Characters &chars = acc->getCharacters(); // Send characters list for (Characters::const_iterator i = chars.begin(), i_end = chars.end(); i != i_end; ++i) sendCharacterData(client, *(*i).second); }
void bring_child_to_top(Window &child) { children.remove(&child); children.insert(children.begin(), &child); invalidate(); }
void stat_itor_unlink(bt_oload0_mlink_itor_t *itor) throw() { torr_itor_db.remove(itor); }
void swarm_unlink(bt_swarm_t *swarm) throw() { swarm_db.remove(swarm); }
// First effect void CountTargets(std::list<Unit*>& unitList) { unitList.remove(GetCaster()); failed = unitList.empty(); }
void cnx_unlink(bt_session_cnx_t *cnx) throw() { cnx_db.remove(cnx); }
void FilterTargets(std::list<Unit*>& unitList) { unitList.remove(GetTargetUnit()); }
void del_player(int _pid) { mtx_all_games.lock(); players.remove(_pid); mtx_all_games.unlock(); }
void FilterTargets(std::list<WorldObject*>& unitList) { unitList.remove(GetExplTargetWorldObject()); }
// remove vertex from graph void remove(unsigned int v) { vertices.remove(v); clear(v); }