/*	Renegade Scripts.dll
Dragonade C4 and Beacon Manager
Copyright 2015 Whitedragon, Tiberian Technologies

This file is part of the Renegade scripts.dll
The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version. See the file COPYING for more details.
In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
Only the source code to the module(s) containing the licenced code has to be released.
*/

#ifndef INCLUDE_NOC4DEFUSELEAVE
#define INCLUDE_NOC4DEFUSELEAVE

#include "da_event.h"
#include "da_gamefeature.h"
#include "da_gameobj.h"
	

class NoC4DefuseOnLeave : public DAEventClass, public DAGameFeatureClass {
public:

	~NoC4DefuseOnLeave();

	virtual void Init();
	virtual void Object_Created_Event(GameObject *obj);
	virtual void Level_Loaded_Event();
	virtual void Player_Join_Event(cPlayer *Player);
	virtual void Player_Leave_Event(cPlayer *Player);

	
};

void Restore_Proxy_C4_After_Join(int PlayerID);

class C4NoDefuse_Script : public ScriptImpClass
{
	void Destroyed(GameObject *obj);
	void Killed(GameObject *obj, GameObject *shooter);
};

class ExtendedC4GameObj : public SimpleGameObj {
public:
	float TriggerTime; // 07B0
	ReferencerClass Owner; // 07B4
	PlayerDataClass *Player; // 07C4
	const AmmoDefinitionClass* AmmoDef; // 07C8
	int DetonationMode; // 07CC
    bool attached; // 07D0
    bool attachedToDynamic; // 07D1
	ReferencerClass attachObject; // 07D4
	Vector3 AttachLocation; // 07E4
	int AttachBoneIndex; // 07F0
	PhysClass* attachPhysics; // 07F4
	bool IsAttachedToMCT; // 07F8
	float SleepTime; // 07FC
};

#endif