get this to compile on windows clang with asan on
This commit is contained in:
parent
9abfea075b
commit
b33f90b6ea
4 changed files with 18 additions and 31 deletions
|
|
@ -7631,14 +7631,14 @@ tic_t GetLag(INT32 node)
|
|||
}
|
||||
|
||||
#define REWIND_POINT_INTERVAL 4*TICRATE + 16
|
||||
rewind_t *rewindhead;
|
||||
rewind_t *netrewindhead;
|
||||
|
||||
void CL_ClearRewinds(void)
|
||||
{
|
||||
rewind_t *head;
|
||||
while ((head = rewindhead))
|
||||
while ((head = netrewindhead))
|
||||
{
|
||||
rewindhead = rewindhead->next;
|
||||
netrewindhead = netrewindhead->next;
|
||||
free(head);
|
||||
}
|
||||
}
|
||||
|
|
@ -7648,7 +7648,7 @@ rewind_t *CL_SaveRewindPoint(size_t demopos)
|
|||
savebuffer_t save = {0};
|
||||
rewind_t *rewind;
|
||||
|
||||
if (rewindhead && rewindhead->leveltime + REWIND_POINT_INTERVAL > leveltime)
|
||||
if (netrewindhead && netrewindhead->leveltime + REWIND_POINT_INTERVAL > leveltime)
|
||||
return NULL;
|
||||
|
||||
rewind = (rewind_t *)malloc(sizeof (rewind_t));
|
||||
|
|
@ -7659,9 +7659,9 @@ rewind_t *CL_SaveRewindPoint(size_t demopos)
|
|||
P_SaveNetGame(&save, false);
|
||||
|
||||
rewind->leveltime = leveltime;
|
||||
rewind->next = rewindhead;
|
||||
rewind->next = netrewindhead;
|
||||
rewind->demopos = demopos;
|
||||
rewindhead = rewind;
|
||||
netrewindhead = rewind;
|
||||
|
||||
return rewind;
|
||||
}
|
||||
|
|
@ -7671,23 +7671,23 @@ rewind_t *CL_RewindToTime(tic_t time)
|
|||
savebuffer_t save = {0};
|
||||
rewind_t *rewind;
|
||||
|
||||
while (rewindhead && rewindhead->leveltime > time)
|
||||
while (netrewindhead && netrewindhead->leveltime > time)
|
||||
{
|
||||
rewind = rewindhead->next;
|
||||
free(rewindhead);
|
||||
rewindhead = rewind;
|
||||
rewind = netrewindhead->next;
|
||||
free(netrewindhead);
|
||||
netrewindhead = rewind;
|
||||
}
|
||||
|
||||
if (!rewindhead)
|
||||
if (!netrewindhead)
|
||||
return NULL;
|
||||
|
||||
P_SaveBufferFromExisting(&save, rewindhead->savebuffer, NETSAVEGAMESIZE);
|
||||
P_SaveBufferFromExisting(&save, netrewindhead->savebuffer, NETSAVEGAMESIZE);
|
||||
P_LoadNetGame(&save, false);
|
||||
|
||||
wipegamestate = gamestate; // No fading back in!
|
||||
timeinmap = leveltime;
|
||||
|
||||
return rewindhead;
|
||||
return netrewindhead;
|
||||
}
|
||||
|
||||
#undef CloneConsistancy
|
||||
|
|
|
|||
|
|
@ -1526,6 +1526,10 @@ void G_UpdateGamepadGravity(INT32 p, vector3_t gyro, vector3_t accel)
|
|||
// limit in proportion to rotation rate
|
||||
angleRate = FixedMul(FV3_Length(&gyro), M_PI_FIXED)/180;
|
||||
correctionLimit = FixedMul(FixedMul(angleRate, FV3_Length(&localgravityvectors[p])), CorrectionGyroFactor);
|
||||
|
||||
CONS_Debug(DBG_IMU, "Angle Rate: %4.3f\n", FixedToFloat(angleRate));
|
||||
CONS_Debug(DBG_IMU, "Correction Limit: %4.3f\n", FixedToFloat(correctionLimit));
|
||||
|
||||
if (gravCorrectionRate > correctionLimit) {
|
||||
fixed_t closeEnoughFactor;
|
||||
if (CorrectionGyroMaxThreshold > CorrectionGyroMinThreshold)
|
||||
|
|
|
|||
|
|
@ -88,13 +88,6 @@
|
|||
|
||||
#include "deh_tables.h" // menunames
|
||||
|
||||
#if defined(HAVE_SDL)
|
||||
#include <SDL3/SDL.h>
|
||||
#if SDL_VERSION_ATLEAST(2,0,0)
|
||||
#include <SDL3/SDL_main.h> // JOYSTICK_HOTPLUG
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PC_DOS
|
||||
#include <stdio.h> // for snprintf
|
||||
int snprintf(char *str, size_t n, const char *fmt, ...);
|
||||
|
|
|
|||
|
|
@ -36,13 +36,7 @@
|
|||
#ifdef HAVE_SDL
|
||||
|
||||
#if defined (_WIN32) && !defined (main)
|
||||
//#define SDLMAIN
|
||||
#endif
|
||||
|
||||
#ifdef SDLMAIN
|
||||
#include "SDL_main.h"
|
||||
#elif defined(FORCESDLMAIN)
|
||||
extern int SDL_main(int argc, char *argv[]);
|
||||
#define SDLMAIN
|
||||
#endif
|
||||
|
||||
#ifdef LOGMESSAGES
|
||||
|
|
@ -185,11 +179,7 @@ ChDirToExe (void)
|
|||
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
|
||||
#endif
|
||||
|
||||
#ifdef FORCESDLMAIN
|
||||
int SDL_main(int argc, char **argv)
|
||||
#else
|
||||
int main(int argc, char **argv)
|
||||
#endif
|
||||
{
|
||||
myargc = argc;
|
||||
myargv = argv; /// \todo pull out path to exe from this string
|
||||
|
|
|
|||
Loading…
Reference in a new issue