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       

Pushwall trick for tight areas
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: Sat Dec 10, 2011 4:03 pm
   Subject: Pushwall trick for tight areas
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

If you need to move a pushwall two spaces, but only have space for one floor tile behind it, you can overcome this by marking the wall behind the pushwall, allowing the pushwall to merge with that wall.

First, define a unique object number (I have used the existing guard blocker in my project) in WL_DEF.H:

::: CODE :::
#define BLOCKGUARD      100   // MCS, Tricob guard blocker

Then in WL_ACT1.CPP's MovePWalls add the code in red:

::: CODE :::
            if ((actorat[pwallx+dx][pwally+dy]
                || xl<=pwallx+dx && pwallx+dx<=xh && yl<=pwally+dy && pwally+dy<=yh)
                &&(*(mapsegs[1]+((pwally+dy)<<mapshift)+(pwallx+dx)) != BLOCKGUARD))  // Allow marked wall to be overrun
            {
                pwallstate = 0;
                tilemap[pwallx][pwally] = oldtile;
                return;
            }
            actorat[pwallx+dx][pwally+dy] = (objtype *)(uintptr_t) (tilemap[pwallx+dx][pwally+dy] = oldtile);
            tilemap[pwallx+dx][pwally+dy] = 64;
        }


Mark your target wall with the defined object number in your favorite map editor, and now the pushwall will not be stopped by it.

Andy
Lozer_42
DieHard Wolfer
DieHard Wolfer


Joined: 09 Jun 2006
Last Visit: 16 Jul 2018

Topics: 49
Posts: 1164
Location: Grand Rapids, Michigan
usa.gif

PostPosted: Sat Dec 10, 2011 5:58 pm
   Subject: Re: Pushwall trick for tight areas
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This is seriously cool. Cool

_________________
Team RayCast YouTube Let's Play Commentaries
View Team RayCast on Mod DB
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 2:57 ago.

Topics: 72
Posts: 3751

blank.gif

PostPosted: Sun Dec 11, 2011 4:51 am
   Subject: Re: Pushwall trick for tight areas
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Very nice code, it's a problem I've run into a couple of times as well. Smile
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 Dec 11, 2011 6:41 am
   Subject: Pushwall trick for tight areas
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Thanks! 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 14640 Tue Aug 24, 2010 10:18 am
dcbasic View latest post
No new posts Sticky: [Tutorial] Compiling Wolf4SDL with Code::Blocks
Author: dcbasic
90 22956 Wed May 24, 2017 7:53 pm
Falcon*93 View latest post
No new posts [Help, please] 90 Walls code in Wolf4SDL code
Author: Tricob
14 2584 Sun Sep 21, 2008 2:51 am
BrotherTank View latest post
No new posts [CODE] Health Shown as a message with full screen view
Author: Raziel
13 2594 Thu Jul 31, 2008 8:07 pm
Raziel View latest post
No new posts [SDL-Help] Wall patches fix
Author: insurrectionman
0 1101 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