Make the default port re-brandable to reduce confusion with TCs.

Make sure TCs send server query broadcasts.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5235 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2018-04-07 12:33:06 +00:00
parent a4942abf52
commit 3c4b5fabb6
9 changed files with 91 additions and 53 deletions

View file

@ -2235,26 +2235,26 @@ static int bi_lua_qtrue (lua_State *L)
break;
default:
// case LUA_TUSERDATA:
// case LUA_TUSERDATA:
// case LUA_TTHREAD:
// case LUA_TLIGHTUSERDATA:
// case LUA_TNONE:
// case LUA_TNIL:
lua_pushboolean(L, false);
break;
case LUA_TBOOLEAN:
lua_pushvalue(L, 1);
break;
case LUA_TNUMBER:
lua_pushboolean(L, lua_tonumber(L, 1) != 0);
break;
case LUA_TFUNCTION: //functions are always considered true. otherwise they're nil and not functions.
lua_pushboolean(L, true);
break;
case LUA_TTABLE:
//might be a vector or an entity.
// case LUA_TNONE:
// case LUA_TNIL:
lua_pushboolean(L, false);
break;
case LUA_TBOOLEAN:
lua_pushvalue(L, 1);
break;
case LUA_TNUMBER:
lua_pushboolean(L, lua_tonumber(L, 1) != 0);
break;
case LUA_TFUNCTION: //functions are always considered true. otherwise they're nil and not functions.
lua_pushboolean(L, true);
break;
case LUA_TTABLE:
//might be a vector or an entity.
lua_getfield(L, 1, "entnum");
if (!lua_isnil(L, -1))
{ //okay, so its a table with a valid entnum field. must be an entity.
@ -2264,10 +2264,10 @@ static int bi_lua_qtrue (lua_State *L)
{ //assume that its a vector.
//note that this means that any table without x|y|z fields will be considered false.
vec3_t v;
lua_readvector(L, 1, v);
lua_pushboolean(L, v[0] || v[1] || v[2]);
}
break;
lua_readvector(L, 1, v);
lua_pushboolean(L, v[0] || v[1] || v[2]);
}
break;
}
return 1;
}