~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/trainingsite.cc

  • Committer: sigra
  • Date: 2007-01-26 16:12:13 UTC
  • Revision ID: git-v1:f983e08603f59bc6a6e99cb732d9102bfbfb3db8
* Try to optimize the set terrain tool by adding Map::set_height for areas. That means first set the height of every node in the area, then adjust the surrounding nodes ([http://sourceforge.net/tracker/index.php?func=detail&aid=1640305&group_id=40163&atid=427221], "Editor set height tool set to max produces funny mountain" is still present though).
* Use Area and Player_Area.
* Put most of the code from Event_Conquer_Area and Event_Unhide_Area into a common base.
* Initialize the names of events and triggers in their initializer lists.

git-svn-id: https://widelands.svn.sourceforge.net/svnroot/widelands/trunk@1965 37b2a8de-5219-0410-9f54-a31bc463ab9c

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
        assert(s);
357
357
        assert(s->get_location(g) == tsite);
358
358
 
359
 
        g->conquer_area(tsite->get_owner()->get_player_number(), tsite->get_position(), tsite->get_descr());
 
359
        g->conquer_area
 
360
                (Player_Area
 
361
                 (tsite->owner().get_player_number(),
 
362
                  Area(tsite->get_position(), tsite->descr().get_conquers())));
360
363
 
361
364
        uint i;
362
365
        for (i = 0; i < tsite->m_soldier_requests.size(); i++) {