1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[3.13] SDK Fix for Spies being displaced on war declarations

Discussion in 'Civ4 - Bug Reports' started by Bhruic, Oct 5, 2007.

  1. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    File: CvUnit.cpp
    Function: CvUnit::verifyStackValid
    Line: 12451
    Replace:
    Code:
    	if (plot()->isVisibleEnemyUnit(this))
    
    With:
    Code:
    	if (plot()->isVisibleEnemyUnit(this) && !isSpy())
    
    Bh
     
  2. Phristen

    Phristen Chieftain

    Joined:
    Aug 5, 2007
    Messages:
    29
    This is really good, I can't believe firaxis omitted it!

    P.S. Although it's line 12451 for me.
     
  3. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    Yes, it is for me too.... :sigh:

    Bh
     
  4. stagnate

    stagnate Warlord

    Joined:
    Sep 28, 2003
    Messages:
    274
    Why is spy being returned by isVisibleEnemyUnit? That seems like the actual problem (strictly based on function name :)

    They changed the behaviour so that invisible units made visible would be bumped, and I bet that screwed up that function.
     
  5. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    No, the spy isn't being returned by that. That check is whether there is a visible enemy unit on the square the spy is on (ie, an enemy to the player).

    Bh
     

Share This Page