Jump to content

Home

JA Bug: Species Rotation *fixing, need help*


Teancum

Recommended Posts

I have about 8 different species in my rotation, but there is a

nasty bug in the species selection code. Left click moves it

forward to the last one on the list, then cycles between the last

3, right click goes backwards, get the ones in the middle, then

cycles between the first 3. To kindof explain what I'm talking

about, here is my meuns.str:

 

 

REFERENCE           JEDI_CF
NOTES               "For character menu"
LANG_ENGLISH        "Chiss Female"

REFERENCE           JEDI_CM
NOTES               "For character menu"
LANG_ENGLISH        "Chiss Male"

REFERENCE           JEDI_HF
NOTES               "For character menu"
LANG_ENGLISH        "Human Female"

REFERENCE           JEDI_HM
NOTES               "For character menu"
LANG_ENGLISH        "Human Male"

REFERENCE           JEDI_KDM
NOTES               "For character menu"
LANG_ENGLISH        "Kel Dor Male"

REFERENCE           JEDI_RM
NOTES               "For character menu"
LANG_ENGLISH        "Rodian Male"

REFERENCE           JEDI_TF
NOTES               "For character menu"
LANG_ENGLISH        "Twi'lek Female"

REFERENCE           JEDI_ZF
NOTES               "For character menu"
LANG_ENGLISH        "Zabrak Female"

REFERENCE           JEDI_ZM
NOTES               "For character menu"
LANG_ENGLISH        "Zabrak Male"

 

So, say we start with Rodian, left click takes us all the way to Zabrak Male, then, Twi'lek, Zabrak Female, and Zabrak Male over and over. Right click will take us all the way to Chiss Female, then Human Female, Chiss Male, Chiss Female over and over. I believe I have hunted down the area of ui_main.c that covers this, but I'm not sure how to change this to get it to cycle properly. I'm assuming it's just a max_variable, and it can't go above a certain number of species, but what do I know? Anyhow, here it is:

 

static void UI_UpdateCharacter( qboolean changedModel )
{
menuDef_t *menu;
itemDef_t *item;
char modelPath[MAX_QPATH];
int	animRunLength;

menu = Menu_GetFocused();	// Get current menu

if (!menu)
{
	return;
}

item = (itemDef_t *) Menu_FindItemByName(menu, "character");

if (!item)
{
	Com_Error( ERR_FATAL, "UI_UpdateCharacter: Could not find item (character) in menu (%s)", menu->window.name);
}

ItemParse_model_g2anim_go( item, ui_char_anim.string );

Com_sprintf( modelPath, sizeof( modelPath ), "models/players/%s/model.glm", UI_Cvar_VariableString ( "ui_char_model" ) );
ItemParse_asset_model_go( item, modelPath, &animRunLength );

if ( changedModel )
{//set all skins to first skin since we don't know you always have all skins
	//FIXME: could try to keep the same spot in each list as you swtich models
	UI_FeederSelection(FEEDER_PLAYER_SKIN_HEAD, 0, item);	//fixme, this is not really the right item!!
	UI_FeederSelection(FEEDER_PLAYER_SKIN_TORSO, 0, item);
	UI_FeederSelection(FEEDER_PLAYER_SKIN_LEGS, 0, item);
	UI_FeederSelection(FEEDER_COLORCHOICES, 0, item);
}
UI_UpdateCharacterSkin();
}

 

To me that's all gibberish. I've only coded in cog (Jedi Knight 1's language) so I don't understand exactly what's going on. Anyhow, if someone will lead me in the right direction, I'll try some fixes.

 

*edit* I've found MAX_PLAYERMODELS in ui_local.h, and playerSpeciesCount seems to be connected to it. Don't know if that helps. On a related note, is there a way to search for something in the whole library with VS.net or do I have to open each file manually?

Link to comment
Share on other sites

Well, the selector still works correctly, right? It's just weird.

 

As such, I might look into it at some point but I'm pretty sick of doing minor bugfixes for now. There's little point of fixing minor issues when gameplay isn't engaging enough to keep people playing as is.

Link to comment
Share on other sites

On a related note, is there a way to search for something in the whole library with VS.net or do I have to open each file manually?

 

3 ways:

 

1) Native - Edit->Find->Find in files , set root dir to something like <location of code>, or <location of code>\game, depends where you want it to start searching from

 

Tick "look in subfolders", enter your text into search field and off you go.

 

2) Plugin for VS.net - There's a very good plugin for VS6/.NET called VisualAssist. It provides you with this service (any many more) on-the-fly. However it's commercial (30 day trial is available I believe)

 

3) External - get Doxygen (http://www.doxygen.org)

Run it and create a default.cfg

Edit it to fit your preferences (namely path to code files and depth of parsing). Run doxygen again with the edited file as parameter. Wait a few hours and it will generate cross-reference/documentation for the code (the level of documentation depends on the level of the comments in code)

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...