mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-23 05:51:58 +00:00
GONNAHURL HARDCODE
This commit is contained in:
parent
e5009348f8
commit
65d5fd0784
3 changed files with 34 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
31
src/p_user.c
31
src/p_user.c
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue