Made computer reciprocate Shared Vision and Ally Commands

This commit is contained in:
mr-russ 2003-05-04 07:31:28 +00:00
parent 1660de9ec5
commit a4c7f88ce9
2 changed files with 15 additions and 0 deletions

View file

@ -31,6 +31,7 @@
<li>Future 1.19 Release<p>
<ul>
<li>+++
<li>Made computer reciprocate Shared Vision and Ally Commands (from Russell Smith)
<li>Made the 'make it so' cheat reversable and changes build speed for buildings already under construction (Nehal Mistry).
<li>Fixed bug #427560: Diplomacy menu button (from Jimmy Salmon).
<li>Rewrote the UI configuration (from Jimmy Salmon).

View file

@ -1373,6 +1373,13 @@ global void CommandAutoSpellCast(Unit* unit,SpellType* spell)
*/
global void CommandDiplomacy(int player,int state,int opponent)
{
// If we work changing states with a computer, it should
// automatically reciprocate the changes :)
if( Players[opponent].Type == PlayerComputer &&
Players[player].Type == PlayerPerson ) {
CommandDiplomacy(opponent,state,player);
}
switch( state ) {
case DiplomacyNeutral:
Players[player].Enemy&=~(1<<opponent);
@ -1405,6 +1412,13 @@ global void CommandSharedVision(int player,int state,int opponent)
{
int i;
Unit* unit;
// If we work changing states with a computer, it should
// automatically reciprocate the changes :)
if( Players[opponent].Type == PlayerComputer &&
Players[player].Type == PlayerPerson ) {
CommandSharedVision(opponent,state,player);
}
if( state==0 ) {
// Check all tiles and mark unseen ones as explored.