User Tag List

Results 1 to 3 of 3

Thread: [2.50.2]High level b-rangs trigger screen secret on flag 97

  1. #1
    Banned
    Join Date
    Jun 2017
    Posts
    17
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    144
    Level
    4
    vBActivity - Bars
    Lv. Percent
    39.67%

    Sick Bug [2.50.2]High level b-rangs trigger screen secret on flag 97

    I don't know the full extent of this bug but, throwing a high item level boomerang onto a screen flag 97 causes the secret sound to play and the screen secret happening.
    In this scenario the B-rang is level 102, but I haven't tested other configurations. Since 97 is not a secret flag, and therefore does not go away when triggered this way, you can keep triggering it as well.

    I'm not including a quest file here since it's like five mins max to replicate the scenario.
    Video of the thing: https://cdn.discordapp.com/attachmen..._11-9-2018.mp4

    ZC version 2.50.2

    Edit: after some more testing I have narrowed it down a bit, this behaviour seem to start somewhere higher than item level 25, but below item level 40.
    Last edited by Lunaria; 09-11-2018 at 04:20 PM.

  2. #2
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,759
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.52%
    Quote Originally Posted by Lunaria View Post
    I don't know the full extent of this bug but, throwing a high item level boomerang onto a screen flag 97 causes the secret sound to play and the screen secret happening.
    In this scenario the B-rang is level 102, but I haven't tested other configurations. Since 97 is not a secret flag, and therefore does not go away when triggered this way, you can keep triggering it as well.

    I'm not including a quest file here since it's like five mins max to replicate the scenario.
    Video of the thing: https://cdn.discordapp.com/attachmen..._11-9-2018.mp4

    ZC version 2.50.2

    Edit: after some more testing I have narrowed it down a bit, this behaviour seem to start somewhere higher than item level 25, but below item level 40.
    That's utterly bizarre. I'll try to sort it ASAP.

    This code, in weapons.cpp is suspicious:

    Code:
    for(int i=0; i<current_item(itype_brang); i++)
            {
                if(findentrance(x,y,mfBRANG+i,true)) dead=deadval;
            }
    It seems that someone was trying to simplify L1 to L3 triggers, except that no-one bothered to ever test it at higher levels!


    Fix:

    Code:
    int brang_level = vbound(current_item(itype_brang),0,2);
    	
            for(int i=0; i<brang_level; i++) //clamp to legal FLAG VALUES! 
            {
                if(findentrance(x,y,mfBRANG+i,true)) dead=deadval;
            }
    I'm pretty sure that the distinction between regular, magic, and fire is still based on level, although it could instead be based on range and power.

  3. #3
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,759
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.52%
    Should be fixed now.

    Here is a Zelda.exe (2.53.0) Binary with the implemented fix, if anyone wishes to check for any continuing bugs or new issues.

    I ended up going with this, so that future flags would be easier to implement:

    Code:
    int branglevel = itemsbuf[parentitem>-1 ? parentitem : current_item_id(itype_brang)].fam_type;
    	
    	switch ( branglevel )
    	{
    		case 0:
    		case 1:
    		{
    			if(findentrance(x,y,mfBRANG,true)) dead=deadval; break;
    		}
    		case 2: 
    		{
    			if(findentrance(x,y,mfBRANG,true)) dead=deadval;
    			if(findentrance(x,y,mfMBRANG,true)) dead=deadval;
    			break;
    		}
    		case 3:
    		{
    			goto brang_level_3_or_higher;
    		}
    		default: //level higher than 3
    		{
    			goto brang_level_3_or_higher;
    		}
    		brang_level_3_or_higher: 
    		{
    			if(findentrance(x,y,mfBRANG,true)) dead=deadval;
    			if(findentrance(x,y,mfMBRANG,true)) dead=deadval;
    			if(findentrance(x,y,mfFBRANG,true)) dead=deadval;
    			break;
    		}
    	}

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social