#include "zcommon.acs"
#library "recoil"

script 278 (void) //Rifle Recoil
{
int angle;
    angle = GetActorPitch(0);

  SetActorPitch(0, (angle-0.002));
  delay (6);
    angle = GetActorPitch(0);
  SetActorPitch(0, (angle+0.001));
}

script 279 (void) //Chaingun Recoil
{
int angle;
    angle = GetActorPitch(0);

  SetActorPitch(0, (angle-0.004));
  delay (4);
    angle = GetActorPitch(0);
  SetActorPitch(0, (angle+0.002));
}


script 281 (void) //Shotgun Recoil
{
int angle;
    angle = GetActorPitch(0);

  SetActorPitch(0, (angle-0.008));
  delay (8);
    angle = GetActorPitch(0);
  SetActorPitch(0, (angle+0.004));
}

script 280 (void) //SSG Recoil
{
int angle;
    angle = GetActorPitch(0);

  SetActorPitch(0, (angle-0.008));
  delay (4);
    angle = GetActorPitch(0);
  SetActorPitch(0, (angle+0.001));
}



Script 293 (void)
{
	// Make sure on floor
	int zDiff = GetActorZ(0) - GetActorFloorZ(0);
	SetActorPosition(0, GetActorX(0), GetActorY(0), GetActorZ(0)-zDiff, 0);
	
	// Grow
	int scaleX = 0.0;
	SetActorProperty(0, APROP_ScaleX, scaleX);
	While (scaleX < 0.5)
	{
		scaleX = scaleX + 0.01;
		SetActorProperty(0, APROP_ScaleX, scaleX);
		Delay(1);
	}
	Delay(35 * 30);
	SetActorState(0, "Fade");
}