
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_ServerProjectile_AcidSpit.h
// Author : Chris Wallace
// Date   : 27-June-2007
//
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
	#pragma once
#endif   // ifdef ASURA_USE_PRAGMA_ONCE

#ifndef __AVP_SERVERPROJECTILE_ACIDSPIT_H__
#define __AVP_SERVERPROJECTILE_ACIDSPIT_H__

////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////

#include "Entity/PhysicalObject/Projectile/AVP_ServerProjectile_GenericProjectile.h"

////////////////////////////////////////////////////////////////////////////////
// Forward class declarations...
////////////////////////////////////////////////////////////////////////////////

class AVP_GenericProjectileData;

////////////////////////////////////////////////////////////////////////////////
// Class        : AVP_ServerProjectile_AcidSpit
// Author       : Callum Hope
// Date         : 20/12/2007
//
// Description  : Class to handle the differences between the acid projectile and the generic one. 
////////////////////////////////////////////////////////////////////////////////

class AVP_ServerProjectile_AcidSpit : public AVP_ServerProjectile_GenericProjectile
{
public:
	static	AVP_ServerProjectile_AcidSpit*	Create( const Asura_Message* pxMsg );

	virtual	void	Update( void );

	virtual	void	ReadFromChunkStream( Asura_Chunk_Stream& xStream );
	virtual	void	WriteToChunkStream( Asura_Chunk_Stream& xStream ) const;

	static	AVP_ServerProjectile_AcidSpit*							FindEntity( const Asura_Guid uGuid ){ return( s_xList.FindEntity( uGuid ) ); }
	static	const Asura_Hashed_List<AVP_ServerProjectile_AcidSpit>*	GetList( void )						{ return( &s_xList ); }

protected:
	AVP_ServerProjectile_AcidSpit( const Asura_Guid uGuid );
	AVP_ServerProjectile_AcidSpit( const Asura_Guid uGuid, const Asura_Message* pxMsg );
	virtual ~AVP_ServerProjectile_AcidSpit();

	virtual void	InitialiseFromBlueprint( const Asura_Blueprint& xBlueprint );
	virtual	void	MakeClientUpdateMessage( void );

	virtual void	OnCollision( const Asura_LOS_InputData& xLOSInputData, const Asura_LOS_OutputData& xLOSOutputData ); 

protected:
	const AVP_GenericProjectileData* m_pxProjectileData;

private:
	void PlaceEnvironmentalAcidDamage( const Asura_Vector_3& xPosition, const Asura_Vector_3& xNormal );

	typedef AVP_ServerProjectile_GenericProjectile PARENT;

	static Asura_Hashed_List<AVP_ServerProjectile_AcidSpit> s_xList;

	AVP_ServerProjectile_AcidSpit( void );
	AVP_ServerProjectile_AcidSpit( const AVP_ServerProjectile_AcidSpit& xOther );
	AVP_ServerProjectile_AcidSpit& operator= ( const AVP_ServerProjectile_AcidSpit& xOther );
};

#endif   // ifndef __AVP_SERVERPROJECTILE_ACIDSPIT_H__

/// End of file. ///
