Made computer reciprocate Shared Vision and Ally Commands
This commit is contained in:
parent
1660de9ec5
commit
a4c7f88ce9
2 changed files with 15 additions and 0 deletions
|
@ -31,6 +31,7 @@
|
||||||
<li>Future 1.19 Release<p>
|
<li>Future 1.19 Release<p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>+++
|
<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>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>Fixed bug #427560: Diplomacy menu button (from Jimmy Salmon).
|
||||||
<li>Rewrote the UI configuration (from Jimmy Salmon).
|
<li>Rewrote the UI configuration (from Jimmy Salmon).
|
||||||
|
|
|
@ -1373,6 +1373,13 @@ global void CommandAutoSpellCast(Unit* unit,SpellType* spell)
|
||||||
*/
|
*/
|
||||||
global void CommandDiplomacy(int player,int state,int opponent)
|
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 ) {
|
switch( state ) {
|
||||||
case DiplomacyNeutral:
|
case DiplomacyNeutral:
|
||||||
Players[player].Enemy&=~(1<<opponent);
|
Players[player].Enemy&=~(1<<opponent);
|
||||||
|
@ -1405,6 +1412,13 @@ global void CommandSharedVision(int player,int state,int opponent)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Unit* unit;
|
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 ) {
|
if( state==0 ) {
|
||||||
// Check all tiles and mark unseen ones as explored.
|
// Check all tiles and mark unseen ones as explored.
|
||||||
|
|
Loading…
Add table
Reference in a new issue