
actor CBM_LMSGas_FlagStack : Inventory
{
inventory.amount 1
inventory.maxamount 500
}

actor CBM_LMSGas_FogPowerup : Powerup
{
powerup.duration 9999
powerup.color 255 90 255
}

actor CBM_LMSGas_GuardPower : Powerup
{
+INVENTORY.ADDITIVETIME
powerup.duration -1
+INVENTORY.ALWAYSPICKUP
}

actor CBM_LMSGas_InGas_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("CBM_LMSGas_InGasFX",random(10,150),0,random(0,80),0,0,0,random(0,359),0)//1
stop
}
}

actor CBM_LMSGas_InGasFX : BasicClientSide
{
Translation "192:192=87:87","198:198=93:93"
+NOTIMEFREEZE
Alpha 0.3
Scale 1.3
States
{
Spawn:
LMSG BCDCB 6 A_FadeOut(0.1)
loop
}
}

actor CBM_LMSGas_Radar_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 ACS_NamedExecuteAlways("cbm_RadarPointer",0,0)
stop
}
}

actor CBM_LMSGas_Center
{
var int user_GasSize;
-SOLID
+NOCLIP
+NOINTERACTION
+NOGRAVITY
+DONTSPLASH
+NOTIMEFREEZE
Renderstyle None
Damage(77)
Radius 4
Height 4
Scale 2.5
states
{
Spawn:
EROB A 0
EROB A 0 //ACS_NamedExecuteAlways("cbm_LMSGasDirectorPart3",0)
EROB A 2
wait
GasStart:
EROB J 0 A_SpawnItemEx("CBM_LMSGas_CenterFX")
EROB J 0 A_SpawnItemEx("CBM_LMSGas_BeaconFX2",0,0,-128)
EROB J 5 A_SpawnItemEx("CBM_LMSGas_BeaconFX")
GasSpewWait:
EROB I 0 A_JumpIf(user_GasSize>=1,"GasSpew")
EROB IJ 4
loop
GasSpew:
EROB I 0 A_JumpIf(user_GasSize<1250,"GasSpew2")
EROB I 4 A_SpawnItemEx("CBM_LMSGas_Spawner",0,0,-floorz,0,0,0,0,32)
EROB J 4 A_SpawnItemEx("CBM_LMSGas_Spawner2",0,0,-floorz,0,0,0,1,32)
loop
GasSpew2:
EROB I 0 A_JumpIf(user_GasSize<=0,"GasWait")
EROB I 4 A_SpawnItemEx("CBM_LMSGas_Spawner3",0,0,-floorz,0,0,0,0,32)
EROB J 4 A_SpawnItemEx("CBM_LMSGas_Spawner4",0,0,-floorz,0,0,0,3,32)
loop
GasWait:
EROB I 0 A_JumpIf(user_GasSize>=1,"GasSpewRestart")
EROB IJ 4
loop
GasSpewRestart:
EROB I 0
goto GasSpew2+1

End:
EROB H 1
EROB H -1
loop
}
}

actor CBM_LMSGas_BeaconFX : BasicClientSide
{
Translation "192:192=87:87","198:198=93:93"
+FORCEYBILLBOARD
+NOTIMEFREEZE
Renderstyle Translucent//Add
Alpha 0.05//0.60
Scale 2.0
states
{
Spawn:
LMSG A 0
LMSG A 0 A_JumpIf(z>5000,"Death")
LMSG A 0 A_SpawnItemEx("CBM_LMSGas_BeaconFX",0,0,128)
FadingIn:
LMSG AAAAAAAAAAAAAAAAAAAAAA 3 A_FadeIn(0.025)
LMSG A 6
goto Fading
Fading:
LMSG AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2 A_FadeTo(0,0.01,0)//30
//A_FadeOut(0.01,0)//30
LMSG AAAAAAAAAAAAAAAAAAAAAAAAAAAA 2 A_FadeIn(0.01)//28
//A_FadeIn(0.01)//25
LMSG A 6
loop
Death:
TNT1 A 1
stop
}
}
actor CBM_LMSGas_BeaconFX2 : CBM_LMSGas_BeaconFX
{
states
{
Spawn:
LMSG A 0
LMSG A 0 A_JumpIf(z<-2500,"Death")
LMSG A 0 A_SpawnItemEx("CBM_LMSGas_BeaconFX2",0,0,-128)
goto FadingIn
}
}

actor CBM_LMSGas_Spawner : BasicHelper
{
Translation "192:192=32:32","198:198=38:38"
+NOCLIP
+NOTIMEFREEZE
scale 3.0
States
{
Spawn:
ROLL A 0
ROLL A 0 A_SetScale(CallACS("cbm_LMSGasRangeFetch")/1000.0)
ROLL A 0 A_SetArg(4,ScaleX*1000.0)
ROLL A 0 A_SpawnItemEx("CBM_LMSGas_DrawMapFX_H",0,0,0,0,0,0,0,33+32768)
ROLL A 0 A_SpawnItemEx("CBM_LMSGas_DrawFX_H",0,0,0,0,0,0,0,33+32768)
ROLL F 4
stop
}
}
actor CBM_LMSGas_Spawner2 : CBM_LMSGas_Spawner
{
States
{
Spawn:
ROLL A 0
ROLL A 0 A_SetScale(CallACS("cbm_LMSGasRangeFetch")/1000.0)
ROLL A 0 A_SetArg(4,ScaleX*1000.0)
ROLL A 0 A_SpawnItemEx("CBM_LMSGas_DrawFX_H2",0,0,0,0,0,0,0,33+32768)
ROLL G 4
stop
}
}
actor CBM_LMSGas_Spawner3 : CBM_LMSGas_Spawner
{
States
{
Spawn:
ROLL A 0
ROLL A 0 A_SetScale(CallACS("cbm_LMSGasRangeFetch")/1000.0)
ROLL A 0 A_SetArg(4,ScaleX*1000.0)
ROLL A 0 A_SpawnItemEx("CBM_LMSGas_DrawMapFX_H",0,0,0,0,0,0,0,33+32768)
ROLL A 0 A_SpawnItemEx("CBM_LMSGas_DrawFX_H3",0,0,0,0,0,0,0,33+32768)
ROLL F 4
stop
}
}
actor CBM_LMSGas_Spawner4 : CBM_LMSGas_Spawner
{
States
{
Spawn:
ROLL A 0
ROLL A 0 A_SetScale(CallACS("cbm_LMSGasRangeFetch")/1000.0)
ROLL A 0 A_SetArg(4,ScaleX*1000.0)
ROLL A 0 A_SpawnItemEx("CBM_LMSGas_DrawFX_H4",0,0,0,0,0,0,0,33+32768)
ROLL G 4
stop
}
}

actor CBM_LMSGas_DrawFX_H : BasicClientSide
{
+NOCLIP
+NOTIMEFREEZE
RenderStyle None
Mass 180
Accuracy 2
ReactionTime 90
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("CBM_LMSGas_FloorFX",Args[4],0,0,0,0,-1,ReactionTime*Accuracy,33,64)
TNT1 A 0 A_SpawnItemEx("CBM_LMSGas_FloorFX",Args[4],0,0,0,0,-1,ReactionTime*Accuracy+Mass,33,64)
TNT1 A 0 A_CountDown
loop
}
}
actor CBM_LMSGas_DrawFX_H2 : CBM_LMSGas_DrawFX_H
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("CBM_LMSGas_FloorFX2",Args[4],0,0,0,0,-1,ReactionTime*Accuracy,33,64)
TNT1 A 0 A_SpawnItemEx("CBM_LMSGas_FloorFX2",Args[4],0,0,0,0,-1,ReactionTime*Accuracy+Mass,33,64)
TNT1 A 0 A_CountDown
loop
}
}
actor CBM_LMSGas_DrawFX_H3 : CBM_LMSGas_DrawFX_H{Mass 60 Accuracy 10 ReactionTime 30}
actor CBM_LMSGas_DrawFX_H4 : CBM_LMSGas_DrawFX_H2{Mass 60 Accuracy 10 ReactionTime 30}

actor CBM_LMSGas_FloorFX
{
-SOLID
+NOBLOCKMAP
+NOGRAVITY
+DONTSPLASH
+INVISIBLE
+FLOORHUGGER
+NOTIMEFREEZE
+CLIENTSIDEONLY
RenderStyle None
MeleeRange 25
Radius 2
Height 2
states
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("CBM_LMSGas_FX",0,0,floorz-z+MeleeRange,random(-2,2),random(-2,2),random(2,5),0,33)
//TNT1 A 1 A_SpawnItemEx("CBM_LMSGasOld_FX",0,0,floorz-z+MeleeRange,0,0,8,0,33)
stop
}
}
actor CBM_LMSGas_FloorFX2 : CBM_LMSGas_FloorFX
{
MeleeRange 75
}

actor CBM_LMSGasOld_FX : BasicClientSide
{
+NOTIMEFREEZE
Renderstyle Translucent
Alpha 0.8
Scale 4.5
States
{
Spawn:
LMSG B 0
LMSG BCDCBCDCBCDCBCDCBCDCBCDCBCDCBCDCBCDCBCDCB 6
stop
}
}

actor CBM_LMSGas_FX : BasicClientSide
{
+NOTIMEFREEZE
Renderstyle Translucent
Alpha 0.8
Scale 2.5
States
{
Spawn:
LMSG B 0
LMSG B 0
LMSG BCDDDCB 1
stop
}
}
actor CBM_LMSGas_FX2 : BasicClientSide
{
+NOTIMEFREEZE
Scale 1.0
States
{
Spawn:
LMSG B 0
LMSG BBCC 1 A_SetScale(Scalex+0.2)
Spawn2:
LMSG D 1 A_SetScale(Scalex+0.2)
LMSG D 0 A_Fadeout(0.2)
loop
}
}

actor CBM_LMSGas_DrawMapFX_H : CBM_LMSGas_DrawFX_H
{
RenderStyle None
ReactionTime 36
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("CBM_LMSGas_MapFX",Args[4],0,0,0,0,-1,ReactionTime*10,33)
TNT1 A 0 A_CountDown
loop
}
}

actor CBM_LMSGas_MapFX : MapMarker
{
-SOLID
+DONTSPLASH
+NOCLIP
+NOTIMEFREEZE
+CLIENTSIDEONLY
Renderstyle "Add"
Alpha 0.85
gravity 999
Radius 2
Height 2
Scale 0.5
States
{
Spawn:
LMSG E 9
stop
}
}

actor CBM_LMSGas_CenterFX : CBM_LMSGas_MapFX
{
Translation "192:192=227:227", "198:198=249:249"
Renderstyle "Translucent"
Alpha 0.85
Scale 0.75
States
{
Spawn:
LMSG BCDEEEEEDC 9
loop
}
}





actor PowerCBM_LMSGasStartProtect : PowerProtection
{
+NOTELEOTHER
//Powerup.Color Green 0.25
Powerup.Duration -1
damagefactor "Suicide", 0.0
}

actor CBM_LMSGas_TelOther : TelOtherFX1
{
Damagetype "TelOther_CBM"
Obituary "%k banished %o to the Realm of Shadows?"
-NOBLOCKMAP
-ACTIVATEIMPACT
-ACTIVATEPCROSS
+THRUACTORS
+DONTSPLASH
+DONTBLAST
+NODAMAGETHRUST
+NOTIMEFREEZE
+SERVERSIDEONLY
RenderStyle "None"
ReactionTime 1
Damage (66)
Radius 8
Height 8
Speed 0
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Countdown
wait
Death:
TNT1 A 0 A_ClearTarget
TNT1 A 2 A_Explode(66,8,0,0,8)
stop
}
}

actor CBM_LMSGas_MonsterChecker
{
+ISMONSTER
+SHOOTABLE
+NONSHOOTABLE
+NOBLOOD
+DONTSPLASH
+NOGRAVITY
+NODAMAGE
+NOTARGETSWITCH
+THRUACTORS
+NOTIMEFREEZE
+SERVERSIDEONLY
damagefactor "Normal", 0.0
Health 100000
RenderStyle None

ReactionTime 3//128
Radius 16
Height 56
Scale 2.5
States
{
Spawn:
CBON X 0
CBON X 0
CBON X 0 A_CountDown
CBON X 0 A_GiveInventory("NoTeleportFX_Flag",1)
CBON X 1 A_SpawnItemEx("CBM_LMSGas_TelOther",0,0,28)
CBON X 0 ACS_NamedExecuteWithResult("cbm_LMSGas_LogSpawnPoint")
goto Spawn+2
Death:
CBON Y 10// ACS_NamedExecuteWithResult("cbm_LMSGas_PickSpawnPoint")
stop
}
}

