evandrocoan / MultiModServer

It is a Multi-Mod plugin's configurations for Amx Mod X - https://forums.alliedmods.net/showthread.php?t=273018
GNU General Public License v3.0
19 stars 17 forks source link

gal_nextmap_change support for amx_votemap #22

Closed mo0nsniper closed 7 years ago

mo0nsniper commented 8 years ago

Hello Evandro,

I would really like your help in implementing the following feature for the galileo plugin. What I want to do is have the galileo plugin voting also take into account admin voting with amx_votemap command. So when there are admins on the server they can make manual votes,

For example: If the gal_nextmap_change feature is enabled and an admin uses the amx_votemap command, the nextmap will be set by the amx_votemap result and skip the galileo automatic vote. So an admin can make a custom vote for the nextmap and if he chooses No to changing the map after the voting finishes galileo would not start another vote and would also change to the choosen map after finnishing the last round.

This would be a nice feature in my oppinion.

evandrocoan commented 8 years ago

To implement it, we should be able to ask the amx_votemap whether the voting is started or not. Just add this on the function approvedTheVotingStart. This is a pseudocode:

    new bool:is_the_voting_necessary = get_pcvar_value( cvar_nextmap_change ) && the_amx_votemap_was_not_performed )

    if( !is_the_voting_necessary )
    {
        LOGGER( 1, "    ( approvedTheVotingStart ) Returning false because the amx_votemap was already performed." )
        return false;
    }

Now we need to see the amx_votemap plugin code and learn if we can get from it when the voting was performed. If no way is found we need to modify its code and create a cvar or public function to get what we want to.

mo0nsniper commented 8 years ago

I am using the default amx_votemap included in AMXX. Do you think there is a way to make it without modifing the amx_votemap plugin?

evandrocoan commented 8 years ago

Now we need to see the amx_votemap plugin code and learn if we can get from it when the voting was performed. If no way is found we need to modify its code and create a cvar or public function to get what we want to.

mo0nsniper commented 8 years ago

Okay I understand. Here is the code for the vote plugin: https://github.com/alliedmodders/amxmodx/blob/master/plugins/adminvote.sma

mo0nsniper commented 8 years ago

I think there is a way to achive this without modifing the amx_votemap command: When no map has been voted the amx_nextap cvar is [not yet voted], if and admin makes a vote the cvar will be changed to the voted map. So if galilelo has gal_nextmap_change cvar enabled and sees that amx_nextmap is set then a vote has been made.

What do you think?

evandrocoan commented 8 years ago

Well thought, It also works, but before it / first we need to fix this other issue:

  1. https://github.com/evandrocoan/Galileo/issues/9 _ Time Left: 19:39 min. Next Map: de_dust2002, instead of "Next Map: [not yet voted on]"
mo0nsniper commented 7 years ago

Hi Evandro,

Did you had any time to look at this? Can I help with testing?

Thanks.

evandrocoan commented 7 years ago

Hi,

I did not get on this issue yet, for now I am solving the ones evolving structural changes, improving the plugin overall code maintainability, this way is easier to fix things.

When I finish implementing this, I will close this issue, therefore as you are watching this repository, you will be notified. So, you can download the lasted development version and to test whether it is working as you expect.

mo0nsniper commented 7 years ago

Okay, Thank you.

mo0nsniper commented 7 years ago

It would be nice if you caould implement this feature now that the bugs are fixed.

We are hosting some 12 vs 12 matches on our server and would like that if we set the amx_nextmap CVAR the voting doesn't start. And it would be good if the galileo plugin would change the map after the last round using the map from amx_nextmap cvar.

And if you could make it that if and admin starts a custom vote, and chooses no for changelevel the nextmap would be set to the result of the vote. The the automatic vote wouldn't start because amx_nextmap would be already set and it would just change to that map after last round.

Thank you.

evandrocoan commented 7 years ago

The the automatic vote wouldn't start because amx_nextmap would be already set and it would just change to that map after last round.

This will be implemented soon as I finish the other feature you just commented.

And it would be good if the galileo plugin would change the map after the last round using the map from amx_nextmap cvar.

This is already implemented and should be working with the other feature above, soon as it is implemented.

And if you could make it that if and admin starts a custom vote, and chooses no for changelevel the nextmap would be set to the result of the vote.

I do not understand this, how the admin would choose not change the level and how it would it set the next map to the result of the vote.

evandrocoan commented 7 years ago

So an admin can make a custom vote for the nextmap and if he chooses No to changing the map after the voting finishes galileo would not start another vote and would also change to the choosen map after finnishing the last round.

I can make galileo not to start a another map voting it the cvar amx_nextmap is not set to [not yet voted on]. So you would need to enable the feature:

// Allow the command command "say nextmap" return "[not yet voted on]"
// if the map vote hasn't started yet and "[voting in progress]" once the
// vote has started. When the outcome of the vote is determined, this
// command will return the map name.
// 0 - Disable the change to "[voting in progress]" and "[not yet voted on]"
// 1 - Enable the change to "[voting in progress]" and "[not yet voted on]"
gal_nextmap_change 1
mo0nsniper commented 7 years ago

Yes, that would be perfect.

evandrocoan commented 7 years ago

I finished it, but I do not performed a test in a server to know whether it is properly working.

evandrocoan commented 7 years ago

I just tested and it seems to be working. But the command amx_votemap does not set the cvar amx_nextmap when you choose the No changelevel option. You need to modify that plugin to change the cvar next_map to the voted map when the admin chooses the No change level option after the voting.

mo0nsniper commented 7 years ago

Thank you very much evandro :) We are hosting some matches and setting the nextmap helps us a lot. And the admins are asking for automatic map change after vote :)

I will check the plugin tommorow. Check our server if you like: CS.MIEZ.ro

evandrocoan commented 7 years ago

setting the nextmap helps us a lot

I am not setting the next map, you will need to change you plugin amx_votemap to set the nextmap when the admin chose No to changelevel. The default amx_votemap seems not to be currently changing the map when the admin chose No.

Galileo is just not starting the voting if the nextmap is set to a valid map. Make sure to get your setting like these:

// Allow the command command "say nextmap" return "[not yet voted on]"
// if the map vote hasn't started yet and "[voting in progress]" once the
// vote has started. When the outcome of the vote is determined, this
// command will return the map name.
// 0 - Disable the change to "[voting in progress]" and "[not yet voted on]"
// 1 - Enable the change to "[voting in progress]" and "[not yet voted on]"
gal_nextmap_change 1

// If the server admin want to, he can make a custom vote for the nextmap
// and after the voting finishes Galileo would not start another map voting.
//
// Note:
// This requires the cvar `gal_nextmap_change` to be enabled.
// 0 - Disable the "[not yet voted on]" change detection.
// 1 - Enable the "[not yet voted on]" change detection.
gal_nextmap_votemap 1
mo0nsniper commented 7 years ago

Yes, I would look at the votemap plugin the next days now that galileo has this option.

mo0nsniper commented 7 years ago

There is a problem with the current implementation.

If I set amx_cvar amx_nextmap fy_snow the nextmap command still [not voted on]. And after the time is up and the last round finnishes the map doesn't change to anything. timelimit reports No time limit

evandrocoan commented 7 years ago

What latest release? What the galileo version? Type gal_version on the server console.

I just tested it here with the version "gal_version" is "v3.2.6-331" and this does not happened:

2

mo0nsniper commented 7 years ago

Looks like I don't have the latest version: "gal_version" is "v3.2.6-328"I'll update and see if it works.

evandrocoan commented 7 years ago

And do you got what you want to? Can it be closed?

mo0nsniper commented 7 years ago

I took some time off from CS during the holidays. I will test now and let you know.

mo0nsniper commented 7 years ago

I have tested with the latest version "gal_version" is "v4.0.0-418" but it's still the same:

status
hostname:  Test
version :  48/1.1.2.7/Stdio 934 secure  (10)
tcp/ip  :  94.176.2.151:27015
map     :  fy_snow at: 0 x, 0 y, 0 z
players :  0 active (25 max)

