mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix editor picking with swapped bottomwalls.
git-svn-id: https://svn.eduke32.com/eduke32@1794 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8e4def18ba
commit
afc266f8d2
1 changed files with 10 additions and 16 deletions
|
@ -1081,11 +1081,16 @@ void polymer_editorpick(void)
|
|||
|
||||
switch (searchstat) {
|
||||
case 0: // wall
|
||||
case 5: // botomwall
|
||||
case 4: // 1-way/masked wall
|
||||
searchsector = sectorofwall(num);
|
||||
searchbottomwall = searchwall = num;
|
||||
if (wall[num].nextwall>=0 && (wall[num].cstat&2))
|
||||
if (searchstat == 5) {
|
||||
searchstat = 0;
|
||||
if (wall[num].nextwall >= 0 && (wall[num].cstat & 2)) {
|
||||
searchbottomwall = wall[num].nextwall;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1: // floor
|
||||
case 2: // ceiling
|
||||
|
@ -3170,22 +3175,11 @@ static void polymer_drawwall(int16_t sectnum, int16_t wallnum)
|
|||
if ((w->underover & 1) && (!parallaxedfloor || (searchit == 2)))
|
||||
{
|
||||
if (searchit == 2) {
|
||||
int16_t pickwallnum;
|
||||
|
||||
memcpy(oldcolor, w->wall.material.diffusemodulation, sizeof(GLubyte) * 4);
|
||||
|
||||
pickwallnum = wallnum;
|
||||
|
||||
// if the bottom of the walls are inverted
|
||||
// we're going to hit the nextwall instead
|
||||
// PK -- handled in polymer_editorpick(), also because there
|
||||
// are maps with .nextwall==-1 but .cstat&2 (like e4l3)
|
||||
// if (wall[wallnum].cstat & 2)
|
||||
// pickwallnum = wall[wallnum].nextwall;
|
||||
|
||||
w->wall.material.diffusemodulation[0] = 0x00;
|
||||
w->wall.material.diffusemodulation[1] = ((GLubyte *)(&pickwallnum))[0];
|
||||
w->wall.material.diffusemodulation[2] = ((GLubyte *)(&pickwallnum))[1];
|
||||
w->wall.material.diffusemodulation[0] = 0x05;
|
||||
w->wall.material.diffusemodulation[1] = ((GLubyte *)(&wallnum))[0];
|
||||
w->wall.material.diffusemodulation[2] = ((GLubyte *)(&wallnum))[1];
|
||||
w->wall.material.diffusemodulation[3] = 0xFF;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue