Jump to content

Servo
 Share

Recommended Posts

I noticed that a fort trained Iberian champion cavalry are not exactly the same as the one trained from the barracks. When you double click on all they are the same but if you triple click they are different. The specs are the same only when you triple click they are not.  

Im not sure if it's the same on other civs. 

Now I noticed it's the same as the champion swordsmen. 

Edited by Servo
Link to comment
Share on other sites

The templates are indeed identical, so it's a code bug, not a template bug.

The triple-click code must check for the template name instead of the SelectionGroup name.

Reading the code (input.js), that's exactly what it does.

					// Check for double click or triple click
					if (ev.clicks == 2)
					{
						// Select similar units regardless of rank
						templateToMatch = GetEntityState(clickedEntity).identity.selectionGroupName;
						if (templateToMatch)
							matchRank = false;
						else
							// No selection group name defined, so fall back to exact match
							templateToMatch = GetEntityState(clickedEntity).template;

					}
					else
						// Triple click
						// Select units matching exact template name (same rank)
						templateToMatch = GetEntityState(clickedEntity).template;

Since that comment exists since r11178, I'm lucky it's not another bug of the alpha 22 doubleclick patch :P

The rank parsing was odd in different places already.  @Imarok did some work with that already, but he's busy atm.

Can you report this bug at http://trac.wildfiregames.com/?

  • Thanks 1
Link to comment
Share on other sites

36 minutes ago, fatherbushido said:

Perhaps I didn't understand but those units don't have the same template name (they aren't the same unit).

edit: to explain a bit more, it will be the same for all champs unlocked in barracks

Well, the code works as the comments intend it to work:

Double-clicking: // Select similar units regardless of rank

Triple-clicking: // Select units matching exact template name (same rank)

It's just not expected by the user I guess.

  • Like 1
Link to comment
Share on other sites

27 minutes ago, elexis said:

Well, the code works as the comments intend it to work:

Double-clicking: // Select similar units regardless of rank

Triple-clicking: // Select units matching exact template name (same rank)

It's just not expected by the user I guess.

Yes

edit: so not really a code problem :/ and no idea for a not hacky solution :/

edit2: perhaps our current construction is hacky btw

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...