I'd like to be able to do something like this in the code:
- Code: Select all • Expand view
void ExtendedUpdatePlayer(int classnum)
{
mPlayerClass = PlayerClasses[classnum];
mPlayerState = GetDefaultByType (mPlayerClass.Type).FindState("Portrait"); // <--- Obviously doesn't work...
if (mPlayerState == NULL) { mPlayerState = GetDefaultByType (mPlayerClass.Type).SeeState; }
if (mPlayerState == NULL) { mPlayerState = GetDefaultByType (mPlayerClass.Type).SpawnState; }
mPlayerTics = mPlayerState != NULL ? mPlayerState.Tics : -1;
}
Is there a reason why FindState (as well as some of the other non-modifying functions) can't be made accessible from ui?