Subversion Repositories nw_plus

Rev

Rev 20 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
 VERY IMPORTANT!
 This file is designed to convert any user maps you have made to combatibility with NW+
 This will move the numbers of certain sounds and change the tile numbers of certain sprites.
 
 It has already been run on the maps included with NW+ (Nuclear Winter, Demo, Zoo).
 
 Before use, follow the instructions about uncommenting code below.
 
 To use, open the console in Mapster32 and type:
 include nwfix
 enableevent all
 
 Then change to 3D mode and back to 2D mode.  Wait for about five seconds for the script to run through all the sprites and sectors.
 Save your map.  Open your next map, switch to 3D mode, etc.  Repeat.  You do not have to type the commands again.
 
 Then follow the instructions abuot uncommenting code and repeat the procedure for your maps.
 
 Notes about replacing the actors: (see "Fixing actors.")
 You must only uncomment one step at a time (the same step in both allsprites and the RESPAWN cases).
 You must run Step 1 before Step 2 and Step 2 after Step 1.
 Do not run Step 1 ever again after running Step 2.
 
 Not following these directions will fuck up your maps.
 
 ALWAYS MAKE BACKUPS OF YOUR MAPS!
*/

include DEFS.CON
include nwinter_hrp/NWDefs.con

gamevar i 0 0
gamevar k 0 0
gamevar l 0 0

onevent EVENT_DRAW2DSCREEN
// Fixing sounds.
    for i allsprites, ifactor MUSICANDSFX
    {
// fixing ambient sounds
      switch .lotag

        case 91
        case 308
          set .lotag 426
        break

        case 244
          set .lotag 438
        break
      endswitch
    }


// fixing one-time sector sounds
    for k allsectors
    {
      getsector[k].lotag l
      switch l

        case 10091
        case 10308
          set sector[k].lotag 10426
        break

        case 10244
          set sector[k].lotag 10438
        break

      endswitch
      setsector[k].lotag l
    }

// Fixing actors.

// fixing actors already in the map
    for i allsprites
    {
      switch .picnum
// Step 1: Santa
/*
        case 2000 set .picnum 3900 break
        case 2045 set .picnum 3905 break
*/
// Step 2: Pig Cops
/*
        case 2002 set .picnum 2000 break
        case 2003 set .picnum 2001 break
        case 2047 set .picnum 2045 break
*/
      endswitch
    }
// fixing actors which spawn on triggers
    for i allsprites, ifactor RESPAWN
    {
      switch .lotag
// Step 1: Santa
/*
        case 2000 set .lotag 3900 break
        case 2045 set .lotag 3905 break
*/
// Step 2: Pig Cops
/*
        case 2002 set .lotag 2000 break
        case 2003 set .lotag 2001 break
        case 2047 set .lotag 2045 break
*/
      endswitch
    }
endevent