diff --git a/src/command.c b/src/command.c index c2926c473b70888fdb38e681f803847e2379c89a..bef6e2cdd1ce29ef835ee4f74ded46885db2f419 100644 --- a/src/command.c +++ b/src/command.c @@ -334,15 +334,15 @@ void COM_Init(void) // add standard commands COM_AddCommand("alias", COM_Alias_f, 0); - COM_AddCommand("echo", COM_Echo_f, 0); - COM_AddCommand("cecho", COM_CEcho_f, 0); - COM_AddCommand("cechoflags", COM_CEchoFlags_f, 0); - COM_AddCommand("cechoduration", COM_CEchoDuration_f, 0); + COM_AddCommand("echo", COM_Echo_f, COM_LUA); + COM_AddCommand("cecho", COM_CEcho_f, COM_LUA); + COM_AddCommand("cechoflags", COM_CEchoFlags_f, COM_LUA); + COM_AddCommand("cechoduration", COM_CEchoDuration_f, COM_LUA); COM_AddCommand("exec", COM_Exec_f, 0); COM_AddCommand("wait", COM_Wait_f, 0); - COM_AddCommand("help", COM_Help_f, 0); - COM_AddCommand("toggle", COM_Toggle_f, 0); - COM_AddCommand("add", COM_Add_f, 0); + COM_AddCommand("help", COM_Help_f, COM_LUA); + COM_AddCommand("toggle", COM_Toggle_f, COM_LUA); + COM_AddCommand("add", COM_Add_f, COM_LUA); RegisterNetXCmd(XD_NETVAR, Got_NetVar); } diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 232b41bd0be2272bdd9cbfb72942293057ffc538..9740c7f224bca2a116413259f4fa9dd8caf39c5b 100755 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3537,22 +3537,22 @@ void D_ClientServerInit(void) VERSION/100, VERSION%100, SUBVERSION)); #ifndef NONET - COM_AddCommand("getplayernum", Command_GetPlayerNum, 0); - COM_AddCommand("kick", Command_Kick, 0); - COM_AddCommand("ban", Command_Ban, 0); - COM_AddCommand("banip", Command_BanIP, 0); - COM_AddCommand("clearbans", Command_ClearBans, 0); - COM_AddCommand("showbanlist", Command_ShowBan, 0); - COM_AddCommand("reloadbans", Command_ReloadBan, 0); - COM_AddCommand("connect", Command_connect, 0); - COM_AddCommand("nodes", Command_Nodes, 0); - COM_AddCommand("resendgamestate", Command_ResendGamestate, 0); + COM_AddCommand("getplayernum", Command_GetPlayerNum, COM_LUA); + COM_AddCommand("kick", Command_Kick, COM_LUA); + COM_AddCommand("ban", Command_Ban, COM_LUA); + COM_AddCommand("banip", Command_BanIP, COM_LUA); + COM_AddCommand("clearbans", Command_ClearBans, COM_LUA); + COM_AddCommand("showbanlist", Command_ShowBan, COM_LUA); + COM_AddCommand("reloadbans", Command_ReloadBan, COM_LUA); + COM_AddCommand("connect", Command_connect, COM_LUA); + COM_AddCommand("nodes", Command_Nodes, COM_LUA); + COM_AddCommand("resendgamestate", Command_ResendGamestate, COM_LUA); #ifdef PACKETDROP - COM_AddCommand("drop", Command_Drop, 0); - COM_AddCommand("droprate", Command_Droprate, 0); + COM_AddCommand("drop", Command_Drop, COM_LUA); + COM_AddCommand("droprate", Command_Droprate, COM_LUA); #endif #ifdef _DEBUG - COM_AddCommand("numnodes", Command_Numnodes, 0); + COM_AddCommand("numnodes", Command_Numnodes, COM_LUA); #endif #endif diff --git a/src/d_netcmd.c b/src/d_netcmd.c index ef00ec4311cde1d43f8c1af631d49c6899ccab4a..676b6e7a0333fe0483ea06b1000f838de7d09482 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -464,57 +464,57 @@ void D_RegisterServerCommands(void) RegisterNetXCmd(XD_LUAFILE, Got_LuaFile); // Remote Administration - COM_AddCommand("password", Command_Changepassword_f, 0); - COM_AddCommand("login", Command_Login_f, 0); // useful in dedicated to kick off remote admin - COM_AddCommand("promote", Command_Verify_f, 0); + COM_AddCommand("password", Command_Changepassword_f, COM_LUA); + COM_AddCommand("login", Command_Login_f, COM_LUA); // useful in dedicated to kick off remote admin + COM_AddCommand("promote", Command_Verify_f, COM_LUA); RegisterNetXCmd(XD_VERIFIED, Got_Verification); - COM_AddCommand("demote", Command_RemoveAdmin_f, 0); + COM_AddCommand("demote", Command_RemoveAdmin_f, COM_LUA); RegisterNetXCmd(XD_DEMOTED, Got_Removal); - COM_AddCommand("motd", Command_MotD_f, 0); + COM_AddCommand("motd", Command_MotD_f, COM_LUA); RegisterNetXCmd(XD_SETMOTD, Got_MotD_f); // For remote admin RegisterNetXCmd(XD_TEAMCHANGE, Got_Teamchange); - COM_AddCommand("serverchangeteam", Command_ServerTeamChange_f, 0); + COM_AddCommand("serverchangeteam", Command_ServerTeamChange_f, COM_LUA); RegisterNetXCmd(XD_CLEARSCORES, Got_Clearscores); - COM_AddCommand("clearscores", Command_Clearscores_f, 0); - COM_AddCommand("map", Command_Map_f, 0); + COM_AddCommand("clearscores", Command_Clearscores_f, COM_LUA); + COM_AddCommand("map", Command_Map_f, COM_LUA); - COM_AddCommand("exitgame", Command_ExitGame_f, 0); - COM_AddCommand("retry", Command_Retry_f, 0); - COM_AddCommand("exitlevel", Command_ExitLevel_f, 0); - COM_AddCommand("showmap", Command_Showmap_f, 0); - COM_AddCommand("mapmd5", Command_Mapmd5_f, 0); + COM_AddCommand("exitgame", Command_ExitGame_f, COM_LUA); + COM_AddCommand("retry", Command_Retry_f, COM_LUA); + COM_AddCommand("exitlevel", Command_ExitLevel_f, COM_LUA); + COM_AddCommand("showmap", Command_Showmap_f, COM_LUA); + COM_AddCommand("mapmd5", Command_Mapmd5_f, COM_LUA); - COM_AddCommand("addfolder", Command_Addfolder, 0); - COM_AddCommand("addfile", Command_Addfile, 0); - COM_AddCommand("listwad", Command_ListWADS_f, 0); + COM_AddCommand("addfolder", Command_Addfolder, COM_LUA); + COM_AddCommand("addfile", Command_Addfile, COM_LUA); + COM_AddCommand("listwad", Command_ListWADS_f, COM_LUA); - COM_AddCommand("runsoc", Command_RunSOC, 0); - COM_AddCommand("pause", Command_Pause, 0); - COM_AddCommand("suicide", Command_Suicide, 0); + COM_AddCommand("runsoc", Command_RunSOC, COM_LUA); + COM_AddCommand("pause", Command_Pause, COM_LUA); + COM_AddCommand("suicide", Command_Suicide, COM_LUA); - COM_AddCommand("gametype", Command_ShowGametype_f, 0); - COM_AddCommand("version", Command_Version_f, 0); + COM_AddCommand("gametype", Command_ShowGametype_f, COM_LUA); + COM_AddCommand("version", Command_Version_f, COM_LUA); #ifdef UPDATE_ALERT - COM_AddCommand("mod_details", Command_ModDetails_f, 0); + COM_AddCommand("mod_details", Command_ModDetails_f, COM_LUA); #endif - COM_AddCommand("quit", Command_Quit_f, 0); + COM_AddCommand("quit", Command_Quit_f, COM_LUA); COM_AddCommand("saveconfig", Command_SaveConfig_f, 0); COM_AddCommand("loadconfig", Command_LoadConfig_f, 0); COM_AddCommand("changeconfig", Command_ChangeConfig_f, 0); - COM_AddCommand("isgamemodified", Command_Isgamemodified_f, 0); // test - COM_AddCommand("showscores", Command_ShowScores_f, 0); - COM_AddCommand("showtime", Command_ShowTime_f, 0); - COM_AddCommand("cheats", Command_Cheats_f, 0); // test + COM_AddCommand("isgamemodified", Command_Isgamemodified_f, COM_LUA); // test + COM_AddCommand("showscores", Command_ShowScores_f, COM_LUA); + COM_AddCommand("showtime", Command_ShowTime_f, COM_LUA); + COM_AddCommand("cheats", Command_Cheats_f, COM_LUA); // test #ifdef _DEBUG - COM_AddCommand("togglemodified", Command_Togglemodified_f, 0); - COM_AddCommand("archivetest", Command_Archivetest_f, 0); + COM_AddCommand("togglemodified", Command_Togglemodified_f, COM_LUA); + COM_AddCommand("archivetest", Command_Archivetest_f, COM_LUA); #endif - COM_AddCommand("downloads", Command_Downloads_f, 0); + COM_AddCommand("downloads", Command_Downloads_f, COM_LUA); // for master server connection AddMServCommands(); @@ -601,7 +601,7 @@ void D_RegisterServerCommands(void) CV_RegisterVar(&cv_blamecfail); #endif - COM_AddCommand("ping", Command_Ping_f, 0); + COM_AddCommand("ping", Command_Ping_f, COM_LUA); CV_RegisterVar(&cv_nettimeout); CV_RegisterVar(&cv_jointimeout); @@ -645,25 +645,25 @@ void D_RegisterClientCommands(void) if (dedicated) return; - COM_AddCommand("numthinkers", Command_Numthinkers_f, 0); - COM_AddCommand("countmobjs", Command_CountMobjs_f, 0); + COM_AddCommand("numthinkers", Command_Numthinkers_f, COM_LUA); + COM_AddCommand("countmobjs", Command_CountMobjs_f, COM_LUA); - COM_AddCommand("changeteam", Command_Teamchange_f, 0); - COM_AddCommand("changeteam2", Command_Teamchange2_f, 0); + COM_AddCommand("changeteam", Command_Teamchange_f, COM_LUA); + COM_AddCommand("changeteam2", Command_Teamchange2_f, COM_LUA); COM_AddCommand("playdemo", Command_Playdemo_f, 0); COM_AddCommand("timedemo", Command_Timedemo_f, 0); - COM_AddCommand("stopdemo", Command_Stopdemo_f, 0); - COM_AddCommand("playintro", Command_Playintro_f, 0); + COM_AddCommand("stopdemo", Command_Stopdemo_f, COM_LUA); + COM_AddCommand("playintro", Command_Playintro_f, COM_LUA); - COM_AddCommand("resetcamera", Command_ResetCamera_f, 0); + COM_AddCommand("resetcamera", Command_ResetCamera_f, COM_LUA); COM_AddCommand("setcontrol", Command_Setcontrol_f, 0); COM_AddCommand("setcontrol2", Command_Setcontrol2_f, 0); - COM_AddCommand("screenshot", M_ScreenShot, 0); - COM_AddCommand("startmovie", Command_StartMovie_f, 0); - COM_AddCommand("stopmovie", Command_StopMovie_f, 0); + COM_AddCommand("screenshot", M_ScreenShot, COM_LUA); + COM_AddCommand("startmovie", Command_StartMovie_f, COM_LUA); + COM_AddCommand("stopmovie", Command_StopMovie_f, COM_LUA); CV_RegisterVar(&cv_screenshot_option); CV_RegisterVar(&cv_screenshot_folder); @@ -725,7 +725,7 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_ghost_last); CV_RegisterVar(&cv_ghost_guest); - COM_AddCommand("displayplayer", Command_Displayplayer_f, 0); + COM_AddCommand("displayplayer", Command_Displayplayer_f, COM_LUA); // FIXME: not to be here.. but needs be done for config loading CV_RegisterVar(&cv_globalgamma); @@ -881,7 +881,7 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_ps_descriptor); // ingame object placing - COM_AddCommand("objectplace", Command_ObjectPlace_f, 0); + COM_AddCommand("objectplace", Command_ObjectPlace_f, COM_LUA); //COM_AddCommand("writethings", Command_Writethings_f); CV_RegisterVar(&cv_speed); CV_RegisterVar(&cv_opflags); @@ -893,32 +893,32 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_freedemocamera); // add cheat commands - COM_AddCommand("noclip", Command_CheatNoClip_f, 0); - COM_AddCommand("god", Command_CheatGod_f, 0); - COM_AddCommand("notarget", Command_CheatNoTarget_f, 0); - COM_AddCommand("getallemeralds", Command_Getallemeralds_f, 0); - COM_AddCommand("resetemeralds", Command_Resetemeralds_f, 0); - COM_AddCommand("setrings", Command_Setrings_f, 0); - COM_AddCommand("setlives", Command_Setlives_f, 0); - COM_AddCommand("setcontinues", Command_Setcontinues_f, 0); - COM_AddCommand("devmode", Command_Devmode_f, 0); - COM_AddCommand("savecheckpoint", Command_Savecheckpoint_f, 0); - COM_AddCommand("scale", Command_Scale_f, 0); - COM_AddCommand("gravflip", Command_Gravflip_f, 0); - COM_AddCommand("hurtme", Command_Hurtme_f, 0); - COM_AddCommand("jumptoaxis", Command_JumpToAxis_f, 0); - COM_AddCommand("charability", Command_Charability_f, 0); - COM_AddCommand("charspeed", Command_Charspeed_f, 0); - COM_AddCommand("teleport", Command_Teleport_f, 0); - COM_AddCommand("rteleport", Command_RTeleport_f, 0); - COM_AddCommand("skynum", Command_Skynum_f, 0); - COM_AddCommand("weather", Command_Weather_f, 0); - COM_AddCommand("toggletwod", Command_Toggletwod_f, 0); + COM_AddCommand("noclip", Command_CheatNoClip_f, COM_LUA); + COM_AddCommand("god", Command_CheatGod_f, COM_LUA); + COM_AddCommand("notarget", Command_CheatNoTarget_f, COM_LUA); + COM_AddCommand("getallemeralds", Command_Getallemeralds_f, COM_LUA); + COM_AddCommand("resetemeralds", Command_Resetemeralds_f, COM_LUA); + COM_AddCommand("setrings", Command_Setrings_f, COM_LUA); + COM_AddCommand("setlives", Command_Setlives_f, COM_LUA); + COM_AddCommand("setcontinues", Command_Setcontinues_f, COM_LUA); + COM_AddCommand("devmode", Command_Devmode_f, COM_LUA); + COM_AddCommand("savecheckpoint", Command_Savecheckpoint_f, COM_LUA); + COM_AddCommand("scale", Command_Scale_f, COM_LUA); + COM_AddCommand("gravflip", Command_Gravflip_f, COM_LUA); + COM_AddCommand("hurtme", Command_Hurtme_f, COM_LUA); + COM_AddCommand("jumptoaxis", Command_JumpToAxis_f, COM_LUA); + COM_AddCommand("charability", Command_Charability_f, COM_LUA); + COM_AddCommand("charspeed", Command_Charspeed_f, COM_LUA); + COM_AddCommand("teleport", Command_Teleport_f, COM_LUA); + COM_AddCommand("rteleport", Command_RTeleport_f, COM_LUA); + COM_AddCommand("skynum", Command_Skynum_f, COM_LUA); + COM_AddCommand("weather", Command_Weather_f, COM_LUA); + COM_AddCommand("toggletwod", Command_Toggletwod_f, COM_LUA); #ifdef _DEBUG - COM_AddCommand("causecfail", Command_CauseCfail_f, 0); + COM_AddCommand("causecfail", Command_CauseCfail_f, COM_LUA); #endif #ifdef LUA_ALLOW_BYTECODE - COM_AddCommand("dumplua", Command_Dumplua_f, 0); + COM_AddCommand("dumplua", Command_Dumplua_f, COM_LUA); #endif } diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 2b1cbfcaf7b3776d3f69dff1b0ec0abf5b08472b..9322770fae96ab430f24a39eeaf6ebf21b2f3f8f 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -328,10 +328,10 @@ void HU_LoadGraphics(void) void HU_Init(void) { #ifndef NONET - COM_AddCommand("say", Command_Say_f, 0); - COM_AddCommand("sayto", Command_Sayto_f, 0); - COM_AddCommand("sayteam", Command_Sayteam_f, 0); - COM_AddCommand("csay", Command_CSay_f, 0); + COM_AddCommand("say", Command_Say_f, COM_LUA); + COM_AddCommand("sayto", Command_Sayto_f, COM_LUA); + COM_AddCommand("sayteam", Command_Sayteam_f, COM_LUA); + COM_AddCommand("csay", Command_CSay_f, COM_LUA); RegisterNetXCmd(XD_SAY, Got_Saycmd); #endif diff --git a/src/m_menu.c b/src/m_menu.c index 9ca21841b7a9a8589a54c228554fb8aab8a13fe7..82d21bc55d734abbf62a545376f0986f7f7cacf2 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3909,7 +3909,7 @@ void M_Init(void) { int i; - COM_AddCommand("manual", Command_Manual_f, 0); + COM_AddCommand("manual", Command_Manual_f, COM_LUA); CV_RegisterVar(&cv_nextmap); CV_RegisterVar(&cv_newgametype); diff --git a/src/mserv.c b/src/mserv.c index 376774b23b20cb8020609aea7880f11f79179d4a..64632016eb88e66325adbb920c6e4bcc8cbcb0e1 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -98,7 +98,7 @@ void AddMServCommands(void) CV_RegisterVar(&cv_servername); #ifdef MASTERSERVER COM_AddCommand("listserv", Command_Listserv_f, 0); - COM_AddCommand("masterserver_update", Update_parameters, 0); // allows people to updates manually in case you were delisted by accident + COM_AddCommand("masterserver_update", Update_parameters, COM_LUA); // allows people to updates manually in case you were delisted by accident #endif #endif } diff --git a/src/s_sound.c b/src/s_sound.c index c230ea3c4242dafea81ae6ec00b48de4118b41fc..c3e5626faf399bdf9b63a0456decc45c9452edf4 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -289,8 +289,8 @@ void S_RegisterSoundStuff(void) CV_RegisterVar(&cv_miditimiditypath); #endif - COM_AddCommand("tunes", Command_Tunes_f, 0); - COM_AddCommand("restartaudio", Command_RestartAudio_f, 0); + COM_AddCommand("tunes", Command_Tunes_f, COM_LUA); + COM_AddCommand("restartaudio", Command_RestartAudio_f, COM_LUA); } static void SetChannelsNum(void) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 2ad97108cbd2b4393dc0bdab3251ad9b34f9b789..57c6e48e9221a0fa133d0052491cb7eb8f37f0a1 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1784,9 +1784,9 @@ void I_StartupGraphics(void) if (graphics_started) return; - COM_AddCommand ("vid_nummodes", VID_Command_NumModes_f, 0); - COM_AddCommand ("vid_info", VID_Command_Info_f, 0); - COM_AddCommand ("vid_modelist", VID_Command_ModeList_f, 0); + COM_AddCommand ("vid_nummodes", VID_Command_NumModes_f, COM_LUA); + COM_AddCommand ("vid_info", VID_Command_Info_f, COM_LUA); + COM_AddCommand ("vid_modelist", VID_Command_ModeList_f, COM_LUA); COM_AddCommand ("vid_mode", VID_Command_Mode_f, 0); CV_RegisterVar (&cv_vidwait); CV_RegisterVar (&cv_stretch); diff --git a/src/z_zone.c b/src/z_zone.c index d0722b84c5d0dd2454d821e236930cd78238a827..6ffe9aedddd4db512ffe4bc461e40aa59df1b99b 100644 --- a/src/z_zone.c +++ b/src/z_zone.c @@ -116,10 +116,10 @@ void Z_Init(void) CONS_Printf("System memory: %uMB - Free: %uMB\n", total>>20, memfree); // Note: This allocates memory. Watch out. - COM_AddCommand("memfree", Command_Memfree_f, 0); + COM_AddCommand("memfree", Command_Memfree_f, COM_LUA); #ifdef ZDEBUG - COM_AddCommand("memdump", Command_Memdump_f, 0); + COM_AddCommand("memdump", Command_Memdump_f, COM_LUA); #endif }