Possible hack fix for bug #14341.

This commit is contained in:
Lari Nieminen 2009-09-18 21:18:54 +00:00
parent 78b01446e3
commit 304bdc6c9f

View file

@ -329,18 +329,34 @@ Note: You need to use map settings for the scenario to work right."
{VARIABLE_OP gold add -$upgrade_cost}
### DEBUG
{VARIABLE_OP total_cost add $upgrade_cost}
{VARIABLE new_spawn[$unit_id].type $advanceto}
{VARIABLE new_spawn[$unit_id].role $next_role}
{VARIABLE somehack_type $advanceto}
{VARIABLE use_somehack yes}
[/then]
[/if]
[/else]
[/if]
[/then]
[/if]
[unstore_unit]
variable=new_spawn[$unit_id]
find_vacant=yes
[/unstore_unit]
[if]
[variable]
name=use_somehack
boolean_equals=yes
[/variable]
[then]
{TRANSFORM_UNIT x,y=$new_spawn[$unit_id].x,$new_spawn[$unit_id].y $somehack_type}
{VARIABLE use_somehack no}
[/then]
[/if]
{NEXT unit_id}
{CLEAR_VARIABLE new_spawn}
#enddef