// ZZ> This function makes an item fall to the floor when spawned
IfSpawned				//
  MakeAmmoKnown				  //
  tmpargument = ACTIONJB		  //
  DoAction				  //
  KeepAction				  //
  MakeCrushValid
IfCrushed
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  tmpargument = 1
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  GoPoof
  tmpargument = 2
  SendMessageNear
IfDropped				// Make it lie on floor
  KeepAction				  //
IfUsed					// Drop shells or make a click sound
  IfAmmoOut
    tmpargument = 1
    PlaySound
  Else
    tmpargument = 1
    tmpdistance = SPAWNLAST
    SpawnParticle                   //This spawns some gunsmoke
    SetTargetToWhoeverIsHolding
      tmpargument = targetint + targetdex
      tmpargument = tmpargument > 8
      tmpargument = 100 - tmpargument
      SetReloadTime
    tmpx = selfx
    tmpy = selfy
    tmpdistance = selfz
    tmpargument = 4
    SpawnExactParticle
    IfStateIs0
      tmpargument = 3
      PlaySound
      tmpargument = 1
    Else
      tmpargument = 4
      PlaySound
      tmpargument = 0
    SetState
    tmpargument = [WAKE]
    tmpdistance = [WAKE]
    OrderSpecialID
IfHitGround				// Play the drop sound
  tmpargument = 0
  PlaySound				  //
IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 0			  //
    IfAmmoOut				  //
      tmpargument = 1			    //
    SendMessageNear			  //
End					// All done
