mail[Wesnoth-commits] r44845 - /trunk/src/whiteboard/recruit.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by gabrielmorin on July 29, 2010 - 11:56:
Author: gabba
Date: Thu Jul 29 11:56:42 2010
New Revision: 44845

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44845&view=rev
Log:
Whiteboard/recruit: add fake unit to represent future recruit.

Modified:
    trunk/src/whiteboard/recruit.cpp

Modified: trunk/src/whiteboard/recruit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/recruit.cpp?rev=44845&r1=44844&r2=44845&view=diff
==============================================================================
--- trunk/src/whiteboard/recruit.cpp (original)
+++ trunk/src/whiteboard/recruit.cpp Thu Jul 29 11:56:42 2010
@@ -18,6 +18,7 @@
 
 #include "recruit.hpp"
 
+#include "manager.hpp"
 #include "visitor.hpp"
 
 #include "game_display.hpp"
@@ -49,14 +50,14 @@
                fake_unit_(),
                temp_cost_()
 {
-       fake_unit_.reset(create_corresponding_unit());
+       fake_unit_.reset(create_corresponding_unit(), 
wb::manager::fake_unit_deleter());
+       fake_unit_->set_location(recruit_hex_);
+       fake_unit_->set_ghosted(false);
        resources::screen->place_temporary_unit(fake_unit_.get());
 }
 
 recruit::~recruit()
 {
-       assert(resources::screen);
-       resources::screen->remove_temporary_unit(fake_unit_.get());
 }
 
 void recruit::accept(visitor& v)




Related Messages


Powered by MHonArc, Updated Thu Jul 29 12:00:26 2010