///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Messages_Predalien.h
// Author : Andy Tate
// Date   : 4-Oct-2006
//
// Copyright (C) 2006 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

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

#ifndef __AVP_MESSAGES_PREDALIEN_H__
#define __AVP_MESSAGES_PREDALIEN_H__

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

#include "Core/Asura_Maths.h"
#include "Entity/PhysicalObject/Moves/Asura_Movement_System.h"

#include "Entity/PhysicalObject/Actor/Vertebrates/AVP_Vertebrate_Messages.h"
//#include "Entity/PhysicalObject/Actor/Vertebrates/Predalien/AVP_ServerActor_Predalien.h"

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

class Asura_NetMsg;
class Asura_BitPacker; 
class Asura_BitUnpacker; 
class AVP_ClientActor_Predalien;
class AVP_ServerActor_Predalien;


////////////////////////////////////////////////////////////////////////////////
// Class declaration...
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Class        : AVP_Message_PredalienClientUpdate
////////////////////////////////////////////////////////////////////////////////

class AVP_Message_PredalienClientUpdate : public AVP_Message_Vertebrate_ClientUpdate
{
public:
	void FillPredalien( const AVP_ServerActor_Predalien& xPredalien );

	// Accessor functions...
	u_int		GetAlertLevel() const					{ return m_uAlertLevel; }

#ifdef ASURA_SUPPORT_NETMSG_SYSTEM
	static void RegisterFields(u_short usMsgID, u_short usEntityClassification);
	static void RegisterFields(Asura_NetMsg* pxNetMsg);
	static u_char GetNumFields() { return static_cast<u_char>(1 + AVP_Message_Vertebrate_ClientUpdate::GetNumFields()); }
#endif//#ifdef ASURA_SUPPORT_NETMSG_SYSTEM

protected:
	AVP_Message_PredalienClientUpdate() {}

private:
	// Private variables...
	u_int		m_uAlertLevel;

};

////////////////////////////////////////////////////////////////////////////////
// Class        : AVP_Message_Predalien_Move_JumpStart
////////////////////////////////////////////////////////////////////////////////
class AVP_Message_Predalien_Move_JumpStart : public Asura_Msg_Move
{
public:

	void SetJumpData(const Asura_Vector_3& xDestinationPosition, int iJumpVariation, bool bRunAfterJump, float fTurnTime )
	{
		m_xDestinationPosition = xDestinationPosition;
		m_iJumpVariation = iJumpVariation;
		m_fTurnTime = fTurnTime;
		m_bRunAfterJump = bRunAfterJump;
	}

	const Asura_Vector_3& GetDestinationPosition() const { return m_xDestinationPosition; }
	int GetJumpVariation() const { return m_iJumpVariation; }
	float GetTurnTime() const { return m_fTurnTime; }
	bool RunAfterJump() const { return m_bRunAfterJump; }

private:
	// Private variables...
	Asura_Vector_3	m_xDestinationPosition;
	int	m_iJumpVariation;
	float m_fTurnTime;
	bool m_bRunAfterJump;

}; 

////////////////////////////////////////////////////////////////////////////////
// Class        : AVP_Message_Predalien_Move_MoveAndJumpStart
////////////////////////////////////////////////////////////////////////////////
class AVP_Message_Predalien_Move_WalkAndJumpStart : public AVP_Message_Predalien_Move_JumpStart
{
public:

	void SetJumpData(const Asura_Vector_3& xStartPosition, const Asura_Vector_3& xDestinationPosition, int iJumpVariation, bool bRunAfterJump, float fTurnTimeInJump , float fMoveSpeed, float fTurnSpeed )
	{
		AVP_Message_Predalien_Move_JumpStart::SetJumpData(xDestinationPosition, iJumpVariation, bRunAfterJump, fTurnTimeInJump);
		m_xStartPosition = xStartPosition;
		m_fMoveSpeed = fMoveSpeed;
		m_fTurnSpeed = fTurnSpeed;

	}

	const Asura_Vector_3& GetStartPosition() const { return m_xStartPosition; }
	float GetMoveSpeed() const { return m_fMoveSpeed; }
	float GetTurnSpeed() const { return m_fTurnSpeed; }

private:
	// Private variables...
	Asura_Vector_3	m_xStartPosition;
	float m_fMoveSpeed;
	float m_fTurnSpeed;

};   


#endif   // ifndef __AVP_MESSAGES_PREDALIEN_H__


/// End of file. ///
