GONNAHURL HARDCODE

This commit is contained in:
James R 2020-01-25 21:43:39 -08:00
parent e5009348f8
commit 65d5fd0784
3 changed files with 34 additions and 0 deletions

View file

@ -133,6 +133,7 @@ extern consvar_t cv_cam_dist[MAXSPLITSCREENPLAYERS], cv_cam_still[MAXSPLITSCREEN
extern consvar_t cv_cam_speed[MAXSPLITSCREENPLAYERS], cv_cam_rotate[MAXSPLITSCREENPLAYERS];
extern fixed_t t_cam_dist[MAXSPLITSCREENPLAYERS], t_cam_height[MAXSPLITSCREENPLAYERS], t_cam_rotate[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_inverseslope;
void P_AddPlayerScore(player_t *player, UINT32 amount);
void P_ResetCamera(player_t *player, camera_t *thiscam);

View file

@ -2725,6 +2725,8 @@ consvar_t cv_cam_rotate[MAXSPLITSCREENPLAYERS] = {
{"cam4_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate4_OnChange, 0, NULL, NULL, 0, 0, NULL}
};
consvar_t cv_inverseslope = {"inverseslope", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
fixed_t t_cam_dist[MAXSPLITSCREENPLAYERS] = {-42,-42,-42,-42};
fixed_t t_cam_height[MAXSPLITSCREENPLAYERS] = {-42,-42,-42,-42};
fixed_t t_cam_rotate[MAXSPLITSCREENPLAYERS] = {-42,-42,-42,-42};
@ -4160,6 +4162,33 @@ static void P_HandleFollower(player_t *player)
}
}
/* gaysed script from me, based on Golden's sprite slope roll */
static void
DoABarrelRoll (player_t *player)
{
angle_t slope;
angle_t delta;
if (player->mo->standingslope)
{
delta = ( player->mo->angle - player->mo->standingslope->xydirection );
slope = FixedMul(FINESINE (delta>>ANGLETOFINESHIFT),
player->mo->standingslope->zangle);
if (cv_inverseslope.value)
slope = -slope;
}
else
slope = 0;
delta = (INT32)( slope - player->viewrollangle )/ 16;
if (delta)
player->viewrollangle += delta;
else
player->viewrollangle = slope;
}
//
// P_PlayerThink
//
@ -4535,6 +4564,8 @@ void P_PlayerThink(player_t *player)
K_KartPlayerThink(player, cmd); // SRB2kart
DoABarrelRoll(player);
LUAh_PlayerThink(player);
}

View file

@ -1705,6 +1705,8 @@ void R_RegisterEngineStuff(void)
CV_RegisterVar(&cv_cam_rotate[i]);
}
CV_RegisterVar(&cv_inverseslope);
CV_RegisterVar(&cv_showhud);
CV_RegisterVar(&cv_translucenthud);