mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-12 13:37:01 +03:00
Revert "Pushables: Fix error in stack height code, use bbox Y1 value for non-rigid pushables"
This reverts commit 21977d5eba
.
This commit is contained in:
parent
21977d5eba
commit
a6a9050d4a
4 changed files with 13 additions and 17 deletions
|
@ -86,12 +86,10 @@ void PushableBlockControl(short itemNumber)
|
||||||
short roomNumber;
|
short roomNumber;
|
||||||
|
|
||||||
int stackIndex; // used for stacked pushables
|
int stackIndex; // used for stacked pushables
|
||||||
int blockHeight;
|
|
||||||
|
|
||||||
|
int blockHeight = 1024;
|
||||||
if (item->triggerFlags > 64)
|
if (item->triggerFlags > 64)
|
||||||
blockHeight = CLICK(item->triggerFlags - 64);
|
blockHeight = CLICK(item->triggerFlags - 64);
|
||||||
else
|
|
||||||
blockHeight = -(GetBoundsAccurate(item)->Y1);
|
|
||||||
|
|
||||||
// get total height of stack
|
// get total height of stack
|
||||||
stackIndex = item->itemFlags[1];
|
stackIndex = item->itemFlags[1];
|
||||||
|
@ -99,9 +97,9 @@ void PushableBlockControl(short itemNumber)
|
||||||
{
|
{
|
||||||
auto stackItem = &g_Level.Items[stackIndex];
|
auto stackItem = &g_Level.Items[stackIndex];
|
||||||
if (stackItem->triggerFlags > 64)
|
if (stackItem->triggerFlags > 64)
|
||||||
blockHeight += CLICK(stackItem->triggerFlags - 64);
|
blockHeight += CLICK(item->triggerFlags - 64);
|
||||||
else
|
else
|
||||||
blockHeight += -(GetBoundsAccurate(stackItem)->Y1);
|
blockHeight += 1024;
|
||||||
|
|
||||||
stackIndex = stackItem->itemFlags[1];
|
stackIndex = stackItem->itemFlags[1];
|
||||||
}
|
}
|
||||||
|
@ -399,12 +397,10 @@ void PushableBlockCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
FLOOR_INFO* floor = GetFloor(item->pos.xPos, item->pos.yPos - 256, item->pos.zPos, &roomNumber);
|
FLOOR_INFO* floor = GetFloor(item->pos.xPos, item->pos.yPos - 256, item->pos.zPos, &roomNumber);
|
||||||
|
|
||||||
int stackIndex; // used for stacked pushables
|
int stackIndex; // used for stacked pushables
|
||||||
int blockHeight;
|
|
||||||
|
|
||||||
|
int blockHeight = 1024;
|
||||||
if (item->triggerFlags > 64)
|
if (item->triggerFlags > 64)
|
||||||
blockHeight = CLICK(item->triggerFlags - 64);
|
blockHeight = CLICK(item->triggerFlags - 64);
|
||||||
else
|
|
||||||
blockHeight = -(GetBoundsAccurate(item)->Y1);
|
|
||||||
|
|
||||||
// get total height of stack
|
// get total height of stack
|
||||||
stackIndex = item->itemFlags[1];
|
stackIndex = item->itemFlags[1];
|
||||||
|
@ -412,9 +408,9 @@ void PushableBlockCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
{
|
{
|
||||||
auto stackItem = &g_Level.Items[stackIndex];
|
auto stackItem = &g_Level.Items[stackIndex];
|
||||||
if (stackItem->triggerFlags > 64)
|
if (stackItem->triggerFlags > 64)
|
||||||
blockHeight += CLICK(stackItem->triggerFlags - 64);
|
blockHeight += CLICK(item->triggerFlags - 64);
|
||||||
else
|
else
|
||||||
blockHeight += -(GetBoundsAccurate(stackItem)->Y1);
|
blockHeight += 1024;
|
||||||
|
|
||||||
stackIndex = stackItem->itemFlags[1];
|
stackIndex = stackItem->itemFlags[1];
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,7 @@ LRESULT CALLBACK WinAppProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
|
||||||
{
|
{
|
||||||
if constexpr (DebugBuild)
|
if constexpr (DebugBuild)
|
||||||
//getCurrentCommit();
|
getCurrentCommit();
|
||||||
int RetVal;
|
int RetVal;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
<ProjectGuid>{15AB0220-541C-4DA1-94EB-ED3C47E4582E}</ProjectGuid>
|
<ProjectGuid>{15AB0220-541C-4DA1-94EB-ED3C47E4582E}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>TR5Main</RootNamespace>
|
<RootNamespace>TR5Main</RootNamespace>
|
||||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
<RESOURCE_FILE>Resources.rc</RESOURCE_FILE>
|
<RESOURCE_FILE>Resources.rc</RESOURCE_FILE>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LocalDebuggerCommand>C:\Users\Krystian\Documents\TR5Main\TR5Main.exe</LocalDebuggerCommand>
|
<LocalDebuggerCommand>Tr5Main.exe</LocalDebuggerCommand>
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
<LocalDebuggerWorkingDirectory>..\..\..\TR5Main</LocalDebuggerWorkingDirectory>
|
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\Build\</LocalDebuggerWorkingDirectory>
|
||||||
<LocalDebuggerCommandArguments>/debug</LocalDebuggerCommandArguments>
|
<LocalDebuggerCommandArguments>/debug</LocalDebuggerCommandArguments>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue