///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_ClientProjectile_Flamethrower.cpp
// Author : Emil Popovic
// Date   : 27 February 2009
//
// Copyright (c) 2009 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

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

#include "Core/Asura.h"

// This file's header...
#include "Entity/PhysicalObject/Projectile/AVP_ClientProjectile_Flamethrower.h"

// Asura independent header-files...
#include "Network/Asura_Message.h"

// Game independent header-files...
#include "Entity/AVP_Entity_Classification.h"
#include "Entity/PhysicalObject/Projectile/AVP_Projectile_Messages.h"


Asura_Hashed_List<AVP_ClientProjectile_Flamethrower>	AVP_ClientProjectile_Flamethrower::s_xList;

AVP_ClientProjectile_Flamethrower::AVP_ClientProjectile_Flamethrower ( const AVP_Message_ProjectileClientUpdate* pxData )
: PARENT( pxData )
, m_bIsDetachedFromFlame(false)
, m_fTimeInAir(0.0f)
{
	Classification = AVP_ENTITYCLASS_PROJECTILE_FLAMETHROWER;

	s_xList.AddToList(this);
}

AVP_ClientProjectile_Flamethrower::~AVP_ClientProjectile_Flamethrower ()
{
	s_xList.RemoveFromList(this);
}

void AVP_ClientProjectile_Flamethrower::Create (const Asura_Message *pxMessage)
{
	AVP_ClientProjectile_Flamethrower* pxClient = new AVP_ClientProjectile_Flamethrower( static_cast< const AVP_Message_ProjectileClientUpdate* >( pxMessage->GetData() ) );

	pxClient->HandleMessage(pxMessage);
}

void AVP_ClientProjectile_Flamethrower::Update()
{
	PARENT::Update();

	m_fTimeInAir += Asura_Timers::GetGameTimeSlice();
}


/// End of file. ///
