A question of unit_animation::get_end_time()

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
ancientcc
Posts: 24
Joined: April 16th, 2009, 10:07 am

A question of unit_animation::get_end_time()

Post by ancientcc »

Code: Select all

int unit_animation::get_end_time() const
{
	int result = unit_anim_.get_end_time();
	std::map<std::string,particule>::const_iterator anim_itor =sub_anims_.end();
	for( /*null*/; anim_itor != sub_anims_.end() ; ++anim_itor) {
		result= std::max<int>(result,anim_itor->second.get_end_time());
	}
	return result;
}
------------------------

Code: Select all

std::map<std::string,particule>::const_iterator anim_itor = sub_anims_.end();
It will result to not calculate particulars of sub_anims_, why?
User avatar
Coffee
Inactive Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: A question of unit_animation::get_end_time()

Post by Coffee »

Maybe you might want to post which files you are looking at, if it is the dev branch you are looking at and -- most importanly -- what it is you are trying to achieve?
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: A question of unit_animation::get_end_time()

Post by Anonymissimus »

As you may have guessed, that code can be seen in unit_animation.cpp in trunk.
The question is perfectly valid. I would try to catch boucman in IRC #wesnoth-dev and ask there, perhaps you spotted a bug.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: A question of unit_animation::get_end_time()

Post by Boucman »

wow

huh

yes...

obviously wrong here... I need to do a git checkout to fix that... unless someone beats me to it :P
Fight key loggers: write some perl using vim
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: A question of unit_animation::get_end_time()

Post by AI »

Boucman wrote:unless someone beats me to it :P
Okay.
bede390805d3343987cb011407c8e12a18c4d14c
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: A question of unit_animation::get_end_time()

Post by Boucman »

that was fast, thx a million
Fight key loggers: write some perl using vim
Post Reply