2020-12-21 13:16:29 -03:00
|
|
|
#include "framework.h"
|
2021-12-22 16:23:57 +03:00
|
|
|
#include "Specific/level.h"
|
2021-12-24 11:08:16 +03:00
|
|
|
#include "Objects/Generic/Object/generic_bridge.h"
|
2021-12-22 16:23:57 +03:00
|
|
|
#include "Game/collision/floordata.h"
|
2020-12-21 13:16:29 -03:00
|
|
|
|
2021-08-30 18:03:21 +03:00
|
|
|
using namespace TEN::Floordata;
|
2020-12-21 13:16:29 -03:00
|
|
|
|
2021-01-06 17:53:13 -03:00
|
|
|
void InitialiseBridge(short itemNumber)
|
|
|
|
{
|
2021-09-29 03:41:36 +03:00
|
|
|
UpdateBridgeItem(itemNumber);
|
2021-01-06 17:53:13 -03:00
|
|
|
}
|
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
int GetOffset(short angle, int x, int z)
|
|
|
|
{
|
|
|
|
const auto point = GetSectorPoint(x, z);
|
|
|
|
auto vector = Vector2(point.x, point.y);
|
|
|
|
const auto matrix = Matrix::CreateRotationZ(TO_RAD(angle));
|
|
|
|
Vector2::Transform(vector, matrix, vector);
|
|
|
|
return -vector.x;
|
|
|
|
}
|