Merge branch 'vulkan2' of https://github.com/coelckers/gzdoom into vulkan2

This commit is contained in:
Magnus Norddahl 2019-03-09 10:20:28 +01:00
commit 8270abcb7e
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.
players[consoleplayer].ReadyWeapon != NULL) // No adjustment if no weapon.
{
auto scale = players[consoleplayer].ReadyWeapon->FloatVar(NAME_FOVScale);
if (scale > 0) // No adjustment if it is non-positive.
auto FOVScale = players[consoleplayer].ReadyWeapon->FloatVar(NAME_FOVScale);
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;

View file

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

View file

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

View file

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

View file

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

View file

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