Viewrollangle indentation fixup

This commit is contained in:
yellowtd 2017-03-16 00:11:30 -04:00
parent f1108b438b
commit 6c6499caa0
4 changed files with 22 additions and 22 deletions

View file

@ -427,7 +427,7 @@ typedef struct player_s
INT32 awayviewtics;
angle_t awayviewaiming; // Used for cut-away view
// miru: let's add stuff to player struct!
// miru: let's add stuff to player struct!
angle_t viewrollangle; // Roll angle (software)
boolean spectator;

View file

@ -308,8 +308,8 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->awayviewtics);
else if (fastcmp(field,"awayviewaiming"))
lua_pushangle(L, plr->awayviewaiming);
// miru: expose and "get" new player struct vars from Lua
else if (fastcmp(field,"viewrollangle"))
// miru: expose and "get" new player struct vars from Lua
else if (fastcmp(field,"viewrollangle"))
lua_pushangle(L, plr->viewrollangle);
else if (fastcmp(field,"spectator"))
lua_pushboolean(L, plr->spectator);
@ -582,7 +582,7 @@ static int player_set(lua_State *L)
}
else if (fastcmp(field,"awayviewaiming"))
plr->awayviewaiming = luaL_checkangle(L, 3);
else if (fastcmp(field,"viewrollangle"))
else if (fastcmp(field,"viewrollangle"))
plr->viewrollangle = luaL_checkangle(L, 3);
else if (fastcmp(field,"spectator"))
plr->spectator = lua_toboolean(L, 3);

View file

@ -3499,7 +3499,7 @@ boolean P_CheckMotionBlur(void)
static boolean P_CheckViewRoll(player_t *player)
{
if (player->viewrollangle != 0)
return true;
return true;
return false;
}
@ -3531,11 +3531,11 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
postimg = postimg_water;
else if (P_CameraCheckHeat(&dummycam))
postimg = postimg_heat;
// miru: assign new postimg on displays
else if (P_CheckViewRoll(player))
{
postimg = postimg_roll;
postimgparam = player->viewrollangle;
// miru: assign new postimg on displays
else if (P_CheckViewRoll(player))
{
postimg = postimg_roll;
postimgparam = player->viewrollangle;
}
else if (P_CheckMotionBlur())
{
@ -3553,12 +3553,12 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
postimg = postimg_water;
else if (P_CameraCheckHeat(thiscam))
postimg = postimg_heat;
else if (P_CheckViewRoll(player))
{
postimg = postimg_roll;
postimgparam = player->viewrollangle;
}
else if (P_CheckMotionBlur())
else if (P_CheckViewRoll(player))
{
postimg = postimg_roll;
postimgparam = player->viewrollangle;
}
else if (P_CheckMotionBlur())
{
postimg = postimg_motion;
if (!forward_postimgparam)

View file

@ -8545,13 +8545,13 @@ static void P_CalcPostImg(player_t *player)
if (player->mo->eflags & MFE_VERTICALFLIP)
*type = postimg_flip;
// miru: postimg types and params need to be set here
// miru: postimg types and params need to be set here
if (player->viewrollangle != 0)
{
*type = postimg_roll;
*param = (player->viewrollangle);
}
if (player->viewrollangle != 0)
{
*type = postimg_roll;
*param = (player->viewrollangle);
}
//miru: Motion blur won't work without this i guess, either way its enabled
//TODO: Opengl motion blur