Author Topic: Votemaps show excluded maps every second mapchange  (Read 1618 times)

0 Members and 1 Guest are viewing this topic.

Offline Tekop

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
Votemaps show excluded maps every second mapchange
« on: June 23, 2015, 07:47:54 PM »
My votemaps.txt includes the maps I want players to be able to vote on, and my config.txt is changed with ulx votemapMapmode 2.

Whenever the map is changed, the list of voteable maps are "flipped" so voteable becomes unvoteable and opposite. This only happen on my servers on a dedicated 64 bit linux machine, while everything works just fine on a separate vps with 64 bit linux too.

Both run the newest version from github. It happens on both a Deathrun and Alien: Isolation server (seperate files) and seemingly on whatever else I put up there.

I know this sounds ridiculous but I feel I've done everything I can think of, and nothing else on the server seems to have anything to do with votemaps (grep'ed related strings). Sorry for rambling but this is driving me crazy.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Votemaps show excluded maps every second mapchange
« Reply #1 on: June 23, 2015, 08:29:23 PM »
It appears that something is probably wrong when XGUI updates or saves the votemaps. There is code to "flip" the list of votemaps based on the ulx_votemapmapmode cvar, but I'm not sure what's exactly causing it to go backwards. (I can't seem to replicate it on my dev server)

One option to temporarily fix the problem would be to simply prevent XGUI from saving the votemaps- you won't be able to edit them in-game, but at least they should stay put. Comment out these two lines, and see if that helps:
https://github.com/Nayruden/Ulysses/blob/master/ulx/lua/ulx/xgui/server/sv_settings.lua#L269-L270
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline Tekop

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
Re: Votemaps show excluded maps every second mapchange
« Reply #2 on: June 24, 2015, 04:55:18 AM »
After fiddling around a bit more, I found that using the inverse approach works (for now) by setting votemapMapmode to 1.

I did however find that it if votemapMapmode is 2 then settings.saveVotemaps( 2 ) will run, but adding a print to https://github.com/Nayruden/Ulysses/blob/31f292516f7d6b379cdcaaedc5e6921ff58db306/ulx/lua/ulx/modules/votemap.lua#L8 indicates that mode is always 1 no matter what I set it to. If I actually set votemapMapmode  to 1 then setting.saveVotemaps won't run...

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given