A question of unit_animation::get_end_time()

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

Moderators: Forum Moderators, Developers

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

A question of unit_animation::get_end_time()

Post by ancientcc » June 9th, 2013, 3:57 pm

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
Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: A question of unit_animation::get_end_time()

Post by Coffee » June 10th, 2013, 4:07 am

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: 2460
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: A question of unit_animation::get_end_time()

Post by Anonymissimus » June 10th, 2013, 2:25 pm

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 » June 17th, 2013, 9:12 pm

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: 2394
Joined: January 31st, 2008, 8:38 pm

Re: A question of unit_animation::get_end_time()

Post by AI » June 18th, 2013, 2:53 am

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 » June 18th, 2013, 8:16 pm

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

Post Reply