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!
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Side SetSpecialColor not working?

Post by Major Cooke »

Code: Select all

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.

Return to “Bugs [GZDoom]”