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
in many places, you had to have certain files in certain folders
autoreset / api key / ihud images / tas folder in Portal 2
crosshairs in portal2
cfgs wouldnt autocomplete from p2common
etc
now you can put anything anywhere and it just works ™️
if a feature tries to read a file it can do it from any search path
and if it writes it will first try to overwrite an existing
e.g.
CON_COMMAND_F_COMPLETION(ghost_set_demo, "ghost_set_demo <demo> [ID] - ghost will use this demo. If ID is specified, will create or modify the ID-th ghost\n", 0, AUTOCOMPLETION_FUNCTION(ghost_set_demo)) {
sf::Uint32 ID = args.ArgC() > 2 ? std::atoi(args[2]) : 0;
209
210
demoGhostPlayer.DeleteGhostsByID(ID);
210
-
if (demoGhostPlayer.SetupGhostFromDemo(engine->GetGameDirectory() + std::string("/") + args[1], ID, false)) {
211
+
auto filepath = fileSystem->FindFileSomewhere(args[1]).value_or(engine->GetGameDirectory() + std::string("/") + args[1]);
212
+
if (demoGhostPlayer.SetupGhostFromDemo(filepath, ID, false)) {
211
213
console->Print("Ghost successfully created! Final time of the ghost: %s\n", SpeedrunTimer::Format(demoGhostPlayer.GetGhostByID(ID)->GetTotalTime()).c_str());
212
214
} else {
213
-
console->Print("Could not parse \"%s\"!\n", (engine->GetGameDirectory() + std::string("/") + args[1]).c_str());
215
+
console->Print("Could not parse \"%s\"!\n", args[1]);
CON_COMMAND_F_COMPLETION(sar_time_demo, "sar_time_demo <demo_name> - parses a demo and prints some information about it\n", 0, AUTOCOMPLETION_FUNCTION(sar_time_demo)) {
0 commit comments