Exemplo n.º 1
0
//==================================================================
//
//	Spawn a door that closes after 30 seconds
//
//==================================================================
        void P_SpawnDoorCloseIn30(sector_t *sec)
        {
            vldoor_t *door;

            door = Z_Malloc(sizeof(*door), PU_LEVSPEC, 0);
            P_AddThinker(&door.thinker);
            sec.specialdata       = door;
            sec.special           = 0;
            door.thinker.function = T_VerticalDoor;
            door.sector           = sec;
            door.direction        = 0;
            door.type             = normal;
            door.speed            = VDOORSPEED;
            door.topcountdown     = 30 * 35;
        }
Exemplo n.º 2
0
//==================================================================
//
//	Spawn a door that opens after 5 minutes
//
//==================================================================
        void P_SpawnDoorRaiseIn5Mins(sector_t *sec, int secnum)
        {
            vldoor_t *door;

            door = Z_Malloc(sizeof(*door), PU_LEVSPEC, 0);
            P_AddThinker(&door.thinker);
            sec.specialdata       = door;
            sec.special           = 0;
            door.thinker.function = T_VerticalDoor;
            door.sector           = sec;
            door.direction        = 2;
            door.type             = raiseIn5Mins;
            door.speed            = VDOORSPEED;
            door.topheight        = P_FindLowestCeilingSurrounding(sec);
            door.topheight       -= 4 * FRACUNIT;
            door.topwait          = VDOORWAIT;
            door.topcountdown     = 5 * 60 * 35;
        }