mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-11 13:06:49 +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;
|
||||
|
||||
int stackIndex; // used for stacked pushables
|
||||
int blockHeight;
|
||||
|
||||
|
||||
int blockHeight = 1024;
|
||||
if (item->triggerFlags > 64)
|
||||
blockHeight = CLICK(item->triggerFlags - 64);
|
||||
else
|
||||
blockHeight = -(GetBoundsAccurate(item)->Y1);
|
||||
|
||||
// get total height of stack
|
||||
stackIndex = item->itemFlags[1];
|
||||
|
@ -99,9 +97,9 @@ void PushableBlockControl(short itemNumber)
|
|||
{
|
||||
auto stackItem = &g_Level.Items[stackIndex];
|
||||
if (stackItem->triggerFlags > 64)
|
||||
blockHeight += CLICK(stackItem->triggerFlags - 64);
|
||||
blockHeight += CLICK(item->triggerFlags - 64);
|
||||
else
|
||||
blockHeight += -(GetBoundsAccurate(stackItem)->Y1);
|
||||
blockHeight += 1024;
|
||||
|
||||
stackIndex = stackItem->itemFlags[1];
|
||||
}
|
||||
|
@ -399,22 +397,20 @@ 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);
|
||||
|
||||
int stackIndex; // used for stacked pushables
|
||||
int blockHeight;
|
||||
|
||||
int blockHeight = 1024;
|
||||
if (item->triggerFlags > 64)
|
||||
blockHeight = CLICK(item->triggerFlags - 64);
|
||||
else
|
||||
blockHeight = -(GetBoundsAccurate(item)->Y1);
|
||||
|
||||
// get total height of stack
|
||||
stackIndex = item->itemFlags[1];
|
||||
while (stackIndex != NO_ITEM)
|
||||
while (stackIndex != NO_ITEM)
|
||||
{
|
||||
auto stackItem = &g_Level.Items[stackIndex];
|
||||
if (stackItem->triggerFlags > 64)
|
||||
blockHeight += CLICK(stackItem->triggerFlags - 64);
|
||||
blockHeight += CLICK(item->triggerFlags - 64);
|
||||
else
|
||||
blockHeight += -(GetBoundsAccurate(stackItem)->Y1);
|
||||
blockHeight += 1024;
|
||||
|
||||
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)
|
||||
{
|
||||
if constexpr (DebugBuild)
|
||||
//getCurrentCommit();
|
||||
getCurrentCommit();
|
||||
int RetVal;
|
||||
int n;
|
||||
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
<ProjectGuid>{15AB0220-541C-4DA1-94EB-ED3C47E4582E}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>TR5Main</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<RESOURCE_FILE>Resources.rc</RESOURCE_FILE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerCommand>C:\Users\Krystian\Documents\TR5Main\TR5Main.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerCommand>Tr5Main.exe</LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>..\..\..\TR5Main</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\Build\</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerCommandArguments>/debug</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue