//
// Asura_ServerEntity_ClientVolumeTrigger.h
//
// Created by Richard Rice - 22/11/2004
// 
// Copyright (C) 2004 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef __ASURA_SERVERENTITY_CLIENTVOLUMETRIGGER_H__
#define __ASURA_SERVERENTITY_CLIENTVOLUMETRIGGER_H__

#include "Entity/Triggers/Asura_ServerEntity_AdvancedVolumeTrigger.h"

class Asura_ServerEntity_ClientVolumeTrigger : public Asura_ServerEntity_AdvancedVolumeTrigger
{
	public :
		Asura_ServerEntity_ClientVolumeTrigger(const Asura_Bounding_Box& xBB);
		Asura_ServerEntity_ClientVolumeTrigger(Asura_Guid uGuid);
		Asura_ServerEntity_ClientVolumeTrigger(Asura_Guid uGuid,const char*& pcChunkBuffer);

		static void CreateFromChunkBuffer(Asura_Guid uGuid, const char*& pcChunkBuffer);

		struct ChunkData
		{
			//If this gets updated then the loaders for the client entity version
			//will need to updatd as well.
			enum{CURRENT_VERSION = 0};
			//nothing to save at the moment
		};

	protected :


		virtual void Update(){};//don't want Update() from parent trigger class being called

		//virtual function overides for saving
		int GetChunkBufferSize();
		void FillInChunkBuffer(char*& chunkBuffer);

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

		virtual void OnActivation();
		virtual void OnDeactivation();
		virtual void OnTrigger() {}//triggering is handled on client instead
		virtual void OnUnTrigger() {}
		virtual void OnDestruction(){};

};


#endif //__ASURA_SERVERENTITY_CLIENTVOLUMETRIGGER_H__
