Fix up some stupid bugs that were causing q2 to completely fail.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5992 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e2b88fafc8
commit
da27411b26
5 changed files with 14 additions and 8 deletions
|
@ -172,7 +172,7 @@ static struct sdljoy_s *J_DevId(SDL_JoystickID jid)
|
|||
}
|
||||
static void J_ControllerAxis(SDL_JoystickID jid, int axis, int value)
|
||||
{
|
||||
int axismap[] = {
|
||||
static int axismap[] = {
|
||||
// SDL_CONTROLLER_AXIS_LEFTX, SDL_CONTROLLER_AXIS_LEFTY, SDL_CONTROLLER_AXIS_RIGHTX,
|
||||
GPAXIS_LT_RIGHT, GPAXIS_LT_DOWN, GPAXIS_RT_RIGHT,
|
||||
// SDL_CONTROLLER_AXIS_RIGHTY, SDL_CONTROLLER_AXIS_TRIGGERLEFT,SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
|
||||
|
@ -191,7 +191,7 @@ static void J_ControllerAxis(SDL_JoystickID jid, int axis, int value)
|
|||
}
|
||||
static void J_JoystickAxis(SDL_JoystickID jid, int axis, int value)
|
||||
{
|
||||
int axismap[] = {0,1,3,4,2,5};
|
||||
static int axismap[] = {0,1,3,4,2,5};
|
||||
|
||||
struct sdljoy_s *joy = J_DevId(jid);
|
||||
if (joy && axis < sizeof(axismap)/sizeof(axismap[0]) && joy->qdevid != DEVID_UNSET)
|
||||
|
@ -202,7 +202,7 @@ static void J_ControllerButton(SDL_JoystickID jid, int button, qboolean pressed)
|
|||
{
|
||||
//controllers have reliable button maps.
|
||||
//but that doesn't meant that fte has specific k_ names for those buttons, but the mapping should be reliable, at least until they get mapped to proper k_ values.
|
||||
int buttonmap[] =
|
||||
static int buttonmap[] =
|
||||
{
|
||||
K_GP_A,
|
||||
K_GP_B,
|
||||
|
@ -242,7 +242,7 @@ static void J_ControllerButton(SDL_JoystickID jid, int button, qboolean pressed)
|
|||
static void J_JoystickButton(SDL_JoystickID jid, int button, qboolean pressed)
|
||||
{
|
||||
//generic joysticks have no specific mappings. they're really random like that.
|
||||
int buttonmap[] = {
|
||||
static int buttonmap[] = {
|
||||
K_JOY1,
|
||||
K_JOY2,
|
||||
K_JOY3,
|
||||
|
|
|
@ -4967,7 +4967,7 @@ static cmodel_t *CM_LoadMap (model_t *mod, qbyte *filein, size_t filelen, qboole
|
|||
}
|
||||
|
||||
#ifdef TERRAIN
|
||||
mod->terrain = Mod_LoadTerrainInfo(mod, loadname, false);
|
||||
wmod->terrain = Mod_LoadTerrainInfo(wmod, loadname, false);
|
||||
#endif
|
||||
|
||||
return &prv->cmodels[0];
|
||||
|
|
|
@ -230,7 +230,7 @@ char *Z_StrDupf(const char *format, ...)
|
|||
|
||||
string = Z_Malloc(n+1);
|
||||
va_start (argptr, format);
|
||||
vsnprintf (string,n, format,argptr);
|
||||
vsnprintf (string,n+1, format,argptr);
|
||||
va_end (argptr);
|
||||
string[n] = 0;
|
||||
|
||||
|
|
|
@ -5380,7 +5380,7 @@ static void Cmd_AddSeat_f(void)
|
|||
|
||||
for (count = 1, prev = host_client, cl = host_client->controlled; cl; cl = cl->controlled)
|
||||
{
|
||||
if (count >= num)
|
||||
if (count > num)
|
||||
{
|
||||
for(; cl; cl = prev->controlled)
|
||||
{
|
||||
|
|
|
@ -916,8 +916,14 @@ qboolean SVQ2_InitGameProgs(void)
|
|||
svq2_maxclients = 1;
|
||||
else
|
||||
svq2_maxclients = maxclients.ival;
|
||||
if (Cvar_VariableValue("cl_splitscreen"))
|
||||
#ifdef HAVE_CLIENT
|
||||
if (cl_splitscreen.ival)
|
||||
{
|
||||
if (!deathmatch.value && !coop.value)
|
||||
Cvar_Set(&coop, "1"); //force coop, for coop rules. we get spawn spot problems otherwise.
|
||||
svq2_maxclients = max(svq2_maxclients, MAX_SPLITS);
|
||||
}
|
||||
#endif
|
||||
if (svq2_maxclients > MAX_CLIENTS)
|
||||
svq2_maxclients = MAX_CLIENTS;
|
||||
if (svq2_maxclients != maxclients.value)
|
||||
|
|
Loading…
Reference in a new issue