set g_balance_tuba_attenuation 0.5
set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
-set g_balance_tuba_fadetime 0.25
set g_balance_tuba_force 40
-set g_balance_tuba_pitchstep 6
set g_balance_tuba_radius 200
set g_balance_tuba_refire 0.05
set g_balance_tuba_switchdelay_drop 0.2
set g_balance_tuba_switchdelay_raise 0.2
-set g_balance_tuba_volume 1
set g_balance_tuba_weaponreplace ""
set g_balance_tuba_weaponstart 0
set g_balance_tuba_weaponstartoverride -1
set g_balance_tuba_attenuation 0.5
set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
-set g_balance_tuba_fadetime 0.25
set g_balance_tuba_force 40
-set g_balance_tuba_pitchstep 6
set g_balance_tuba_radius 200
set g_balance_tuba_refire 0.05
set g_balance_tuba_switchdelay_drop 0.15
set g_balance_tuba_switchdelay_raise 0.15
-set g_balance_tuba_volume 1
set g_balance_tuba_weaponreplace ""
set g_balance_tuba_weaponstart 0
set g_balance_tuba_weaponstartoverride -1
set g_balance_tuba_attenuation 0.5
set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
-set g_balance_tuba_fadetime 0.25
set g_balance_tuba_force 40
-set g_balance_tuba_pitchstep 6
set g_balance_tuba_radius 200
set g_balance_tuba_refire 0.05
set g_balance_tuba_switchdelay_drop 0.2
set g_balance_tuba_switchdelay_raise 0.2
-set g_balance_tuba_volume 1
set g_balance_tuba_weaponreplace ""
set g_balance_tuba_weaponstart 0
set g_balance_tuba_weaponstartoverride -1
set g_balance_tuba_attenuation 0.5
set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
-set g_balance_tuba_fadetime 0.25
set g_balance_tuba_force 40
-set g_balance_tuba_pitchstep 6
set g_balance_tuba_radius 200
set g_balance_tuba_refire 0.05
set g_balance_tuba_switchdelay_drop 0
set g_balance_tuba_switchdelay_raise 0
-set g_balance_tuba_volume 1
set g_balance_tuba_weaponreplace ""
set g_balance_tuba_weaponstart 0
set g_balance_tuba_weaponstartoverride -1
set g_balance_tuba_attenuation 0.5
set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
-set g_balance_tuba_fadetime 0.25
set g_balance_tuba_force 40
-set g_balance_tuba_pitchstep 6
set g_balance_tuba_radius 200
set g_balance_tuba_refire 0.05
set g_balance_tuba_switchdelay_drop 0.2
set g_balance_tuba_switchdelay_raise 0.2
-set g_balance_tuba_volume 1
set g_balance_tuba_weaponreplace ""
set g_balance_tuba_weaponstart 0
set g_balance_tuba_weaponstartoverride -1
W_PROP_PRI(class, fld, T, wepname) \
W_PROP_SEC(class, fld, T, wepname)
#define W_PROP_BEGIN(class)
- #ifdef GAMEQC
+ #if defined(SVQC)
#define _W_PROP(class, fld, T, wepname) \
/* static */ T _W_PROP_CVAR(wepname, fld); \
ATTRIB(class, wepvar_##fld, T, _W_PROP_CVAR(wepname, fld));
#define _W_PROP_CVAR(wepname, fld) autocvar_g_balance_##wepname##_##fld
+ #elif defined(CSQC)
+ #define _W_PROP(class, fld, T, wepname) ATTRIB(class, wepvar_##fld, T);
#else
#define _W_PROP(class, fld, T, wepname)
- #define _W_PROP_CVAR(wepname, fld)
#endif
#define W_PROP_END()
actor.(weaponentity).tuba_note.teleport_time = time + WEP_CVAR(WEP_TUBA, refire) * 2 * W_WeaponRateFactor(actor); // so it can get prolonged safely
- //sound(actor, c, TUBA_NOTE(n), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), autocvar_g_balance_tuba_attenuation);
+ //sound(actor, c, TUBA_NOTE(n), bound(0, VOL_BASE * autocvar_cl_tuba_volume, 1), autocvar_cl_tuba_attenuation);
RadiusDamage(actor, actor, WEP_CVAR(WEP_TUBA, damage), WEP_CVAR(WEP_TUBA, edgedamage), WEP_CVAR(WEP_TUBA, radius), NULL, NULL, WEP_CVAR(WEP_TUBA, force), hittype | WEP_TUBA.m_id, weaponentity, NULL);
if(time > actor.(weaponentity).tuba_smoketime)
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
}
- sound7(e, CH_TUBA_SINGLE, snd1, e.tuba_volume * vol1, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation, 100 * speed1, 0);
+ sound7(e, CH_TUBA_SINGLE, snd1, e.tuba_volume * vol1, e.tuba_attenuate * autocvar_cl_tuba_attenuation, 100 * speed1, 0);
if (vol2) {
- sound7(e.enemy, CH_TUBA_SINGLE, snd2, e.tuba_volume * vol2, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation, 100 * speed2, 0);
+ sound7(e.enemy, CH_TUBA_SINGLE, snd2, e.tuba_volume * vol2, e.tuba_attenuate * autocvar_cl_tuba_attenuation, 100 * speed2, 0);
}
} else {
if (restart) {
snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
}
- _sound(e, CH_TUBA_SINGLE, snd1, e.tuba_volume, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation);
+ _sound(e, CH_TUBA_SINGLE, snd1, e.tuba_volume, e.tuba_attenuate * autocvar_cl_tuba_attenuation);
}
}
void Ent_TubaNote_Think(entity this)
{
- float f = autocvar_g_balance_tuba_fadetime;
+ float f = autocvar_cl_tuba_fadetime;
if (f > 0) {
this.tuba_volume -= frametime * this.tuba_volume_initial / f;
} else {
void Ent_TubaNote_UpdateSound(entity this)
{
- this.enemy.tuba_volume = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
+ this.enemy.tuba_volume = bound(0, VOL_BASE * autocvar_cl_tuba_volume, 1);
this.enemy.tuba_volume_initial = this.enemy.tuba_volume;
this.enemy.note = this.note;
this.enemy.tuba_instrument = this.tuba_instrument;
PRECACHE(Tuba)
{
- Tuba_PitchStep = autocvar_g_balance_tuba_pitchstep;
+ Tuba_PitchStep = autocvar_cl_tuba_pitchstep;
if (Tuba_PitchStep) {
if (!checkextension("DP_SND_SOUND7_WIP2") && !checkextension("DP_SND_SOUND7")) {
LOG_WARN("requested pitch shifting, but not supported by this engine build");
MODEL(KLEINBOTTLE_WORLD, W_Model("v_kleinbottle.md3"));
#endif
+#ifdef CSQC
+float autocvar_cl_tuba_attenuation = 0.5;
+float autocvar_cl_tuba_fadetime = 0.25;
+float autocvar_cl_tuba_pitchstep = 6;
+float autocvar_cl_tuba_volume = 1;
+#endif
+
CLASS(Tuba, Weapon)
/* spawnfunc */ ATTRIB(Tuba, m_canonical_spawnfunc, string, "weapon_tuba");
/* impulse */ ATTRIB(Tuba, impulse, int, 1);
P(class, prefix, attenuation, float, NONE) \
P(class, prefix, damage, float, NONE) \
P(class, prefix, edgedamage, float, NONE) \
- P(class, prefix, fadetime, float, NONE) \
P(class, prefix, force, float, NONE) \
- P(class, prefix, pitchstep, float, NONE) \
P(class, prefix, radius, float, NONE) \
P(class, prefix, refire, float, NONE) \
P(class, prefix, switchdelay_drop, float, NONE) \
P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, volume, float, NONE) \
P(class, prefix, weaponreplace, string, NONE) \
P(class, prefix, weaponstartoverride, float, NONE) \
P(class, prefix, weaponstart, float, NONE) \
scr_screenshot_jpeg 1
scr_screenshot_jpeg_quality 0.9
+
+seta cl_tuba_attenuation 0.5
+seta cl_tuba_fadetime 0.25
+seta cl_tuba_pitchstep 6
+seta cl_tuba_volume 1
+
cl_sound_wizardhit ""
cl_sound_hknighthit ""
cl_sound_tink1 weapons/tink1.wav