/*=========================================================================
* MSMagnet.cpp : MSMagnet's functions
*
*
*
*         MSMagnet MUST BE REPLACE BY THE C FILENAME
*
*
* Version              1.0
* Creation date        01/10/96
* Revision date
*
* That file needs to be compatible for all platforms.
*
* (c) Ubi Studios 1996
*=======================================================================*/
 
#ifndef  D_THROW_MGT
 
/*******************************************************/
/**** For the structures and variables declarations ****/
/*******************************************************/
#define D_MSMagnet_StructureDefine
#define D_MSMagnet_VariableDefine
 
#include "ToolsCPA.h"
 
#include "Options/Options.h"
#include "Macros.h"
 
#include "Actions/AllActs.h"
#include "Structur/MemGame.h"
#include "Structur/ErrGame.h"
#include "Structur/Objects.h"
#include "Structur/GameScpt.h"
#include "Structur/StdObjSt.h"
#include "Structur/EngMode.h"
 
#include "Basic.h"
#include "GameEng.h"
#include "ObjInit.h"
#include "ZeMem.h"
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet's object action script callback
 *-----------------------------------------------------------------------------
 *  Input :         Object pointer
 *  Output :        None
 *-----------------------------------------------------------------------------
 *  Creation date : 01/10/96            Author : Francois
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
#if defined(GAM_USE_SCRIPT)
SCR_tde_Anl_ReturnValue fn_eMSMagnetScriptCallback(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action	_eAction)
{
	SCR_tde_Anl_ReturnValue eReturnValue = SCR_ERV_Anl_NormalReturn;
	MS_tdxHandleToMSMagnet h_MSMagnet;
	struct tdstEngineObject_ *p_stEngineObject;
 
	_p_stFile=_p_stFile;
 
	SCR_M_RdL0_GetSectionLong(C_ParentSection,0,struct tdstEngineObject_ *, p_stEngineObject);
 
	if (M_IsTitle)
	{
        MMG_fn_vBeginMemoryInfo (MMG_C_lTypeMiniStructure , MMG_C_lSubTypeMagnet , p_stEngineObject);
		h_MSMagnet = fn_h_MSMagnetRealAlloc();
        MMG_fn_vEndMemoryInfo ();
		p_stEngineObject->h_MSMagnet = h_MSMagnet;
 
		SCR_M_RdL0_SetSectionLong(C_ThisSection,0,h_MSMagnet);
	}
	else if (M_IsEntry)
	{
		SCR_M_RdL0_GetSectionLong(C_ThisSection,0,MS_tdxHandleToMSMagnet,h_MSMagnet);
		if (M_ActionIs(C_EntryMagnetStatus))
		{
			M_CheckScriptParamNumber(1);
			fn_vMSMagnetSetStatus(h_MSMagnet,(unsigned char)fn_lAToI(_ap_szParams[0]));
		}
		if (M_ActionIs(C_EntryMagnetFar))
		{
			M_CheckScriptParamNumber(1);
			fn_vMSMagnetSetFar(h_MSMagnet,fn_fAToF(_ap_szParams[0]));
		}
		if (M_ActionIs(C_EntryMagnetNear))
		{
			M_CheckScriptParamNumber(1);
			fn_vMSMagnetSetNear(h_MSMagnet,fn_fAToF(_ap_szParams[0]));
		}
		if (M_ActionIs(C_EntryMagnetStrength))
		{
			M_CheckScriptParamNumber(1);
			fn_vMSMagnetSetStrength(h_MSMagnet,fn_fAToF(_ap_szParams[0]));
		}
		if (M_ActionIs(C_EntryMagnetDuration))
		{
			M_CheckScriptParamNumber(1);
			fn_vMSMagnetSetDuration(h_MSMagnet,(unsigned long)fn_lAToI(_ap_szParams[0]));
		}
	}
 
	return(eReturnValue);
}
#endif /* GAM_USE_SCRIPT */
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet's save structure
 *-----------------------------------------------------------------------------
 *  Input :         SCR_tdst_File_Description *, struct tdstEngineObject_ *
 *  Output :        Void
 *-----------------------------------------------------------------------------
 *  Creation date : 28/02/97            Author : Francois
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
/*
void fn_vMSMagnetSaveMiniStructure(SCR_tdst_File_Description *p_stFile,struct tdstEngineObject_ *p_stObject)
{
 char szSection[SCR_CV_ui_Cfg_MaxLenName];
 MS_tdxHandleToMSMagnet h_MSMagnet = p_stObject->h_MSMagnet;
 
 SCR_M_SvL0_SaveBlankLine(p_stFile);
 SCR_M_SvL0_SaveComment(p_stFile, "**** MSMagnet mini-structure definition ****");
 
 sprintf(szSection,"%s:",C_SectionMSMagnetDescription);
 SCR_M_SvL0_SaveBeginSection(p_stFile,szSection,SCR_CC_C_Cfg_EOL);
 
 // ** Put here the saving script functions **	- Oliv' - Portage v15 - 1 warning removed here
 
 SCR_M_SvL0_SaveEndSection(p_stFile, SCR_CC_C_Cfg_EOL)
}
*/
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet's mini-structure sizeof
 *-----------------------------------------------------------------------------
 *  Input :         None
 *  Output :        Size of
 *-----------------------------------------------------------------------------
 *  Creation date : 14/10/96            Author : Francois
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
unsigned long fn_ulMSMagnetSizeOf()
{
	return(sizeof(struct tdstMSMagnet_));
}
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet's object action allocation
 *-----------------------------------------------------------------------------
 *  Input :         Object pointer
 *  Output :        None
 *-----------------------------------------------------------------------------
 *  Creation date : 01/10/96            Author : Francois
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
void fn_vMSMagnetAlloc(struct tdstEngineObject_ *p_stObject)
{
	if (p_stObject==NULL)
		M_GameFatalError(E_uwGameMiniStructObjectNull);
 
	if (p_stObject->h_MSMagnet!=NULL)
		M_GameFatalError(E_uwGameMiniStructAllocAlreadyAlloc);
 
    MMG_fn_vBeginMemoryInfo (MMG_C_lTypeMiniStructure , MMG_C_lSubTypeMagnet , p_stObject);
	p_stObject->h_MSMagnet									= fn_h_MSMagnetRealAlloc();
    MMG_fn_vEndMemoryInfo ();
	p_stObject->h_MSMagnet->ulDuration						= 0;
	p_stObject->h_MSMagnet->status							= MAGNETOFF;
	p_stObject->h_MSMagnet->xMaxIndexOfMagnetModification	= 0;
	/*p_stObject->h_MSMagnet->bStrengthModified				= FALSE;*/
	/*p_stObject->h_MSMagnet->bNearFarModified				= FALSE;*/
	p_stObject->h_MSMagnet->ucModifiedFlags					= 0;
	fn_vMSMagnetInitValueSAI(p_stObject->h_MSMagnet);
}
 
