(Tutorial) Fast moving multiple Pushwall

View previous topic View next topic Go down

(Tutorial) Fast moving multiple Pushwall

Post by Officer-M. John (Admin) on Thu May 05, 2016 8:32 am

I edit Andy Nonmymous's Pushwall movement flexibility routine.

WL_DEF.H:

Code:

extern  boolean  param_ignorenumchunks;
extern  boolean  param_pushwall_32spaces;

WL_MAIN.CPP:

Code:

boolean param_ignorenumchunks = false;
boolean param_pushwall_32spaces = false;

      else IFARG("--ignorenumchunks")
            param_ignorenumchunks = true;
      else IFARG("--pushwall32spaces")
            param_pushwall_32spaces = true;

            " --ignorenumchunks      Ignores the number of chunks in VGAHEAD.*\n"
            "                        (may be useful for some broken mods)\n"
            " --pushwall32spaces      Force pushwalls to move only 32 spaces.\n"

WL_ACT1.CPP:

Code:

if (pwallstate/4096 != oldblock)
    {
        // block crossed into a new block
        oldtile = pwalltile;

       //
        // see if it should be pushed farther
        //
       if ((param_pushwall_32spaces == true) && (pwallstate>=8192) ||  // move 32 tiles
            (param_pushwall_32spaces == false) && (pwallstate>=12288))   // move 33 tiles (default)
        {
            //
            // the block has been pushed two tiles
            //
            pwallstate = 0;
            tilemap[pwallx+dx][pwally+dy] = oldtile;
            return;
        }

    pwallpos = (pwallstate/32)&63;
}
avatar
Officer-M. John (Admin)
Admin

Posts : 328
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