The following change should fix your problem, although there is still the problem that the editor does not set the nodes as seen when it creates the headquarter, so now Test1 loaded as scenario does not show anything. But i guess you already noticed this when looking at Test2, where it is apparent that only the area around the second headquarter (created when starting the game) is revealed.
--- src/player.cc (revision 2046)
+++ src/player.cc (arbetskopia)
@@ -85,14 +85,19 @@
if (place_headquarters) { const Tribe_Descr & trdesc = m_tribe; const int plnum = m_plnum;
+ const Coords starting_pos = map.get_starting_pos(plnum);
+ Warehouse * const warehouse =
+ dynamic_cast<Warehouse * const>(map.get_immovable(starting_pos)); //try { trdesc.load_warehouse_with_start_wares (egbase(),
- *dynamic_cast<Warehouse * const>
- (egbase().warp_building
- (map.get_starting_pos(plnum),
- plnum,
- trdesc.get_building_index("headquarters"))));
+ *(warehouse ?
+ warehouse :
+ dynamic_cast<Warehouse * const>
+ (egbase().warp_building
+ (starting_pos,
+ plnum,
+ trdesc.get_building_index("headquarters")))));
//} catch (const Descr_Maintainer<Building_Descr>::Nonexistent) { //throw wexception("Tribe %s lacks headquarters", tribe.get_name());
//}
Logged In: YES
user_id=31104
Originator: NO
The following change should fix your problem, although there is still the problem that the editor does not set the nodes as seen when it creates the headquarter, so now Test1 loaded as scenario does not show anything. But i guess you already noticed this when looking at Test2, where it is apparent that only the area around the second headquarter (created when starting the game) is revealed. headquarters) {
const Tribe_Descr & trdesc = m_tribe;
const int plnum = m_plnum; starting_ pos(plnum) ; cast<Warehouse * const>( map.get_ immovable( starting_ pos));
//try {
trdesc. load_warehouse_ with_start_ wares
(egbase( ), cast<Warehouse * const> ).warp_ building starting_ pos(plnum) , get_building_ index(" headquarters" )))); cast<Warehouse * const> ).warp_ building get_building_ index(" headquarters" ))))); r<Building_ Descr>: :Nonexistent) {
//throw wexception("Tribe %s lacks headquarters", tribe.get_name());
--- src/player.cc (revision 2046)
+++ src/player.cc (arbetskopia)
@@ -85,14 +85,19 @@
if (place_
+ const Coords starting_pos = map.get_
+ Warehouse * const warehouse =
+ dynamic_
- *dynamic_
- (egbase(
- (map.get_
- plnum,
- trdesc.
+ *(warehouse ?
+ warehouse :
+ dynamic_
+ (egbase(
+ (starting_pos,
+ plnum,
+ trdesc.
//} catch (const Descr_Maintaine
//}