MS_tdxHandleToMSMagnet fn_h_MSMagnetRealAlloc()
{
	MS_tdxHandleToMSMagnet h_MSMagnet;
 
	h_MSMagnet = (MS_tdxHandleToMSMagnet)M_p_GameMallocInHLM(fn_ulMSMagnetSizeOf());
 
	return(h_MSMagnet);
}
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet's object action free
 *-----------------------------------------------------------------------------
 *  Input :         Object pointer
 *  Output :        None
 *-----------------------------------------------------------------------------
 *  Creation date : 01/10/96            Author : Francois
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
void fn_vMSMagnetFree(struct tdstEngineObject_ *p_stObject)
{
	if (p_stObject==NULL)
		M_GameFatalError(E_uwGameMiniStructObjectNull);
 
	if (p_stObject->h_MSMagnet==NULL)
		M_GameFatalError(E_uwGameMiniStructNull);
 
	fn_vMSMagnetFreeInitValueSAI(p_stObject->h_MSMagnet);
    MMG_fn_vAddMemoryInfo( MMG_C_lTypeMiniStructure , MMG_C_lSubTypeMagnet , p_stObject );
	M_GameFreeInHLM(p_stObject->h_MSMagnet);
}
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet's object action initialisation
 *-----------------------------------------------------------------------------
 *  Input :         When this function's called (see ObjInit.h)
 *  Output :        None
 *-----------------------------------------------------------------------------
 *  Creation date : 01/10/96            Author : Francois
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
void fn_vMSMagnetInit(struct tdstEngineObject_ *p_stObject,enum tdeObjectTreeInit_ eObjectInit)
{
	if (p_stObject==NULL)
		M_GameFatalError(E_uwGameMiniStructObjectNull);
 
	if (p_stObject->h_MSMagnet==NULL)
		M_GameFatalError(E_uwGameMiniStructNull);
 
	switch(eObjectInit)
	{
	case OTI_ReinitTheMap:
		fn_vMSMagnetSetStatus(p_stObject->h_MSMagnet, MAGNETOFF);
		break;
	case OTI_LoadSavedGame:
		fn_vMSMagnetSetStatus(p_stObject->h_MSMagnet, MAGNETOFF);
		break;
	case OTI_MapLoaded:
		fn_vMSMagnetSetStatus(p_stObject->h_MSMagnet, MAGNETOFF);
		fn_vMSMagnetInitValueSAI(p_stObject->h_MSMagnet);
		fn_vMSMagnetSavedValueSAI(p_stObject->h_MSMagnet);
		break;
	case OTI_PlayerDead:
		fn_vMSMagnetSetStatus(p_stObject->h_MSMagnet, MAGNETOFF);
		break;
	default:
     break;
	}
}
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet's object action desinitialisation
 *-----------------------------------------------------------------------------
 *  Input :         When this function's called (see ObjInit.h)
 *  Output :        None
 *-----------------------------------------------------------------------------
 *  Creation date : 01/10/96            Author : Francois
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
void fn_vMSMagnetDesinit(struct tdstEngineObject_ *p_stObject,enum tdeObjectTreeInit_ eObjectInit)
{
	if (p_stObject==NULL)
		M_GameFatalError(E_uwGameMiniStructObjectNull);
 
	if (p_stObject->h_MSMagnet==NULL)
		M_GameFatalError(E_uwGameMiniStructNull);
 
	switch(eObjectInit)
	{
	case OTI_ReinitTheMap:
		break;
	case OTI_MapLoaded:
		break;
	case OTI_PlayerDead:
		break;
	default:
     break;
	}
}
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet's object copy clone action
 *-----------------------------------------------------------------------------
 *  Input :         Handle to destination, handle to source
 *  Output :        None
 *-----------------------------------------------------------------------------
 *  Creation date : 30/06/97            Author : Olivier Jourdan
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
void fn_vMSMagnetCopyClone(struct tdstEngineObject_ * _p_stObjectDest,struct tdstEngineObject_ * _p_stObjectSrc)
{
   /* If MSMagnet doesn't contains pointers to structure that may be*/
   /* changed during the game, this function must only be a :*/
    memcpy(_p_stObjectDest->h_MSMagnet,_p_stObjectSrc->h_MSMagnet,fn_ulMSMagnetSizeOf());
}
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet access functions
 *-----------------------------------------------------------------------------
 *  Input :         MS_tdxHandleToMSMagnet + (value)
 *  Output :        (value or pointer)
 *-----------------------------------------------------------------------------
 *  Creation date : 29/01/97            Author : Francois
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
MTH_tdxReal fn_xMSMagnetGetFar(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	return((h_MSMagnet->xFar > h_MSMagnet->xNear)?h_MSMagnet->xFar:h_MSMagnet->xNear);
}
 
