Hi All,
I wrote this script that automatically swaps the teams when playing a scrim (and it worked back in the day when I ran my server on Ubuntu 10 or 12???), but now it's completely problematic (happening in Ubuntu 14.04 --- haven't tried it on 16 or 18 yet):
Code:
main:
if(int(getcvar(inscrim)) == 1){
// If inscrim is not set DO NOTHING
teamswitchdelay .2
if(level.swapLoaded)
end
level.swapLoaded = 1
//Check if players were swapped last round, if so, reset the cvars
if(getcvar swapped == "1") {
setcvar swap "0"
setcvar swapped "0"
}
// Register events
if(level.elgboton != 1){
// Unregister events just to be on the safe side:
// local.unreg2 = unregisterev "intermission"
// local.unreg3 = unregisterev "connected"
// println local.unreg2
// println local.unreg3
wait 5
local.connectme = registerev "connected" teamswap/swap.scr::connected
local.intermission = registerev "intermission" teamswap/swap.scr::intermission
}
}
end
connected local.player:
if(getcvar swap == "1" && int(getcvar(inscrim)) == 1) {
if(local.player.dmteam == "axis") {
setcvar swapped "1" //set a cvar so that we don't swap again next round.
local.player join_team allies
}
else {
if(local.player.dmteam == "allies") {
setcvar swapped "1" //set a cvar so that we don't swap again next round.
local.player join_team axis
}
}
}
end
intermission local.type:
if(local.type == 0)
{
setcvar swap "1"
}
end
When you rcon restart the server, it crashes:
Code:
restart
Got signal 6 - Aborted
Crash Recover Attempt will take place!
Execution path:
--> [0xf77d0cd9]
--> /usr/lib/i386-linux-gnu/libstdc++.so.5(+0x91cd4) [0xf7794cd4]
--> /usr/lib/i386-linux-gnu/libstdc++.so.5(+0x91e46) [0xf7794e46]
--> ./fgamededmohaa.so(_ZN12ScriptMaster18CreateScriptThreadEP10GameScriptP8Listener9const_str+0x1aa) [0xf24bb09a]
--> ./fgamededmohaa.so(_ZN8Listener20CreateScriptInternalERK14ScriptVariable+0x271) [0xf2593451]
--> ./fgamededmohaa.so(_ZN8Listener21ExecuteScriptInternalEP13Event_GAMEDLLR14ScriptVariable+0x28) [0xf258cbb8]
--> ./fgamededmohaa.so(_ZN8Listener13ExecuteScriptEP13Event_GAMEDLL+0x29) [0xf258ca19]
--> ./fgameded.so(ExecuteScript+0x2e) [0xf28679ba]
--> ./fgameded.so(G_ClientBegin+0x23c) [0xf286ecb9]
--> ./mohaa_lnxded() [0x8087939]
--> ./mohaa_lnxded() [0x808b22f]
--> ./mohaa_lnxded() [0x8084f7a]
--> ./mohaa_lnxded() [0x806507d]
--> ./mohaa_lnxded() [0x808cfde]
--> ./fgameded.so(SV_ConnectionlessPacket_hook+0x52e) [0xf28750c7]
--> ./mohaa_lnxded() [0x806676b]
--> ./mohaa_lnxded() [0x8067425]
--> ./mohaa_lnxded() [0x809726e]
--> /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xf7508af3]
Any idea what's wrong? It looks like it's a bug in reborn? Maybe because the libc libraries have changed?
I removed the above script, and now the server doesn't crash on restart, so I know it has something to do with my intermission script and reborn.
Man, we could really use a Reborn update if this is a bug.