G_AdjustViewEx and macro for G_AdjustView

neppy likes it more which is fair so we do this too
This commit is contained in:
Alug committed 2025-12-01 21:08:30 +01:00
1 parent 204607e272
commit cfcd20d44a
2 files changed
+4 -10

No files matched your search

+2 -9
View File
@@ -1750,7 +1750,7 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive)
// Increment a viewpoint by offset from the current player. A negative value
// decrements.
//
static void G_ActuallyAdjustView(UINT8 viewnum, INT32 offset, boolean onlyactive, boolean resetfreecam)
void G_AdjustViewEx(UINT8 viewnum, INT32 offset, boolean onlyactive, boolean resetfreecam)
{
INT32 *displayplayerp, oldview;
displayplayerp = &displayplayers[viewnum-1];
@@ -1767,12 +1767,6 @@ static void G_ActuallyAdjustView(UINT8 viewnum, INT32 offset, boolean onlyactive
(*displayplayerp) = oldview;
}
// im a lazy ass :chonkbuncle:
void G_AdjustView(UINT8 viewnum, INT32 offset, boolean onlyactive)
{
G_ActuallyAdjustView(viewnum, offset, onlyactive, true);
}
//
// G_ResetViews
// Ensures all viewpoints are valid
@@ -1802,7 +1796,7 @@ void G_ResetViews(boolean resetfreecam)
*/
for (viewd = 1; viewd <= splits; ++viewd)
{
G_ActuallyAdjustView(viewd, 0, false, resetfreecam);
G_AdjustViewEx(viewd, 0, false, resetfreecam);
}
}
@@ -1891,7 +1885,6 @@ void G_Ticker(boolean run)
switch (gamestate)
{
case GS_LEVEL:
for (; ra_timeskip < starttime - TICRATE*4; ra_timeskip++) // this looks weird but this is done to not break compability with older demos for now.
{
if (demo.title)
+2 -1
View File
@@ -264,7 +264,8 @@ INT32 G_CountPlayersPotentiallyViewable(boolean active);
void G_ResetViews(boolean resetfreecam);
void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive);
void G_AdjustView(UINT8 viewnum, INT32 offset, boolean onlyactive);
void G_AdjustViewEx(UINT8 viewnum, INT32 offset, boolean onlyactive, boolean resetfreecam);
#define G_AdjustView(v,o,oa) G_AdjustViewEx(v,o,oa, true)
void G_AddPlayer(INT32 playernum);