diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 14a4db683..1914c6f15 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -778,10 +778,13 @@ void editinput(void) } } - if (goalz < hiz+(4<<8)) goalz = hiz+(4<<8); - if (goalz > loz-(4<<8)) goalz = loz-(4<<8); + 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,8 +796,11 @@ void editinput(void) posz += hvel; - if (posz > loz-(4<<8)) posz = loz-(4<<8), hvel = 0; - if (posz < hiz+(4<<8)) posz = hiz+(4<<8), hvel = 0; + 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; diff --git a/polymer/build/src/polymer.c b/polymer/build/src/polymer.c index 7605e48be..8fb95ddce 100644 --- a/polymer/build/src/polymer.c +++ b/polymer/build/src/polymer.c @@ -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 diff --git a/polymer/build/src/sdlayer.c b/polymer/build/src/sdlayer.c index 25c6eda72..9814f215f 100644 --- a/polymer/build/src/sdlayer.c +++ b/polymer/build/src/sdlayer.c @@ -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);