void fn_vMSMagnetSetFar(MS_tdxHandleToMSMagnet h_MSMagnet,MTH_tdxReal xValue)
{
	h_MSMagnet->xFar = xValue;
	fn_vMSMagnetSetNearFarModification(h_MSMagnet,TRUE);
}
 
MTH_tdxReal fn_xMSMagnetGetNear(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	return((h_MSMagnet->xFar < h_MSMagnet->xNear)?h_MSMagnet->xFar:h_MSMagnet->xNear);
}
 
void fn_vMSMagnetSetNear(MS_tdxHandleToMSMagnet h_MSMagnet,MTH_tdxReal xValue)
{
	h_MSMagnet->xNear = xValue;
	fn_vMSMagnetSetNearFarModification(h_MSMagnet,TRUE);
}
 
MTH_tdxReal fn_xMSMagnetGetStrength(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	return(h_MSMagnet->xStrength);
}
 
void fn_vMSMagnetSetStrength(MS_tdxHandleToMSMagnet h_MSMagnet,MTH_tdxReal xValue)
{
	h_MSMagnet->xStrength = xValue;
	fn_vMSMagnetSetStrengthModification(h_MSMagnet,TRUE);
}
 
unsigned char fn_lMSMagnetGetStatus(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	return(h_MSMagnet->status);
}
 
void fn_vMSMagnetSetStatus(MS_tdxHandleToMSMagnet h_MSMagnet,unsigned char xValue)
{
	h_MSMagnet->status = xValue;
}
 
void fn_vMSMagnetAddMagnetModification(MS_tdxHandleToMSMagnet h_MSMagnet, MGT_tdxHandleToMagnetModification h_MagnetModif )
{
	ACP_tdxIndex					  xIndex;
	MGT_tdxHandleToMagnetModification *p_h_MagnetModif;
 
	for( xIndex = 0 , p_h_MagnetModif = h_MSMagnet -> d_hMagnetModification ;
	     xIndex < h_MSMagnet -> xMaxIndexOfMagnetModification ;
		 xIndex++, p_h_MagnetModif++ )
	{
		if( (*p_h_MagnetModif) == NULL )
		{
			break;
		}
	}
	if( xIndex < MGT_MAX_NUMBEROF_MODIFIEDOBJECTS )
	{
		(*p_h_MagnetModif) = h_MagnetModif;
		if( xIndex == h_MSMagnet -> xMaxIndexOfMagnetModification )
			h_MSMagnet -> xMaxIndexOfMagnetModification++;
	}
}
 
void fn_vMSMagnetDeleteMagnetModification(MS_tdxHandleToMSMagnet h_MSMagnet, MGT_tdxHandleToMagnetModification h_MagnetModif )
{
	ACP_tdxIndex xIndex;
 
	for( xIndex = 0 ; xIndex < h_MSMagnet -> xMaxIndexOfMagnetModification ; xIndex++ )
	{
		if( h_MSMagnet -> d_hMagnetModification[ xIndex ] == h_MagnetModif )
		{
			h_MSMagnet -> d_hMagnetModification[ xIndex ] = NULL;
			if( xIndex == (h_MSMagnet -> xMaxIndexOfMagnetModification-1) )
				h_MSMagnet -> xMaxIndexOfMagnetModification--;
			break;
		}
	}
}
 
MGT_tdxHandleToMagnetModification fn_hMSMagnetGetMagnetModification(MS_tdxHandleToMSMagnet h_MSMagnet, ACP_tdxIndex xIndex )
{
	return h_MSMagnet -> d_hMagnetModification[ xIndex ];
}
 
ACP_tdxIndex fn_xMSMagnetGetMaxIndexOfMagnetModification(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	return h_MSMagnet -> xMaxIndexOfMagnetModification;
}
 
MTH3D_tdstVector * fn_hMSMagnetGetPosition(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	return(&(h_MSMagnet->stPosition));
}
 
