set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_balance_health_start 150
+set g_balance_health_start 100
set g_balance_armor_start 0
set g_start_ammo_shells 15
set g_start_ammo_nails 0
set g_balance_nex_charge 1
set g_balance_nex_charge_mindmg 40
-set g_balance_nex_charge_start 0
+set g_balance_nex_charge_start 0.5
set g_balance_nex_charge_rate 0.3
set g_balance_nex_charge_animlimit 0.5
set g_balance_nex_charge_limit 1
set g_balance_rocketlauncher_speedaccel 1500
set g_balance_rocketlauncher_speedstart 800
set g_balance_rocketlauncher_lifetime 30
-set g_balance_rocketlauncher_refire 1.2
+set g_balance_rocketlauncher_refire 1.1
set g_balance_rocketlauncher_animtime 0.3
set g_balance_rocketlauncher_ammo 3
set g_balance_rocketlauncher_health 30 // 5 hitpoints above maximum laser value -- this way lasers can't blow it up, but grenadelauncher still can most the time.
set g_balance_rocketlauncher_damageforcescale 4
set g_balance_rocketlauncher_detonatedelay 0.05 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 140 // max degrees per second
+set g_balance_rocketlauncher_guiderate 130 // max degrees per second
set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
seta crosshair_dot_color "1 0 0" "when != 0, use custom color for the crosshair dot"
seta crosshair_pickup 0.25
seta crosshair_pickup_speed 4
+seta crosshair_hitindication 0.5
+seta crosshair_hitindication_color "10 -10 -10"
+seta crosshair_hitindication_speed 5
seta crosshair_per_weapon 0 "when 1, each gun will display a different crosshair"
seta crosshair_color_per_weapon 1 "when 1, each gun will display the crosshair with a different color"
seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
set sv_ready_restart_after_countdown 0 "if set to 1 the players and map items are reset after the countdown ended, otherwise they're reset already at the beginning of the countdown"
set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed"
-set sv_hitsound_antispam_time 0.05 "don't play the hitsound more often than this for the electro lightning gun or the laser gauntlet"
+seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy"
+set cl_hitsound_antispam_time 0.05 "don't play the hitsound more often than this"
//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
set teamplay_lockonrestart 0 "it set to 1 in a team-based game, the teams are locked once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
seta cl_sound_maptime_warning "1" "play announcer sound telling you the remaining maptime - 0: do not play at all, 1: play at one minute, 2: play at five minutes, 3: play both"
seta cl_notify_carried_items "3" "notify you of carried items when you obtain them (e.g. flags in CTF) - 0: disabled, 1: notify of taken items, 2: notify of picking up dropped items, 3: notify of both"
-seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy"
seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"
// startmap_dm is used when running with the -listen or -dedicated commandline options
seta hud_panel_notify_bg_border ""
seta hud_panel_notify_bg_padding ""
seta hud_panel_notify_flip "0"
+seta hud_panel_notify_fontsize "0.8"
seta hud_panel_notify_print "1"
seta hud_panel_timer 1
seta hud_panel_timer_bg_border ""
seta hud_panel_timer_bg_padding "0"
-seta hud_panel_radar 1
+seta hud_panel_radar 2 // enabled for keepaway and to make the HUD consistent throughout game modes
seta hud_panel_radar_pos "0.030000 0.020000"
seta hud_panel_radar_size "0.170000 0.220000"
seta hud_panel_radar_bg ""
seta hud_panel_notify_bg_border ""
seta hud_panel_notify_bg_padding ""
seta hud_panel_notify_flip "1"
+seta hud_panel_notify_fontsize "0.8"
seta hud_panel_notify_print "0"
seta hud_panel_timer 1
seta hud_panel_notify_bg_border ""
seta hud_panel_notify_bg_padding ""
seta hud_panel_notify_flip "1"
+seta hud_panel_notify_fontsize "0.8"
seta hud_panel_notify_print "0"
seta hud_panel_timer 1
seta hud_panel_notify_bg_border ""
seta hud_panel_notify_bg_padding ""
seta hud_panel_notify_flip "0"
+seta hud_panel_notify_fontsize "1"
seta hud_panel_notify_print "1"
seta hud_panel_timer 1
#: qcsrc/server/w_electro.qc:503
#, c-format
msgid "%s could not remember where they put plasma"
-msgstr "%s could not remember where they put plasma"
+msgstr "%s konnte sich nicht erinnern, wo das Plasma lag"
#: qcsrc/server/w_electro.qc:505
#, c-format
#: qcsrc/server/w_electro.qc:514
#, c-format
msgid "%s got in touch with %s's blue ball"
-msgstr "%s schaute mit den Fingern auf %ss blauen Ball"
+msgstr "%s kam in Kontakt mit %ss blauen Ball"
#: qcsrc/server/w_electro.qc:519
#, c-format
#: qcsrc/server/w_fireball.qc:401
#, c-format
msgid "%s tried to catch %s's firemine"
-msgstr "%s hat versucht, %ss Feuermine zu fangen"
+msgstr "%s hat versucht %ss Feuermine zu fangen"
#: qcsrc/server/w_fireball.qc:403
#, c-format
WaypointSprite_Load();
// precaches
+ precache_sound("misc/hit.wav");
+ precache_sound("misc/typehit.wav");
Projectile_Precache();
Hook_Precache();
GibSplash_Precache();
entity nightvision_noise, nightvision_noise2;
float pickup_crosshair_time, pickup_crosshair_size;
+float hit_time, typehit_time;
+float nextsound_hit_time, nextsound_typehit_time;
+float hitindication_crosshair_time, hitindication_crosshair_size;
float use_nex_chargepool;
float myhealth, myhealth_prev;
scoreboard_active = HUD_WouldDrawScoreboard();
+ hit_time = getstatf(STAT_HIT_TIME);
+ if(hit_time > nextsound_hit_time && autocvar_cl_hitsound)
+ {
+ sound(world, CHAN_AUTO, "misc/hit.wav", VOL_BASE, ATTN_NONE);
+ nextsound_hit_time = time + autocvar_cl_hitsound_antispam_time;
+ }
+ typehit_time = getstatf(STAT_TYPEHIT_TIME);
+ if(typehit_time > nextsound_typehit_time)
+ {
+ sound(world, CHAN_AUTO, "misc/typehit.wav", VOL_BASE, ATTN_NONE);
+ nextsound_typehit_time = time + autocvar_cl_hitsound_antispam_time;
+ }
+
float hud;
hud = getstati(STAT_HUD);
if(hud == HUD_SPIDERBOT)
wcross_scale += sin(pickup_crosshair_size) * autocvar_crosshair_pickup;
}
+
+ vector hitindication_color;
+ if(autocvar_crosshair_hitindication)
+ {
+ hitindication_color = stov(autocvar_crosshair_hitindication_color);
+ if(hitindication_crosshair_time < hit_time)
+ {
+ hitindication_crosshair_size = 1;
+ hitindication_crosshair_time = hit_time;
+ }
+
+ if(hitindication_crosshair_size > 0)
+ hitindication_crosshair_size -= autocvar_crosshair_hitindication_speed * frametime;
+ else
+ hitindication_crosshair_size = 0;
+
+ wcross_scale += sin(hitindication_crosshair_size) * autocvar_crosshair_hitindication;
+ wcross_color_x += sin(hitindication_crosshair_size) * hitindication_color_x;
+ wcross_color_y += sin(hitindication_crosshair_size) * hitindication_color_y;
+ wcross_color_z += sin(hitindication_crosshair_size) * hitindication_color_z;
+ }
if(shottype == SHOTTYPE_HITENEMY)
wcross_scale *= autocvar_crosshair_hittest; // is not queried if hittest is 0
float autocvar_crosshair_dot_size;
float autocvar_crosshair_effect_scalefade;
float autocvar_crosshair_effect_speed;
+float autocvar_crosshair_hitindication;
+string autocvar_crosshair_hitindication_color;
+float autocvar_crosshair_hitindication_speed;
float autocvar_crosshair_hittest;
float autocvar_crosshair_hittest_blur;
float autocvar_crosshair_hittest_showimpact;
float autocvar_hud_panel_notify;
float autocvar_hud_panel_notify_fadetime;
float autocvar_hud_panel_notify_flip;
+float autocvar_hud_panel_notify_fontsize;
float autocvar_hud_panel_notify_print;
float autocvar_hud_panel_notify_time;
float autocvar_hud_panel_powerups;
float autocvar_vid_pixelheight;
float autocvar_viewsize;
float autocvar_crosshair_color_by_health;
+float autocvar_cl_hitsound;
+float autocvar_cl_hitsound_antispam_time;
height = mySize_y/entries;
vector fontsize;
- fontsize = '0.5 0.5 0' * height;
+ float fontheight = height * autocvar_hud_panel_notify_fontsize;
+ fontsize = '0.5 0.5 0' * fontheight;
float a;
float when;
}
attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+ pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
if(s != "")
victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
:hud_config_notifyprint
width_attacker = stringwidth(attacker, TRUE, fontsize);
- pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height);
- pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+ pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
+ pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
if(s != "")
const float STAT_LAST_PICKUP = 51;
const float STAT_HUD = 52;
const float STAT_NEX_CHARGEPOOL = 53;
+const float STAT_HIT_TIME = 54;
+const float STAT_TYPEHIT_TIME = 55;
// see DP source, quakedef.h
const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
e.onEnter = ServerList_Connect_Click;
e.onEnterEntity = slist;
+ e.onChange = ServerList_Update_favoriteButton;
+ e.onChangeEntity = slist;
slist.ipAddressBox = e;
me.TD(me, 1, 1.5, e = makeXonoticButton("", '0 0 0'));
e.onClick = ServerList_Favorite_Click;
me.TDempty(me, 0.2);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair color:"));
me.TD(me, 1, 0.9, e = makeXonoticCheckBox(0, "crosshair_color_per_weapon", _("Per weapon")));
+ setDependent(e, "crosshair_color_by_health", 0, 0);
me.TD(me, 1, 0.9, e = makeXonoticCheckBox(0, "crosshair_color_by_health", _("By health")));
- setDependent(e, "crosshair_color_per_weapon", 0, 0);
+ setDependent(e, "crosshair_color_per_weapon", 0, 0);
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 2, 2.6, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color"));
- setDependentAND(e, "crosshair_color_per_weapon", 0, 0, "crosshair_color_by_health", 0, 0);
+ setDependentAND(e, "crosshair_color_per_weapon", 0, 0, "crosshair_color_by_health", 0, 0);
me.TR(me);
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center dot")));
me.TD(me, 1, 2.2, e = makeXonoticButton(_("Waypoints setup..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.waypointDialog;
- me.TDempty(me, 0.5);
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 1, 2.2, e = makeXonoticButton(_("Enter HUD editor"), '0 0 0'));
e.onClick = HUDSetup_Join_Click;
e.onClickEntity = me;
- me.TDempty(me, 0.5);
- me.TR(me);
me.TR(me);
#ifdef ALLOW_FORCEMODELS
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Force models:")));
void ServerList_Filter_Change(entity box, entity me);
void ServerList_Favorite_Click(entity btn, entity me);
void ServerList_Info_Click(entity btn, entity me);
+void ServerList_Update_favoriteButton(entity btn, entity me);
#endif
#ifdef IMPLEMENTATION
resorthostcache();
}
+void ServerList_Update_favoriteButton(entity btn, entity me)
+{
+ if(IsFavorite(me.ipAddressBox.text))
+ me.favoriteButton.setText(me.favoriteButton, _("Remove"));
+ else
+ me.favoriteButton.setText(me.favoriteButton, _("Bookmark"));
+}
+
entity makeXonoticServerList()
{
entity me;
if(me.ipAddressBoxFocused != me.ipAddressBox.focused)
{
if(me.ipAddressBox.focused || me.ipAddressBoxFocused < 0)
- {
- if(IsFavorite(me.ipAddressBox.text))
- me.favoriteButton.setText(me.favoriteButton, _("Remove"));
- else
- me.favoriteButton.setText(me.favoriteButton, _("Bookmark"));
- }
+ ServerList_Update_favoriteButton(NULL, me);
me.ipAddressBoxFocused = me.ipAddressBox.focused;
}
float autocvar_g_minstagib_ammo_drop;
float autocvar_g_minstagib_extralives;
float autocvar_g_minstagib_speed_highspeed;
-float autocvar_g_mirrordamage;
#define autocvar_g_mirrordamage cvar("g_mirrordamage")
#define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual")
float autocvar_g_monster_zombie_attack_run_damage;
float autocvar_sv_friction_on_land;
float autocvar_sv_gameplayfix_q2airaccelerate;
#define autocvar_sv_gravity cvar("sv_gravity")
-float autocvar_sv_hitsound_antispam_time;
string autocvar_sv_intermission_cdtrack;
string autocvar_sv_jumpspeedcap_max;
float autocvar_sv_jumpspeedcap_max_disable_on_ramps;
self.impulse = 0;
self.items = spectatee.items;
self.last_pickup = spectatee.last_pickup;
+ self.hit_time = spectatee.hit_time;
self.metertime = spectatee.metertime;
self.strength_finished = spectatee.strength_finished;
self.invincible_finished = spectatee.invincible_finished;
.float last_pickup;
+.float hit_time;
+.float typehit_time;
+
.float stat_leadlimit;
float radar_showennemies;
if(damage > 0)
{
if(deathtype != DEATH_FIRE)
- if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
{
if(targ.BUTTON_CHAT)
attacker.typehitsound += 1;
else
attacker.hitsound += 1;
- attacker.prevhitsound = time;
}
damage_goodhits += 1;
else
{
if(deathtype != DEATH_FIRE)
- if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
{
attacker.typehitsound += 1;
- attacker.prevhitsound = time;
}
if(mirrordamage > 0)
if(time > attacker.teamkill_complain)
attach_sameorigin(dst, src, self.message);
}
+ dst.solid = SOLID_NOT; // solid doesn't work with attachment
remove(self);
}
else
addstat(STAT_WEAPON_CLIPLOAD, AS_INT, clip_load);
addstat(STAT_WEAPON_CLIPSIZE, AS_INT, clip_size);
addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
+ addstat(STAT_HIT_TIME, AS_FLOAT, hit_time);
+ addstat(STAT_TYPEHIT_TIME, AS_FLOAT, typehit_time);
addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
addstat(STAT_NEX_CHARGEPOOL, AS_FLOAT, nex_chargepool_ammo);
if(self.classname == "spectator")
{
if(self.enemy.typehitsound)
- play2(self, "misc/typehit.wav");
+ self.typehit_time = time;
else if(self.enemy.hitsound && self.cvar_cl_hitsound)
- play2(self, "misc/hit.wav");
+ self.hit_time = time;
}
else
{
if(self.typehitsound)
- play2(self, "misc/typehit.wav");
+ self.typehit_time = time;
else if(self.hitsound && self.cvar_cl_hitsound)
- play2(self, "misc/hit.wav");
+ self.hit_time = time;
}
}
altime = time + frametime * (1 + autocvar_g_antilag_nudge);
precache_sound ("misc/gib_splat02.wav");
precache_sound ("misc/gib_splat03.wav");
precache_sound ("misc/gib_splat04.wav");
- precache_sound ("misc/hit.wav");
- precache_sound ("misc/typehit.wav");
PrecacheGlobalSound((globalsound_fall = "misc/hitground 4"));
PrecacheGlobalSound((globalsound_metalfall = "misc/metalhitground 4"));
precache_sound ("misc/null.wav");
precache_model ("models/elaser.mdl");
precache_sound ("nexball/shoot1.wav");
precache_sound ("nexball/shoot2.wav");
+ precache_sound ("misc/typehit.wav");
}
else if (req == WR_SETUP)
weapon_setup(WEP_PORTO);
void() train_next;
void train_wait()
{
- self.think = train_next;
- self.nextthink = self.ltime + self.wait;
-
if(self.noise != "")
stopsoundto(MSG_BROADCAST, self, CHAN_TRIGGER); // send this as unreliable only, as the train will resume operation shortly anyway
+
+ if(self.wait < 0)
+ {
+ train_next();
+ }
+ else
+ {
+ self.think = train_next;
+ self.nextthink = self.ltime + self.wait;
+ }
+
+ entity oldself;
+ oldself = self;
+ self = self.enemy;
+ SUB_UseTargets();
+ self = oldself;
+ self.enemy = world;
};
void train_next()
{
local entity targ;
targ = find(world, targetname, self.target);
+ self.enemy = targ;
self.target = targ.target;
if (!self.target)
objerror("train_next: no next target");
self.wait = targ.wait;
if (!self.wait)
self.wait = 0.1;
- if(self.wait < 0)
- {
- if (targ.speed)
- SUB_CalcMove(targ.origin - self.mins, targ.speed, train_next);
- else
- SUB_CalcMove(targ.origin - self.mins, self.speed, train_next);
- }
+
+ if (targ.speed)
+ SUB_CalcMove(targ.origin - self.mins, targ.speed, train_wait);
else
- {
- if (targ.speed)
- SUB_CalcMove(targ.origin - self.mins, targ.speed, train_wait);
- else
- SUB_CalcMove(targ.origin - self.mins, self.speed, train_wait);
- }
+ SUB_CalcMove(targ.origin - self.mins, self.speed, train_wait);
if(self.noise != "")
sound(self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);