You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- edt file is now parsed only once per map load, this should improve perf
- ability to create default map config on missing edt
- added convar sourcecoop_default_config, sourcecoop_default_config_dest
- added command sc_mkconfigs
Copy file name to clipboardExpand all lines: scripting/srccoop.sp
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -211,6 +211,8 @@ public void OnPluginStart()
211
211
g_pConvarHomeMap=CreateConVar("sourcecoop_homemap", "", "The map to return to after finishing a campaign/map.");
212
212
g_pConvarEndWaitDisplayMode=CreateConVar("sourcecoop_end_wait_display_mode", "1", "Sets which method to show countdown. 0 is panel, 1 is hud text.", _, true, 0.0, true, 1.0);
213
213
g_pConvarValidateSteamIds=CreateConVar("sourcecoop_validate_steamids", "0", "Validate players steam id's? Increases security at the cost of some functionality breakage when Steam goes down.\n At the time of writing this includes survival mode and equipment persistence.", _, true, 0.0, true, 1.0);
214
+
g_pConvarDefaultMapConfig=CreateConVar("sourcecoop_default_config", "", "Default edt file, relative to game folder. This file is copied when starting a map with missing config as \"<sourcecoop_default_config_dest>/<mapname>.edt\". Useful for rapid development, or to enforce sourcecoop on all maps on the server.");
215
+
g_pConvarDefaultMapConfigDest=CreateConVar("sourcecoop_default_config_dest", "maps", "Destination folder for \"sourcecoop_default_config\", relative to game folder. Should be a one of edt scan paths!");
214
216
215
217
mp_friendlyfire=FindConVar("mp_friendlyfire");
216
218
mp_flashlight=FindConVar("mp_flashlight");
@@ -220,6 +222,7 @@ public void OnPluginStart()
220
222
RegAdminCmd("sc_ft", Command_SetFeature, ADMFLAG_ROOT, "Command for toggling plugin features on/off");
221
223
RegServerCmd("sourcecoop_dump", Command_DumpMapEntities, "Command for dumping map entities to a file");
222
224
RegServerCmd("sc_dump", Command_DumpMapEntities, "Command for dumping map entities to a file");
225
+
RegServerCmd("sc_mkconfigs", Command_MakeConfigs, "Creates default edt configs for all maps in the maps directory which are missing one");
0 commit comments