Begin A1_DAT_SRT_Light

Float TentLiteDelTimer
Float TentLitePitchTimer
Float TentLiteStrikeTimer
Float TentPosX
Float TentPosY
Float TentPosZ
Float Z1



If ( A1_DAT_SRT_TentPitched == 1 )
	Set TentLitePitchTimer To ( TentLitePitchTimer + GetSecondsPassed )
		If ( TentLitePitchTimer > .2 )
			Set A1_DAT_SRT_TentPitched To 2
			Set TentLitePitchTimer To 0
		EndIf
EndIf

If ( GetDisabled == 1 )
	Set TentLiteDelTimer To ( TentLiteDelTimer + GetSecondsPassed )
		If ( TentLiteDelTimer > .2 )
			Set TentLiteDelTimer To 0
			SetDelete 1
		EndIf
EndIf

If ( A1_DAT_SRT_TentPitched == 2 )
	Set TentPosX To A1_DAT_SRT_TentPosX
	Set TentPosY To A1_DAT_SRT_TentPosY
	Set TentPosZ To ( A1_DAT_SRT_TentPosZ + 384 )
	Set A1_DAT_SRT_TentPitched To 3
EndIf

If (A1_DAT_SRT_TentPitched == 3 )
	SetPos, X, TentPosX
	SetPos, Y, TentPosY
	SetPos, Z, TentPosZ
	Set A1_DAT_SRT_TentPitched To -1
EndIf

If ( A1_DAT_SRT_TentStrike == 1 )
	Set TentLiteStrikeTimer To ( TentLiteStrikeTimer + GetSecondsPassed )
		If ( TentLiteStrikeTimer > .2 )
			Set TentLiteStrikeTimer To 0
			Disable
			Set z1 to GetPos Z
			Set z1 to ( z1 - 1 )
			SetPos Z z1 ; move a little to force lighting update
			Set z1 to ( z1 + 1 )
			SetPos Z z1 ; move back
			Set A1_DAT_SRT_TentStrike To 2
		EndIf
EndIf

If ( A1_DAT_SRT_TentStrike == 2 )
	Set TentLiteStrikeTimer To ( TentLiteStrikeTimer + GetSecondsPassed )
		If ( TentLiteStrikeTimer > .2 )
			Set TentLiteStrikeTimer To 0
			Set A1_DAT_SRT_TentStrike To -1
		Endif
EndIf

End