#include "scripts/common.txt"
#include "scripts/BP_common.txt"

class BP_RopePoint : ScriptObject
{
    kActor @self;
	// float reactivateTime;
	//------------------------------------------------------------------------------------------------------------------------
    BP_RopePoint(kActor @actor)
	{
        @self = actor;
		ropePoints.insertLast(@self);
    }
	//------------------------------------------------------------------------------------------------------------------------
	void OnBeginLevel()
    {
		self.ImpactType() = IT_STONE;
		self.Flags() |= AF_NODRAW;
		self.Flags() &= ~AF_SOLID;
	}
	//------------------------------------------------------------------------------------------------------------------------
	// void OnDamage(kActor @attacker, kDictMem @damageDef, const int damage)
	// {
		// self.Health() += damage;
        // if (damageDef is null || reactivateTime > 0.0f || playerIsRoping)
        // {
            // return;
        // }
        
        // bool bValue;
        // if (damageDef.GetBool("bRope", bValue) && bValue == true)
        // {
			// Game.PlaySound("sounds/shaders/trex_bite_attack.ksnd");
            // //self.RunFxEvent("Mantis_GlowBlue");
			
			// playerIsRoping = true;
			// playerRopePoint = self.Origin();
			// //self.Flags() &= ~AF_SOLID;
        // }
	// }
	//------------------------------------------------------------------------------------------------------------------------
    void OnTick()
	{
		// if (reactivateTime > 0.0f)
		// {
			// reactivateTime -= GAME_DELTA_TIME;
			// if (reactivateTime <= 0.0f)
			// {
				// self.Flags() |= AF_SOLID;
			// }
		// }
		// else if (!playerIsRoping && (self.Flags() & AF_SOLID) == 0)
		// {
			// reactivateTime = 0.5f;
		// }
    }
	//------------------------------------------------------------------------------------------------------------------------
    void OnSpawn()
	{
    }
	//------------------------------------------------------------------------------------------------------------------------
}
