Merge remote-tracking branch 'remotes/origin/master' into vulkan2

This commit is contained in:
Christoph Oelckers 2019-03-09 08:55:40 +01:00
commit 54efbf3edd
6 changed files with 15 additions and 6 deletions

View file

@ -756,10 +756,15 @@ static int LookAdjust(int look)
if (players[consoleplayer].playerstate != PST_DEAD && // No adjustment while dead. if (players[consoleplayer].playerstate != PST_DEAD && // No adjustment while dead.
players[consoleplayer].ReadyWeapon != NULL) // No adjustment if no weapon. players[consoleplayer].ReadyWeapon != NULL) // No adjustment if no weapon.
{ {
auto scale = players[consoleplayer].ReadyWeapon->FloatVar(NAME_FOVScale); auto FOVScale = players[consoleplayer].ReadyWeapon->FloatVar(NAME_FOVScale);
if (scale > 0) // No adjustment if it is non-positive. auto LookScale = players[consoleplayer].ReadyWeapon->FloatVar(NAME_LookScale);
if (FOVScale > 0) // No adjustment if it is non-positive.
{ {
look = int(look * scale); look = int(look * FOVScale);
}
if (LookScale > 0) // No adjustment if it is non-positive.
{
look = int(look * LookScale);
} }
} }
return look; return look;

View file

@ -2019,7 +2019,7 @@ void FMapInfoParser::ParseEpisodeInfo ()
{ {
ParseAssign(); ParseAssign();
sc.MustGetString (); sc.MustGetString ();
name = sc.String; name = strbin1(sc.String);
} }
else if (sc.Compare ("picname")) else if (sc.Compare ("picname"))
{ {

View file

@ -214,7 +214,7 @@ void FMapInfoParser::ParseSkill ()
{ {
ParseAssign(); ParseAssign();
sc.MustGetString (); sc.MustGetString ();
skill.MenuName = sc.String; skill.MenuName = strbin1(sc.String);
} }
else if (sc.Compare("PlayerClassName")) else if (sc.Compare("PlayerClassName"))
{ {

View file

@ -24,6 +24,7 @@
#include "r_defs.h" #include "r_defs.h"
#include "p_setup.h" #include "p_setup.h"
#include "gi.h" #include "gi.h"
#include "cmdlib.h"
FName MakeEndPic(const char *string); FName MakeEndPic(const char *string);
@ -231,7 +232,7 @@ static int ParseStandardProperty(FScanner &scanner, UMapEntry *mape)
// add the given episode // add the given episode
FEpisode epi; FEpisode epi;
epi.mEpisodeName = split[1]; epi.mEpisodeName = strbin1(split[1]);
epi.mEpisodeMap = mape->MapName; epi.mEpisodeMap = mape->MapName;
epi.mPicName = split[0]; epi.mPicName = split[0];
epi.mShortcut = split[2][0]; epi.mShortcut = split[2][0];

View file

@ -1029,6 +1029,7 @@ xx(Kickback)
xx(MinSelAmmo1) xx(MinSelAmmo1)
xx(bDehAmmo) xx(bDehAmmo)
xx(FOVScale) xx(FOVScale)
xx(LookScale)
xx(YAdjust) xx(YAdjust)
xx(Crosshair) xx(Crosshair)
xx(WeaponFlags) xx(WeaponFlags)

View file

@ -28,6 +28,7 @@ class Weapon : StateProvider
Ammo Ammo1, Ammo2; // In-inventory instance variables Ammo Ammo1, Ammo2; // In-inventory instance variables
Weapon SisterWeapon; Weapon SisterWeapon;
double FOVScale; double FOVScale;
double LookScale; // Multiplier for look sensitivity (like FOV scaling but without the zooming)
int Crosshair; // 0 to use player's crosshair int Crosshair; // 0 to use player's crosshair
bool GivenAsMorphWeapon; bool GivenAsMorphWeapon;
bool bAltFire; // Set when this weapon's alternate fire is used. bool bAltFire; // Set when this weapon's alternate fire is used.
@ -58,6 +59,7 @@ class Weapon : StateProvider
property BobRangeY: BobRangeY; property BobRangeY: BobRangeY;
property SlotNumber: SlotNumber; property SlotNumber: SlotNumber;
property SlotPriority: SlotPriority; property SlotPriority: SlotPriority;
property LookScale: LookScale;
flagdef NoAutoFire: WeaponFlags, 0; // weapon does not autofire flagdef NoAutoFire: WeaponFlags, 0; // weapon does not autofire
flagdef ReadySndHalf: WeaponFlags, 1; // ready sound is played ~1/2 the time flagdef ReadySndHalf: WeaponFlags, 1; // ready sound is played ~1/2 the time