Side SetSpecialColor not working?

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Side SetSpecialColor not working?

Postby Major Cooke » Sat Feb 08, 2020 8:41 am

Code: Select allExpand view
Class TC : Actor
{
   override void PostBeginPlay()
   {
      // The sector version works fine.
      for (int i = 0; i < Level.Sectors.Size(); i++)
      {
         Sector s = Level.Sectors[i];
         
         if (s)
         {
            s.SetSpecialColor(Sector.Floor,"Blue");
            s.SetSpecialColor(Sector.Wallbottom,"Blue");
            s.SetSpecialColor(Sector.Walltop,"Gold");
            s.SetSpecialColor(Sector.Ceiling,"Gold");
         }
      }

      // This side version however does nothing.
      for (int i = 0; i < Level.Sides.Size(); i++)
      {
         Side s = Level.Sides[i];
         if (s)
         {
            for (int j = 0; j < 1; j++)
            {
               s.SetSpecialColor(j,0,"Blue");
               s.SetSpecialColor(j,1,"Gold");
               
            }
            s.EnableAdditiveColor(i,true);
         }
      }
      
      Destroy();
   }
}


I'm not sure if this is supposed to do anything on its own but it seems not to be working. It seems like this has the capability of setting a lower wall's colors from the bottom of the lower wall to the top of the lower wall, and same with the middle and top walls. But this code seems not to do anything.

The Sector version works just fine though. I even tried using SetSpecialColor for the sector upon it first and then change the side but nothing happened still.
User avatar
Major Cooke
d = klabs(wall[wall[wall[sector[dasect].wallptr].point2].point2].x-s->x)...
Global Moderator
 
Joined: 28 Jan 2007

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest