- wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
- wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
- make
- - EXPECT=d5bda479d65190330f6ee23c6f9aa5e7
+ - EXPECT=6535600492e1cb63af8e449570bffe4a
- HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
set g_ctf_flag_neutral_skin 4
set g_ctf_flag_glowtrails 1
set g_ctf_fullbrightflags 0
-set g_ctf_dynamiclights 0
+set g_ctf_dynamiclights 0 "flags (not flag carriers) cast light of their team's colour"
set g_ctf_ignore_frags 0 "1: regular frags give no points"
exec ctfscoring-samual.cfg
bool autocvar_g_instagib_ammo_convert_rockets;
bool autocvar_g_instagib_ammo_convert_shells;
bool autocvar_g_instagib_ammo_convert_bullets;
-int autocvar_g_instagib_extralives;
float autocvar_g_instagib_speed_highspeed;
IntrusiveList g_instagib_items;
#include "items.qh"
float autocvar_g_instagib_invis_alpha;
+int autocvar_g_instagib_extralives;
void instagib_invisibility(entity this);
void instagib_extralife(entity this);
ent.ammo_max *= ent.turret_scale_ammo;
ent.ammo_recharge *= ent.turret_scale_ammo;
ent.aim_speed *= ent.turret_scale_aim;
- ent.health *= ent.turret_scale_health;
+ SetResourceExplicit(ent, RES_HEALTH, GetResource(ent, RES_HEALTH) * ent.turret_scale_health);
ent.respawntime *= ent.turret_scale_respawn;
ent.shot_dmg *= ent.turret_scale_damage;
ent.shot_refire *= ent.turret_scale_refire;
set_movetype(player, MOVETYPE_WALK);
player.effects &= ~EF_NODRAW;
player.teleportable = TELEPORT_NORMAL;
- player.alpha = 1;
+ player.alpha = default_player_alpha;
player.PlayerPhysplug = func_null;
player.vehicle = NULL;
player.view_ofs = STAT(PL_VIEW_OFS, player);
#include "bumblebee.qh"
+#ifdef GAMEQC
+
+#ifdef SVQC
+ #include <common/mutators/mutator/instagib/sv_instagib.qh>
+#endif
+
const float BRG_SETUP = 2;
const float BRG_START = 4;
const float BRG_END = 8;
}
else if(IS_CLIENT(trace_ent))
{
- if(GetResource(trace_ent, RES_ARMOR) <= autocvar_g_vehicle_bumblebee_healgun_amax && autocvar_g_vehicle_bumblebee_healgun_aps)
- GiveResourceWithLimit(trace_ent, RES_ARMOR, autocvar_g_vehicle_bumblebee_healgun_aps * dt, autocvar_g_vehicle_bumblebee_healgun_amax);
+ float maxarmor = ((MUTATOR_IS_ENABLED(mutator_instagib)) ? autocvar_g_instagib_extralives : autocvar_g_vehicle_bumblebee_healgun_amax);
+ if(GetResource(trace_ent, RES_ARMOR) <= maxarmor && autocvar_g_vehicle_bumblebee_healgun_aps)
+ GiveResourceWithLimit(trace_ent, RES_ARMOR, autocvar_g_vehicle_bumblebee_healgun_aps * dt, maxarmor);
}
}
}
}
#endif
+
+#endif
#include "racer.qh"
+#ifdef GAMEQC
+
#ifdef SVQC
#include <common/mapobjects/trigger/impulse.qh>
.float racer_watertime;
-var vector racer_force_from_tag(entity this, string tag_name, float spring_length, float max_power);
+var .vector(entity this, string tag_name, float spring_length, float max_power) racer_force_from_tag;
-void racer_align4point(entity this, float _delta)
+void racer_align4point(entity this, entity player, float _delta)
{
vector push_vector;
float fl_push, fr_push, bl_push, br_push;
- push_vector = racer_force_from_tag(this, "tag_engine_fr", autocvar_g_vehicle_racer_springlength, autocvar_g_vehicle_racer_hoverpower);
+ push_vector = this.racer_force_from_tag(this, "tag_engine_fr", autocvar_g_vehicle_racer_springlength, autocvar_g_vehicle_racer_hoverpower);
fr_push = force_fromtag_normpower;
//vehicles_sweap_collision(force_fromtag_origin, this.velocity, _delta, v_add, autocvar_g_vehicle_racer_collision_multiplier);
- push_vector += racer_force_from_tag(this, "tag_engine_fl", autocvar_g_vehicle_racer_springlength, autocvar_g_vehicle_racer_hoverpower);
+ push_vector += this.racer_force_from_tag(this, "tag_engine_fl", autocvar_g_vehicle_racer_springlength, autocvar_g_vehicle_racer_hoverpower);
fl_push = force_fromtag_normpower;
//vehicles_sweap_collision(force_fromtag_origin, this.velocity, _delta, v_add, autocvar_g_vehicle_racer_collision_multiplier);
- push_vector += racer_force_from_tag(this, "tag_engine_br", autocvar_g_vehicle_racer_springlength, autocvar_g_vehicle_racer_hoverpower);
+ push_vector += this.racer_force_from_tag(this, "tag_engine_br", autocvar_g_vehicle_racer_springlength, autocvar_g_vehicle_racer_hoverpower);
br_push = force_fromtag_normpower;
//vehicles_sweap_collision(force_fromtag_origin, this.velocity, _delta, v_add, autocvar_g_vehicle_racer_collision_multiplier);
- push_vector += racer_force_from_tag(this, "tag_engine_bl", autocvar_g_vehicle_racer_springlength, autocvar_g_vehicle_racer_hoverpower);
+ push_vector += this.racer_force_from_tag(this, "tag_engine_bl", autocvar_g_vehicle_racer_springlength, autocvar_g_vehicle_racer_hoverpower);
bl_push = force_fromtag_normpower;
//vehicles_sweap_collision(force_fromtag_origin, this.velocity, _delta, v_add, autocvar_g_vehicle_racer_collision_multiplier);
{
uforce = autocvar_g_vehicle_racer_water_upforcedamper;
- if(PHYS_INPUT_BUTTON_CROUCH(this.owner) && time < this.air_finished)
+ if(PHYS_INPUT_BUTTON_CROUCH(player) && time < this.air_finished)
this.velocity_z += 30;
else
this.velocity_z += 200;
return;
}
- racer_align4point(vehic, dt);
+ racer_align4point(vehic, player, dt);
PHYS_INPUT_BUTTON_ZOOM(player) = PHYS_INPUT_BUTTON_CROUCH(player) = false;
void racer_think(entity this)
{
- this.nextthink = time + autocvar_g_vehicle_racer_thinkrate;
+ float dt = autocvar_g_vehicle_racer_thinkrate;
+
+ this.nextthink = time + dt;
tracebox(this.origin, this.mins, this.maxs, this.origin - ('0 0 1' * autocvar_g_vehicle_racer_springlength), MOVE_NOMONSTERS, this);
this.velocity_z += 200;
}
- this.velocity += df * autocvar_g_vehicle_racer_thinkrate;
+ this.velocity += df * dt;
if(this.velocity_z > 0)
- this.velocity_z *= 1 - forced * autocvar_g_vehicle_racer_thinkrate;
+ this.velocity_z *= 1 - forced * dt;
- this.angles_x *= 1 - (autocvar_g_vehicle_racer_anglestabilizer * autocvar_g_vehicle_racer_thinkrate);
- this.angles_z *= 1 - (autocvar_g_vehicle_racer_anglestabilizer * autocvar_g_vehicle_racer_thinkrate);
+ this.angles_x *= 1 - (autocvar_g_vehicle_racer_anglestabilizer * dt);
+ this.angles_z *= 1 - (autocvar_g_vehicle_racer_anglestabilizer * dt);
CSQCMODEL_AUTOUPDATE(this);
}
if(time >= this.delay)
racer_blowup(this);
- CSQCMODEL_AUTOUPDATE(this);
+ //CSQCMODEL_AUTOUPDATE(this);
}
void racer_deadtouch(entity this, entity toucher)
METHOD(Racer, vr_enter, void(Racer thisveh, entity instance))
{
-#ifdef SVQC
set_movetype(instance, MOVETYPE_BOUNCE);
+#ifdef SVQC
instance.owner.vehicle_health = (GetResource(instance, RES_HEALTH) / autocvar_g_vehicle_racer_health) * 100;
instance.owner.vehicle_shield = (instance.vehicle_shield / autocvar_g_vehicle_racer_shield) * 100;
if(instance.owner.flagcarried)
setorigin(instance.owner.flagcarried, '-190 0 96');
-#elif defined(CSQC)
- set_movetype(instance, MOVETYPE_BOUNCE);
#endif
}
METHOD(Racer, vr_spawn, void(Racer thisveh, entity instance))
{
#ifdef SVQC
- if(instance.scale != 0.5)
- {
- if(autocvar_g_vehicle_racer_hovertype != 0)
- racer_force_from_tag = vehicles_force_fromtag_maglev;
- else
- racer_force_from_tag = vehicles_force_fromtag_hover;
-
- // FIXME: this be hakkz, fix the models insted (scale body, add tag_viewport to the hudmodel).
- instance.scale = 0.5;
- setattachment(instance.vehicle_hudmodel, instance, "");
- setattachment(instance.vehicle_viewport, instance, "tag_viewport");
-
- instance.mass = 900;
- }
+ if(autocvar_g_vehicle_racer_hovertype != 0)
+ instance.racer_force_from_tag = vehicles_force_fromtag_maglev;
+ else
+ instance.racer_force_from_tag = vehicles_force_fromtag_hover;
setthink(instance, racer_think);
instance.nextthink = time;
set_movetype(instance, MOVETYPE_TOSS);
instance.solid = SOLID_SLIDEBOX;
instance.delay = time;
- instance.scale = 0.5;
+ instance.scale = 0.5; // FIXME: this be hakkz, fix the models insted (scale body, add tag_viewport to the hudmodel).
+ instance.mass = 900;
+
+ setattachment(instance.vehicle_hudmodel, instance, "");
+ setattachment(instance.vehicle_viewport, instance, "tag_viewport");
instance.PlayerPhysplug = racer_frame;
instance.vehicle_exit = racer_exit;
// we have no need to network energy
- if(autocvar_g_vehicle_racer_energy)
- if(autocvar_g_vehicle_racer_energy_regen)
+ if(autocvar_g_vehicle_racer_energy && autocvar_g_vehicle_racer_energy_regen)
instance.vehicle_flags |= VHF_ENERGYREGEN;
if(autocvar_g_vehicle_racer_shield)
AuxiliaryXhair[0].axh_image = vCROSS_LOCK; // Rocket
#endif
}
+
+#endif
#include "raptor.qh"
+#ifdef GAMEQC
+
#ifdef SVQC
bool autocvar_g_vehicle_raptor = true;
}
#endif
+
+#endif
#include "spiderbot.qh"
+#ifdef GAMEQC
+
const int SBRM_FIRST = 1;
const int SBRM_VOLLY = 1;
const int SBRM_GUIDE = 2;
}
#endif
+
+#endif
string autocvar_sv_eventlog_files_nameprefix;
string autocvar_sv_eventlog_files_namesuffix;
bool autocvar_sv_eventlog_files_timestamps;
+bool autocvar_sv_eventlog_ipv6_delimiter = false;
float autocvar_sv_friction_on_land;
var float autocvar_sv_friction_slick = 0.5;
float autocvar_sv_gameplayfix_q2airaccelerate = 1;
return s;
}
-bool autocvar_sv_qcphysics = false; // TODO this is for testing - remove when qcphysics work
+bool autocvar_sv_qcphysics = true; // TODO this is for testing - remove when qcphysics work
/**
=============
CS(this).allowed_timeouts = autocvar_sv_timeout_number;
if (autocvar_sv_eventlog)
- GameLogEcho(strcat(":join:", ftos(this.playerid), ":", ftos(etof(this)), ":", ((IS_REAL_CLIENT(this)) ? this.netaddress : "bot"), ":", playername(this, false)));
+ GameLogEcho(strcat(":join:", ftos(this.playerid), ":", ftos(etof(this)), ":", ((IS_REAL_CLIENT(this)) ? GameLog_ProcessIP(this.netaddress) : "bot"), ":", playername(this, false)));
CS(this).just_joined = true; // stop spamming the eventlog with additional lines when the client connects
BADCVAR("g_ca_point_limit");
BADCVAR("g_ctf_captimerecord_always");
BADCVAR("g_ctf_flag_glowtrails");
+ BADCVAR("g_ctf_dynamiclights");
BADCVAR("g_ctf_flag_pickup_verbosename");
BADCVAR("g_domination_point_leadlimit");
BADCVAR("g_forced_respawn");
BADCVAR("g_ca_weaponarena");
BADCVAR("g_freezetag_weaponarena");
BADCVAR("g_lms_weaponarena");
+ BADCVAR("g_ctf_stalemate_time");
if(cvar_string("g_mod_balance") == "Testing")
{
if(this.spawnflags & SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS)
bot_waypoints_for_items = 0;
- precache();
-
WaypointSprite_Init();
GameLogInit(); // prepare everything
MapVote_Start();
}
-/*
-============
-FindIntermission
-
-Returns the entity to view from
-============
-*/
-/*
-entity FindIntermission()
-{
- local entity spot;
- local float cyc;
-
-// look for info_intermission first
- spot = find(NULL, classname, "info_intermission");
- if (spot)
- { // pick a random one
- cyc = random() * 4;
- while (cyc > 1)
- {
- spot = find(spot, classname, "info_intermission");
- if (!spot)
- spot = find(spot, classname, "info_intermission");
- cyc = cyc - 1;
- }
- return spot;
- }
-
-// then look for the start position
- spot = find(NULL, classname, "info_player_start");
- if (spot)
- return spot;
-
-// testinfo_player_start is only found in regioned levels
- spot = find(NULL, classname, "testplayerstart");
- if (spot)
- return spot;
-
-// then look for the start position
- spot = find(NULL, classname, "info_player_deathmatch");
- if (spot)
- return spot;
-
- //objerror ("FindIntermission: no spot");
- return NULL;
-}
-*/
-
/*
===============================================================================
if (server_is_dedicated) print(input);
}
+string GameLog_ProcessIP(string s)
+{
+ if(!autocvar_sv_eventlog_ipv6_delimiter)
+ return s;
+ return strreplace(":", "_", s);
+}
+
void GameLogEcho(string s)
{
string fn;
FOREACH_WORD(s, true, { precache_playermodel(it); });
}
-void precache()
+PRECACHE(PlayerModels)
{
- // gamemode related things
-
// Precache all player models if desired
if (autocvar_sv_precacheplayermodels)
{
precache_playermodels(autocvar_sv_defaultplayermodel_pink);
precache_playermodels(autocvar_sv_defaultplayermodel);
}
-
-#if 0
- // Disabled this code because it simply does not work (e.g. ignores bgmvolume, overlaps with "cd loop" controlled tracks).
-
- if (!this.noise && this.music) // quake 3 uses the music field
- this.noise = this.music;
-
- // plays music for the level if there is any
- if (this.noise)
- {
- precache_sound (this.noise);
- ambientsound ('0 0 0', this.noise, VOL_BASE, ATTEN_NONE);
- }
-#endif
}
/** print(), but only print if the server is not local */
void dedicated_print(string input);
+string GameLog_ProcessIP(string s);
+
void GameLogEcho(string s);
void GameLogInit();
string playername(entity p, bool team_colorize);
-void precache();
-
void remove_safely(entity e);
void remove_unsafely(entity e);
float PlayerEdgeDistance(entity p, vector v)
{
- vector vbest;
-
- if(v.x < 0) vbest.x = p.mins.x; else vbest.x = p.maxs.x;
- if(v.y < 0) vbest.y = p.mins.y; else vbest.y = p.maxs.y;
- if(v.z < 0) vbest.z = p.mins.z; else vbest.z = p.maxs.z;
+ vector vbest = vec3(
+ ((v.x < 0) ? p.mins.x : p.maxs.x),
+ ((v.y < 0) ? p.mins.y : p.maxs.y),
+ ((v.z < 0) ? p.mins.z : p.maxs.z));
return vbest * v;
}
set sv_eventlog_files_counter 0 "internal counter cvar, do not modify"
set sv_eventlog_files_nameprefix xonotic "prefix of individual log file names"
set sv_eventlog_files_namesuffix .log "suffix of individual log file names"
+set sv_eventlog_ipv6_delimiter 0 "use a _ delimiter for IPV6 IPs, so that they can be easily detected in scripts"
set nextmap "" "override the maplist when switching to the next map"
set lastlevel "" "for singleplayer use, shows the menu once the match has ended"