#      name userid uniqueid frag time ping loss adr
0 users
version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 19:18:26 Nov  1 2016 (934)
ReHLDS API version 2.13
meta list
Currently loaded plugins:
      description      stat pend  file              vers      src   load  unlod
 [ 1] SafeNameAndChat  RUN   -    SafeNameAndChat.  v1.0      ini   ANY   ANY
 [ 2] AMX Mod X        RUN   -    amxmodx_mm_i386.  v1.8.3-R  ini   Start ANY
 [ 3] Rechecker        RUN   -    rechecker_mm_i38  v2.0      ini   Chlvl ANY
 [ 4] WHBlocker        RUN   -    whblocker_mm_i38  v1.5.626  ini   Chlvl ANY
 [ 5] GeoIP            RUN   -    geoip_amxx_i386.  v1.8.3-R  pl2   ANY   ANY
 [ 6] hackdetector     RUN   -    hackdetector_amx  v0.15.30  pl2   ANY   ANY
 [ 7] CStrike          RUN   -    cstrike_amxx_i38  v1.8.3-R  pl2   ANY   ANY
 [ 8] FakeMeta         RUN   -    fakemeta_amxx_i3  v1.8.3-R  pl2   ANY   ANY
 [ 9] Ham Sandwich     RUN   -    hamsandwich_amxx  v1.8.3-R  pl2   ANY   ANY
 [10] Engine           RUN   -    engine_amxx_i386  v1.8.3-R  pl2   ANY   ANY
 [11] MySQL            RUN   -    mysql_amxx_i386.  v1.8.3-R  pl2   ANY   ANY
 [12] Fun              RUN   -    fun_amxx_i386.so  v1.8.3-R  pl2   ANY   ANY
 [13] CSX              RUN   -    csx_amxx_i386.so  v1.8.3-R  pl2   ANY   ANY
13 plugins, 13 running

Here is _galileo.log. I have a problem where somethimes the first time I start the server it crashes, them if I restart it works. That is what happened in the first run in the log

evandrocoan commented 7 years ago

The server crashed on the on the moment the Galileo run this command:

changelevel fy_2forts

Did you enabled the condebug option I mentioned? The Galileo log cannot know what goes after it run the command changelevel fy_2forts. More information should be available on the qconsole.log file. May you post it?


What did you do when you entered on your server? Did you changed the cvar amx_nextmap?

Seconds later you disconnect and the server ends, did you restated it?

mo0nsniper commented 7 years ago

Here are the steps: I entered the server say nextmap reported [not yet voted on] set amx_cvar amx_nextmap de_emir it reported the nextmap changed say nextmap reported still [not yet voted on] stopped the server

I enabled the -debug console command. I will enable also condebug and post again

evandrocoan commented 7 years ago

I am analyzing the galielo.log file you sent, looking for irregularities. Could you also show the output of the command amxx cvars only within the cvars from galileo?

mo0nsniper commented 7 years ago

Enabled -condebug and recreated the steps, with the same result qconsole.log _galileo.log

mo0nsniper commented 7 years ago

