floor->floordestheight = floor->sector->floorheight + 512 * FRACUNIT;
break;
case raiseFloor24AndChange:
floor->direction = 1; floor->sector = sec; floor->speed = FLOORSPEED;
floor->floordestheight = floor->sector->floorheight +
24 * FRACUNIT;
sec->floorpic = line->frontsector->floorpic; sec->special = line->frontsector->special; break;
case raiseToTexture:
{ |
|
|
int |
minsize = |
MAXINT; |
side_t* |
side; |
|
floor->direction = 1; floor->sector = sec; floor->speed = FLOORSPEED;
for (i = 0; i < sec->linecount; i++)
{
if (twoSided (secnum, i) )
{
side = getSide(secnum,i,0); if (side->bottomtexture >= 0)
if (textureheight[side->bottomtexture] < minsize)
minsize = textureheight[side->bottomtexture];
side = getSide(secnum,i,1); if (side->bottomtexture >= 0)
if (textureheight[side->bottomtexture] < minsize)
minsize = textureheight[side->bottomtexture];
}
}
floor->floordestheight = floor->sector->floorheight + minsize;
}
break;
case lowerAndChange: floor->direction = -1; floor->sector = sec; floor->speed = FLOORSPEED; floor->floordestheight =
P_FindLowestFloorSurrounding(sec); floor->texture = sec->floorpic;
for (i = 0; i < sec->linecount; i++)
{
if ( twoSided(secnum, i) )
{
if (getSide(secnum,i,0)->sector-sectors == secnum)
{
sec = getSector(secnum,i,1);
if (sec->floorheight == floor->floordestheight)
{
floor->texture = sec->floorpic; floor->newspecial = sec->special;