HelpChannel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) { this->SetAuthor("Anope"); Implementation i[] = { I_OnChannelModeSet, I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); OnReload(); }
LDAPOper(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), ldap("LDAPProvider", "ldap/main"), iinterface(this) { this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnNickIdentify, I_OnDelCore }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); OnReload(); }
//-------------------------------------------------------------------------------- void CIwASDAttrPanel::OnSwap(wxCommandEvent& e) { OnSave(e); if (m_Layout->m_DataAttr!=NULL) m_Layout->SetData(m_Layout->m_DataAttr->m_File,true); else m_Layout->SetData(m_Layout->m_DataSource->m_File,false); OnReload(e); }
qtDLGOption::qtDLGOption(QWidget *parent, Qt::WFlags flags) : QDialog(parent, flags) { setupUi(this); this->setFixedSize(this->width(),this->height()); this->setStyleSheet("background: rgb(230, 235, 230)"); //this->setAttribute(Qt::WA_DeleteOnClose,true); tblCustomExceptions->insertRow(tblCustomExceptions->rowCount()); tblCustomExceptions->setItem(tblCustomExceptions->rowCount() - 1,0,new QTableWidgetItem("")); tblCustomExceptions->setItem(tblCustomExceptions->rowCount() - 1,1,new QTableWidgetItem("")); OnLoad(); // Events for the GUI connect(tblCustomExceptions,SIGNAL(customContextMenuRequested(const QPoint &)),this,SLOT(OnRightClickCustomException(const QPoint &))); connect(btnClose,SIGNAL(clicked()),this,SLOT(OnClose())); connect(btnReload,SIGNAL(clicked()),this,SLOT(OnReload())); connect(btnSave,SIGNAL(clicked()),this,SLOT(OnSave())); }
qtDLGOption::qtDLGOption(QWidget *parent, Qt::WFlags flags) : QDialog(parent, flags) { setupUi(this); this->setFixedSize(this->width(),this->height()); tblCustomExceptions->horizontalHeader()->setFixedHeight(21); m_pMainWindow = qtDLGNanomite::GetInstance(); m_pSettings = clsAppSettings::SharedInstance(); #ifdef _AMD64_ lblCurrentJIT->setText("x64"); lblCurrentJITWOW64->setText("x86"); lblDefaultJIT->setText("x64"); lblDefaultJITWOW64->setText("x86"); #else lblCurrentJIT->setText("x86"); lblCurrentJITWOW64->setText("x86"); lblDefaultJIT->setText("x86"); lblDefaultJITWOW64->setText("x86"); lineCurrentWOW64->setEnabled(false); lineOrgWOW64->setEnabled(false); #endif OnLoad(); // Events for the GUI connect(cbLoadSym, SIGNAL(stateChanged(int)), this, SLOT(SetUseSym(int))); connect(cbMSSym, SIGNAL(stateChanged(int)), this, SLOT(OnMSSymWarning(int))); connect(tblCustomExceptions,SIGNAL(customContextMenuRequested(const QPoint &)),this,SLOT(OnRightClickCustomException(const QPoint &))); connect(btnClose,SIGNAL(clicked()),this,SLOT(OnClose())); connect(btnReload,SIGNAL(clicked()),this,SLOT(OnReload())); connect(btnSave,SIGNAL(clicked()),this,SLOT(OnSave())); connect(pbSetNanomite,SIGNAL(clicked()),this,SLOT(OnSetNanomiteDefault())); connect(pbRestoreOrg,SIGNAL(clicked()),this,SLOT(OnRestoreOrg())); connect(bpRegisterNDB,SIGNAL(clicked()),this,SLOT(EnableNDBExtension())); connect(bpUnregisterNDB,SIGNAL(clicked()),this,SLOT(DisableNDBExtension())); connect(new QShortcut(QKeySequence(QKeySequence::Delete),this),SIGNAL(activated()),this,SLOT(OnExceptionRemove())); }
//============================================================ // <T>服务器重新加载操作。</T> // // @return 处理结果 //============================================================ TResult FServer::Reload(){ MO_INFO("Server '%s' reload.", (TCharC*)_name); return OnReload(); }
void DefenderWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo& wi, double dt) { CheckBoost(cWeapon, wi); // Decrement reload timer Field<double> reloadTimer = cWeapon["ReloadTimer"]; reloadTimer = glm::max(0.0, reloadTimer - dt); // Start reloading automatically if at 0 mag ammo Field<int> magAmmo = cWeapon["MagazineAmmo"]; if (m_ConfigAutoReload && magAmmo <= 0) { OnReload(cWeapon, wi); } // Handle reloading Field<bool> isReloading = cWeapon["IsReloading"]; if (isReloading && reloadTimer <= 0.0) { double reloadTime = cWeapon["ReloadTime"]; Field<int> magSize = cWeapon["MagazineSize"]; Field<int> ammo = cWeapon["Ammo"]; if (magAmmo < magSize && ammo > 0) { ammo -= 1; magAmmo += 1; reloadTimer = reloadTime; Events::PlaySoundOnEntity e; e.Emitter = wi.Player; e.FilePath = "Audio/weapon/Zoom.wav"; m_EventBroker->Publish(e); } else { isReloading = false; playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "ReloadEnd"); if (wi.ThirdPersonPlayerModel.Valid()) { Events::AutoAnimationBlend eFireIdle; eFireIdle.Duration = 0.2; eFireIdle.RootNode = wi.ThirdPersonPlayerModel; eFireIdle.NodeName = "Fire"; eFireIdle.Start = false; m_EventBroker->Publish(eFireIdle); } } } // Restore view angle if (IsClient) { Field<float> currentTravel = cWeapon["CurrentTravel"]; Field<float> returnSpeed = cWeapon["ViewReturnSpeed"]; if (currentTravel > 0) { float change = returnSpeed * dt; currentTravel = glm::max(0.f, currentTravel - change); EntityWrapper camera = wi.Player.FirstChildByName("Camera"); if (camera.Valid()) { Field<glm::vec3> cameraOrientation = camera["Transform"]["Orientation"]; cameraOrientation.x(cameraOrientation.x() - change); } } } // Fire if we're able to fire if (canFire(cWeapon, wi)) { fireShell(cWeapon, wi); } }