Default Context Commands

Default Context Commands

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Default Context Commands

Post by ILMTitan »

I finally found the rhyme and reason of which context commands show up, ie. why selecting units and a factory sometimes allow for left click attack and sometimes don't. The context command is determined by the unit with the lowest aihint value. The aihint value is exactly equal to the unit id, which is determined by the the order in which spring finds the unit .fbi files and followed by the opposite order it finds the unit .swu files.

I think this should be changed. The com should be the lowest, followed by combat units, con units, factories and finally other buildings.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmm, maybe aihint could fianlly be used by the AI in some strange way.
Post Reply

Return to “Engine”