- 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=ae8189deefd88a6f2f8c22b0da186691
+ - EXPECT=662ab75eeb91d25c2d86ebb81ce8dc02
- HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
r_shadow_realtime_world_importlightentitiesfrommap 0 // Whether build process uses keepLights is nontransparent and may change, so better make keepLights not matter.
cl_decals_fadetime 5
cl_decals_time 1
-seta cl_gunalign 3 "Gun alignment; 1 = center (if allowed by g_shootfromclient) or right, 2 = center (if allowed by g_shootfromclient) or left, 3 = right only, 4 = left only"
+seta cl_gunalign 3 "Gun alignment; 1 = center, 3 = right, 4 = left; requires reconnect"
seta cl_nogibs 0 "reduce number of violence effects, or remove them totally"
seta cl_particlegibs 0 "simpler gibs"
seta cl_gibs_damageforcescale 3.5 "force to push around gibs"
//float lastpnum;
void Scoreboard_UpdatePlayerTeams()
{
- float Team;
entity pl, tmp;
//int num = 0;
for(pl = players.sort_next; pl; pl = pl.sort_next)
{
//num += 1;
- Team = entcs_GetScoreTeam(pl.sv_entnum);
+ int Team = entcs_GetScoreTeam(pl.sv_entnum);
if(SetTeam(pl, Team))
{
tmp = pl.sort_prev;
GetTeam(NUM_SPECTATOR, true); // add specs first
+ for (int w = 0; w <= WEP_LAST - WEP_FIRST; ++w)
+ weapon_accuracy[w] = -1;
+
// precaches
if(autocvar_cl_reticle)
int f = ReadByte();
- scoreboard_showscores_force = (f & 1);
+ scoreboard_showscores_force = (f & BIT(0));
- if(f & 2)
+ if(f & BIT(1))
{
newspectatee_status = ReadByte();
if(newspectatee_status == player_localnum + 1)
else
newspectatee_status = 0;
- spectatorbutton_zoom = (f & 4);
+ spectatorbutton_zoom = (f & BIT(2));
- if(f & 16)
+ if(f & BIT(4))
{
num_spectators = ReadByte();
//if(invincible) { e.spawnflags |= MONSTERFLAG_INVINCIBLE; }
setorigin(e, orig);
+ bool allow_any = boolean(monster == "anyrandom");
- if(monster == "random")
+ if(monster == "random" || allow_any)
{
RandomSelection_Init();
- FOREACH(Monsters, it != MON_Null && !(it.spawnflags & MONSTER_TYPE_PASSIVE) && !(it.spawnflags & MON_FLAG_HIDDEN),
+ FOREACH(Monsters, it != MON_Null && (allow_any || (!(it.spawnflags & MONSTER_TYPE_PASSIVE) && !(it.spawnflags & MON_FLAG_HIDDEN))),
{
RandomSelection_AddEnt(it, 1, 1);
});
#include "sv_damagetext.qh"
-AUTOCVAR(sv_damagetext, int, 2, "<= 0: disabled, >= 1: spectators, >= 2: players, >= 3: all players");
+AUTOCVAR(sv_damagetext, int, 2, "<= 0: disabled, >= 1: visible to spectators, >= 2: visible to attacker, >= 3: all players see everyone's damage");
REGISTER_MUTATOR(damagetext, true);
-#define SV_DAMAGETEXT_DISABLED() (autocvar_sv_damagetext <= 0 /* disabled */)
-#define SV_DAMAGETEXT_SPECTATORS_ONLY() (autocvar_sv_damagetext >= 1 /* spectators only */)
-#define SV_DAMAGETEXT_PLAYERS() (autocvar_sv_damagetext >= 2 /* players */)
-#define SV_DAMAGETEXT_ALL() (autocvar_sv_damagetext >= 3 /* all players */)
+#define SV_DAMAGETEXT_DISABLED() (autocvar_sv_damagetext <= 0 || autocvar_g_instagib)
+#define SV_DAMAGETEXT_SPECTATORS_ONLY() (autocvar_sv_damagetext >= 1)
+#define SV_DAMAGETEXT_PLAYERS() (autocvar_sv_damagetext >= 2)
+#define SV_DAMAGETEXT_ALL() (autocvar_sv_damagetext >= 3)
MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) {
if (SV_DAMAGETEXT_DISABLED()) return;
const entity attacker = M_ARGV(0, entity);
M_ARGV(0, string) = strcat(M_ARGV(0, string), ":Nades");
}
-MUTATOR_HOOKFUNCTION(nades, BuildMutatorsPrettyString)
-{
- M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Nades");
-}
-
MUTATOR_HOOKFUNCTION(nades, BuildGameplayTipsString)
{
M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3nades^8 are enabled, press 'g' to use them\n");
const int WEP_TYPE_MELEE_SEC = 0x800; // secondary attack is melee swing (for animation)
const int WEP_FLAG_DUALWIELD = 0x1000; // weapon can be dual wielded
const int WEP_FLAG_NODUAL = 0x2000; // weapon doesn't work well with dual wielding (fireball etc just explode on fire), doesn't currently prevent anything
+const int WEP_FLAG_PENETRATEWALLS = 0x4000; // weapon has high calibur bullets that can penetrate thick walls (WEAPONTODO)
// variables:
string weaponorder_byid;
CLASS(Rifle, Weapon)
/* ammotype */ ATTRIB(Rifle, ammo_field, .int, ammo_nails);
/* impulse */ ATTRIB(Rifle, impulse, int, 7);
-/* flags */ ATTRIB(Rifle, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
+/* flags */ ATTRIB(Rifle, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS);
/* rating */ ATTRIB(Rifle, bot_pickupbasevalue, float, 7000);
/* color */ ATTRIB(Rifle, wpcolor, vector, '0.5 1 0');
/* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle");
//dprint("e ", vtos(diffang), " < ", ftos(maxfiredeviation), "\n");
// decide whether to fire this time
- if ((normalize(v) * shotdir) >= cos(maxfiredeviation * DEG2RAD))
+ if (v * shotdir >= cos(maxfiredeviation * DEG2RAD))
if(vdist(trace_endpos-shotorg, <, 500 + 500 * bound(0, skill + this.bot_aggresskill, 10)) || random()*random()>bound(0,(skill+this.bot_aggresskill)*0.05,1))
this.bot_firetimer = time + bound(0.1, 0.5-(skill+this.bot_aggresskill)*0.05, 0.5);
//traceline(shotorg,shotorg+shotdir*1000,false,NULL);
// only add one bot per frame to avoid utter chaos
if(time > botframe_nextthink)
{
- //dprint(ftos(bots), " ? ", ftos(currentbots), "\n");
- while (currentbots < bots)
+ if (currentbots < bots)
{
if (bot_spawn() == NULL)
{
if (IS_SPEC(e)) e = e.enemy;
sf = 0;
- if (CS(e).race_completed) sf |= 1; // forced scoreboard
- if (CS(to).spectatee_status) sf |= 2; // spectator ent number follows
- if (CS(e).zoomstate) sf |= 4; // zoomed
- if (autocvar_sv_showspectators) sf |= 16; // show spectators
+ if (CS(e).race_completed) sf |= BIT(0); // forced scoreboard
+ if (CS(to).spectatee_status) sf |= BIT(1); // spectator ent number follows
+ if (CS(e).zoomstate) sf |= BIT(2); // zoomed
+ if (autocvar_sv_showspectators) sf |= BIT(4); // show spectators
WriteHeader(MSG_ENTITY, ENT_CLIENT_CLIENTDATA);
WriteByte(MSG_ENTITY, sf);
- if (sf & 2)
- {
+ if (sf & BIT(1))
WriteByte(MSG_ENTITY, CS(to).spectatee_status);
- }
- if(sf & 16)
+ if(sf & BIT(4))
{
float specs = CountSpectators(e, to);
WriteByte(MSG_ENTITY, specs);
this.takedamage = DAMAGE_NO;
this.event_damage = func_null;
+ MUTATOR_CALLHOOK(PrepareExplosionByDamage, this, attacker);
+
if(IS_CLIENT(attacker) && !autocvar_g_projectiles_keep_owner)
{
this.owner = attacker;
this.realowner = attacker;
}
- MUTATOR_CALLHOOK(PrepareExplosionByDamage, this, attacker);
-
// do not explode NOW but in the NEXT FRAME!
// because recursive calls to RadiusDamage are not allowed
this.nextthink = time;
float oldsolid = ent.dphitcontentsmask;
if(!IS_CLIENT(ent))
antilag = false; // no antilag for non-clients!
- if (IS_PLAYER(ent) && (ent.(weaponentity).m_weapon == WEP_RIFLE || ent.(weaponentity).m_weapon == WEP_MACHINEGUN))
+ if (IS_PLAYER(ent) && (ent.(weaponentity).m_weapon.spawnflags & WEP_FLAG_PENETRATEWALLS))
ent.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
else
ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
{
dpnoshadow
deformVertexes autosprite
- dppolygonoffset -6000
{
map "models/ok_nade_counter/ok_nade_counter_01"
blendfunc add
{
dpnoshadow
deformVertexes autosprite
- dppolygonoffset -6000
{
map "models/ok_nade_counter/ok_nade_counter_02"
blendfunc add
{
dpnoshadow
deformVertexes autosprite
- dppolygonoffset -6000
{
map "models/ok_nade_counter/ok_nade_counter_03"
blendfunc add
{
dpnoshadow
deformVertexes autosprite
- dppolygonoffset -6000
{
map "models/ok_nade_counter/ok_nade_counter_04"
blendfunc add
{
dpnoshadow
deformVertexes autosprite
- dppolygonoffset -6000
{
map "models/ok_nade_counter/ok_nade_counter_05"
blendfunc add
{
dpnoshadow
deformVertexes autosprite
- dppolygonoffset -6000
{
map "models/ok_nade_counter/ok_nade_counter_06"
blendfunc add
{
dpnoshadow
deformVertexes autosprite
- dppolygonoffset -6000
{
map "models/ok_nade_counter/ok_nade_counter_07"
blendfunc add
{
dpnoshadow
deformVertexes autosprite
- dppolygonoffset -6000
{
map "models/ok_nade_counter/ok_nade_counter_08"
blendfunc add
{
dpnoshadow
deformVertexes autosprite
- dppolygonoffset -6000
{
map "models/ok_nade_counter/ok_nade_counter_09"
blendfunc add
}
-}
\ No newline at end of file
+}