PDA

View Full Version : SetModelIndex not setting the model name


z33ky
05-30-2009, 08:00 PM
At least in the Beta SDK I've noticed that SetModelIndex does not set the model-name (GetModelName), meaning that it stays on whatever it was before.
I doubt that this should happen.

z33ky
06-05-2009, 05:18 AM
Well, in case anyone else needs this, simply do
SetModelName( MAKE_STRING( modelinfo->GetModelName( modelinfo->GetModel( GetModelIndex() ) ) ) );.
You should probably make sure, that modelinfo->GetModel doesn't return NULL, which is never the case for me, since I'm using SetModelIndex on an int I got from GetModelIndex before and so doesn't change until there's a map-change.