void fn_vMSMagnetSetPosition(MS_tdxHandleToMSMagnet h_MSMagnet,MTH3D_tdstVector *stPosition)
{
	MTH3D_M_vCopyVector(&(h_MSMagnet->stPosition), stPosition);
}
 
unsigned long fn_ulMSMagnetGetDuration(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	return(h_MSMagnet->ulDuration);
}
 
void fn_vMSMagnetSetDuration(MS_tdxHandleToMSMagnet h_MSMagnet,unsigned long ulDuration)
{
	h_MSMagnet->ulDuration = ulDuration;
}
 
void fn_vMSMagnetSetNearFarModification(MS_tdxHandleToMSMagnet h_MSMagnet,ACP_tdxBool _bModified)
{
	/*h_MSMagnet->bNearFarModified = _bModified;*/
	if( _bModified )
		h_MSMagnet->ucModifiedFlags |= MAGNET_NEARFAR_MODIFIED;
	else
		h_MSMagnet->ucModifiedFlags &= ~MAGNET_NEARFAR_MODIFIED;
}
 
ACP_tdxBool	fn_bMSMagnetIsNearFarModified(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	/*return h_MSMagnet->bNearFarModified;*/
	return (unsigned char)( h_MSMagnet->ucModifiedFlags & MAGNET_NEARFAR_MODIFIED ? TRUE : FALSE );
}
 
void fn_vMSMagnetSetStrengthModification(MS_tdxHandleToMSMagnet h_MSMagnet,ACP_tdxBool _bModified)
{
	/*h_MSMagnet->bStrengthModified = _bModified;*/
	if( _bModified )
		h_MSMagnet->ucModifiedFlags |= MAGNET_STRENGTH_MODIFIED;
	else
		h_MSMagnet->ucModifiedFlags &= ~MAGNET_STRENGTH_MODIFIED;
}
 
ACP_tdxBool	fn_bMSMagnetIsStrengthModified(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	/*return h_MSMagnet->bStrengthModified;*/
	return (unsigned char)( h_MSMagnet->ucModifiedFlags & MAGNET_STRENGTH_MODIFIED ? TRUE : FALSE );
}
 
void fn_vMSMagnetSetPositionModification(MS_tdxHandleToMSMagnet h_MSMagnet,ACP_tdxBool _bModified)
{
	if( _bModified )
		h_MSMagnet->ucModifiedFlags |= MAGNET_POSITION_MODIFIED;
	else
		h_MSMagnet->ucModifiedFlags &= ~MAGNET_POSITION_MODIFIED;
}
 
ACP_tdxBool fn_bMSMagnetIsPositionModified(MS_tdxHandleToMSMagnet h_MSMagnet)
{
	return (unsigned char)( h_MSMagnet->ucModifiedFlags & MAGNET_POSITION_MODIFIED ? TRUE : FALSE );
}
 
/*************************************/
/**** Access functions for Editor ****/
/*************************************/
 
#define C_Magnet_SAIInitFlags (SAI_eInitWhenPlayerDead|SAI_eInitWhenReinitTheMap|SAI_eInitWhenMapLoaded)
 
#if defined(ACTIVE_EDITOR)
/*************************************************************************/
MTH_tdxReal *fn_p_xMSMagnetGetFarInit(MS_tdxHandleToMSMagnet _hMSMagnet)
{
 return
    (MTH_tdxReal *)SAI_fn_p_vGetTableValuePointerOf((void*)&_hMSMagnet->xFar, C_Magnet_SAIInitFlags);
}
 
MTH_tdxReal *fn_p_xMSMagnetGetNearInit(MS_tdxHandleToMSMagnet _hMSMagnet)
{
 return
    (MTH_tdxReal *)SAI_fn_p_vGetTableValuePointerOf((void*)&_hMSMagnet->xNear, C_Magnet_SAIInitFlags);
}
MTH_tdxReal *fn_p_xMSMagnetGetStrengthInit(MS_tdxHandleToMSMagnet _hMSMagnet)
{
 return
    (MTH_tdxReal *)SAI_fn_p_vGetTableValuePointerOf((void*)&_hMSMagnet->xStrength, C_Magnet_SAIInitFlags);
}
 
