if (CAN_FALL(element) && y<lev_fieldy-1)
{
+ if (PlayerPushing && PlayerMovPos)
+ {
+ int nextJX = JX + (JX - lastJX);
+ int nextJY = JY + (JY - lastJY);
+
+ if (x == nextJX && y == nextJY)
+ return;
+ }
+
if (element==EL_MORAST_VOLL)
{
if (IS_FREE(x,y+1))
DrawLevelElement(oldJX,oldJY, Feld[oldJX][oldJY]);
*/
+
+ if (PlayerPushing)
+ {
+ int nextJX = JX + (JX - lastJX);
+ int nextJY = JY + (JY - lastJY);
+
+ if (Feld[nextJX][nextJY] == EL_SOKOBAN_FELD_VOLL)
+ DrawLevelElement(nextJX,nextJY, EL_SOKOBAN_FELD_LEER);
+ else
+ DrawLevelElement(nextJX,nextJY, EL_LEERRAUM);
+ }
+
+
DrawPlayerField();
return;
else
DrawLevelField(oldJX,oldJY);
+ if (PlayerPushing)
+ {
+ int nextJX = JX + (JX - lastJX);
+ int nextJY = JY + (JY - lastJY);
+ if (PlayerMovPos)
+ {
+ if (Feld[nextJX][nextJY] == EL_SOKOBAN_FELD_VOLL)
+ DrawLevelElement(nextJX,nextJY, EL_SOKOBAN_FELD_LEER);
+ else
+ DrawLevelElement(nextJX,nextJY, EL_LEERRAUM);
+ }
+ else
+ DrawLevelElement(nextJX,nextJY, Feld[nextJX][nextJY]);
+ }
if (!PlayerMovPos)
{
static long push_delay = 0;
static int push_delay_value = 5;
- PlayerPushing = FALSE;
+ if (!PlayerMovPos)
+ PlayerPushing = FALSE;
if (mode == DF_NO_PUSH)
{
*/
+
+ if (PlayerPushing && PlayerMovPos)
+ {
+ int nextJX = JX + (JX - lastJX);
+ int nextJY = JY + (JY - lastJY);
+ int px = SCROLLX(nextJX), py = SCROLLY(nextJY);
+
+ if (Feld[JX][JY] == EL_SOKOBAN_FELD_LEER ||
+ Feld[nextJX][nextJY] == EL_SOKOBAN_FELD_VOLL)
+ DrawGraphicShiftedThruMask(px,py,sxx,syy,
+ GFX_SOKOBAN_OBJEKT,
+ CUT_NO_CUTTING);
+ else
+ DrawGraphicShifted(px,py,sxx,syy,
+ el2gfx(Feld[nextJX][nextJY]),
+ CUT_NO_CUTTING);
+ }
+
+
+
/* draw things in front of player (EL_DYNAMIT || EL_DYNABOMB) */
if (element == EL_DYNAMIT || element == EL_DYNABOMB)