- wget -O data/maps/g-23.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.cache
- wget -O data/maps/g-23.waypoints.hardwired https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.hardwired
- make
- - EXPECT=0a9ea83e32e148da989cbbadc7421ea0
+ - EXPECT=93decd0a82cf911f02fb5572197db7f3
- HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
int weapon_stats = weapon_accuracy[i - WEP_FIRST];
WepSet set = it.m_wepset;
- if (weapon_stats < 0)
+ if (weapon_stats < 0 && !((weapons_stat & set) || (weapons_inmap & set)))
{
- if (!(weapons_stat & set) && (it.spawnflags & WEP_FLAG_HIDDEN || it.spawnflags & WEP_FLAG_MUTATORBLOCKED))
- nHidden += 1;
- else if (!(weapons_stat & set || weapons_inmap & set))
+ if (((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)))
+ ++nHidden;
+ else
++disownedcnt;
}
});
int weapon_stats = weapon_accuracy[i - WEP_FIRST];
WepSet set = it.m_wepset;
- if (weapon_stats < 0 && !(weapons_stat & set || weapons_inmap & set))
+ if (weapon_stats < 0 && !((weapons_stat & set) || (weapons_inmap & set)))
continue;
float weapon_alpha;
#include <common/triggers/target/music.qh>
#include <common/teams.qh>
+#include <common/weapons/weapon/tuba.qh>
+
#include <common/vehicles/all.qh>
#include <common/weapons/_all.qh>
#include <common/viewloc.qh>
{
static string name_last;
string name = wep.mdl;
+ if(wep == WEP_TUBA)
+ {
+ name = (this.tuba_instrument == 0) ? "tuba" :
+ (this.tuba_instrument == 1) ? "akordeon" :
+ "kleinbottle";
+ }
bool swap = name != name_last;
// if (swap)
{
start_items |= IT_UNLIMITED_SUPERWEAPONS;
}
+MUTATOR_HOOKFUNCTION(mutator_instagib, SetWeaponArena)
+{
+ // turn weapon arena off
+ M_ARGV(0, string) = "off";
+}
+
void replace_with_insta_cells(entity item)
{
entity e = spawn();
start_weapons = warmup_start_weapons = WEPSET(SHOTGUN);
}
+MUTATOR_HOOKFUNCTION(melee_only, SetWeaponArena)
+{
+ // turn weapon arena off
+ M_ARGV(0, string) = "off";
+}
+
MUTATOR_HOOKFUNCTION(melee_only, ForbidThrowCurrentWeapon)
{
return true;
METHOD(NadeOffhand, offhand_think, void(NadeOffhand this, entity player, bool key_pressed))
{
entity held_nade = player.nade;
- if (held_nade)
- {
- player.nade_timer = bound(0, (time - held_nade.nade_time_primed) / autocvar_g_nades_nade_lifetime, 1);
- // LOG_TRACEF("%d %d", player.nade_timer, time - held_nade.nade_time_primed);
- makevectors(player.angles);
- held_nade.velocity = player.velocity;
- setorigin(held_nade, player.origin + player.view_ofs + v_forward * 8 + v_right * -8 + v_up * 0);
- held_nade.angles_y = player.angles.y;
-
- if (time + 0.1 >= held_nade.wait)
- toss_nade(player, false, '0 0 0', time + 0.05);
- }
if (!CanThrowNade(player)) return;
if (!(time > player.nade_refire)) return;
if (player.nade && (player.offhand != OFFHAND_NADE || (player.weapons & WEPSET(HOOK)))) OFFHAND_NADE.offhand_think(OFFHAND_NADE, player, player.nade_altbutton);
+ entity held_nade = player.nade;
+ if (held_nade)
+ {
+ player.nade_timer = bound(0, (time - held_nade.nade_time_primed) / autocvar_g_nades_nade_lifetime, 1);
+ // LOG_TRACEF("%d %d", player.nade_timer, time - held_nade.nade_time_primed);
+ makevectors(player.angles);
+ held_nade.velocity = player.velocity;
+ setorigin(held_nade, player.origin + player.view_ofs + v_forward * 8 + v_right * -8 + v_up * 0);
+ held_nade.angles_y = player.angles.y;
+
+ if (time + 0.1 >= held_nade.wait)
+ toss_nade(player, false, '0 0 0', time + 0.05);
+ }
+
if(IS_PLAYER(player))
{
if ( autocvar_g_nades_bonus && autocvar_g_nades )
start_weapons = warmup_start_weapons = ok_start_items;
}
+MUTATOR_HOOKFUNCTION(ok, SetWeaponArena)
+{
+ // turn weapon arena off
+ M_ARGV(0, string) = "off";
+}
+
MUTATOR_HOOKFUNCTION(ok, BuildMutatorsString)
{
M_ARGV(0, string) = strcat(M_ARGV(0, string), ":OK");
this.colormod = '1 0 0' + '0 1 0' * (2 * h - 0.5);
else
this.colormod = '1 1 1';
-
- CSQCMODEL_AUTOUPDATE(this);
}
void func_breakable_look_destroyed(entity this)
this.effects &= ~EF_NODRAW;
}
- CSQCMODEL_AUTOUPDATE(this);
-
this.solid = SOLID_NOT;
}
if(this.mdl_dead != "") // only do this if we use mdl_dead, to behave better with misc_follow
setorigin(this, this.dropped_origin);
- CSQCMODEL_AUTOUPDATE(this);
-
this.solid = SOLID_BSP;
}
stopsound (this, CH_TRIGGER_SINGLE);
}
+void func_breakable_think(entity this)
+{
+ this.nextthink = time;
+ CSQCMODEL_AUTOUPDATE(this);
+}
+
void func_breakable_destroy(entity this, entity actor, entity trigger);
void func_breakable_behave_restore(entity this)
{
if(this.spawnflags & 4)
this.use = func_breakable_destroy; // don't need to set it usually, as .use isn't reset
this.state = 0;
- this.nextthink = 0; // cancel auto respawn
+ //this.nextthink = 0; // cancel auto respawn
+ setthink(this, func_breakable_think);
+ this.nextthink = time + 0.1;
func_breakable_colormod(this);
if (this.noise1)
_sound (this, CH_TRIGGER_SINGLE, this.noise1, VOL_BASE, ATTEN_NORM);
{
func_breakable_look_destroyed(this);
func_breakable_behave_destroyed(this);
-
- CSQCMODEL_AUTOUPDATE(this);
}
void func_breakable_restore(entity this, entity actor, entity trigger)
{
func_breakable_look_restore(this);
func_breakable_behave_restore(this);
-
- CSQCMODEL_AUTOUPDATE(this);
}
void func_breakable_restore_self(entity this)
if(this.respawntime)
{
+ CSQCMODEL_AUTOUPDATE(this);
setthink(this, func_breakable_restore_self);
this.nextthink = time + this.respawntime + crandom() * this.respawntimejitter;
}
// do not explode NOW but in the NEXT FRAME!
// because recursive calls to RadiusDamage are not allowed
this.nextthink = time;
+ CSQCMODEL_AUTOUPDATE(this);
setthink(this, func_breakable_destroy_self);
}
}
func_breakable_behave_destroyed(this);
else
func_breakable_behave_restore(this);
-
- CSQCMODEL_AUTOUPDATE(this);
}
// destructible walls that can be used to trigger target_objective_decrease
{
// loadable hagar secondary attack, must always run each frame
- if(time < game_starttime || PS(actor).m_switchweapon != WEP_HAGAR)
+ if(time < game_starttime)
return;
bool loaded = actor.hagar_load >= WEP_CVAR_SEC(hagar, load_max);
}
}
+void tuba_instrument_send(entity this, int instr);
METHOD(Tuba, wr_setup, void(Tuba this, entity actor))
{
actor.ammo_field = ammo_none;
actor.tuba_instrument = 0;
+ tuba_instrument_send(actor, actor.tuba_instrument);
}
#endif
string s = (i == 0) ? "tuba" :
(i == 1) ? "akordeon" :
"kleinbottle" ;
+ viewmodel.tuba_instrument = i;
CL_WeaponEntity_SetModel(viewmodel, s, true);
}
#endif
const int TUBA_MAX = 27;
const int TUBA_INSTRUMENTS = 3;
-entityclass(Tuba);
-class(Tuba) .int note;
-class(Tuba) .bool tuba_attenuate;
-class(Tuba) .float tuba_volume;
-class(Tuba) .float tuba_volume_initial;
-class(Tuba) .int tuba_instrument;
-
int Tuba_PitchStep;
void tubasound(entity e, bool restart)
#pragma once
+
+#ifdef CSQC
+entityclass(Tuba);
+class(Tuba) .int note;
+class(Tuba) .bool tuba_attenuate;
+class(Tuba) .float tuba_volume;
+class(Tuba) .float tuba_volume_initial;
+class(Tuba) .int tuba_instrument;
+#endif
#include "rootdialog.qh"
CLASS(XonoticUid2NameDialog, XonoticRootDialog)
METHOD(XonoticUid2NameDialog, fill, void(entity));
- ATTRIB(XonoticUid2NameDialog, title, string);
+ ATTRIB(XonoticUid2NameDialog, title, string, "");
ATTRIB(XonoticUid2NameDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticUid2NameDialog, intendedWidth, float, 0.5);
ATTRIB(XonoticUid2NameDialog, rows, float, 4);
SLIST_CATEGORY(CAT_SERVERS, "CAT_NORMAL", "CAT_SERVERS", CTX(_("SLCAT^Servers"))) \
SLIST_CATEGORY(CAT_XPM, "CAT_NORMAL", "CAT_SERVERS", CTX(_("SLCAT^Competitive Mode"))) \
SLIST_CATEGORY(CAT_MODIFIED, "", "CAT_SERVERS", CTX(_("SLCAT^Modified Servers"))) \
- SLIST_CATEGORY(CAT_OVERKILL, "", "CAT_SERVERS", CTX(_("SLCAT^Overkill Mode"))) \
- SLIST_CATEGORY(CAT_INSTAGIB, "", "CAT_SERVERS", CTX(_("SLCAT^InstaGib Mode"))) \
+ SLIST_CATEGORY(CAT_OVERKILL, "", "CAT_SERVERS", CTX(_("SLCAT^Overkill"))) \
+ SLIST_CATEGORY(CAT_INSTAGIB, "", "CAT_SERVERS", CTX(_("SLCAT^InstaGib"))) \
SLIST_CATEGORY(CAT_DEFRAG, "", "CAT_SERVERS", CTX(_("SLCAT^Defrag Mode")))
#define SLIST_CATEGORY_AUTOCVAR(name) autocvar_menu_slist_categories_##name##_override