mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
fixes weird problems
git-svn-id: https://svn.eduke32.com/eduke32@1630 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c82a6b7ab0
commit
cda6330cc2
3 changed files with 44 additions and 46 deletions
|
@ -11837,7 +11837,7 @@ MAIN_LOOP_RESTART:
|
|||
do //main loop
|
||||
{
|
||||
static uint32_t nextrender = 0;
|
||||
uint32_t j, next = 0;
|
||||
uint32_t j;
|
||||
|
||||
if (handleevents() && quitevent)
|
||||
{
|
||||
|
@ -11846,45 +11846,12 @@ MAIN_LOOP_RESTART:
|
|||
quitevent = 0;
|
||||
}
|
||||
|
||||
while (!(g_player[myconnectindex].ps->gm&MODE_MENU) && ready2send && totalclock >= ototalclock+TICSPERFRAME)
|
||||
faketimerhandler();
|
||||
|
||||
if (((ud.show_help == 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU) || ud.recstat == 2 || (g_netServer || ud.multimode > 1)) &&
|
||||
(g_player[myconnectindex].ps->gm&MODE_GAME) && g_player[myconnectindex].movefifoend-movefifoplc > 0 && ud.pause_on == 0)
|
||||
P_ProcessInput(myconnectindex);
|
||||
|
||||
if (ud.statusbarmode == 1 && (ud.statusbarscale == 100 || !getrendermode()))
|
||||
{
|
||||
ud.statusbarmode = 0;
|
||||
G_UpdateScreenArea();
|
||||
}
|
||||
|
||||
j = getticks();
|
||||
|
||||
if (r_maxfps == 0 || j >= nextrender)
|
||||
{
|
||||
if (j > nextrender+g_frameDelay)
|
||||
nextrender = j;
|
||||
|
||||
nextrender += g_frameDelay;
|
||||
|
||||
if ((ud.show_help == 0 && (!g_netServer && ud.multimode < 2) && !(g_player[myconnectindex].ps->gm&MODE_MENU)) || (g_netServer || ud.multimode > 1) || ud.recstat == 2)
|
||||
i = min(max((totalclock-ototalclock)*(65536L/TICSPERFRAME),0),65536);
|
||||
else
|
||||
i = 65536;
|
||||
|
||||
G_DrawRooms(screenpeek,i);
|
||||
|
||||
if (getrendermode() >= 3)
|
||||
G_DrawBackground();
|
||||
|
||||
G_DisplayRest(i);
|
||||
|
||||
S_Update();
|
||||
|
||||
next = 1;
|
||||
}
|
||||
|
||||
MUSIC_Update();
|
||||
|
||||
// only allow binds to function if the player is actually in a game (not in a menu, typing, et cetera) or demo
|
||||
|
@ -11923,11 +11890,37 @@ MAIN_LOOP_RESTART:
|
|||
g_multiMapState = NULL;
|
||||
}
|
||||
|
||||
if (next)
|
||||
j = getticks();
|
||||
|
||||
if (r_maxfps == 0 || j >= nextrender)
|
||||
{
|
||||
if (j > nextrender+g_frameDelay)
|
||||
nextrender = j;
|
||||
|
||||
nextrender += g_frameDelay;
|
||||
|
||||
if ((ud.show_help == 0 && (!g_netServer && ud.multimode < 2) && !(g_player[myconnectindex].ps->gm&MODE_MENU)) || (g_netServer || ud.multimode > 1) || ud.recstat == 2)
|
||||
i = min(max((totalclock-ototalclock)*(65536L/TICSPERFRAME),0),65536);
|
||||
else
|
||||
i = 65536;
|
||||
|
||||
G_DrawRooms(screenpeek,i);
|
||||
|
||||
if (getrendermode() >= 3)
|
||||
G_DrawBackground();
|
||||
|
||||
G_DisplayRest(i);
|
||||
|
||||
S_Update();
|
||||
|
||||
nextpage();
|
||||
}
|
||||
|
||||
if (g_player[myconnectindex].ps->gm&MODE_DEMO)
|
||||
goto MAIN_LOOP_RESTART;
|
||||
|
||||
while (!(g_player[myconnectindex].ps->gm&MODE_MENU) && ready2send && totalclock >= ototalclock+TICSPERFRAME)
|
||||
faketimerhandler();
|
||||
}
|
||||
while (1);
|
||||
|
||||
|
@ -12773,8 +12766,7 @@ GAME_STATIC int32_t G_DoMoveThings(void)
|
|||
|
||||
if (ud.pause_on == 0)
|
||||
{
|
||||
if (i != myconnectindex)
|
||||
P_ProcessInput(i);
|
||||
P_ProcessInput(i);
|
||||
P_CheckSectors(i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5962,26 +5962,31 @@ static void C_AddDefaultDefinitions(void)
|
|||
static void C_InitProjectiles(void)
|
||||
{
|
||||
int32_t i;
|
||||
struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int32_t workslike, extra, cstat, extra_rand; // 16b
|
||||
int32_t workslike, cstat; // 8b
|
||||
int32_t hitradius, range, flashcolor; // 12b
|
||||
int16_t spawns, sound, isound, vel; // 8b
|
||||
int16_t decal, trail, tnum, drop; // 8b
|
||||
int16_t clipdist, offset, bounces, bsound; // 8b
|
||||
int16_t offset, bounces, bsound; // 6b
|
||||
int16_t toffset; // 2b
|
||||
int16_t extra, extra_rand; // 4b
|
||||
int8_t sxrepeat, syrepeat, txrepeat, tyrepeat; // 4b
|
||||
int8_t shade, xrepeat, yrepeat, pal; // 4b
|
||||
int8_t velmult, filler; // 2b
|
||||
} DefaultProjectile =
|
||||
int8_t velmult; // 1b
|
||||
uint8_t clipdist; // 1b
|
||||
int8_t filler[6]; // 6b
|
||||
} defaultprojectile_t;
|
||||
|
||||
defaultprojectile_t DefaultProjectile =
|
||||
{
|
||||
1, 100, -1, -1, 2048, 0, 0,
|
||||
SMALLSMOKE, -1, -1, 600, BULLETHOLE, -1, 0, 0, 32, 448, g_numFreezeBounces, PIPEBOMB_BOUNCE, 1,
|
||||
-1, -1, -1, -1, -96, 18, 18, 0, 1, 0
|
||||
1, -1, 2048, 0, 0, SMALLSMOKE, -1, -1, 600, BULLETHOLE, -1, 0, 0, 448, g_numFreezeBounces, PIPEBOMB_BOUNCE, 1,
|
||||
100, -1, -1, -1, -1, -1, -96, 18, 18, 0, 1, 32
|
||||
};
|
||||
|
||||
// this will only happen if I forget to update this function...
|
||||
if (sizeof(projectile_t) != sizeof(DefaultProjectile))
|
||||
if (sizeof(projectile_t) != sizeof(DefaultProjectile) || offsetof(projectile_t, filler) != offsetof(defaultprojectile_t, filler))
|
||||
G_GameExit("ERROR: C_InitProjectiles(): projectile_t mismatch!");
|
||||
|
||||
for (i=MAXTILES-1; i>=0; i--)
|
||||
|
|
|
@ -2516,6 +2516,7 @@ cheat_for_port_credits:
|
|||
resetvideomode();
|
||||
if (setgamemode(fullscreen,xdim,ydim,bpp))
|
||||
OSD_Printf("restartvid: Reset failed...\n");
|
||||
r_downsizevar = r_downsize;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue