function basegun_calledFromAnim() /* entry=270 class_id=0x04C8 slot=0x0E */
{
  var
    referent, /* [BP+00h] type=0x69 */
    n, /* [BP-02h] type=0x24 */
    dir, /* [BP-04h] type=0x69 */
    b, /* [BP-06h] type=0x69 */
    item; /* [BP-08h] type=0x24 */

  set_info(0x021A, *(arg_06));
  process_exclude();
  n = *(arg_06);
  dir = Actor.getDir(n);
  b = Actor.getLastAnimSet(n);
  if ((b == 13) || (b != 8)) {
    WALLGUN.slot_40(0, 5, dir, dir, arg_06);
    WALLGUN.slot_3F(retval, dir, arg_06);
    WALLGUN.slot_3E(retval, dir, arg_06);
    WALLGUN.slot_43(0, 5, dir, dir, arg_06);
    WALLGUN.slot_42(retval, dir, arg_06);
    WALLGUN.slot_41(retval, dir, arg_06);
    return;
  }
  else {
    set_info(0x00F0, 0);
    spawn ITEM.slot_28(pid, 1, 2, n);
    suspend;
  }
  return;
}
