~marten-r/widelands/feature-3d-rendering-open-gl-es-compat

« back to all changes in this revision

Viewing changes to src/logic/ship.cc

  • Committer: Marten Richter \
  • Date: 2013-12-07 16:34:54 UTC
  • Revision ID: marten.richter@freenet.de-20131207163454-ssy014khpxtrgvq9
Add z-Ordering for rendering, fix some drawing glitches, change api for 3d rendering

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
                                                        idx++;
276
276
                                                }
277
277
 
278
 
                                                start_task_movepath(game, subpath, descr().get_sail_anims());
 
278
                                                start_task_movepath(game, subpath, descr().get_sail_anims(), true);
279
279
                                                return true;
280
280
                                        }
281
281
 
293
293
 
294
294
                                if (closest_target) {
295
295
                                        molog("Closest target en route is (%i,%i)\n", closest_target.x, closest_target.y);
296
 
                                        if (start_task_movepath(game, closest_target, 0, descr().get_sail_anims()))
 
296
                                        if (start_task_movepath(game, closest_target, 0, descr().get_sail_anims(), true))
297
297
                                                return true;
298
298
 
299
299
                                        molog("  Failed to find path!!! Retry full search\n");
519
519
                                }
520
520
 
521
521
                                state.ivar1 = 1;
522
 
                                start_task_move(game, dir, descr().get_sail_anims(), false);
 
522
                                start_task_move(game, dir, false, descr().get_sail_anims(), false);
523
523
                                return;
524
524
                        }
525
525
                        // No desire to move around, so sleep
562
562
                                                } while (!exp_dir_swimable(m_expedition->direction));
563
563
                                        }
564
564
                                        state.ivar1 = 1;
565
 
                                        return start_task_move(game, m_expedition->direction, descr().get_sail_anims(), false);
 
565
                                        return start_task_move(game, m_expedition->direction, false, descr().get_sail_anims(), false);
566
566
                                } else {
567
567
                                        // The ship got the command to scout around an island, but is not close to any island
568
568
                                        // Most likely the command was send as the ship was on an exploration and just leaving
577
577
                                                                // However, we do neither save the position as starting position, nor do we save
578
578
                                                                // the direction we currently go. So the ship can start exploring normally
579
579
                                                                state.ivar1 = 1;
580
 
                                                                return start_task_move(game, dir, descr().get_sail_anims(), false);
 
580
                                                                return start_task_move(game, dir, false, descr().get_sail_anims(), false);
581
581
                                                        }
582
582
                                        }
583
583
                                        // if we are here, it seems something really strange happend.
589
589
                                if (exp_dir_swimable(m_expedition->direction)) {
590
590
                                        // the scouting direction is still free to move
591
591
                                        state.ivar1 = 1;
592
 
                                        start_task_move(game, m_expedition->direction, descr().get_sail_anims(), false);
 
592
                                        start_task_move(game, m_expedition->direction, false, descr().get_sail_anims(), false);
593
593
                                        return;
594
594
                                } else { // coast reached
595
595
                                        m_ship_state = EXP_WAITING;
719
719
                if (cur.field->get_immovable() == &pd) {
720
720
                        Path path;
721
721
                        astar.pathto(cur, path);
722
 
                        start_task_movepath(game, path, descr().get_sail_anims());
 
722
                        start_task_movepath(game, path, descr().get_sail_anims(), true);
723
723
                        return;
724
724
                }
725
725
        }