Polymer external view when above and below sectors. Noclip in the editor

also works for vertical movement now. (Hunter)


git-svn-id: https://svn.eduke32.com/eduke32@717 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2008-04-27 22:47:47 +00:00
parent 1c88276aab
commit 3895de1e06
3 changed files with 31 additions and 23 deletions

View file

@ -778,10 +778,13 @@ void editinput(void)
}
}
if (!noclip)
{
if (goalz < hiz+(4<<8)) goalz = hiz+(4<<8);
if (goalz > loz-(4<<8)) goalz = loz-(4<<8);
}
if (zmode == 1) goalz = loz-zlock;
if (goalz < hiz+(4<<8)) goalz = ((loz+hiz)>>1); //ceiling&floor too close
if (!noclip && (goalz < hiz+(4<<8))) goalz = ((loz+hiz)>>1); //ceiling&floor too close
if (zmode == 1) posz = goalz;
if (goalz != posz)
@ -793,9 +796,12 @@ void editinput(void)
posz += hvel;
if (!noclip)
{
if (posz > loz-(4<<8)) posz = loz-(4<<8), hvel = 0;
if (posz < hiz+(4<<8)) posz = hiz+(4<<8), hvel = 0;
}
}
else
hvel = 0;
}

View file

@ -230,8 +230,26 @@ void polymer_drawrooms(int daposx, int daposy, int daposz, short
if ((cursectnum >= 0) && (cursectnum < numsectors))
dacursectnum = cursectnum;
// unflag all sectors
i = 0;
while (i < numsectors)
{
prsectors[i]->controlstate = 0;
prsectors[i]->wallsproffset = 0.0f;
prsectors[i]->floorsproffset = 0.0f;
i++;
}
i = 0;
while (i < numwalls)
{
prwalls[i]->controlstate = 0;
i++;
}
// external view (editor)
if ((dacursectnum < 0) || (dacursectnum >= numsectors))
if ((dacursectnum < 0) || (dacursectnum >= numsectors) ||
(daposz > sector[dacursectnum].floorz) ||
(daposz < sector[dacursectnum].ceilingz))
{
i = 0;
while (i < numsectors)
@ -255,22 +273,6 @@ void polymer_drawrooms(int daposx, int daposy, int daposz, short
rootsectnum = dacursectnum;
// unflag all sectors
i = 0;
while (i < numsectors)
{
prsectors[i]->controlstate = 0;
prsectors[i]->wallsproffset = 0.0f;
prsectors[i]->floorsproffset = 0.0f;
i++;
}
i = 0;
while (i < numwalls)
{
prwalls[i]->controlstate = 0;
i++;
}
// GO!
depth = 0;
mirrorfrom[0] = -3; // no mirror

View file

@ -518,7 +518,7 @@ void grabmouse(char a)
if (a != mouseacquired)
{
// #ifndef DEBUGGINGAIDS
#if 1
#if 0
SDL_GrabMode g;
g = SDL_WM_GrabInput(a ? SDL_GRAB_ON : SDL_GRAB_OFF);