2021-09-05 05:52:50 +02:00
|
|
|
#include "framework.h"
|
|
|
|
#include "generic_doors.h"
|
|
|
|
#include "level.h"
|
|
|
|
#include "control.h"
|
|
|
|
#include "box.h"
|
|
|
|
#include "items.h"
|
|
|
|
#include "lot.h"
|
|
|
|
#include "newinv2.h"
|
|
|
|
#include "input.h"
|
2021-09-11 09:41:29 +03:00
|
|
|
#include "pickup\pickup.h"
|
2021-09-05 05:52:50 +02:00
|
|
|
#include "sound.h"
|
|
|
|
#include "draw.h"
|
|
|
|
#include "sphere.h"
|
|
|
|
#include "cog_switch.h"
|
|
|
|
#include "objectslist.h"
|
|
|
|
#include "lara_struct.h"
|
|
|
|
#include "lara.h"
|
|
|
|
#include "trmath.h"
|
|
|
|
#include "misc.h"
|
2021-09-11 05:38:26 +02:00
|
|
|
#include "door_data.h"
|
|
|
|
#include "collide.h"
|
|
|
|
#include "itemdata/itemdata.h"
|
2021-09-05 05:52:50 +02:00
|
|
|
|
|
|
|
namespace TEN::Entities::Doors
|
|
|
|
{
|
|
|
|
PHD_VECTOR CrowbarDoorPos(-412, 0, 256);
|
|
|
|
|
|
|
|
OBJECT_COLLISION_BOUNDS CrowbarDoorBounds =
|
|
|
|
{
|
|
|
|
-512, 512,
|
|
|
|
-1024, 0,
|
|
|
|
0, 512,
|
|
|
|
-ANGLE(80), ANGLE(80),
|
|
|
|
-ANGLE(80), ANGLE(80),
|
|
|
|
-ANGLE(80), ANGLE(80)
|
|
|
|
};
|
|
|
|
|
|
|
|
void InitialiseDoor(short itemNumber)
|
|
|
|
{
|
|
|
|
ITEM_INFO* item = &g_Level.Items[itemNumber];
|
|
|
|
|
|
|
|
if (item->objectNumber == ID_SEQUENCE_DOOR1)
|
|
|
|
item->flags &= 0xBFFFu;
|
|
|
|
|
|
|
|
if (item->objectNumber == ID_LIFT_DOORS1 || item->objectNumber == ID_LIFT_DOORS2)
|
|
|
|
item->itemFlags[0] = 4096;
|
|
|
|
|
2021-09-11 05:38:26 +02:00
|
|
|
item->data = DOOR_DATA();
|
|
|
|
DOOR_DATA* door = item->data;
|
2021-09-05 05:52:50 +02:00
|
|
|
|
|
|
|
door->opened = false;
|
|
|
|
door->dptr1 = NULL;
|
|
|
|
door->dptr2 = NULL;
|
|
|
|
door->dptr3 = NULL;
|
|
|
|
door->dptr4 = NULL;
|
|
|
|
|
|
|
|
int dz, dx;
|
|
|
|
ROOM_INFO* r;
|
|
|
|
ROOM_INFO* b;
|
|
|
|
short boxNumber, twoRoom, roomNumber;
|
|
|
|
|
|
|
|
dz = dx = 0;
|
|
|
|
|
|
|
|
if (item->pos.yRot == 0)
|
|
|
|
dz--;
|
2021-09-06 05:27:27 +02:00
|
|
|
else if (item->pos.yRot == -ANGLE(180))
|
2021-09-05 05:52:50 +02:00
|
|
|
dz++;
|
2021-09-06 05:27:27 +02:00
|
|
|
else if (item->pos.yRot == ANGLE(90))
|
2021-09-05 05:52:50 +02:00
|
|
|
dx--;
|
|
|
|
else
|
|
|
|
dx++;
|
|
|
|
|
|
|
|
r = &g_Level.Rooms[item->roomNumber];
|
|
|
|
|
|
|
|
door->d1.floor = &r->floor[(item->pos.zPos - r->z) / SECTOR(1) + dz + ((item->pos.xPos - r->x) / SECTOR(1) + dx) * r->xSize];
|
|
|
|
roomNumber = GetDoor(door->d1.floor);
|
|
|
|
if (roomNumber == NO_ROOM)
|
|
|
|
boxNumber = door->d1.floor->box;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
b = &g_Level.Rooms[roomNumber];
|
|
|
|
boxNumber = b->floor[(item->pos.zPos - b->z) / SECTOR(1) + dz + ((item->pos.xPos - b->x) / SECTOR(1) + dx) * b->xSize].box;
|
|
|
|
}
|
|
|
|
door->d1.block = (boxNumber != NO_BOX && g_Level.Boxes[boxNumber].flags & BLOCKABLE) ? boxNumber : NO_BOX;
|
|
|
|
|
|
|
|
memcpy(&door->d1.data, door->d1.floor, sizeof(FLOOR_INFO));
|
|
|
|
|
|
|
|
if (r->flippedRoom != -1)
|
|
|
|
{
|
|
|
|
r = &g_Level.Rooms[r->flippedRoom];
|
|
|
|
|
|
|
|
door->d1flip.floor = &r->floor[(item->pos.zPos - r->z) / SECTOR(1) + dz + ((item->pos.xPos - r->x) / SECTOR(1) + dx) * r->xSize];
|
|
|
|
roomNumber = GetDoor(door->d1flip.floor);
|
|
|
|
if (roomNumber == NO_ROOM)
|
|
|
|
boxNumber = door->d1flip.floor->box;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
b = &g_Level.Rooms[roomNumber];
|
|
|
|
boxNumber = b->floor[(item->pos.zPos - b->z) / SECTOR(1) + dz + ((item->pos.xPos - b->x) / SECTOR(1) + dx) * b->xSize].box;
|
|
|
|
}
|
|
|
|
door->d1flip.block = (boxNumber != NO_BOX && g_Level.Boxes[boxNumber].flags & BLOCKABLE) ? boxNumber : NO_BOX;
|
|
|
|
|
|
|
|
memcpy(&door->d1flip.data, door->d1flip.floor, sizeof(FLOOR_INFO));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
door->d1flip.floor = NULL;
|
|
|
|
|
|
|
|
twoRoom = GetDoor(door->d1.floor);
|
|
|
|
|
|
|
|
ShutThatDoor(&door->d1, door);
|
|
|
|
ShutThatDoor(&door->d1flip, door);
|
|
|
|
|
|
|
|
if (twoRoom == NO_ROOM)
|
|
|
|
{
|
|
|
|
door->d2.floor = NULL;
|
|
|
|
door->d2flip.floor = NULL;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
r = &g_Level.Rooms[twoRoom];
|
|
|
|
|
|
|
|
door->d2.floor = &r->floor[(item->pos.zPos - r->z) / SECTOR(1) + (item->pos.xPos - r->x) / SECTOR(1) * r->xSize];
|
|
|
|
roomNumber = GetDoor(door->d2.floor);
|
|
|
|
if (roomNumber == NO_ROOM)
|
|
|
|
boxNumber = door->d2.floor->box;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
b = &g_Level.Rooms[roomNumber];
|
|
|
|
boxNumber = b->floor[(item->pos.zPos - b->z) / SECTOR(1) + (item->pos.xPos - b->x) / SECTOR(1) * b->xSize].box;
|
|
|
|
}
|
|
|
|
door->d2.block = (boxNumber != NO_BOX && g_Level.Boxes[boxNumber].flags & BLOCKABLE) ? boxNumber : NO_BOX;
|
|
|
|
|
|
|
|
memcpy(&door->d2.data, door->d2.floor, sizeof(FLOOR_INFO));
|
|
|
|
|
|
|
|
if (r->flippedRoom != -1)
|
|
|
|
{
|
|
|
|
r = &g_Level.Rooms[r->flippedRoom];
|
|
|
|
|
|
|
|
door->d2flip.floor = &r->floor[(item->pos.zPos - r->z) / SECTOR(1) + (item->pos.xPos - r->x) / SECTOR(1) * r->xSize];
|
|
|
|
roomNumber = GetDoor(door->d2flip.floor);
|
|
|
|
if (roomNumber == NO_ROOM)
|
|
|
|
boxNumber = door->d2flip.floor->box;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
b = &g_Level.Rooms[roomNumber];
|
|
|
|
boxNumber = b->floor[(item->pos.zPos - b->z) / SECTOR(1) + (item->pos.xPos - b->x) / SECTOR(1) * b->xSize].box;
|
|
|
|
}
|
|
|
|
door->d2flip.block = (boxNumber != NO_BOX && g_Level.Boxes[boxNumber].flags & BLOCKABLE) ? boxNumber : NO_BOX;
|
|
|
|
|
|
|
|
memcpy(&door->d2flip.data, door->d2flip.floor, sizeof(FLOOR_INFO));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
door->d2flip.floor = NULL;
|
|
|
|
|
|
|
|
ShutThatDoor(&door->d2, door);
|
|
|
|
ShutThatDoor(&door->d2flip, door);
|
|
|
|
|
|
|
|
roomNumber = item->roomNumber;
|
|
|
|
ItemNewRoom(itemNumber, twoRoom);
|
|
|
|
item->roomNumber = roomNumber;
|
|
|
|
item->inDrawRoom = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void DoorCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
|
|
|
{
|
|
|
|
ITEM_INFO* item = &g_Level.Items[itemNum];
|
|
|
|
|
|
|
|
if (item->triggerFlags == 2
|
|
|
|
&& item->status == ITEM_NOT_ACTIVE && !item->gravityStatus // CHECK
|
|
|
|
&& ((TrInput & IN_ACTION ||
|
|
|
|
#ifdef NEW_INV
|
|
|
|
GLOBAL_inventoryitemchosen == ID_CROWBAR_ITEM
|
|
|
|
#else
|
|
|
|
g_Inventory.GetSelectedObject() == ID_CROWBAR_ITEM
|
|
|
|
#endif
|
|
|
|
)
|
|
|
|
&& l->currentAnimState == LS_STOP
|
|
|
|
&& l->animNumber == LA_STAND_IDLE
|
|
|
|
&& !l->hitStatus
|
|
|
|
&& Lara.gunStatus == LG_NO_ARMS
|
2021-09-11 05:38:26 +02:00
|
|
|
|| Lara.isMoving && Lara.interactedItem == itemNum))
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
|
|
|
item->pos.yRot ^= ANGLE(180);
|
|
|
|
if (TestLaraPosition(&CrowbarDoorBounds, item, l))
|
|
|
|
{
|
|
|
|
if (!Lara.isMoving)
|
|
|
|
{
|
|
|
|
#ifdef NEW_INV
|
|
|
|
if (GLOBAL_inventoryitemchosen == NO_ITEM)
|
|
|
|
#else
|
|
|
|
if (g_Inventory.GetSelectedObject() == NO_ITEM)
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
#ifdef NEW_INV
|
|
|
|
if (have_i_got_object(ID_CROWBAR_ITEM))
|
|
|
|
{
|
|
|
|
GLOBAL_enterinventory = ID_CROWBAR_ITEM;
|
|
|
|
item->pos.yRot ^= ANGLE(180);
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
if (g_Inventory.IsObjectPresentInInventory(ID_CROWBAR_ITEM))
|
|
|
|
{
|
|
|
|
g_Inventory.SetEnterObject(ID_CROWBAR_ITEM);
|
|
|
|
item->pos.yRot ^= ANGLE(180);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (OldPickupPos.x != l->pos.xPos || OldPickupPos.y != l->pos.yPos || OldPickupPos.z != l->pos.zPos)
|
|
|
|
{
|
|
|
|
OldPickupPos.x = l->pos.xPos;
|
|
|
|
OldPickupPos.y = l->pos.yPos;
|
|
|
|
OldPickupPos.z = l->pos.zPos;
|
|
|
|
SayNo();
|
|
|
|
}
|
|
|
|
item->pos.yRot ^= ANGLE(180);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
#ifdef NEW_INV
|
|
|
|
if (GLOBAL_inventoryitemchosen != ID_CROWBAR_ITEM)
|
|
|
|
#else
|
|
|
|
if (g_Inventory.GetSelectedObject() != ID_CROWBAR_ITEM)
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
item->pos.yRot ^= ANGLE(180);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#ifdef NEW_INV
|
|
|
|
GLOBAL_inventoryitemchosen = NO_ITEM;
|
|
|
|
#else
|
|
|
|
g_Inventory.SetSelectedObject(NO_ITEM);
|
|
|
|
#endif
|
|
|
|
if (MoveLaraPosition(&CrowbarDoorPos, item, l))
|
|
|
|
{
|
|
|
|
l->animNumber = LA_DOOR_OPEN_CROWBAR;
|
|
|
|
l->frameNumber = GF(LA_DOOR_OPEN_CROWBAR, 0);
|
|
|
|
l->currentAnimState = LS_MISC_CONTROL;
|
|
|
|
item->pos.yRot ^= ANGLE(180);
|
|
|
|
|
|
|
|
AddActiveItem(itemNum);
|
|
|
|
|
|
|
|
item->flags |= IFLAG_ACTIVATION_MASK;
|
|
|
|
item->status = ITEM_ACTIVE;
|
|
|
|
item->goalAnimState = LS_RUN_FORWARD;
|
|
|
|
Lara.isMoving = 0;
|
|
|
|
Lara.gunStatus = LG_HANDS_BUSY;
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-09-11 05:38:26 +02:00
|
|
|
Lara.interactedItem = itemNum;
|
2021-09-05 05:52:50 +02:00
|
|
|
}
|
2021-09-11 05:38:26 +02:00
|
|
|
else if (Lara.isMoving && Lara.interactedItem == itemNum)
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
|
|
|
Lara.isMoving = 0;
|
|
|
|
Lara.gunStatus = LG_NO_ARMS;
|
|
|
|
}
|
|
|
|
|
|
|
|
item->pos.yRot ^= ANGLE(180);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (TestBoundsCollide(item, l, coll->radius))
|
|
|
|
{
|
|
|
|
if (TestCollision(item, l))
|
|
|
|
{
|
|
|
|
if (coll->enableBaddiePush)
|
|
|
|
{
|
|
|
|
if (!(item->objectNumber >= ID_LIFT_DOORS1 && item->objectNumber <= ID_LIFT_DOORS2) || item->itemFlags[0])
|
|
|
|
{
|
|
|
|
ItemPushItem(item, l, coll, FALSE, TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void DoorControl(short itemNumber)
|
|
|
|
{
|
|
|
|
ITEM_INFO* item = &g_Level.Items[itemNumber];
|
|
|
|
DOOR_DATA* door = (DOOR_DATA*)item->data;
|
|
|
|
|
2021-09-06 05:41:03 +02:00
|
|
|
// Doors with OCB = 1 are raisable with cog switchs
|
2021-09-05 05:52:50 +02:00
|
|
|
if (item->triggerFlags == 1)
|
|
|
|
{
|
|
|
|
if (item->itemFlags[0])
|
|
|
|
{
|
|
|
|
BOUNDING_BOX* bounds = GetBoundsAccurate(item);
|
2021-09-06 05:41:03 +02:00
|
|
|
|
|
|
|
item->itemFlags[0]--;
|
2021-09-05 05:52:50 +02:00
|
|
|
item->pos.yPos -= TEN::Entities::Switches::COG_DOOR_SPEED;
|
2021-09-06 05:41:03 +02:00
|
|
|
|
2021-09-05 05:52:50 +02:00
|
|
|
int y = bounds->Y1 + item->itemFlags[2] - STEP_SIZE;
|
|
|
|
if (item->pos.yPos < y)
|
|
|
|
{
|
|
|
|
item->pos.yPos = y;
|
|
|
|
item->itemFlags[0] = 0;
|
|
|
|
}
|
|
|
|
if (!door->opened)
|
|
|
|
{
|
|
|
|
OpenThatDoor(&door->d1, door);
|
|
|
|
OpenThatDoor(&door->d2, door);
|
|
|
|
OpenThatDoor(&door->d1flip, door);
|
|
|
|
OpenThatDoor(&door->d2flip, door);
|
|
|
|
door->opened = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-09-06 05:41:03 +02:00
|
|
|
if (item->pos.yPos < item->startPos.yPos)
|
2021-09-06 05:27:27 +02:00
|
|
|
item->pos.yPos += 4;
|
2021-09-06 05:41:03 +02:00
|
|
|
if (item->pos.yPos >= item->startPos.yPos)
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
2021-09-06 05:41:03 +02:00
|
|
|
item->pos.yPos = item->startPos.yPos;
|
2021-09-05 05:52:50 +02:00
|
|
|
if (door->opened)
|
|
|
|
{
|
|
|
|
ShutThatDoor(&door->d1, door);
|
|
|
|
ShutThatDoor(&door->d2, door);
|
|
|
|
ShutThatDoor(&door->d1flip, door);
|
|
|
|
ShutThatDoor(&door->d2flip, door);
|
|
|
|
door->opened = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-09-06 05:41:03 +02:00
|
|
|
|
|
|
|
return;
|
2021-09-05 05:52:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (item->objectNumber < ID_LIFT_DOORS1 || item->objectNumber > ID_LIFT_DOORS2)
|
|
|
|
{
|
|
|
|
if (TriggerActive(item))
|
|
|
|
{
|
2021-09-06 05:27:27 +02:00
|
|
|
if (item->currentAnimState == 0)
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
|
|
|
item->goalAnimState = 1;
|
|
|
|
}
|
2021-09-06 05:27:27 +02:00
|
|
|
else if (!door->opened)
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
|
|
|
OpenThatDoor(&door->d1, door);
|
|
|
|
OpenThatDoor(&door->d2, door);
|
|
|
|
OpenThatDoor(&door->d1flip, door);
|
|
|
|
OpenThatDoor(&door->d2flip, door);
|
|
|
|
door->opened = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->status = ITEM_ACTIVE;
|
|
|
|
|
|
|
|
if (item->currentAnimState == 1)
|
|
|
|
{
|
|
|
|
item->goalAnimState = 0;
|
|
|
|
}
|
2021-09-06 05:27:27 +02:00
|
|
|
else if (door->opened)
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
|
|
|
ShutThatDoor(&door->d1, door);
|
|
|
|
ShutThatDoor(&door->d2, door);
|
|
|
|
ShutThatDoor(&door->d1flip, door);
|
|
|
|
ShutThatDoor(&door->d2flip, door);
|
|
|
|
door->opened = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-09-06 05:27:27 +02:00
|
|
|
else
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
2021-09-06 05:27:27 +02:00
|
|
|
// TR5 lift doors
|
|
|
|
/*if (!TriggerActive(item))
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
2021-09-06 05:27:27 +02:00
|
|
|
if (item->itemFlags[0] >= SECTOR(4))
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
2021-09-06 05:27:27 +02:00
|
|
|
if (door->opened)
|
|
|
|
{
|
|
|
|
ShutThatDoor(&door->d1, door);
|
|
|
|
ShutThatDoor(&door->d2, door);
|
|
|
|
ShutThatDoor(&door->d1flip, door);
|
|
|
|
ShutThatDoor(&door->d2flip, door);
|
|
|
|
door->opened = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!item->itemFlags[0])
|
|
|
|
SoundEffect(SFX_TR5_LIFT_DOORS, &item->pos, 0);
|
|
|
|
item->itemFlags[0] += STEP_SIZE;
|
2021-09-05 05:52:50 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-09-06 05:27:27 +02:00
|
|
|
if (item->itemFlags[0] > 0)
|
|
|
|
{
|
|
|
|
if (item->itemFlags[0] == SECTOR(4))
|
|
|
|
SoundEffect(SFX_TR5_LIFT_DOORS, &item->pos, 0);
|
|
|
|
item->itemFlags[0] -= STEP_SIZE;
|
|
|
|
}
|
|
|
|
if (!door->opened)
|
|
|
|
{
|
|
|
|
DontUnlockBox = true;
|
|
|
|
OpenThatDoor(&door->d1, door);
|
|
|
|
OpenThatDoor(&door->d2, door);
|
|
|
|
OpenThatDoor(&door->d1flip, door);
|
|
|
|
OpenThatDoor(&door->d2flip, door);
|
|
|
|
DontUnlockBox = false;
|
|
|
|
door->opened = true;
|
|
|
|
}
|
|
|
|
}*/
|
2021-09-05 05:52:50 +02:00
|
|
|
}
|
2021-09-06 05:27:27 +02:00
|
|
|
|
|
|
|
AnimateItem(item);
|
2021-09-05 05:52:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void OpenThatDoor(DOORPOS_DATA* doorPos, DOOR_DATA* dd)
|
|
|
|
{
|
|
|
|
FLOOR_INFO* floor = doorPos->floor;
|
|
|
|
|
|
|
|
if (floor != NULL)
|
|
|
|
{
|
2021-09-11 05:38:26 +02:00
|
|
|
*doorPos->floor = doorPos->data;
|
2021-09-05 05:52:50 +02:00
|
|
|
|
|
|
|
short boxIndex = doorPos->block;
|
|
|
|
if (boxIndex != NO_BOX)
|
|
|
|
{
|
2021-09-11 05:38:26 +02:00
|
|
|
g_Level.Boxes[boxIndex].flags &= ~BLOCKED;
|
2021-09-05 05:52:50 +02:00
|
|
|
|
2021-09-11 05:38:26 +02:00
|
|
|
for (int i = 0; i < ActiveCreatures.size(); i++)
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
2021-09-11 05:38:26 +02:00
|
|
|
ActiveCreatures[i]->LOT.targetBox = NO_BOX;
|
2021-09-05 05:52:50 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ShutThatDoor(DOORPOS_DATA* doorPos, DOOR_DATA* dd)
|
|
|
|
{
|
|
|
|
FLOOR_INFO* floor = doorPos->floor;
|
|
|
|
|
|
|
|
if (floor)
|
|
|
|
{
|
|
|
|
floor->box = NO_BOX;
|
|
|
|
floor->ceiling = -127;
|
|
|
|
floor->floor = -127;
|
|
|
|
floor->index = 0;
|
|
|
|
floor->skyRoom = NO_ROOM;
|
|
|
|
floor->pitRoom = NO_ROOM;
|
|
|
|
|
|
|
|
short boxIndex = doorPos->block;
|
|
|
|
if (boxIndex != NO_BOX)
|
|
|
|
{
|
|
|
|
g_Level.Boxes[boxIndex].flags |= BLOCKED;
|
2021-09-11 05:38:26 +02:00
|
|
|
|
|
|
|
for (int i = 0; i < ActiveCreatures.size(); i++)
|
2021-09-05 05:52:50 +02:00
|
|
|
{
|
2021-09-11 05:38:26 +02:00
|
|
|
ActiveCreatures[i]->LOT.targetBox = NO_BOX;
|
2021-09-05 05:52:50 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|