Esempio n. 1
0
void cDvbHdFfDevice::TurnOffLiveMode(bool LiveView)
{
  // Turn off live PIDs:

  DetachAll(pidHandles[ptAudio].pid);
  DetachAll(pidHandles[ptVideo].pid);
  DetachAll(pidHandles[ptPcr].pid);
  DetachAll(pidHandles[ptTeletext].pid);
  DelPid(pidHandles[ptAudio].pid);
  DelPid(pidHandles[ptVideo].pid);
  DelPid(pidHandles[ptPcr].pid, ptPcr);
  DelPid(pidHandles[ptTeletext].pid);
  DelPid(pidHandles[ptDolby].pid);
}
Esempio n. 2
0
CUIWindow::~CUIWindow()
{
	VERIFY( !(GetParent()&&IsAutoDelete()) );

	CUIWindow* parent	= GetParent();
	bool ad				= IsAutoDelete();
	if( parent && !ad )
		parent->CUIWindow::DetachChild( this );

	DetachAll();

	if(	GetPPMode() )
		MainMenu()->UnregisterPPDraw	(this);

#ifdef LOG_ALL_WNDS
	xr_vector<DBGList>::iterator _it = dbg_list_wnds.begin();
	bool bOK = false;
	for(;_it!=dbg_list_wnds.end();++_it){
		if( (*_it).num==m_dbg_id && !(*_it).closed){
			bOK = true;
			(*_it).closed = true;
			dbg_list_wnds.erase(_it);
			break;
		}
		if( (*_it).num==m_dbg_id && (*_it).closed){
			Msg("--CUIWindow [%d] already deleted", m_dbg_id);
			bOK = true;
		}
	}
	if(!bOK)
		Msg("CUIWindow::~CUIWindow.[%d] cannot find window in list", m_dbg_id);
#endif
}
Esempio n. 3
0
void cDvbHdFfDevice::SetAudioTrackDevice(eTrackType Type)
{
    //printf("SetAudioTrackDevice %d\n", Type);
    const tTrackId *TrackId = GetTrack(Type);
    if (TrackId && TrackId->id) {
        int streamType = 0;
        cChannel * channel = Channels.GetByNumber(CurrentChannel());
        if (channel) {
            if (IS_AUDIO_TRACK(Type))
                streamType = channel->Atype(Type - ttAudioFirst);
            else if (IS_DOLBY_TRACK(Type))
                streamType = channel->Dtype(Type - ttDolbyFirst);
        }
        //printf("SetAudioTrackDevice new %d %d, current %d\n", TrackId->id, streamType, pidHandles[ptAudio].pid);
        if (pidHandles[ptAudio].pid && pidHandles[ptAudio].pid != TrackId->id) {
            DetachAll(pidHandles[ptAudio].pid);
            if (CamSlot())
                CamSlot()->SetPid(pidHandles[ptAudio].pid, false);
            pidHandles[ptAudio].pid = TrackId->id;
            pidHandles[ptAudio].streamType = streamType;
            SetPid(&pidHandles[ptAudio], ptAudio, true);
            if (CamSlot()) {
                CamSlot()->SetPid(pidHandles[ptAudio].pid, true);
                CamSlot()->StartDecrypting();
            }
        }
    }
}
Esempio n. 4
0
void cDvbDevice::SetAudioTrackDevice(eTrackType Type)
{
  const tTrackId *TrackId = GetTrack(Type);
  if (TrackId && TrackId->id) {
     SetAudioBypass(false);
     if (IS_AUDIO_TRACK(Type) || (IS_DOLBY_TRACK(Type) && SetAudioBypass(true))) {
        if (pidHandles[ptAudio].pid && pidHandles[ptAudio].pid != TrackId->id) {
           DetachAll(pidHandles[ptAudio].pid);
           if (ciHandler)
              ciHandler->SetPid(pidHandles[ptAudio].pid, false);
           pidHandles[ptAudio].pid = TrackId->id;
           SetPid(&pidHandles[ptAudio], ptAudio, true);
           if (ciHandler) {
              ciHandler->SetPid(pidHandles[ptAudio].pid, true);
              ciHandler->StartDecrypting();
              }
           }
        }
     else if (IS_DOLBY_TRACK(Type)) {
        if (setTransferModeForDolbyDigital == 0)
           return;
        // Currently this works only in Transfer Mode
        ForceTransferMode();
        }
     }
}
Esempio n. 5
0
void CUIMiniMap::UpdateSpots()
{
	DetachAll();
	Locations& ls =Level().MapManager().Locations();
	for(Locations_it it=ls.begin(); it!=ls.end(); ++it){
			(*it).location->UpdateMiniMap(this);
	}

}
Esempio n. 6
0
Sprite3DAsset::~Sprite3DAsset()
{
  DetachAll();
  csRef<iEngine> engine = csQueryRegistry<iEngine> (object_reg);
  engine->RemoveObject(spritewrapper);
  engine->RemoveObject(spritewrapper->GetFactory());
  spritewrapper.Invalidate();
  state.Invalidate();
  sprite.Invalidate();
}
Esempio n. 7
0
void ModuleManager::DoSafeUnload(Module* mod)
{
	std::map<std::string, Module*>::iterator modfind = Modules.find(mod->ModuleSourceFile);

	std::vector<reference<ExtensionItem> > items;
	ServerInstance->Extensions.BeginUnregister(modfind->second, items);
	/* Give the module a chance to tidy out all its metadata */
	for (chan_hash::iterator c = ServerInstance->chanlist->begin(); c != ServerInstance->chanlist->end(); c++)
	{
		mod->OnCleanup(TYPE_CHANNEL,c->second);
		c->second->doUnhookExtensions(items);
		const UserMembList* users = c->second->GetUsers();
		for(UserMembCIter mi = users->begin(); mi != users->end(); mi++)
			mi->second->doUnhookExtensions(items);
	}
	for (user_hash::iterator u = ServerInstance->Users->clientlist->begin(); u != ServerInstance->Users->clientlist->end(); u++)
	{
		mod->OnCleanup(TYPE_USER,u->second);
		u->second->doUnhookExtensions(items);
	}
	for(char m='A'; m <= 'z'; m++)
	{
		ModeHandler* mh;
		mh = ServerInstance->Modes->FindMode(m, MODETYPE_USER);
		if (mh && mh->creator == mod)
			ServerInstance->Modes->DelMode(mh);
		mh = ServerInstance->Modes->FindMode(m, MODETYPE_CHANNEL);
		if (mh && mh->creator == mod)
			ServerInstance->Modes->DelMode(mh);
	}
	for(std::multimap<std::string, ServiceProvider*>::iterator i = DataProviders.begin(); i != DataProviders.end(); )
	{
		std::multimap<std::string, ServiceProvider*>::iterator curr = i++;
		if (curr->second->creator == mod)
			DataProviders.erase(curr);
	}

	dynamic_reference_base::reset_all();

	/* Tidy up any dangling resolvers */
	ServerInstance->Res->CleanResolvers(mod);

	FOREACH_MOD(I_OnUnloadModule,OnUnloadModule(mod));

	DetachAll(mod);

	Modules.erase(modfind);
	ServerInstance->GlobalCulls.AddItem(mod);

	ServerInstance->Logs->Log("MODULE", DEFAULT,"Module %s unloaded",mod->ModuleSourceFile.c_str());
	this->ModCount--;
	ServerInstance->BuildISupport();
}
Esempio n. 8
0
void ModuleManager::DoSafeUnload(Module* mod)
{
	// First, notify all modules that a module is about to be unloaded, so in case
	// they pass execution to the soon to be unloaded module, it will happen now,
	// i.e. before we unregister the services of the module being unloaded
	FOREACH_MOD(OnUnloadModule, (mod));

	std::map<std::string, Module*>::iterator modfind = Modules.find(mod->ModuleSourceFile);

	std::vector<reference<ExtensionItem> > items;
	ServerInstance->Extensions.BeginUnregister(modfind->second, items);
	/* Give the module a chance to tidy out all its metadata */
	for (chan_hash::iterator c = ServerInstance->chanlist->begin(); c != ServerInstance->chanlist->end(); c++)
	{
		mod->OnCleanup(TYPE_CHANNEL,c->second);
		c->second->doUnhookExtensions(items);
		const UserMembList* users = c->second->GetUsers();
		for(UserMembCIter mi = users->begin(); mi != users->end(); mi++)
			mi->second->doUnhookExtensions(items);
	}
	for (user_hash::iterator u = ServerInstance->Users->clientlist->begin(); u != ServerInstance->Users->clientlist->end(); u++)
	{
		mod->OnCleanup(TYPE_USER,u->second);
		u->second->doUnhookExtensions(items);
	}
	for(char m='A'; m <= 'z'; m++)
	{
		ModeHandler* mh;
		mh = ServerInstance->Modes->FindMode(m, MODETYPE_USER);
		if (mh && mh->creator == mod)
			this->DelService(*mh);
		mh = ServerInstance->Modes->FindMode(m, MODETYPE_CHANNEL);
		if (mh && mh->creator == mod)
			this->DelService(*mh);
	}
	for(std::multimap<std::string, ServiceProvider*>::iterator i = DataProviders.begin(); i != DataProviders.end(); )
	{
		std::multimap<std::string, ServiceProvider*>::iterator curr = i++;
		if (curr->second->creator == mod)
			DataProviders.erase(curr);
	}

	dynamic_reference_base::reset_all();

	DetachAll(mod);

	Modules.erase(modfind);
	ServerInstance->GlobalCulls.AddItem(mod);

	ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Module %s unloaded",mod->ModuleSourceFile.c_str());
	this->ModCount--;
	ServerInstance->ISupport.Build();
}
Esempio n. 9
0
GenmeshAsset::~GenmeshAsset()
{
  DetachAll();
  csRef<iEngine> engine = csQueryRegistry<iEngine> (object_reg);
  engine->RemoveObject(spritewrapper);
  engine->RemoveObject(spritewrapper->GetFactory());
  spritewrapper.Invalidate();
  state.Invalidate();
  sprite.Invalidate();
  animcontrol.Invalidate();
  skeleton.Invalidate();
}
Esempio n. 10
0
void cDvbDevice::TurnOffLiveMode(bool LiveView)
{
  if (LiveView) {
     // Avoid noise while switching:
     CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, true));
     CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true));
     CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER));
     CHECK(ioctl(fd_video, VIDEO_CLEAR_BUFFER));
     }

  // Turn off live PIDs:

  DetachAll(pidHandles[ptAudio].pid);
  DetachAll(pidHandles[ptVideo].pid);
  DetachAll(pidHandles[ptPcr].pid);
  DetachAll(pidHandles[ptTeletext].pid);
  DelPid(pidHandles[ptAudio].pid);
  DelPid(pidHandles[ptVideo].pid);
  DelPid(pidHandles[ptPcr].pid, ptPcr);
  DelPid(pidHandles[ptTeletext].pid);
  DelPid(pidHandles[ptDolby].pid);
}
 graph_pack(size_t k, const std::string &workdir, size_t lib_count,
                     Sequence genome = Sequence(),
                     size_t flanking_range = 50,
                     size_t max_mapping_gap = 0,
                     size_t max_gap_diff = 0,
                     bool detach_indices = true)
         : k_value(k), g(k), index(g, workdir),
           kmer_mapper(g),
           flanking_cov(g, flanking_range),
           paired_indices(lib_count),
           clustered_indices(g, lib_count),
           scaffolding_indices(g, lib_count),
           single_long_reads(g, lib_count),
           genome(genome),
           edge_qual(g),
           edge_pos(g, max_mapping_gap + k, max_gap_diff)
 { 
     if (detach_indices) {
         DetachAll();
     }
 }
