(Tutorial) More Locked Door sound

View previous topic View next topic Go down

(Tutorial) More Locked Door sound

Post by Officer-M. John (Admin) on Thu Aug 11, 2016 5:00 pm

I test this function in my and KKK911's Project:Wolfenstein 3D New Year's Eve mod (Updated version) and for first worked.

WL_ACT.1CPP:

Code:

void OperateDoor (int door)
{
    int lock;

    lock = doorobjlist[door].lock;
    if (lock >= dr_lock1 && lock <= dr_lock2)
    {
        if ( ! (gamestate.keys & (1 << (lock-dr_lock1) ) ) )
        {
            SD_PlaySound (NOWAYSND);                // locked
            return;
        }
    }
    if (lock >= dr_lock3 && lock <= dr_lock4)
    {
        if ( ! (gamestate.keys & (4 << (lock-dr_lock3) ) ) )
        {
            SD_PlaySound (WALK1SND);                // locked
            return;
        }
    }

    switch (doorobjlist[door].action)
    {
        case dr_closed:
        case dr_closing:
            OpenDoor (door);
            break;
        case dr_open:
        case dr_opening:
            CloseDoor (door);
            break;
    }
}
avatar
Officer-M. John (Admin)
Admin

Posts : 323
Join date : 2015-10-02
Age : 19

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum