project-navigation
Personal tools

Author Topic: Health bar may go missing (+FIX)  (Read 6429 times)

Offline xoft

  • Rookie
  • ***
  • Posts: 13
    • View Profile
Health bar may go missing (+FIX)
« on: November 14, 2009, 10:29:31 am »
I found out that in the Base->Aircraft->Assign soldiers screen, the soldiers' health bar may go missing. After fiddling with the code, I found out that it was due to some really strange code in 0ufos.pk3/ufos/menu_team.ufo:
Code: [Select]
string hp_val
{
if "mn_show_employee == 1"
pos "975 360" string "*cvar mn_thp" align ur
}
bar hp_bar
{
if "mn_show_employee == 1"
pos "716 383" current "*cvar mn_vhp" size "245 6" color "0 .8 0 1" max "*cvar mn_vhpmax" align uc
}
 
I searched for mn_show_employee in the C code and found it only in the section that deals with hiring staff, so I suppose the condition in the above code is wrong. After commenting out the condition, the health bar is displaying correctly. Also with the condition above in place, I verified that setting the Base->Hire staff screen to anything other than Soldiers will indeed disable the health bar.
« Last Edit: November 14, 2009, 01:12:08 pm by xoft »

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Health bar may go missing (+FIX)
« Reply #1 on: November 14, 2009, 07:42:40 pm »
I searched for mn_show_employee in the C code and found it only in the section that deals with hiring staff, so I suppose the condition in the above code is wrong. After commenting out the condition, the health bar is displaying correctly. Also with the condition above in place, I verified that setting the Base->Hire staff screen to anything other than Soldiers will indeed disable the health bar.

If I remember right that cvar was usefull to hide health bar for scientists, workers and medics too. I'm not sure if your change broke that or not.

By the way that menu was changed in the latest dev version, there is no such problem anymore.

-geever

Offline xoft

  • Rookie
  • ***
  • Posts: 13
    • View Profile
Re: Health bar may go missing (+FIX)
« Reply #2 on: November 14, 2009, 09:35:50 pm »
If I remember right that cvar was usefull to hide health bar for scientists, workers and medics too.

Exactly, but that was in the Hire staff screen, not the Assign soldiers screen.

I'm not sure if your change broke that or not.

Shouldn't have, since it only affects the Assign soldiers screen.

By the way that menu was changed in the latest dev version, there is no such problem anymore.
I most certainly do hope so, it had a terrible design. I'm thinking of moving on to the dev version, if that screen has been reworked there.

Thanks for the info.