Sure

 [117] gal_debug_level          1048575 | 16             galileo.amxx       no       no       no
 [118] gal_version              v4.0.0-418               galileo.amxx       no       no       no
 [119] gal_cmd_votemap          1                        galileo.amxx       no       no       no
 [120] gal_cmd_listmaps         1                        galileo.amxx       no       no       no
 [121] gal_listmaps_paginate    10                       galileo.amxx       no       no       no
 [122] gal_banrecent            3                        galileo.amxx       no       no       no
 [123] gal_recent_nom_maps      0                        galileo.amxx       no       no       no
 [124] gal_banrecent_mapcycle   0                        galileo.amxx       no       no       no
 [125] gal_banrecentstyle       1                        galileo.amxx       no       no       no
 [126] gal_rtv_commands         3                        galileo.amxx       no       no       no
 [127] gal_rtv_wait             0                        galileo.amxx       no       no       no
 [128] gal_rtv_wait_rounds      0                        galileo.amxx       no       no       no
 [129] gal_rtv_wait_frags       0                        galileo.amxx       no       no       no
 [130] gal_rtv_wait_admin       0                        galileo.amxx       no       no       no
 [131] gal_rtv_ratio            0.60                     galileo.amxx       no       no       no
 [132] gal_rtv_reminder         0                        galileo.amxx       no       no       no
 [133] gal_runoff_enabled       1                        galileo.amxx       no       no       no
 [134] gal_runoff_duration      10                       galileo.amxx       no       no       no
 [135] gal_runoff_ratio         0.1                      galileo.amxx       no       no       no
 [136] gal_runoff_mapchoices    2                        galileo.amxx       no       no       no
 [137] gal_vote_weight          1                        galileo.amxx       no       no       no
 [138] gal_vote_weightflags     y                        galileo.amxx       no       no       no
 [139] gal_endonround           1                        galileo.amxx       no       no       no
 [140] gal_endonround_change    1                        galileo.amxx       no       no       no
 [141] gal_endonround_rtv       2                        galileo.amxx       no       no       no
 [142] gal_endonround_msg       0                        galileo.amxx       no       no       no
 [143] gal_endonround_countdow  0                        galileo.amxx       no       no       no
 [144] gal_vote_showstatus      0                        galileo.amxx       no       no       no
 [145] gal_vote_showstatustype  0                        galileo.amxx       no       no       no
 [146] gal_vote_replace_menu    0                        galileo.amxx       no       no       no
 [147] gal_vote_show_none       1                        galileo.amxx       no       no       no
 [148] gal_vote_show_none_type  0                        galileo.amxx       no       no       no
 [149] gal_vote_expirationcoun  0                        galileo.amxx       no       no       no
 [150] gal_vote_show_counter    0                        galileo.amxx       no       no       no
 [151] gal_endofmapvote_ask     0                        galileo.amxx       no       no       no
 [152] gal_srv_start            1                        galileo.amxx       no       no       no
 [153] gal_srv_move_cursor      0                        galileo.amxx       no       no       no
 [154] gal_game_crash_recreati  0                        galileo.amxx       no       no       no
 [155] gal_srv_timelimit_resta  0                        galileo.amxx       no       no       no
 [156] gal_srv_maxrounds_resta  0                        galileo.amxx       no       no       no
 [157] gal_srv_winlimit_restar  0                        galileo.amxx       no       no       no
 [158] gal_srv_fraglimit_resta  0                        galileo.amxx       no       no       no
 [159] gal_endofmapvote         1                        galileo.amxx       no       no       no
 [160] gal_endofmapvote_expira  0                        galileo.amxx       no       no       no
 [161] gal_endofmapvote_start   2                        galileo.amxx       no       no       no
 [162] gal_nextmap_change       1                        galileo.amxx       no       no       no
 [163] gal_nextmap_votemap      1                        galileo.amxx       no       no       no
 [164] gal_vote_mapchoices      5                        galileo.amxx       no       no       no
 [165] gal_vote_mapchoices_nex  0                        galileo.amxx       no       no       no
 [166] gal_vote_duration        15                       galileo.amxx       no       no       no
 [167] gal_vote_mapfile         addons/amxmodx/configs/  galileo.amxx       no       no       no
 [168] gal_vote_minplayers      9                        galileo.amxx       no       no       no
 [169] gal_vote_midplayers      0                        galileo.amxx       no       no       no
 [170] gal_nom_minplayers_cont  0                        galileo.amxx       no       no       no
 [171] gal_vote_minplayers_map  addons/amxmodx/configs/  galileo.amxx       no       no       no
 [172] gal_vote_midplayers_map  addons/amxmodx/configs/  galileo.amxx       no       no       no
 [173] gal_whitelist_minplayer  0                        galileo.amxx       no       no       no
 [174] gal_whitelist_nom_block  0                        galileo.amxx       no       no       no
 [175] gal_whitelist_block_out  0                        galileo.amxx       no       no       no
 [176] gal_vote_whitelist_mapf  addons/amxmodx/configs/  galileo.amxx       no       no       no
 [177] gal_vote_uniqueprefixes  1                        galileo.amxx       no       no       no
 [178] gal_nom_playerallowance  2                        galileo.amxx       no       no       no
 [179] gal_nom_cleaning         1                        galileo.amxx       no       no       no
 [180] gal_nom_mapfile          *                        galileo.amxx       no       no       no
 [181] gal_nom_prefixes         1                        galileo.amxx       no       no       no
 [182] gal_nom_qtyused          0                        galileo.amxx       no       no       no
 [183] gal_unnominate_disconne  1                        galileo.amxx       no       no       no
 [184] gal_vote_announcechoice  1                        galileo.amxx       no       no       no
 [185] gal_emptyserver_wait     5                        galileo.amxx       no       no       no
 [186] gal_emptyserver_change   0                        galileo.amxx       no       no       no
 [187] gal_emptyserver_mapfile  addons/amxmodx/configs/  galileo.amxx       no       no       no
 [188] gal_sounds_mute          31                       galileo.amxx       no       no       no
 [189] gal_sounds_hud           7                        galileo.amxx       no       no       no
 [190] gal_colored_chat_prefix                           galileo.amxx       no       no       no
 [191] gal_colored_chat_enable  0                        galileo.amxx       no       no       no
 [192] gal_server_starting      0                        galileo.amxx       no       no       no
 [193] gal_in_empty_cycle       1                        galileo.amxx       no       no       no
 [194] gal_disabled_value_poin  [inca nu s-a votat]      galileo.amxx       no       no       no
 [195] amx_nextmap              [inca nu s-a votat]      galileo.amxx       no       no       no
