#include "waypoints.qh"
-#include <common/weapons/_all.qh>
-#include <common/stats.qh>
-#include <server/items/items.qh>
-#include <server/spawnpoints.qh>
-#include <server/weapons/tracing.qh>
-#include "cvars.qh"
-
-#include "bot.qh"
-#include "navigation.qh"
-
-#include <common/state.qh>
-
-#include "../../antilag.qh"
-
+#include <common/animdecide.qh>
#include <common/constants.qh>
#include <common/debug.qh>
#include <common/gamemodes/_mod.qh>
#include <common/mapobjects/trigger/jumppads.qh>
#include <common/net_linked.qh>
#include <common/physics/player.qh>
-
+#include <common/state.qh>
+#include <common/stats.qh>
+#include <common/weapons/_all.qh>
#include <lib/warpzone/common.qh>
#include <lib/warpzone/util_server.qh>
+#include <server/antilag.qh>
+#include <server/bot/default/bot.qh>
+#include <server/bot/default/cvars.qh>
+#include <server/bot/default/navigation.qh>
+#include <server/items/items.qh>
+#include <server/spawnpoints.qh>
+#include <server/weapons/tracing.qh>
+STATIC_INIT(waypoints)
+{
+ waypointeditor_enabled = autocvar_g_waypointeditor;
+}
.entity spawnpointmodel;
void waypoint_unreachable(entity pl)
{
LOG_INFO("spawn without waypoint: ", etos(it), " ", vtos(it.origin), "\n");
it.spawnpointmodel.effects |= EF_NODEPTHTEST;
_setmodel(it.spawnpointmodel, pl.model);
- it.spawnpointmodel.frame = pl.frame;
+ it.spawnpointmodel.frame = ANIM_idle.m_id;
it.spawnpointmodel.skin = pl.skin;
- it.spawnpointmodel.colormap = pl.colormap;
- it.spawnpointmodel.colormod = pl.colormod;
- it.spawnpointmodel.glowmod = pl.glowmod;
+ it.spawnpointmodel.colormap = 1024 + 68;
+ it.spawnpointmodel.glowmod = '1 0 0';
+ it.spawnpointmodel.angles = it.angles;
setsize(it.spawnpointmodel, PL_MIN_CONST, PL_MAX_CONST);
j++;
}
void waypoint_setupmodel(entity wp)
{
- if (autocvar_g_waypointeditor)
+ if (waypointeditor_enabled)
{
// TODO: add some sort of visible box in edit mode for box waypoints
vector m1 = wp.mins;
e = it; break;
});
if (!e)
- e = waypoint_spawn(jp.absmin - PL_MAX_CONST + '1 1 1', jp.absmax - PL_MIN_CONST + '-1 -1 -1', WAYPOINTFLAG_TELEPORT);
+ e = waypoint_spawn(jp.absmin - PL_MAX_CONST, jp.absmax - PL_MIN_CONST, WAYPOINTFLAG_TELEPORT);
if (!pl.wp_locked)
pl.wp_locked = e;
}
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)
+ if (waypointeditor_enabled && autocvar_g_waypointeditor_symmetrical_allowload)
{
string sym_str = "";
cvar_set("g_waypointeditor_symmetrical", ftos(sym));
void waypoint_spawnforteleporter(entity e, vector destination, float timetaken, entity tracetest_ent)
{
destination = waypoint_fixorigin(destination, tracetest_ent);
- waypoint_spawnforteleporter_boxes(e, WAYPOINTFLAG_TELEPORT, e.absmin - PL_MAX_CONST + '1 1 1', e.absmax - PL_MIN_CONST + '-1 -1 -1', destination, destination, timetaken);
+ waypoint_spawnforteleporter_boxes(e, WAYPOINTFLAG_TELEPORT, e.absmin - PL_MAX_CONST, e.absmax - PL_MIN_CONST, destination, destination, timetaken);
}
entity waypoint_spawnpersonal(entity this, vector position)