project-navigation
Personal tools

Author Topic: althud firing (Fixed in svn)  (Read 5046 times)

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
althud firing (Fixed in svn)
« on: March 18, 2007, 05:13:19 am »
I can't do it. When the althud is chosen there is no way to fire at the aliens except for reaction fire. I like the althud better than the default one. Is this something that is going to be fixed?

EDIT: edited the title --Werner

Hoehrer

  • Guest
althud firing (Fixed in svn)
« Reply #1 on: March 18, 2007, 10:18:07 am »
Yes, althud is currently broken.

The reason is that I recently implemented the code to support more than the previously max. of  2 firemodes. In order to display them in a usable way I added the pop-up list to the two huds, but only the one in the default hud seems to work. I couldn't find a way to make it work without duplicating functions in the code for every single hud (which is "teh baddest" [tm] way to solve this IMO)

hacking details: I'm accessing elements inside a "menu" definition (e.g. displaying, greying out etc... the menu entries in the popup menu) But the function that is used only seems to have access to the elements that are in the same "scope" (i.e. menu definition) that the "confunc" is defined in.
Defining the exact same "confunc" in  every menu definition also doesn't seem to work as expected.

Any tips would be helpful, I'm running in circles here :(

Werner

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
althud firing (Fixed in svn)
« Reply #2 on: March 18, 2007, 07:04:47 pm »
if the nodes have the same name in every menu, one confunc should be sufficient

Hoehrer

  • Guest
althud firing (Fixed in svn)
« Reply #3 on: March 19, 2007, 11:27:12 am »
After a quick chat with mattn althud should work now in trunk and 2.1 branch. Thanks again mattn.
If any errors pop up please report them ASAP.

Werner

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
althud firing (Fixed in svn)
« Reply #4 on: March 20, 2007, 12:52:00 am »
Cool, I'll try it out.

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
Looks good
« Reply #5 on: March 23, 2007, 11:12:37 pm »
Now, is there a way to move it?

Would it be possible to still call the same function, but have an if statement that says

if hud
  do this function here
else
  do this function but put the window here

At least it is functional.

Hoehrer

  • Guest
Re: Looks good
« Reply #6 on: March 25, 2007, 06:35:29 pm »
Moving it around is not a problem, we can just change the positions in the base/ufos/menu_althud.ufo file (currently they are exactly the same as in menu_hud). Hurray for mod-ability :)

You may ask why this hasn't been done yet? Well it's a lot of boring monotone work :)
If you want to help us out here have a look at all pos "xx yy" lines after "//  FIREMODES (seperate lists for each weaponhand)".
Otherwise you just need to wait until s/b (most probably me) feels like it ;)

Werner

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
althud firing (Fixed in svn)
« Reply #7 on: March 31, 2007, 06:20:32 am »
Thanks, I messed around with it, moved the righthand over to match the left, its better but has to be moved up and over some more. I'll work with it and then send it to you to verify.

Offline Zenerka

  • Sergeant
  • *****
  • Posts: 301
    • View Profile
althud firing (Fixed in svn)
« Reply #8 on: March 31, 2007, 01:20:01 pm »
Quote from: "lfloden"
I'll work with it and then send it to you to verify.

Please do.

Offline tempsanity

  • Rookie
  • ***
  • Posts: 53
    • View Profile
althud firing (Fixed in svn)
« Reply #9 on: April 03, 2007, 02:40:40 pm »
I just installed UFO 2.1 on my second Linux box running Arch. Everything seems to run great (after getting jack and making a proper symbolic link), but after choosing althud I can't shoot. I finished my first round, then I wanted to shoot an alien in the second, but I couldn't. Clicking lmb did not work. Weird.

Hoehrer

  • Guest
althud firing (Fixed in svn)
« Reply #10 on: April 03, 2007, 04:18:11 pm »
Thanks for the report tempsanity. I don't have a clue yet why this could even happen (somehting an/after the end of the round seems to mess up the firemode code/buttons/definitions), but I'll try to reproduce it this afternoon.

Werner

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
Updated althud file
« Reply #11 on: April 06, 2007, 05:02:21 pm »
I have the althud file updated and will email it later today. It doesn't line up perfectly with the bottom of the firing control section(?) but it is close, much better than going all the way across the screen.