evandrocoan commented 7 years ago

Seems a bug on hlds. Try to change these lines:

File: galileo.sma
8199: #if AMXX_VERSION_NUM < 183
8200:     server_cmd( "changelevel %s", mapName );
8201: #else
8202:     engine_changelevel( mapName );
8203: #endif

to:

File: galileo.sma
8199:     server_cmd( "changelevel %s", mapName );

If not work, change these:

File: galileo.sma
8195: stock serverChangeLevel( mapName[] )
8196: {
8197:     LOGGER( 128, "I AM ENTERING ON serverChangeLevel(1) | mapName: %s", mapName )
8198: 
8199: #if AMXX_VERSION_NUM < 183
8200:     server_cmd( "changelevel %s", mapName );
8201: #else
8202:     engine_changelevel( mapName );
8203: #endif
8204: }

to:

File: galileo.sma
8195: stock serverChangeLevel( mapName[] )
8196: {
8197:     LOGGER( 128, "I AM ENTERING ON serverChangeLevel(1) | mapName: %s", mapName )
8198:     set_task( 2.0, "changeLevel", _, mapName, MAX_MAPNAME_LENGHT - 1 );
8199: }
8200: 
8201: public changeLevel( mapName[] )
8202: {
8203:     LOGGER( 128, "I AM ENTERING ON changeLevel(1) | mapName: %s", mapName )
8204:     server_cmd( "changelevel %s", mapName );
8205: }
mo0nsniper commented 7 years ago

It might be related to the ReHLDS engine. There are also some functions that changed in ReAMXModX

Changed:

File: galileo.sma
8199: #if AMXX_VERSION_NUM < 183
8200:     server_cmd( "changelevel %s", mapName );
8201: #else
8202:     engine_changelevel( mapName );
8203: #endif

to:

File: galileo.sma
8199:     server_cmd( "changelevel %s", mapName );

And restarted the server a few times and it didn't crash. But the crash is somewhat random so I'll check if it happends in the future. But the nextmap still doesn't change

evandrocoan commented 7 years ago

I found another bug with the:

[194] gal_disabled_value_poin  [inca nu s-a votat]      galileo.amxx

That cvar must to be 0 always. I am fixing this now. Later I will look into it.

evandrocoan commented 7 years ago

I finished all the updates on the version v4.0.0-424

What I still not not know if it is fixed is your crashes by the change:

server_cmd( "changelevel %s", mapName );

The version v4.0.0-424 is has it already changed if this macro:

/**
 * Change this value from 1 to 0, to disable Re-HLDS and Re-Amx Mod X support. If you disable the
 * support, and you are using the Re-HLDS and Re-Amx Mod X, you server may crash.
 */
#define IS_TO_ENABLE_RE_HLDS_RE_AMXMODX_SUPPORT 1

So, while its value is 1, the plugin will not run this code:

engine_changelevel( mapName );

Only this:

server_cmd( "changelevel %s", mapName );
mo0nsniper commented 7 years ago

Tested version v4.0.0-425 but it has some errors on compile:

[>] Compiling galileo.sma
AMX Mod X Compiler 1.8.3-dev+5067
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

