Merge branch 'maint'

This commit is contained in:
Braden Obrzut 2014-01-18 18:10:48 -05:00
commit efa9e0c3ee
10 changed files with 1231 additions and 1203 deletions

File diff suppressed because it is too large Load diff

View file

@ -41,6 +41,7 @@
#include "version.h"
#include "g_game.h"
#include "c_bind.h"
#include "c_console.h"
#include "c_cvars.h"
#include "c_dispatch.h"
@ -1696,6 +1697,12 @@ static bool C_HandleKey (event_t *ev, BYTE *buffer, int len)
break;
case '`':
// Check to see if we have ` bound to the console before accepting
// it as a way to close the console.
if (Bindings.GetBinding(KEY_GRAVE).CompareNoCase("toggleconsole"))
{
break;
}
case GK_ESCAPE:
// Close console and clear command line. But if we're in the
// fullscreen console mode, there's nothing to fall back on

View file

@ -861,7 +861,7 @@ void D_ReadUserInfoStrings (int pnum, BYTE **stream, bool update)
val.String = CleanseString(value.LockBuffer());
(*cvar_ptr)->SetGenericRep(val, CVAR_String);
value.UnlockBuffer();
if (keyname == NAME_Name && update && oldname != value)
if (keyname == NAME_Name && update && oldname.Compare (value))
{
Printf("%s is now known as %s\n", oldname.GetChars(), value.GetChars());
}

View file

@ -130,6 +130,7 @@ enum ESkillLevels
#define KEY_F10 0x44 // DIK_F10
#define KEY_F11 0x57 // DIK_F11
#define KEY_F12 0x58 // DIK_F12
#define KEY_GRAVE 0x29 // DIK_GRAVE
#define KEY_BACKSPACE 0x0e // DIK_BACK

View file

@ -996,7 +996,10 @@ bool DPlayerMenu::MenuEvent (int mkey, bool fromcontroller)
// item specific handling comes here
case NAME_Playerbox:
PlayerNameChanged(li);
if (mkey == MKEY_Input)
{
PlayerNameChanged(li);
}
break;
case NAME_Team:

View file

@ -655,7 +655,14 @@ static void TakeStrifeItem (player_t *player, const PClass *itemtype, int amount
item->Amount -= amount;
if (item->Amount <= 0)
{
item->Destroy ();
if (item->ItemFlags & IF_KEEPDEPLETED)
{
item->Amount = 0;
}
else
{
item->Destroy ();
}
}
}
}

View file

@ -4676,6 +4676,12 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
if (defaults->SpawnState == NULL ||
sprites[defaults->SpawnState->sprite].numframes == 0)
{
// We don't load mods for shareware games so we'll just ignore
// missing actors. Heretic needs this since the shareware includes
// the retail weapons in Deathmatch.
if (gameinfo.flags & GI_SHAREWARE)
return NULL;
Printf ("%s at (%i, %i) has no frames\n",
i->TypeName.GetChars(), mthing->x>>FRACBITS, mthing->y>>FRACBITS);
i = PClass::FindClass("Unknown");

View file

@ -607,8 +607,7 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl
// same visplane, then only the floor sky will be drawn.
plane.c = height.c;
plane.ic = height.ic;
isskybox = skybox != NULL && !skybox->bInSkybox &&
(skybox->bAlways || picnum == skyflatnum);
isskybox = skybox != NULL && !skybox->bInSkybox;
}
else if (skybox != NULL && skybox->bAlways && !skybox->bInSkybox)
{

View file

@ -1,8 +1,12 @@
#include <SDL_joystick.h>
#include "doomdef.h"
#include "templates.h"
#include "m_joy.h"
// Very small deadzone so that floating point magic doesn't happen
#define MIN_DEADZONE 0.000001f
class SDLInputJoystick: public IJoystickConfig
{
public:
@ -65,7 +69,7 @@ public:
void SetAxisDeadZone(int axis, float zone)
{
Axes[axis].DeadZone = zone;
Axes[axis].DeadZone = clamp(zone, MIN_DEADZONE, 1.f);
}
void SetAxisMap(int axis, EJoyAxis gameaxis)
{
@ -83,7 +87,7 @@ public:
}
bool IsAxisDeadZoneDefault(int axis)
{
return Axes[axis].DeadZone == 0.0f;
return Axes[axis].DeadZone <= MIN_DEADZONE;
}
bool IsAxisMapDefault(int axis)
{
@ -105,7 +109,7 @@ public:
info.Name.Format("Axis %d", i+1);
else
info.Name.Format("Hat %d (%c)", (i-NumAxes)/2 + 1, (i-NumAxes)%2 == 0 ? 'x' : 'y');
info.DeadZone = 0.0f;
info.DeadZone = MIN_DEADZONE;
info.Multiplier = 1.0f;
info.Value = 0.0;
info.ButtonValue = 0;
@ -141,7 +145,7 @@ public:
{
buttonstate = 0;
Axes[i].Value = SDL_JoystickGetAxis(Device, i)/32768.0;
Axes[i].Value = SDL_JoystickGetAxis(Device, i)/32767.0;
Axes[i].Value = Joy_RemoveDeadZone(Axes[i].Value, Axes[i].DeadZone, &buttonstate);
// Map button to axis

View file

@ -4,5 +4,6 @@ gameinfo
{
finalepage = "ORDER"
infopage = "ORDER", "HELP1", "HELP2", "CREDIT"
borderflat = "FLOOR04"
}