unsigned long *fn_p_ulMSMagnetGetDurationInit(MS_tdxHandleToMSMagnet _hMSMagnet)
{
 return
    (unsigned long *)SAI_fn_p_vGetTableValuePointerOf((void*)&_hMSMagnet->ulDuration, C_Magnet_SAIInitFlags);
}
 
#endif /* ACTIVE_EDITOR */
 
/*-----------------------------------------------------------------------------
 *  Description : MSMagnet SAI functions
 *-----------------------------------------------------------------------------
 *  Input :         MS_tdxHandleToMSMagnet + (value)
 *  Output :        (value or pointer)
 *-----------------------------------------------------------------------------
 *  Creation date : 29/01/97            Author : Francois
 *-----------------------------------------------------------------------------
 *  Modification date :                 Modification Author :
 *  Modifications :
 *---------------------------------------------------------------------------*/
void fn_vMSMagnetInitValueSAI(MS_tdxHandleToMSMagnet _h_MSMagnet)
{
 /**** Put here the functions :*/
	SAI_fn_bInsertMTHRealInTable((void*)&_h_MSMagnet->xFar, C_Magnet_SAIInitFlags);
	SAI_fn_bInsertMTHRealInTable((void*)&_h_MSMagnet->xNear, C_Magnet_SAIInitFlags);
	SAI_fn_bInsertMTHRealInTable((void*)&_h_MSMagnet->xStrength, C_Magnet_SAIInitFlags);
	SAI_fn_bInsertLongInTable((void*)&_h_MSMagnet->ulDuration, C_Magnet_SAIInitFlags);
}
void fn_vMSMagnetSavedValueSAI(MS_tdxHandleToMSMagnet _h_MSMagnet)
{
 /**** Put here the functions :*/
/*	SAI_fn_bInsertMTHRealInTable((void*)&_h_MSMagnet->xFar,SAI_ePlayerSaveCurrentValue);*/
/*	SAI_fn_bInsertMTHRealInTable((void*)&_h_MSMagnet->xNear,SAI_ePlayerSaveCurrentValue);*/
/*	SAI_fn_bInsertMTHRealInTable((void*)&_h_MSMagnet->xStrength,SAI_ePlayerSaveCurrentValue);*/
/*	SAI_fn_bInsertLongInTable((void*)&_h_MSMagnet->ulDuration,SAI_ePlayerSaveCurrentValue);*/
}
void fn_vMSMagnetFreeInitValueSAI(MS_tdxHandleToMSMagnet _h_MSMagnet)
{
 /**** Put here the functions :*/
 /*****/
	SAI_fn_bRemoveValueFromTable((void*)&_h_MSMagnet->xFar, C_Magnet_SAIInitFlags);
	SAI_fn_bRemoveValueFromTable((void*)&_h_MSMagnet->xNear, C_Magnet_SAIInitFlags);
	SAI_fn_bRemoveValueFromTable((void*)&_h_MSMagnet->xStrength, C_Magnet_SAIInitFlags);
	SAI_fn_bRemoveValueFromTable((void*)&_h_MSMagnet->ulDuration, C_Magnet_SAIInitFlags);
 
/*	SAI_fn_bRemoveValueFromTable((void*)&_h_MSMagnet->xFar,SAI_ePlayerSaveCurrentValue);*/
/*	SAI_fn_bRemoveValueFromTable((void*)&_h_MSMagnet->xNear,SAI_ePlayerSaveCurrentValue);*/
/*	SAI_fn_bRemoveValueFromTable((void*)&_h_MSMagnet->xStrength,SAI_ePlayerSaveCurrentValue);*/
/*	SAI_fn_bRemoveValueFromTable((void*)&_h_MSMagnet->ulDuration,SAI_ePlayerSaveCurrentValue);*/
}
 
#endif /* D_THROW_MGT */