galileo.sma(303) : error 017: undefined symbol "test_isMapExtensionAvowed_case1"
galileo.sma(317) : error 017: undefined symbol "saveServerCvarsForTesting"
galileo.sma(328) : error 017: undefined symbol "test_SortCustomSynced2D"
galileo.sma(345) : error 017: undefined symbol "printTheUnitTestsResults"
galileo.sma(1436) : error 017: undefined symbol "nextmapPluginInit"
galileo.sma(1444) : error 017: undefined symbol "register_dictionary_colored"
galileo.sma(1490) : error 017: undefined symbol "loadNextMapPluginSetttings"
galileo.sma(1499) : error 017: undefined symbol "resetRoundsScores"
galileo.sma(1523) : error 017: undefined symbol "configureTheUnitTests"
galileo.sma(1718) : error 017: undefined symbol "map_loadPrefixList"
galileo.sma(1721) : error 017: undefined symbol "loadNominationList"
galileo.sma(1732) : error 017: undefined symbol "get_real_players_number"
galileo.sma(1735) : error 017: undefined symbol "computeNextWhiteListLoadTime"
galileo.sma(1736) : error 017: undefined symbol "loadTheWhiteListFeature"
galileo.sma(1818) : error 017: undefined symbol "map_loadEmptyCycleList"
galileo.sma(1883) : error 017: undefined symbol "loadNominationList"
galileo.sma(1897) : error 017: undefined symbol "isAllowedValidMapByTheUnitTests"
galileo.sma(1901) : error 017: undefined symbol "serverChangeLevel"
galileo.sma(1970) : error 017: undefined symbol "saveEndGameLimits"
galileo.sma(1972) : error 017: undefined symbol "tryToSetGameModCvarFloat"
galileo.sma(1973) : error 017: undefined symbol "tryToSetGameModCvarNum"
galileo.sma(1974) : error 017: undefined symbol "tryToSetGameModCvarNum"
galileo.sma(1975) : error 017: undefined symbol "tryToSetGameModCvarNum"
galileo.sma(1996) : error 017: undefined symbol "map_getNext"
galileo.sma(2011) : error 017: undefined symbol "map_getNext"
galileo.sma(2059) : error 017: undefined symbol "saveCurrentMapCycleSetting"

Compilation aborted.
26 Errors.
Done.
evandrocoan commented 7 years ago

What is the DEBUG_LEVEL value set?

I used your 1.8.3-Re compiler and it is compiling. You do not need to change anything on the source code.

mo0nsniper commented 7 years ago

I forgot about it and let it default and didn't change anything in the code. #define DEBUG_LEVEL 1+2+4+16

evandrocoan commented 7 years ago

Can you send me the file you are trying to compile?

Just need to rename the file to galileo.txt, and you may drag and drop here on the github commentary.

galileo.txt

mo0nsniper commented 7 years ago

Hmm, something strange happened. I didn't change anything to the plugin sma. Tried to compile again and now it works.

I'll test amx_nextmap cvar now

evandrocoan commented 7 years ago

Well, I remember now, something like this happened with me like 3 times on the last 20 days 👍

mo0nsniper commented 7 years ago

Yes, I had problems like this also. Something like a memory corruption or memory leak maybe.

Good news: It now works. The nextmap is reported correctly :) Thank you very much. Now I wait to see if the automatic vote starts if setting the nextmap manually.

mo0nsniper commented 7 years ago

There is still something wrong. I was alone on the server with fy_2forts as the map. I have set amx_cvar amx_nextmap aim_map. say nextmap reported aim_map I've set mp_timelimit 8 When the timelimit expired galileo reported: Time limit expired The map will be changed to 'fy_cluj' :( say nextmap reported still aim_map mp_timelimit was set to 0, and as I was alone on the map round time reached 0 but the round didn't end and the map didn't change. killed myself, the reconnected tot he server but the map still didn't change and mp_timelimit was still 0

evandrocoan commented 7 years ago

