DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[tutorial] Eliminate locked door sound if door is open
Page 1 of 1
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Andy_Nonymous
Moderator
<B>Moderator</B>


Joined: 02 Apr 2003
Last Visit: 17 Feb 2015

Topics: 99
Posts: 589
Location: New Jersey, USA
usa.gif

PostPosted: Sun Jun 30, 2013 4:18 am
   Subject: [tutorial] Eliminate locked door sound if door is open
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Ever shoot a guard in a locked doorway to prop it open because you don't have the key? Well, if you then actually "try" the door standing in the open doorway, you will still get the locked door sound. This is more noticeable in mods where the spacebar sound is disabled.

The fix is pretty simple: make the sound only if the door is closed.

In WL_ACT1.CPP add the code in blue:
::: CODE :::
void OperateDoor (int door)
{
    int lock;

    lock = doorobjlist[door].lock;
    if (lock >= dr_lock1 && lock <= dr_lock4)
    {
        if ( ! (gamestate.keys & (1 << (lock-dr_lock1) ) ) )
        {
            if (doorposition[door] == 0) SD_PlaySound (NOWAYSND);        // locked
            return;
        }
    }
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 5:20 ago.

Topics: 163
Posts: 8194
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sun Jun 30, 2013 5:34 am
   Subject: Re: [tutorial] Eliminate locked door sound if door is open
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Good call, Andy. I really need to implement all the bugfixes you've posted lately. It's time for me to put together a bugfix for the mods that use the Base Of Operations code, anyway. Smile
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts Announcement: Wolf3d & Spear of Destiny Shareware SDL Downloads
Author: BrotherTank
10 15113 Tue Aug 24, 2010 10:18 am
dcbasic View latest post
No new posts Sticky: [Tutorial] Compiling Wolf4SDL with Code::Blocks
Author: dcbasic
90 24559 Wed May 24, 2017 7:53 pm
Falcon*93 View latest post
No new posts [IDEA] Introducing the new "Haasboy Engine"
Author: Haasboy
2 1274 Fri Aug 01, 2008 10:37 am
dcbasic View latest post
No new posts [CODE] Health Shown as a message with full screen view
Author: Raziel
13 2797 Thu Jul 31, 2008 8:07 pm
Raziel View latest post
No new posts [SDL-Help] Wall patches fix
Author: insurrectionman
0 1178 Tue Jul 15, 2008 11:12 am
insurrectionman View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group