void waypoint_spawn_fromeditor(entity pl, bool at_crosshair, bool is_jump_wp)
{
+ if (WAYPOINT_VERSION < waypoint_version_loaded)
+ {
+ LOG_INFOF("^1Editing waypoints with a higher version number (%f) is not allowed.\n"
+ "Update Xonotic to make them editable.", waypoint_version_loaded);
+ return;
+ }
+
entity e = NULL, jp = NULL;
vector org = pl.origin;
if (at_crosshair)
void waypoint_remove_fromeditor(entity pl)
{
+ if (WAYPOINT_VERSION < waypoint_version_loaded)
+ {
+ LOG_INFOF("^1Editing waypoints with a higher version number (%f) is not allowed.\n"
+ "Update Xonotic to make them editable.", waypoint_version_loaded);
+ return;
+ }
+
entity e = navigation_findnearestwaypoint(pl, false);
int ctf_flags = havocbot_symmetry_origin_order;
// save waypoints to gamedir/data/maps/mapname.waypoints
void waypoint_saveall()
{
+ if (WAYPOINT_VERSION < waypoint_version_loaded)
+ {
+ LOG_INFOF("^1Overwriting waypoints with a higher version number (%f) is not allowed.\n"
+ "Update Xonotic to make them editable.", waypoint_version_loaded);
+ return;
+ }
string gt_ext = GET_GAMETYPE_EXTENSION();
string filename = sprintf("maps/%s.waypoints", strcat(mapname, gt_ext));
botframe_loadedforcedlinks = false;
+ waypoint_version_loaded = WAYPOINT_VERSION;
LOG_INFOF("saved %d waypoints to %s", c, filename);
}
cwb = cwb + 1;
}
fclose(file);
+ waypoint_version_loaded = ver;
LOG_TRACE("loaded ", ftos(cwp), " waypoints and ", ftos(cwb), " wayboxes from maps/", mapname, ".waypoints");
if (autocvar_g_waypointeditor && autocvar_g_waypointeditor_symmetrical_allowload)
LOG_INFO(strcat("g_waypointeditor_symmetrical", " has been set to ", cvar_string("g_waypointeditor_symmetrical")));
}
+ if (WAYPOINT_VERSION < waypoint_version_loaded)
+ LOG_INFOF("^1Editing waypoints with a higher version number (%f) is not allowed.\n"
+ "Update Xonotic to make them editable.", waypoint_version_loaded);
+
return cwp + cwb;
}
// increase by 0.01 when changes require only waypoint relinking
// increase by 1 when changes require to manually edit waypoints
// max 2 decimal places, always specified
-const float WAYPOINT_VERSION = 1.02;
+const float WAYPOINT_VERSION = 1.03;
+float waypoint_version_loaded;
string waypoint_time;
// fields you can query using prvm_global server to get some statistics about waypoint linking culling