When the timelimit expired galileo reported. Time limit expired The map will be changed to 'fy_cluj' :(

I think I know what gone wrong here. Should be simple to fix.

mp_timelimit was set to 0, and as I was alone on the map round time reached 0 but the round didn't end

This also, but do you had the debug enabled? Would help to read it.

It is bugging like that because seems there was no voting on the map, and I put a fail safe to not allow the map change without a vote. I seems I need to ease it little and detect when there was not voting but the next map was set to.

mo0nsniper commented 7 years ago

Yes, I had debug enabled. I will download the log and send it to you. But will take some minutes as my internet is slow now.

mo0nsniper commented 7 years ago

Here is the _galileo.log

evandrocoan commented 7 years ago

I think I fixed everything now on build v4.0.0-427

mo0nsniper commented 7 years ago

Updated to "gal_version" is "v4.0.0-429"

I have done 2 tests:

First I was on fy_snow. set amx_cvar amx_nextmap de_emir say nextmap reported de_emir correctly set amx_cvar mp_timelimit 5 When the time expired galileo reported Time limit reached. Nextmap will be 'fy_cluj' As I was alone on the server the timelimit was set to 0 and the round didn't end. I killed myself with a grenade and the map changed immediately to de_emir.

Then I was on fy_2forts set amx_cvar amx_nextmap to de_emir say nextmap reported de_emir correctly set mp_timelimit 5 When the time expired galileo reported Time limit reached. Nextmap will be 'de_dust2_2x2' As I was alone on the server the timelimit was set to 0 and the round didn't end. I jumped in the pit and the map changed immediately to de_emir

Here is _galileo.log

As a side note: On fy_ maps when there is a single player on the server and galileo is set to change after last round the round will not end unless the player kills himself in order to change the map

evandrocoan commented 7 years ago

Thanks for testing.

When the time expired galileo reported Time limit reached. Nextmap will be 'de_dust2_2x2'

I will look it into it at the log file. When do you say Time limit reached. Nextmap will be 'de_dust2_2x2', it was a chat message or the HUD was saying that?

On fy_ maps when there is a single player on the server and galileo is set to change after last round the round will not end unless the player kills himself in order to change the map

I will set to force the round end after the time expired. There will be an error about of 15 seconds, i.e., if the time ended now, could take up from zero to 15 seconds to change the map.

mo0nsniper commented 7 years ago

When do you say Time limit reached. Nextmap will be 'de_dust2_2x2', it was a chat message or the HUD was saying that?

It was a chat message. I try to disable all HUD messages that I can :)

I will set to force the round end after the time expired. There will be an error about of 15 seconds, i.e., if the time ended now, could take up from zero to 15 seconds to change the map.

That would be great

evandrocoan commented 7 years ago

When the time expired galileo reported Time limit reached. Nextmap will be 'fy_cluj'

I just implemented the build v4.0.0-430. I think I already fixed that.

I looked it into the code and there are a few options:

As a side note: On fy_ maps when there is a single player on the server and galileo is set to change after last round the round will not end unless the player kills himself in order to change the map

The map will change after about 8 minutes or 3*total_round_time. So I would like to not create a new counter check just to this because of that and this other cvar:

// Indicates how to announce the last round. If selected a value higher
// than 0, this cvar indicates also the players minimum number necessary
// to allow the last round to be finished when the time runs out.
//
// 0 - to show only a chat print, saying that it is the last round.
// 1 - to show chat and a constant HUD message during the last round.
gal_endonround_msg 1

I noticed on your cvar posted just above, you set it to 0. So, would be better to set it to 2, so that player would not have to wait until the round end, or the 8 minutes check mentioned above.

If you do not like the HUD message, you can mute it setting this other cvar to 4:

// Indicates if any HUD messages should be hidden during the various
// events in which they'd normal be showed. The flags are additive.
// A value of 0 will not hide any of the HUD.
//
// 1 - The change level numbers countdown text
// 2 - The voting start numbers countdown text
// 4 - The constant change level HUD announcement `The next map will be 'mapName'`
//
// For example, if you want to mude the options 1 and 2, use 1 + 2:
// gal_sounds_hud 3
//
// Instead of:
// gal_sounds_hud 0
gal_sounds_hud 0

However I looked over set cvar above and it is already set to 7, so you just need to set the cvar gal_endonround_msg to 4.

So, this would be enough, really there is the need to end the round exactly when there is 1 player at the server and the round time end up?

evandrocoan commented 7 years ago

I noticed a bug on the gal_endonround_msg, I am fixing it now.

I also will remove its HUD control as the gal_sounds_hud already does that. Therefore it will now only control how many players must there be on the server to allow the round finish feature.