Commit bea9942b authored by Gerhard Stein's avatar Gerhard Stein

changed the stone code a bit for Patchwork I

parent 68a90fbb
......@@ -64,6 +64,7 @@ void CPhysicsSettings::loadGameConstants(int episode, byte* data)
misc.raygun_tile = GETWORD(data+0x1166);
misc.pogo_tile = GETWORD(data+0x11A7);
misc.changestoneblock = GETWORD(data+0x2414);
// TODO: ... More stuff will come here
}
else if(episode == 2)
......
......@@ -58,6 +58,9 @@ public:
int pogo_tile;
int raygun_tile;
// For the stoneblock normally in level 16
int changestoneblock;
}misc;
int max_fallspeed;
......
......@@ -326,7 +326,7 @@ void CPlayer::TogglePogo_and_Switches()
// and it's relative to the position of the switch.)
Uint16 bridge = mp_Map->getObjectat(mx, my);
if (bridge==0) // Uh Oh! This means you have enabled a tantalus ray of the ship
if (bridge == 0) // Uh Oh! This means you have enabled a tantalus ray of the ship
{ // lightswitch
if(TileProperty[t].behaviour == 23)
m_Level_Trigger = LVLTRIG_LIGHT;
......
......@@ -36,9 +36,9 @@ void CRope::process()
// check if we've hit the ground yet
for(int x=2;x<STONE_WIDTH-2;x++)
{
if (g_pBehaviorEngine->getTileProperties().at(mp_Map->at(stoneX+x, stoneY+2)).bup)
if (falldist >= 4)
{
exists=false;
exists = false;
return;
}
}
......@@ -66,7 +66,8 @@ void CRope::getShotByRay()
stoneX = x - 4;
stoneY = y + 1;
// get color of background
bgtile = mp_Map->at(x, y);
bgtile = g_pBehaviorEngine->getPhysicsSettings().misc.changestoneblock;
falldist = 0;
}
}
}
......@@ -93,6 +94,7 @@ void CRope::rope_movestone()
mp_Map->setTile(x+xa,ya,bgtile, true);
stoneY++;
falldist++;
}
void CRope::getTouchedBy(CObject &theObject)
......
......@@ -28,6 +28,7 @@ private:
int droptimer;
int stoneX, stoneY;
int bgtile;
int falldist;
};
#endif /* CROPE_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment