mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Make camera noclip during NiGHTS gameplay
This commit is contained in:
parent
25c220d363
commit
a29d1ca219
2 changed files with 5 additions and 6 deletions
|
@ -2524,7 +2524,6 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam)
|
|||
boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam)
|
||||
{
|
||||
subsector_t *s = R_PointInSubsector(x, y);
|
||||
boolean retval = true;
|
||||
boolean itsatwodlevel = false;
|
||||
|
||||
floatok = false;
|
||||
|
@ -2539,8 +2538,8 @@ boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam)
|
|||
fixed_t tryx = thiscam->x;
|
||||
fixed_t tryy = thiscam->y;
|
||||
|
||||
if ((thiscam == &camera && (players[displayplayer].pflags & PF_NOCLIP))
|
||||
|| (thiscam == &camera2 && (players[secondarydisplayplayer].pflags & PF_NOCLIP)))
|
||||
if ((thiscam == &camera && (players[displayplayer].pflags & PF_NOCLIP || players[displayplayer].powers[pw_carry] == CR_NIGHTSMODE))
|
||||
|| (thiscam == &camera2 && (players[secondarydisplayplayer].pflags & PF_NOCLIP || players[secondarydisplayplayer].powers[pw_carry] == CR_NIGHTSMODE)))
|
||||
{ // Noclipping player camera noclips too!!
|
||||
floatok = true;
|
||||
thiscam->floorz = thiscam->z;
|
||||
|
@ -2608,7 +2607,7 @@ boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam)
|
|||
thiscam->y = y;
|
||||
thiscam->subsector = s;
|
||||
|
||||
return retval;
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -3688,7 +3688,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
dummy.y = thiscam->y;
|
||||
dummy.z = thiscam->z;
|
||||
dummy.height = thiscam->height;
|
||||
if (!resetcalled && !(player->pflags & PF_NOCLIP) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead.
|
||||
if (!resetcalled && !(player->pflags & PF_NOCLIP || player->powers[pw_carry] == CR_NIGHTSMODE) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead.
|
||||
P_ResetCamera(player, thiscam);
|
||||
else
|
||||
{
|
||||
|
@ -3719,7 +3719,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
// adjust height
|
||||
thiscam->z += thiscam->momz + player->mo->pmomz;
|
||||
|
||||
if (!itsatwodlevel && !(player->pflags & PF_NOCLIP))
|
||||
if (!itsatwodlevel && !(player->pflags & PF_NOCLIP || player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
{
|
||||
// clip movement
|
||||
if (thiscam->z <= thiscam->floorz) // hit the floor
|
||||
|
|
Loading…
Reference in a new issue