mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
remove obsolete CON compile warnings about affecting multiplayer sync, add -nodinput compatibility parameter to work around DirectInput crash issues on certain systems, fix http://forums.duke4.net/index.php?s=&showtopic=2961&view=findpost&p=60752
git-svn-id: https://svn.eduke32.com/eduke32@1729 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
07ecd3eede
commit
c0fd65345e
13 changed files with 114 additions and 56 deletions
|
@ -658,6 +658,7 @@ int32_t md_loadmodel(const char *fn);
|
||||||
int32_t md_setmisc(int32_t modelid, float scale, int32_t shadeoff, float zadd, int32_t flags);
|
int32_t md_setmisc(int32_t modelid, float scale, int32_t shadeoff, float zadd, int32_t flags);
|
||||||
// int32_t md_tilehasmodel(int32_t tilenume, int32_t pal);
|
// int32_t md_tilehasmodel(int32_t tilenume, int32_t pal);
|
||||||
|
|
||||||
|
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
// maps build tiles to particular animation frames of a model
|
// maps build tiles to particular animation frames of a model
|
||||||
|
@ -679,6 +680,7 @@ static inline int32_t md_tilehasmodel(int32_t tilenume,int32_t pal)
|
||||||
if (!mdinited) return -1;
|
if (!mdinited) return -1;
|
||||||
return tile2model[Ptile2tile(tilenume,pal)].modelid;
|
return tile2model[Ptile2tile(tilenume,pal)].modelid;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int32_t md_defineframe(int32_t modelid, const char *framename, int32_t tilenume, int32_t skinnum, float smoothduration, int32_t pal);
|
int32_t md_defineframe(int32_t modelid, const char *framename, int32_t tilenume, int32_t skinnum, float smoothduration, int32_t pal);
|
||||||
int32_t md_defineanimation(int32_t modelid, const char *framestart, const char *frameend, int32_t fps, int32_t flags);
|
int32_t md_defineanimation(int32_t modelid, const char *framestart, const char *frameend, int32_t fps, int32_t flags);
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#ifndef __editor_h__
|
#ifndef __editor_h__
|
||||||
#define __editor_h__
|
#define __editor_h__
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -10,6 +10,8 @@ extern uint32_t maxrefreshfreq;
|
||||||
|
|
||||||
extern int32_t glusecds;
|
extern int32_t glusecds;
|
||||||
|
|
||||||
|
extern char di_disabled;
|
||||||
|
|
||||||
int32_t win_gethwnd(void);
|
int32_t win_gethwnd(void);
|
||||||
int32_t win_gethinstance(void);
|
int32_t win_gethinstance(void);
|
||||||
|
|
||||||
|
|
|
@ -56,15 +56,15 @@ void drawpixel_safe(void* s, char a)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static const char *const c = &editorcolors[15];
|
static const char *const c = &editorcolors[15];
|
||||||
drawpixel((void*)frameplace, *c);
|
drawpixel((intptr_t*)frameplace, *c);
|
||||||
drawpixel((void*)frameplace+1, *c);
|
drawpixel((intptr_t*)frameplace+1, *c);
|
||||||
drawpixel((void*)frameplace+2, *c);
|
drawpixel((intptr_t*)frameplace+2, *c);
|
||||||
drawpixel((void*)frameplace+bytesperline, *c);
|
drawpixel((intptr_t*)frameplace+bytesperline, *c);
|
||||||
drawpixel((void*)frameplace+bytesperline+1, *c);
|
drawpixel((intptr_t*)frameplace+bytesperline+1, *c);
|
||||||
drawpixel((void*)frameplace+bytesperline+2, *c);
|
drawpixel((intptr_t*)frameplace+bytesperline+2, *c);
|
||||||
drawpixel((void*)frameplace+2*bytesperline, *c);
|
drawpixel((intptr_t*)frameplace+2*bytesperline, *c);
|
||||||
drawpixel((void*)frameplace+2*bytesperline+1, *c);
|
drawpixel((intptr_t*)frameplace+2*bytesperline+1, *c);
|
||||||
drawpixel((void*)frameplace+2*bytesperline+2, *c);
|
drawpixel((intptr_t*)frameplace+2*bytesperline+2, *c);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,8 +153,9 @@ static LPDIRECTINPUTDEVICE7A lpDID = NULL;
|
||||||
#define INPUT_BUFFER_SIZE 32
|
#define INPUT_BUFFER_SIZE 32
|
||||||
static GUID guidDevs;
|
static GUID guidDevs;
|
||||||
|
|
||||||
|
char di_disabled = 0;
|
||||||
static char di_devacquired;
|
static char di_devacquired;
|
||||||
static HANDLE di_inputevt;
|
static HANDLE di_inputevt = 0;
|
||||||
static int32_t joyblast=0;
|
static int32_t joyblast=0;
|
||||||
volatile uint8_t moustat = 0, mousegrab = 0;
|
volatile uint8_t moustat = 0, mousegrab = 0;
|
||||||
|
|
||||||
|
@ -1053,7 +1054,7 @@ static BOOL InitDirectInput(void)
|
||||||
LPDIRECTINPUTDEVICE7A dev2;
|
LPDIRECTINPUTDEVICE7A dev2;
|
||||||
DIDEVCAPS didc;
|
DIDEVCAPS didc;
|
||||||
|
|
||||||
if (hDInputDLL) return FALSE;
|
if (hDInputDLL || di_disabled) return FALSE;
|
||||||
|
|
||||||
initprintf("Initializing DirectInput...\n");
|
initprintf("Initializing DirectInput...\n");
|
||||||
|
|
||||||
|
@ -1077,7 +1078,7 @@ static BOOL InitDirectInput(void)
|
||||||
|
|
||||||
initprintf(" - Enumerating attached game controllers\n");
|
initprintf(" - Enumerating attached game controllers\n");
|
||||||
inputdevices = 1|2;
|
inputdevices = 1|2;
|
||||||
result = IDirectInput7_EnumDevices(lpDI, 0, InitDirectInput_enum, NULL, DIEDFL_ATTACHEDONLY);
|
result = IDirectInput7_EnumDevices(lpDI, DIDEVTYPE_JOYSTICK, InitDirectInput_enum, NULL, DIEDFL_ATTACHEDONLY);
|
||||||
if (FAILED(result)) { HorribleDInputDeath("Failed enumerating attached game controllers", result); }
|
if (FAILED(result)) { HorribleDInputDeath("Failed enumerating attached game controllers", result); }
|
||||||
else if (result != DI_OK) initprintf(" Enumerated game controllers with warning: %s\n",GetDInputError(result));
|
else if (result != DI_OK) initprintf(" Enumerated game controllers with warning: %s\n",GetDInputError(result));
|
||||||
|
|
||||||
|
@ -1105,6 +1106,7 @@ static BOOL InitDirectInput(void)
|
||||||
else if (result != DI_OK) initprintf(" Set data format with warning: %s\n",GetDInputError(result));
|
else if (result != DI_OK) initprintf(" Set data format with warning: %s\n",GetDInputError(result));
|
||||||
|
|
||||||
di_inputevt = CreateEvent(NULL, FALSE, FALSE, NULL);
|
di_inputevt = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
|
|
||||||
if (di_inputevt == NULL)
|
if (di_inputevt == NULL)
|
||||||
{
|
{
|
||||||
IDirectInputDevice7_Release(dev2);
|
IDirectInputDevice7_Release(dev2);
|
||||||
|
@ -1192,17 +1194,18 @@ static void UninitDirectInput(void)
|
||||||
Bfree(hatdefs); hatdefs = NULL;
|
Bfree(hatdefs); hatdefs = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*devicedef.did)
|
|
||||||
{
|
|
||||||
IDirectInputDevice7_Release(*devicedef.did);
|
|
||||||
*devicedef.did = NULL;
|
|
||||||
}
|
|
||||||
if (di_inputevt)
|
if (di_inputevt)
|
||||||
{
|
{
|
||||||
CloseHandle(di_inputevt);
|
CloseHandle(di_inputevt);
|
||||||
di_inputevt = NULL;
|
di_inputevt = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*devicedef.did)
|
||||||
|
{
|
||||||
|
IDirectInputDevice7_Release(*devicedef.did);
|
||||||
|
*devicedef.did = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (lpDI)
|
if (lpDI)
|
||||||
{
|
{
|
||||||
IDirectInput7_Release(lpDI);
|
IDirectInput7_Release(lpDI);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@brief ENet linked list functions
|
@brief ENet linked list functions
|
||||||
*/
|
*/
|
||||||
#define ENET_BUILDING_LIB 1
|
#define ENET_BUILDING_LIB 1
|
||||||
#include "enet/list.h"
|
#include "enet/enet.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@defgroup list ENet linked list utility functions
|
@defgroup list ENet linked list utility functions
|
||||||
|
|
|
@ -6787,6 +6787,7 @@ FOUNDCHEAT:
|
||||||
sprite[g_player[myconnectindex].ps->i].extra = g_player[myconnectindex].ps->max_player_health;
|
sprite[g_player[myconnectindex].ps->i].extra = g_player[myconnectindex].ps->max_player_health;
|
||||||
actor[g_player[myconnectindex].ps->i].extra = 0;
|
actor[g_player[myconnectindex].ps->i].extra = 0;
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
g_player[myconnectindex].ps->cheat_phase = 0;
|
||||||
|
g_player[myconnectindex].ps->dead_flag = 0;
|
||||||
KB_FlushKeyBoardQueue();
|
KB_FlushKeyBoardQueue();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -7756,6 +7757,7 @@ static void G_ShowDebugHelp(void)
|
||||||
"-name [name]\tPlayer name in multiplay\n"
|
"-name [name]\tPlayer name in multiplay\n"
|
||||||
"-nD\t\tDump default gamevars to gamevars.txt\n"
|
"-nD\t\tDump default gamevars to gamevars.txt\n"
|
||||||
"-noautoload\tDisable loading content from autoload dir\n"
|
"-noautoload\tDisable loading content from autoload dir\n"
|
||||||
|
"-nodinput\tDisable DirectInput (joystick) support\n"
|
||||||
"-nologo\t\tSkip the logo anim\n"
|
"-nologo\t\tSkip the logo anim\n"
|
||||||
"-ns/-nm\t\tDisable sound or music\n"
|
"-ns/-nm\t\tDisable sound or music\n"
|
||||||
"-q#\t\tFake multiplayer with # (2-8) players\n"
|
"-q#\t\tFake multiplayer with # (2-8) players\n"
|
||||||
|
@ -8273,6 +8275,15 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (!Bstrcasecmp(c+1,"nodinput"))
|
||||||
|
{
|
||||||
|
initprintf("DirectInput (joystick) support disabled\n");
|
||||||
|
di_disabled = 1;
|
||||||
|
i++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (!Bstrcasecmp(c+1,"noautoload"))
|
if (!Bstrcasecmp(c+1,"noautoload"))
|
||||||
{
|
{
|
||||||
initprintf("Autoload disabled\n");
|
initprintf("Autoload disabled\n");
|
||||||
|
@ -8950,13 +8961,10 @@ static void G_CompileScripts(void)
|
||||||
|
|
||||||
static inline void G_CheckGametype(void)
|
static inline void G_CheckGametype(void)
|
||||||
{
|
{
|
||||||
// initprintf("ud.m_coop=%i before sanitization\n",ud.m_coop);
|
|
||||||
ud.m_coop = clamp(ud.m_coop, 0, g_numGametypes-1);
|
ud.m_coop = clamp(ud.m_coop, 0, g_numGametypes-1);
|
||||||
Bsprintf(tempbuf,"%s\n",GametypeNames[ud.m_coop]);
|
initprintf("%s\n",GametypeNames[ud.m_coop]);
|
||||||
initprintf(tempbuf);
|
|
||||||
if (GametypeFlags[ud.m_coop] & GAMETYPE_ITEMRESPAWN)
|
if (GametypeFlags[ud.m_coop] & GAMETYPE_ITEMRESPAWN)
|
||||||
ud.m_respawn_items = ud.m_respawn_inventory = 1;
|
ud.m_respawn_items = ud.m_respawn_inventory = 1;
|
||||||
// initprintf("ud.m_coop=%i after sanitisation\n",ud.m_coop);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void G_LoadExtraPalettes(void)
|
static void G_LoadExtraPalettes(void)
|
||||||
|
@ -9140,9 +9148,9 @@ static void G_Startup(void)
|
||||||
initprintf("Multiplayer initialized.\n");
|
initprintf("Multiplayer initialized.\n");
|
||||||
|
|
||||||
{
|
{
|
||||||
char cwd[BMAX_PATH];
|
char *cwd;
|
||||||
|
|
||||||
if (getcwd(cwd,BMAX_PATH) && g_modDir[0] != '/')
|
if (g_modDir[0] != '/' && (cwd = (char *)getcwd(NULL, 0)))
|
||||||
{
|
{
|
||||||
chdir(g_modDir);
|
chdir(g_modDir);
|
||||||
// initprintf("g_rootDir '%s'\nmod '%s'\ncwd '%s'\n",g_rootDir,mod_dir,cwd);
|
// initprintf("g_rootDir '%s'\nmod '%s'\ncwd '%s'\n",g_rootDir,mod_dir,cwd);
|
||||||
|
@ -9153,6 +9161,7 @@ static void G_Startup(void)
|
||||||
G_GameExit("Failed loading art.");
|
G_GameExit("Failed loading art.");
|
||||||
}
|
}
|
||||||
chdir(cwd);
|
chdir(cwd);
|
||||||
|
Bfree(cwd);
|
||||||
}
|
}
|
||||||
else if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
|
else if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
|
||||||
G_GameExit("Failed loading art.");
|
G_GameExit("Failed loading art.");
|
||||||
|
@ -9168,13 +9177,6 @@ static void G_Startup(void)
|
||||||
screenpeek = myconnectindex;
|
screenpeek = myconnectindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendscore(const char *s)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(s);
|
|
||||||
// if (numplayers > 1)
|
|
||||||
// genericmultifunction(-1,(char *)s,strlen(s)+1,5);
|
|
||||||
}
|
|
||||||
|
|
||||||
void G_UpdatePlayerFromMenu(void)
|
void G_UpdatePlayerFromMenu(void)
|
||||||
{
|
{
|
||||||
if (ud.recstat != 0)
|
if (ud.recstat != 0)
|
||||||
|
@ -10751,12 +10753,6 @@ FRAGBONUS:
|
||||||
minitext(92+(y*23),90+t,tempbuf,0,2+8+16+128);
|
minitext(92+(y*23),90+t,tempbuf,0,2+8+16+128);
|
||||||
xfragtotal += g_player[i].frags[y];
|
xfragtotal += g_player[i].frags[y];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_netServer)
|
|
||||||
{
|
|
||||||
Bsprintf(tempbuf,"stats %d killed %d %d\n",i+1,y+1,g_player[i].frags[y]);
|
|
||||||
sendscore(tempbuf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bsprintf(tempbuf,"%-4d",xfragtotal);
|
Bsprintf(tempbuf,"%-4d",xfragtotal);
|
||||||
|
@ -10834,11 +10830,7 @@ FRAGBONUS:
|
||||||
playerbest = CONFIG_GetMapBestTime(MapInfo[ud.volume_number*MAXLEVELS+ud.last_level-1].filename);
|
playerbest = CONFIG_GetMapBestTime(MapInfo[ud.volume_number*MAXLEVELS+ud.last_level-1].filename);
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->player_par < playerbest || playerbest < 0)
|
if (g_player[myconnectindex].ps->player_par < playerbest || playerbest < 0)
|
||||||
{
|
|
||||||
CONFIG_SetMapBestTime(MapInfo[ud.volume_number*MAXLEVELS+ud.last_level-1].filename, g_player[myconnectindex].ps->player_par);
|
CONFIG_SetMapBestTime(MapInfo[ud.volume_number*MAXLEVELS+ud.last_level-1].filename, g_player[myconnectindex].ps->player_par);
|
||||||
// if(playerbest != -1)
|
|
||||||
// playerbest = g_player[myconnectindex].ps->player_par;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
int32_t ii, ij;
|
int32_t ii, ij;
|
||||||
|
@ -10859,7 +10851,7 @@ FRAGBONUS:
|
||||||
clockpad = max(clockpad,ij);
|
clockpad = max(clockpad,ij);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (1)
|
do
|
||||||
{
|
{
|
||||||
int32_t yy = 0, zz;
|
int32_t yy = 0, zz;
|
||||||
|
|
||||||
|
@ -11089,10 +11081,13 @@ FRAGBONUS:
|
||||||
totalclock = (1000000000L);
|
totalclock = (1000000000L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else break;
|
else
|
||||||
|
break;
|
||||||
|
|
||||||
VM_OnEvent(EVENT_DISPLAYBONUSSCREEN, g_player[screenpeek].ps->i, screenpeek, -1);
|
VM_OnEvent(EVENT_DISPLAYBONUSSCREEN, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||||
nextpage();
|
nextpage();
|
||||||
}
|
}
|
||||||
|
while (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void G_DrawCameraText(int16_t i)
|
static void G_DrawCameraText(int16_t i)
|
||||||
|
@ -11184,13 +11179,10 @@ void A_SpawnWallGlass(int32_t i,int32_t wallnum,int32_t n)
|
||||||
|
|
||||||
void A_SpawnGlass(int32_t i,int32_t n)
|
void A_SpawnGlass(int32_t i,int32_t n)
|
||||||
{
|
{
|
||||||
int32_t j, k, a, z;
|
for (; n>0; n--)
|
||||||
|
|
||||||
for (j=n; j>0; j--)
|
|
||||||
{
|
{
|
||||||
a = krand()&2047;
|
int32_t k = A_InsertSprite(SECT,SX,SY,SZ-((krand()&16)<<8),GLASSPIECES+(n%3),
|
||||||
z = SZ-((krand()&16)<<8);
|
krand()&15,36,36,krand()&2047,32+(krand()&63),-512-(krand()&2047),i,5);
|
||||||
k = A_InsertSprite(SECT,SX,SY,z,GLASSPIECES+(j%3),krand()&15,36,36,a,32+(krand()&63),-512-(krand()&2047),i,5);
|
|
||||||
sprite[k].pal = sprite[i].pal;
|
sprite[k].pal = sprite[i].pal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1446,6 +1446,7 @@ static void C_SetProjectile(int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static int32_t C_CheckEventSync(int32_t iEventID)
|
static int32_t C_CheckEventSync(int32_t iEventID)
|
||||||
{
|
{
|
||||||
if (g_parsingEventPtr || g_parsingActorPtr)
|
if (g_parsingEventPtr || g_parsingActorPtr)
|
||||||
|
@ -1484,6 +1485,7 @@ static int32_t C_CheckEventSync(int32_t iEventID)
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#define GetDefID(szGameLabel) hash_find(&h_gamevars,szGameLabel)
|
#define GetDefID(szGameLabel) hash_find(&h_gamevars,szGameLabel)
|
||||||
#define GetADefID(szGameLabel) hash_find(&h_arrays,szGameLabel)
|
#define GetADefID(szGameLabel) hash_find(&h_arrays,szGameLabel)
|
||||||
|
@ -1829,6 +1831,7 @@ static void C_GetNextVarType(int32_t type)
|
||||||
C_ReportError(ERROR_VARTYPEMISMATCH);
|
C_ReportError(ERROR_VARTYPEMISMATCH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if ((aGameVars[i].dwFlags & GAMEVAR_SYNCCHECK) && g_parsingActorPtr && C_CheckEventSync(g_currentEvent))
|
if ((aGameVars[i].dwFlags & GAMEVAR_SYNCCHECK) && g_parsingActorPtr && C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(-1);
|
C_ReportError(-1);
|
||||||
|
@ -1837,6 +1840,7 @@ static void C_GetNextVarType(int32_t type)
|
||||||
g_lineNumber,label+(g_numLabels<<6),g_parsingEventPtr?"a synced event":"an actor");
|
g_lineNumber,label+(g_numLabels<<6),g_parsingEventPtr?"a synced event":"an actor");
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
|
if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
|
||||||
initprintf("%s:%d: debug: accepted gamevar `%s'.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6));
|
initprintf("%s:%d: debug: accepted gamevar `%s'.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6));
|
||||||
|
|
||||||
|
@ -2197,8 +2201,10 @@ static int32_t C_ParseCommand(void)
|
||||||
|
|
||||||
case CON_SETTHISPROJECTILE:
|
case CON_SETTHISPROJECTILE:
|
||||||
case CON_SETPROJECTILE:
|
case CON_SETPROJECTILE:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
|
*/
|
||||||
case CON_GETTHISPROJECTILE:
|
case CON_GETTHISPROJECTILE:
|
||||||
case CON_GETPROJECTILE:
|
case CON_GETPROJECTILE:
|
||||||
{
|
{
|
||||||
|
@ -2426,11 +2432,13 @@ static int32_t C_ParseCommand(void)
|
||||||
case CON_MOVE:
|
case CON_MOVE:
|
||||||
if (g_parsingActorPtr || g_processingState)
|
if (g_parsingActorPtr || g_processingState)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if ((C_GetNextValue(LABEL_MOVE|LABEL_DEFINE) == 0) && (*(g_scriptPtr-1) != 0) && (*(g_scriptPtr-1) != 1))
|
if ((C_GetNextValue(LABEL_MOVE|LABEL_DEFINE) == 0) && (*(g_scriptPtr-1) != 0) && (*(g_scriptPtr-1) != 1))
|
||||||
{
|
{
|
||||||
|
@ -2640,11 +2648,13 @@ static int32_t C_ParseCommand(void)
|
||||||
case CON_AI:
|
case CON_AI:
|
||||||
if (g_parsingActorPtr || g_processingState)
|
if (g_parsingActorPtr || g_processingState)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
C_GetNextValue(LABEL_AI);
|
C_GetNextValue(LABEL_AI);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2720,11 +2730,13 @@ static int32_t C_ParseCommand(void)
|
||||||
case CON_ACTION:
|
case CON_ACTION:
|
||||||
if (g_parsingActorPtr || g_processingState)
|
if (g_parsingActorPtr || g_processingState)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
C_GetNextValue(LABEL_ACTION);
|
C_GetNextValue(LABEL_ACTION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3023,11 +3035,13 @@ static int32_t C_ParseCommand(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_INSERTSPRITEQ:
|
case CON_INSERTSPRITEQ:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_QSPRINTF:
|
case CON_QSPRINTF:
|
||||||
|
@ -3066,11 +3080,13 @@ static int32_t C_ParseCommand(void)
|
||||||
case CON_LOTSOFGLASS:
|
case CON_LOTSOFGLASS:
|
||||||
case CON_SAVENN:
|
case CON_SAVENN:
|
||||||
case CON_SAVE:
|
case CON_SAVE:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_ANGOFF:
|
case CON_ANGOFF:
|
||||||
case CON_QUOTE:
|
case CON_QUOTE:
|
||||||
case CON_SOUND:
|
case CON_SOUND:
|
||||||
|
@ -3099,11 +3115,13 @@ static int32_t C_ParseCommand(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_HITRADIUSVAR:
|
case CON_HITRADIUSVAR:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
C_GetManyVars(5);
|
C_GetManyVars(5);
|
||||||
break;
|
break;
|
||||||
case CON_HITRADIUS:
|
case CON_HITRADIUS:
|
||||||
|
@ -3117,11 +3135,13 @@ static int32_t C_ParseCommand(void)
|
||||||
case CON_DEBRIS:
|
case CON_DEBRIS:
|
||||||
case CON_ADDINVENTORY:
|
case CON_ADDINVENTORY:
|
||||||
case CON_GUTS:
|
case CON_GUTS:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
C_GetNextValue(LABEL_DEFINE);
|
C_GetNextValue(LABEL_DEFINE);
|
||||||
C_GetNextValue(LABEL_DEFINE);
|
C_GetNextValue(LABEL_DEFINE);
|
||||||
break;
|
break;
|
||||||
|
@ -3175,11 +3195,13 @@ static int32_t C_ParseCommand(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_SETSECTOR:
|
case CON_SETSECTOR:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GETSECTOR:
|
case CON_GETSECTOR:
|
||||||
{
|
{
|
||||||
int32_t lLabelID;
|
int32_t lLabelID;
|
||||||
|
@ -3310,11 +3332,13 @@ static int32_t C_ParseCommand(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
case CON_SETWALL:
|
case CON_SETWALL:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GETWALL:
|
case CON_GETWALL:
|
||||||
{
|
{
|
||||||
int32_t lLabelID;
|
int32_t lLabelID;
|
||||||
|
@ -3377,11 +3401,13 @@ static int32_t C_ParseCommand(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
case CON_SETPLAYER:
|
case CON_SETPLAYER:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GETPLAYER:
|
case CON_GETPLAYER:
|
||||||
{
|
{
|
||||||
int32_t lLabelID;
|
int32_t lLabelID;
|
||||||
|
@ -3458,11 +3484,13 @@ static int32_t C_ParseCommand(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
case CON_SETINPUT:
|
case CON_SETINPUT:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GETINPUT:
|
case CON_GETINPUT:
|
||||||
{
|
{
|
||||||
int32_t lLabelID;
|
int32_t lLabelID;
|
||||||
|
@ -3577,11 +3605,13 @@ static int32_t C_ParseCommand(void)
|
||||||
|
|
||||||
case CON_SETACTORVAR:
|
case CON_SETACTORVAR:
|
||||||
case CON_SETPLAYERVAR:
|
case CON_SETPLAYERVAR:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GETACTORVAR:
|
case CON_GETACTORVAR:
|
||||||
case CON_GETPLAYERVAR:
|
case CON_GETPLAYERVAR:
|
||||||
{
|
{
|
||||||
|
@ -3711,11 +3741,13 @@ static int32_t C_ParseCommand(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
case CON_SETACTOR:
|
case CON_SETACTOR:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GETACTOR:
|
case CON_GETACTOR:
|
||||||
{
|
{
|
||||||
int32_t lLabelID;
|
int32_t lLabelID;
|
||||||
|
@ -3871,11 +3903,13 @@ static int32_t C_ParseCommand(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_GETTICKS:
|
case CON_GETTICKS:
|
||||||
|
/*
|
||||||
if (C_CheckEventSync(g_currentEvent))
|
if (C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_REVEVENTSYNC);
|
C_ReportError(WARNING_REVEVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GETCURRADDRESS:
|
case CON_GETCURRADDRESS:
|
||||||
C_GetNextVarType(GAMEVAR_READONLY);
|
C_GetNextVarType(GAMEVAR_READONLY);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3892,11 +3926,13 @@ static int32_t C_ParseCommand(void)
|
||||||
case CON_LOCKPLAYER:
|
case CON_LOCKPLAYER:
|
||||||
case CON_SHOOTVAR:
|
case CON_SHOOTVAR:
|
||||||
case CON_QUAKE:
|
case CON_QUAKE:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_JUMP:
|
case CON_JUMP:
|
||||||
case CON_CMENU:
|
case CON_CMENU:
|
||||||
case CON_SOUNDVAR:
|
case CON_SOUNDVAR:
|
||||||
|
@ -3947,11 +3983,13 @@ static int32_t C_ParseCommand(void)
|
||||||
case CON_RANDVAR:
|
case CON_RANDVAR:
|
||||||
case CON_ZSHOOT:
|
case CON_ZSHOOT:
|
||||||
case CON_EZSHOOT:
|
case CON_EZSHOOT:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_SETVAR:
|
case CON_SETVAR:
|
||||||
case CON_ADDVAR:
|
case CON_ADDVAR:
|
||||||
case CON_SUBVAR:
|
case CON_SUBVAR:
|
||||||
|
@ -4113,11 +4151,13 @@ static int32_t C_ParseCommand(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_RANDVARVAR:
|
case CON_RANDVARVAR:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_SETVARVAR:
|
case CON_SETVARVAR:
|
||||||
case CON_ADDVARVAR:
|
case CON_ADDVARVAR:
|
||||||
case CON_SUBVARVAR:
|
case CON_SUBVARVAR:
|
||||||
|
@ -4140,11 +4180,13 @@ static int32_t C_ParseCommand(void)
|
||||||
case CON_OPERATESECTORS:
|
case CON_OPERATESECTORS:
|
||||||
case CON_OPERATEACTIVATORS:
|
case CON_OPERATEACTIVATORS:
|
||||||
case CON_SSP:
|
case CON_SSP:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GMAXAMMO:
|
case CON_GMAXAMMO:
|
||||||
case CON_DIST:
|
case CON_DIST:
|
||||||
case CON_LDIST:
|
case CON_LDIST:
|
||||||
|
@ -4255,11 +4297,13 @@ static int32_t C_ParseCommand(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
C_GetNextVar();
|
C_GetNextVar();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -4526,11 +4570,13 @@ static int32_t C_ParseCommand(void)
|
||||||
|
|
||||||
case CON_MOVESPRITE:
|
case CON_MOVESPRITE:
|
||||||
case CON_SETSPRITE:
|
case CON_SETSPRITE:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
C_GetManyVars(4);
|
C_GetManyVars(4);
|
||||||
if (tw == CON_MOVESPRITE)
|
if (tw == CON_MOVESPRITE)
|
||||||
{
|
{
|
||||||
|
@ -4857,11 +4903,13 @@ repeatcase:
|
||||||
case CON_CHANGESPRITESECT:
|
case CON_CHANGESPRITESECT:
|
||||||
case CON_ZSHOOTVAR:
|
case CON_ZSHOOTVAR:
|
||||||
case CON_EZSHOOTVAR:
|
case CON_EZSHOOTVAR:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GETPNAME:
|
case CON_GETPNAME:
|
||||||
case CON_STARTLEVEL:
|
case CON_STARTLEVEL:
|
||||||
case CON_QSTRCAT:
|
case CON_QSTRCAT:
|
||||||
|
@ -4881,11 +4929,13 @@ repeatcase:
|
||||||
return 0;
|
return 0;
|
||||||
case CON_SETACTORANGLE:
|
case CON_SETACTORANGLE:
|
||||||
case CON_SETPLAYERANGLE:
|
case CON_SETPLAYERANGLE:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_GETANGLETOTARGET:
|
case CON_GETANGLETOTARGET:
|
||||||
case CON_GETACTORANGLE:
|
case CON_GETACTORANGLE:
|
||||||
case CON_GETPLAYERANGLE:
|
case CON_GETPLAYERANGLE:
|
||||||
|
@ -4904,11 +4954,13 @@ repeatcase:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_IFRND:
|
case CON_IFRND:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_IFPDISTL:
|
case CON_IFPDISTL:
|
||||||
case CON_IFPDISTG:
|
case CON_IFPDISTG:
|
||||||
case CON_IFWASWEAPON:
|
case CON_IFWASWEAPON:
|
||||||
|
@ -4973,11 +5025,13 @@ repeatcase:
|
||||||
break;
|
break;
|
||||||
case CON_IFSOUND:
|
case CON_IFSOUND:
|
||||||
case CON_IFACTORSOUND:
|
case CON_IFACTORSOUND:
|
||||||
|
/*
|
||||||
if (C_CheckEventSync(g_currentEvent))
|
if (C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_REVEVENTSYNC);
|
C_ReportError(WARNING_REVEVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
default:
|
default:
|
||||||
C_GetNextValue(LABEL_DEFINE);
|
C_GetNextValue(LABEL_DEFINE);
|
||||||
break;
|
break;
|
||||||
|
@ -5790,11 +5844,13 @@ repeatcase:
|
||||||
case CON_PKICK:
|
case CON_PKICK:
|
||||||
case CON_MIKESND:
|
case CON_MIKESND:
|
||||||
case CON_TOSSWEAPON:
|
case CON_TOSSWEAPON:
|
||||||
|
/*
|
||||||
if (!C_CheckEventSync(g_currentEvent))
|
if (!C_CheckEventSync(g_currentEvent))
|
||||||
{
|
{
|
||||||
C_ReportError(WARNING_EVENTSYNC);
|
C_ReportError(WARNING_EVENTSYNC);
|
||||||
g_numCompilerWarnings++;
|
g_numCompilerWarnings++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case CON_NULLOP:
|
case CON_NULLOP:
|
||||||
if (tw == CON_NULLOP)
|
if (tw == CON_NULLOP)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
#include "gamedef.h"
|
#include "gamedef.h"
|
||||||
|
|
|
@ -306,13 +306,9 @@ static int32_t osdcmd_god(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(parm);
|
UNREFERENCED_PARAMETER(parm);
|
||||||
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||||
{
|
|
||||||
osdcmd_cheatsinfo_stat.cheatnum = 0;
|
osdcmd_cheatsinfo_stat.cheatnum = 0;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
OSD_Printf("god: Not in a single-player game.\n");
|
OSD_Printf("god: Not in a single-player game.\n");
|
||||||
}
|
|
||||||
|
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -495,7 +495,8 @@ int32_t G_LoadPlayer(int32_t spot)
|
||||||
Bstrcpy(MapInfo[ud.level_number].musicfn,levname);
|
Bstrcpy(MapInfo[ud.level_number].musicfn,levname);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MapInfo[(uint8_t)g_musicIndex].musicfn != NULL && (i != g_musicIndex || MapInfo[MAXVOLUMES*MAXLEVELS+2].alt_musicfn))
|
if (ud.config.MusicToggle && MapInfo[(uint8_t)g_musicIndex].musicfn != NULL &&
|
||||||
|
(i != g_musicIndex || MapInfo[MAXVOLUMES*MAXLEVELS+2].alt_musicfn))
|
||||||
{
|
{
|
||||||
S_StopMusic();
|
S_StopMusic();
|
||||||
S_PlayMusic(&MapInfo[(uint8_t)g_musicIndex].musicfn[0],g_musicIndex);
|
S_PlayMusic(&MapInfo[(uint8_t)g_musicIndex].musicfn[0],g_musicIndex);
|
||||||
|
|
|
@ -173,7 +173,7 @@ int32_t MUSIC_Init(int32_t SoundCard, int32_t Address)
|
||||||
sz = (numargs+2)*sizeof(char *) + (c-command+1);
|
sz = (numargs+2)*sizeof(char *) + (c-command+1);
|
||||||
sz = ((sz+pagesize-1)/pagesize)*pagesize;
|
sz = ((sz+pagesize-1)/pagesize)*pagesize;
|
||||||
# ifdef NEDMALLOC
|
# ifdef NEDMALLOC
|
||||||
external_midi_argv = Bmemalign(pagesize, sz);
|
external_midi_argv = Bmalloc(sz);
|
||||||
if (!external_midi_argv)
|
if (!external_midi_argv)
|
||||||
goto fallback;
|
goto fallback;
|
||||||
# else
|
# else
|
||||||
|
|
|
@ -221,7 +221,10 @@ static void PopulateForm(int32_t pgs)
|
||||||
(void)ComboBox_ResetContent(hwnd);
|
(void)ComboBox_ResetContent(hwnd);
|
||||||
(void)ComboBox_SetCurSel(hwnd, 0);
|
(void)ComboBox_SetCurSel(hwnd, 0);
|
||||||
|
|
||||||
for (i=0; i<4; i++)
|
if (di_disabled) j = 2;
|
||||||
|
else j = 4;
|
||||||
|
|
||||||
|
for (i=0; i<j; i++)
|
||||||
{
|
{
|
||||||
(void)ComboBox_InsertString(hwnd, i, controlstrings[i]);
|
(void)ComboBox_InsertString(hwnd, i, controlstrings[i]);
|
||||||
(void)ComboBox_SetItemData(hwnd, i, i);
|
(void)ComboBox_SetItemData(hwnd, i, i);
|
||||||
|
|
Loading…
Reference in a new issue