Some minor tweaks to make the image prefetching feel less flickery : when a card goes from a player's library into their hand, trigger a prefetch of the image. Also do the same thing when the AI decides on what card to play and creates an action. The idea being, new cards in play will probably want to be viewed by the player (and in the case of the AI playing a spell, we automatically show the image during the interrupt window before it comes into play). This makes for a much smoother gameplay - we have to get the image at some point anyway, and by doing it before we get to the render call, we no longer have the back card image pop up briefly.

This commit is contained in:
wrenczes@gmail.com
2011-04-20 21:07:24 +00:00
parent d06965d95e
commit babda2bc0f
4 changed files with 48 additions and 9 deletions

View File

@@ -40,12 +40,8 @@ public:
id = currentId++;
};
AIAction(MTGCardInstance * c, MTGCardInstance * t = NULL)
: efficiency(-1), ability(NULL), player(NULL), click(c), target(t)
{
id = currentId++;
};
AIAction(MTGCardInstance * c, MTGCardInstance * t = NULL);
AIAction(Player * p)
: efficiency(-1), ability(NULL), player(p), click(NULL), target(NULL)
{