Esempio n. 12
0
// ----------------------------------------------------------------------------
void MouseSap::OnRelease(bool /*appShutDown*/)
// ----------------------------------------------------------------------------
{
	// do de-initialization for your plugin
	// if appShutDown is false, the plugin is unloaded because Em::Blocks is being shut down,
	// which means you must not use any of the SDK Managers
	// NOTE: after this function, the inherited member variable
	// IsAttached() will be FALSE...

	// Remove all Mouse event handlers
	DetachAll();
	#if defined(LOGGING)
	// deleting the log crashes CB on exit
	//-delete pMyLog;
	//-m_pMyLog = 0;
    #endif

    delete m_pMMSapEvents;
    m_pMMSapEvents = 0;
    m_bMouseSapEnabled = false;
}
Esempio n. 13
0
void CUILevelMap::UpdateSpots		()
{
	DetachAll		();
	if( fsimilar(MapWnd()->GlobalMap()->GetCurrentZoom(),MapWnd()->GlobalMap()->GetMinZoom(),EPS_L ) ) return;
	Frect _r;
	GetAbsoluteRect(_r);
	if( FALSE==MapWnd()->ActiveMapRect().intersected(_r)) return;
/*
	if(m_anomalies_map){
		m_anomalies_map->SetWndPos	(0.0f,0.0f);
		m_anomalies_map->SetWndSize	(GetWndSize());
		AttachChild					(m_anomalies_map);
	}

	CLevelFogOfWar* F	= Level().FogOfWarMngr().GetFogOfWar(MapName());
	AttachChild		(F);
*/
	Locations& ls =Level().MapManager().Locations();
	for(Locations_it it=ls.begin(); it!=ls.end(); ++it){
		if ((*it).location->Update())
			(*it).location->UpdateLevelMap(this);
	}
}
Esempio n. 14
0
bool
LDemonstrator::Inference(vector<string>* __param){
// cout<<"\nLDemonstrator::Inference(vector<string>* __param){ ....\n";
// 
if(GetStack()->size() == 0)
   return this;
bool end=false;

LDemonstrator* affine=POPAffines();
// Print();
int nb_repeats=GetStack()->size();
nb_repeats*=nb_repeats;
bool some_affine_constraints=false;
if(GetStack()->size() ==0)
   end=true;

while(!end){
//    cout<<"\nLDemonstrator::Inference==========STACK\n";
//    Print();
   AttachedClauses* header=POP();
/*   cout<<"\nLDemonstrator::Inference==========HEADER\n";
   header->Print();*/
   int __nb_unified;
   if(header->GetKnowledge()->GetVariables()->size()==0){
      PUSHBACK(header->GetKnowledge());
      __nb_unified=0;
      
      }
   else{

      AttachToAll(header->GetKnowledge());
      Try2UnifyAll(__param);
      vector<LogicalClause*>* unified=new vector<LogicalClause*>();
      *unified=RecoverUnified();
      __nb_unified=unified->size();
      DetachAll();
      Inject(unified);
      
      PUSHBACK(header->GetKnowledge());
      LDemonstrator* traduced_affine=POPAffines();
   
      if(traduced_affine->GetStack()->size() != 0){
         affine->Merge(traduced_affine);
//          cout<<"\nInference ........ ohhh pas mal fin anticipée ...!\n";
//          traduced_affine->Print();
//          cout<<"\naffine ....\n";
//          affine->Print();
//          cout<<"\nInference ........ ohhh pas mal fin anticipée ...FIN\n";
         some_affine_constraints=true;
         end=true;
         }
      
      }
   
   nb_repeats--;
      
   if(nb_repeats==0) end=true;
//    cout<<"\n nb repeats = "<<nb_repeats<<"  taille pile d'inferences ="<<GetStack()->size()<<"  nb unified == "<<__nb_unified;
//    Print();

   }


// CLEAR();
Merge(affine);

// cout<<"\nLDemonstrator::Inference=================FIN DE DEMO \n";
// Print();
// cout<<"\nLDemonstrator::Inference(vector<string>* __param){ ....END\n";
// cout<<"\n================================================================\n";
return some_affine_constraints;
}
Esempio n. 15
0
void CBattleArrayStationServer::ChangeArrayState(EBattleArrayState eState)
{
	CCharacterDictator* pCharacter=CCharacterDictator::GetCharacterByID(m_uEntityID);
	if (NULL==pCharacter||m_eBattleArrayState==eState)
	{
		return;
	}
	EBattleArrayState eArrayState=m_eBattleArrayState;
	m_eBattleArrayState=eState;
	switch (eState)
	{
	case eBAS_InArray:
		if (m_pArrayMgr->m_uOutArrayStateCount>0&&eArrayState==eBAS_OutArray)
		{
			m_pArrayMgr->SetOutArrayStateCount(--m_pArrayMgr->m_uOutArrayStateCount);
		}
		m_pArrayMgr->SetInStationCount(++m_pArrayMgr->m_uInStationCount);
		CMagicEffServer::GetMagicEff("压阵")->Do(m_pSkillInst,pCharacter->GetFighter(),pCharacter->GetFighter());
		break;
	case eBAS_OutArray:
		{
			DetachAll();
			CMagicEffServer::GetMagicEff("离阵")->Do(m_pSkillInst,pCharacter->GetFighter(),pCharacter->GetFighter());
			uint8 uOutArrayStateCount=++m_pArrayMgr->m_uOutArrayStateCount;
			m_pArrayMgr->SetOutArrayStateCount(uOutArrayStateCount);
			if (uOutArrayStateCount==MAX_BATTLEARRAY)
			{
				return;
			}
			if (m_pArrayMgr->m_uInStationCount>0)
			{
				m_pArrayMgr->SetInStationCount(--m_pArrayMgr->m_uInStationCount);
			}	
		}
		break;
	case eBAS_ReturnArray:
		if (pCharacter->GetScene()==m_pArrayMgr->m_pScene)
		{
			if (m_pArrayMgr->m_uOutArrayStateCount>0&&eArrayState==eBAS_OutArray)
			{
				m_pArrayMgr->SetOutArrayStateCount(--m_pArrayMgr->m_uOutArrayStateCount);
			}
			pCharacter->GetFighter()->Attach(this,eCE_ChangeMapEnd);
			pCharacter->GetFighter()->Attach(this,eCE_CancelCoerceMove);
			CMagicEffServer::GetMagicEff("归阵")->Do(m_pSkillInst,pCharacter->GetFighter(),pCharacter->GetFighter());
			CFPos CurPos = pCharacter->GetPixelPos();
			int32 iMaxStep =(int32) (abs(CurPos.x - m_Pos.x) + abs(CurPos.y - m_Pos.y))/eGridSpanForObj;
			 iMaxStep = iMaxStep > 5 ? iMaxStep : 5 ;
			EMoveToResult eResult=pCharacter->MoveToInAStarPath(m_Pos,pCharacter->GetFighter()->m_RunSpeed.Get(pCharacter->GetFighter()),eFPT_AStar,eBT_LowBarrier,0.0f,iMaxStep);
			if (eResult!=eMTR_Success)
			{
				ChangeArrayState(eBAS_OutArray);
			}
		}
		break;
	case eBAS_FinishArray:
		FinishArray();
		break;
	default:
		break;
	}
	NotifyClientArrayChange();
}
Esempio n. 16
0
Container::~Container()
{
  DetachAll();
}
Esempio n. 17
0
//-----------------------------------------------------------------------------
// Purpose: Make the magnet inactive. Drop everything it's got hooked on.
//-----------------------------------------------------------------------------
void CPhysMagnet::InputTurnOff( inputdata_t &inputdata )
{
	m_bActive = false;
	DetachAll();
}
Esempio n. 18
0
void ModuleManager::DoSafeUnload(Module* mod)
{
	// First, notify all modules that a module is about to be unloaded, so in case
	// they pass execution to the soon to be unloaded module, it will happen now,
	// i.e. before we unregister the services of the module being unloaded
	FOREACH_MOD(OnUnloadModule, (mod));

	std::map<std::string, Module*>::iterator modfind = Modules.find(mod->ModuleSourceFile);

	std::vector<reference<ExtensionItem> > items;
	ServerInstance->Extensions.BeginUnregister(modfind->second, items);
	/* Give the module a chance to tidy out all its metadata */
	const chan_hash& chans = ServerInstance->GetChans();
	for (chan_hash::const_iterator c = chans.begin(); c != chans.end(); )
	{
		Channel* chan = c->second;
		++c;
		mod->OnCleanup(TYPE_CHANNEL, chan);
		chan->doUnhookExtensions(items);
		const Channel::MemberMap& users = chan->GetUsers();
		for (Channel::MemberMap::const_iterator mi = users.begin(); mi != users.end(); ++mi)
			mi->second->doUnhookExtensions(items);
	}

	const user_hash& users = ServerInstance->Users->GetUsers();
	for (user_hash::const_iterator u = users.begin(); u != users.end(); )
	{
		User* user = u->second;
		// The module may quit the user (e.g. SSL mod unloading) and that will remove it from the container
		++u;
		mod->OnCleanup(TYPE_USER, user);
		user->doUnhookExtensions(items);
	}

	const ModeParser::ModeHandlerMap& usermodes = ServerInstance->Modes->GetModes(MODETYPE_USER);
	for (ModeParser::ModeHandlerMap::const_iterator i = usermodes.begin(); i != usermodes.end(); )
	{
		ModeHandler* mh = i->second;
		++i;
		if (mh->creator == mod)
			this->DelService(*mh);
	}

	const ModeParser::ModeHandlerMap& chanmodes = ServerInstance->Modes->GetModes(MODETYPE_CHANNEL);
	for (ModeParser::ModeHandlerMap::const_iterator i = chanmodes.begin(); i != chanmodes.end(); )
	{
		ModeHandler* mh = i->second;
		++i;
		if (mh->creator == mod)
			this->DelService(*mh);
	}

	for(std::multimap<std::string, ServiceProvider*>::iterator i = DataProviders.begin(); i != DataProviders.end(); )
	{
		std::multimap<std::string, ServiceProvider*>::iterator curr = i++;
		if (curr->second->creator == mod)
			DataProviders.erase(curr);
	}

	dynamic_reference_base::reset_all();

	DetachAll(mod);

	Modules.erase(modfind);
	ServerInstance->GlobalCulls.AddItem(mod);

	ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Module %s unloaded",mod->ModuleSourceFile.c_str());
	ServerInstance->ISupport.Build();
}
Esempio n. 19
0
void CUIArtefactParams::SetInfo(CGameObject *obj)
{	
	CArtefact *art = smart_cast<CArtefact*> (obj);
	R_ASSERT2(art, "object is not CArtefact");
	const shared_str& af_section = art->cNameSect();
	CActor *pActor = Actor();
	if (!pActor) return;

	string128					_buff;
	float						_h = 0.0f;
	DetachAll					();
	for(u32 i=_item_start; i<_max_item_index; ++i)
	{
		CUIStatic* _s			= m_info_items[i];

		float					_val;
		if(i<_max_item_index1)
		{
#ifdef AF_SHOW_DYNAMIC_PARAMS
			float _actor_val	= pActor->conditions().GetParamByName(af_actor_param_names[i]);			
			float CArtefact::* pRestoreSpeed = af_prop_offsets[i];
			_val = (art->*pRestoreSpeed); // alpet: используется указатель на данные класса
#else
			_val				= pSettings->r_float	(af_section, af_item_sect_names[i]);
			float _actor_val	= pSettings->r_float	("actor_condition", af_actor_param_names[i]);
#endif
			if					(fis_zero(_val))				continue;
			
			_val				= (_val/_actor_val)*100.0f;
		}else
		{
#ifdef AF_SHOW_DYNAMIC_PARAMS			
			u32 idx = i - _max_item_index1;  // absorbation index			 
			_val = art->m_ArtefactHitImmunities.immunities()[idx]; // real absorbation values			
#else
			shared_str _sect	= pSettings->r_string(af_section, "hit_absorbation_sect");
			_val				= pSettings->r_float(_sect, af_item_sect_names[i]);
#endif
			if					(fsimilar(_val, 1.0f))				continue;
			_val				= (1.0f - _val);
			_val				*= 100.0f;

		}
		LPCSTR _sn = "%";
		if(i==_item_radiation_restore_speed || i==_item_power_restore_speed)
		{
			_val				/= 100.0f;
			_sn					= "";
		}

		LPCSTR _color = (_val>0)?"%c[green]":"%c[red]";
		
		if(i==_item_bleeding_restore_speed)
			_val		*=	-1.0f;

		if(i==_item_bleeding_restore_speed || i==_item_radiation_restore_speed)
			_color = (_val>0)?"%c[red]":"%c[green]";


		sprintf_s					(	_buff, "%s %s %+.0f %s", 
									CStringTable().translate(af_item_param_names[i]).c_str(), 
									_color, 
									_val, 
									_sn);
		_s->SetText				(_buff);
		_s->SetWndPos			(_s->GetWndPos().x, _h);
		_h						+= _s->GetWndSize().y;
		AttachChild				(_s);
	}
	SetHeight					(_h);
}
Esempio n. 20
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
CPhysMagnet::~CPhysMagnet( void )
{
	DetachAll();
}