09-02-2015, 12:24 AM
(This post was last modified: 09-02-2015, 12:25 AM by BuddyFriendGuy.)

Game server admins,

Since there are some new maps in 0.8.1, if your players still run 0.8, they will see blank maps for atelier, finalrage, and warfare. Please urge your users to upgrade.

Here's what's in my server.cfg. If one of those map is chosen, it'll say something like this:

The first two parts are taken from BlaXpirit's wonderful tricks. The last part compares the map name to the constants and spit out the warning if there's a match.

Since there are some new maps in 0.8.1, if your players still run 0.8, they will see blank maps for atelier, finalrage, and warfare. Please urge your users to upgrade.

Here's what's in my server.cfg. If one of those map is chosen, it'll say something like this:

Code:

`The map warfare is only included in Xonotic 0.8.1, so be sure you are running the latest version. Otherwise, you may see a blank map.`

The first two parts are taken from BlaXpirit's wonderful tricks. The last part compares the map name to the constants and spit out the warning if there's a match.

Code:

`// conditional`

alias bx_noop ""

set bx_if_var_ ""

alias bx_if "bx_if_var_ ${1}; toggle bx_if_var_; alias bx_if_action0_ ${2-}; alias bx_if_action1_ bx_noop; bx_if_do_"

alias bx_if_do_ "bx_if_action${bx_if_var_}_"

// hash-based comparison

alias bx_if_eq "rpn /bx_if_eq_var1_ \"/${1}\" /SHA256 digest =; rpn /bx_if_eq_var2_ \"/${2}\" /SHA256 digest =; alias bx_if_eq_action_ ${3- q}; bx_if_eq_step2_"

alias bx_if_eq_step2_ "set bx_if_eq_resultvar_ \"bx_if_eq_var_${bx_if_eq_var1_}_\"; set bx_if_eq_var_${bx_if_eq_var1_}_ 0; set bx_if_eq_var_${bx_if_eq_var2_}_ 1; bx_if_eq_step3_"

alias bx_if_eq_step3_ "bx_if ${$bx_if_eq_resultvar_} bx_if_eq_action_"

alias bx_if_not_eq "rpn /bx_if_not_eq_var1_ \"/${1}\" /SHA256 digest =; rpn /bx_if_not_eq_var2_ \"/${2}\" /SHA256 digest =; alias bx_if_not_eq_action_ ${3- q}; bx_if_not_eq_step2_"

alias bx_if_not_eq_step2_ "set bx_if_not_eq_resultvar_ \"bx_if_not_eq_var_${bx_if_not_eq_var1_}_\"; set bx_if_not_eq_var_${bx_if_not_eq_var1_}_ 1; set bx_if_not_eq_var_${bx_if_not_eq_var2_}_ 0; bx_if_not_eq_step3_"

alias bx_if_not_eq_step3_ "bx_if ${$bx_if_not_eq_resultvar_} bx_if_not_eq_action_"

// hooks for game start and game end

alias sv_hook_gamestart_all "echo Map: ${sv_worldbasename}; _check081Maps"

alias _check081Maps "bx_if_eq ${sv_worldbasename} finalrage _showUpgradeWarning; bx_if_eq ${sv_worldbasename} warfare _showUpgradeWarning; bx_if_eq ${sv_worldbasename} atelier _showUpgradeWarning"

alias _showUpgradeWarning "say The map ${sv_worldbasename} is only included in Xonotic 0.8.1, so be sure you are running the latest version. Otherwise, you may see a blank map."

alias sv_hook_gameend "say ^xfffGame over. Thanks for playing! Remember, ^xEC0Kansas server has Friday Is For Fragging every Friday around 11pm UTC (7pm EST, 6pm CST). Highly skilled players will be there to help you play better! ^xfffSee the forums.xonotic.org for more details. Go there! We'll be closed down during that time to support it."