Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit f0216df

Browse files
committed
One more piling logic fix so that it avoids settling atop of settle material as well
1 parent a31d76a commit f0216df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Managers/MovableMan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1954,7 +1954,7 @@ void MovableMan::Update()
19541954
Material const * terrMat = g_SceneMan.GetMaterialFromID(g_SceneMan.GetTerrain()->GetMaterialPixel(parPos.GetFloorIntX(), parPos.GetFloorIntY()));
19551955
int piling = (*parIt)->GetMaterial()->GetPiling();
19561956
if (piling > 0) {
1957-
for (int s = 0; terrMat->GetIndex() == (*parIt)->GetMaterial()->GetIndex() && s < piling; ++s) {
1957+
for (int s = 0; s < piling && (terrMat->GetIndex() == (*parIt)->GetMaterial()->GetIndex() || terrMat->GetIndex() == (*parIt)->GetMaterial()->GetSettleMaterial()); ++s) {
19581958
if ((piling - s) % 2 == 0) {
19591959
parPos.m_Y -= 1.0F;
19601960
} else {

0 commit comments

Comments
 (0)