]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/samual/hud_notify_fontsize'
authorRudolf Polzer <divverent@alientrap.org>
Wed, 16 Feb 2011 06:36:56 +0000 (07:36 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 16 Feb 2011 06:36:56 +0000 (07:36 +0100)
17 files changed:
balanceSamual.cfg
defaultXonotic.cfg
hud_luminos.cfg
menu.dat.de.po
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/common/constants.qh
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_triggers.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/nexball.qc
qcsrc/server/t_plats.qc

index 02f16775fc3dde1c8e4ecad142e402a025658c68..83a1db0a7cab6a242bc5760f354b19cb0710e4f2 100644 (file)
@@ -17,7 +17,7 @@ set g_start_weapon_sniperrifle -1 "0 = never provide the weapon, 1 = always prov
 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
@@ -487,7 +487,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 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
@@ -534,13 +534,13 @@ set g_balance_rocketlauncher_speed 1500
 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
index 05cc6c8931286d0ee81988f4a697f6eaaad336d9..c76176a843fbbff851f86403ba198fb2c3c05f41 100644 (file)
@@ -103,6 +103,9 @@ seta crosshair_dot_size 0.600000
 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"
@@ -301,7 +304,8 @@ set sv_ready_restart 0 "if set to 1 allow a map to be restarted once all players
 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)"
@@ -927,7 +931,6 @@ sv_sound_watersplash ""
 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
index e5b998a1f6c4192509fa7c508fcd72da41d6f0e5..ca8ea38de05476976feaf3a64b31755697d7cd44 100644 (file)
@@ -121,7 +121,7 @@ seta hud_panel_timer_bg_alpha ""
 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 ""
index 238a8f1efb12d3767fa2516c90c0de1fc37b8976..eab0ff082ad0bdd564e26089d59c71621727f9e5 100644 (file)
@@ -2433,7 +2433,7 @@ msgstr "Electro"
 #: 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
@@ -2448,7 +2448,7 @@ msgstr "%s hat gerade %ss blauen Ball bemerkt"
 #: 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
@@ -2482,7 +2482,7 @@ msgstr "%s hätte eine kleinere Waffe nehmen sollen"
 #: 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
index f87538a9eebf76e80d1483d714b88e9a2ca1c378..8614863318dcac9396237f4d6462dc30cdcf2826 100644 (file)
@@ -136,6 +136,8 @@ void CSQC_Init(void)
        WaypointSprite_Load();
 
        // precaches
+       precache_sound("misc/hit.wav");
+       precache_sound("misc/typehit.wav");
        Projectile_Precache();
        Hook_Precache();
        GibSplash_Precache();
index 2e1a1c3d321da58c5a7006809970659745dbd718..7270a9cf19e0882a9f41bf26434ff325dcb33f9f 100644 (file)
@@ -353,6 +353,9 @@ vector freeze_pmove_org, freeze_input_angles;
 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;
@@ -809,6 +812,19 @@ void CSQC_UpdateView(float w, float h)
 
        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)
@@ -973,6 +989,27 @@ void CSQC_UpdateView(float w, float h)
 
                                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
index 412ed1a7b035bf4d9f986fa665b0859cc6a7647f..0cf1e4bf8dc8d5f76652fa0141d269ce66ff358f 100644 (file)
@@ -99,6 +99,9 @@ string autocvar_crosshair_dot_color;
 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;
@@ -292,3 +295,5 @@ float autocvar_vid_conwidth;
 float autocvar_vid_pixelheight;
 float autocvar_viewsize;
 float autocvar_crosshair_color_by_health;
+float autocvar_cl_hitsound;
+float autocvar_cl_hitsound_antispam_time;
index 90376b5b96bf9691c69ed98057e403282e7cec3c..60633f57472b111687223018d3491f9488a28fbf 100644 (file)
@@ -313,6 +313,8 @@ const float STAT_NEX_CHARGE = 49;
 const float STAT_LAST_PICKUP = 50;
 const float STAT_HUD = 51;
 const float STAT_NEX_CHARGEPOOL = 52;
+const float STAT_HIT_TIME = 53;
+const float STAT_TYPEHIT_TIME = 54;
 
 // see DP source, quakedef.h
 const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
index 0820ef713f2d261caf9414ee34a2ff8c86cf6fda..7c3bcf89773028335cd3541289953e1712d30cd2 100644 (file)
@@ -804,7 +804,6 @@ float autocvar_g_midair_shieldtime;
 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;
@@ -1120,7 +1119,6 @@ float autocvar_sv_friction;
 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;
index dbdaddded549e4d687f1ebb07a151eb5fdeec022..71584d350379869717ce8e3cd1ca6a2a3ce47f24 100644 (file)
@@ -2346,6 +2346,7 @@ void SpectateCopy(entity spectatee) {
        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;
index 944dcc4ce0a249ce877681f01682219cbc38250e..936cb9c6b651f85f181fc82a86bc65bd7c3aadd3 100644 (file)
@@ -605,6 +605,9 @@ string matchid;
 
 .float last_pickup;
 
+.float hit_time; 
+.float typehit_time; 
+
 .float stat_leadlimit;
 
 float radar_showennemies;
index 68be349714138d5f6f865ac5d53494fd820fc1b1..22497c99d978eb9ba4cc74511d5d6c96cc793b7b 100644 (file)
@@ -790,13 +790,11 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                        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;
@@ -822,10 +820,8 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                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)
index e177cdec73673d89bf4c812aff5dfaad099c8da6..6c0921ba9b6ee7317f341dd2e09a623786a3c4d7 100644 (file)
@@ -1722,6 +1722,7 @@ void follow_init()
                        attach_sameorigin(dst, src, self.message);
                }
 
+               dst.solid = SOLID_NOT; // solid doesn't work with attachment
                remove(self);
        }
        else
index 6c74ec83954d03455c3e73f8b8dd9a690bb8bea4..268743b41542393e8389fef479be07b8109eb18f 100644 (file)
@@ -825,6 +825,8 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
        addstat(STAT_BULLETS_LOADED, AS_INT, sniperrifle_bulletcounter);
        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);
@@ -2840,16 +2842,16 @@ void EndFrame()
                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);
index 508957b4aa4c6b14edb98c49d50f48216afc4dcd..c04c477cdf778cc0b32be50b5e628999342ad3f4 100644 (file)
@@ -1639,8 +1639,6 @@ void precache()
     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");
index b1f59497abde896bff38abc3fcfbad79120252ad..13e8eea40a9103424f89eb187af775d0903f247f 100644 (file)
@@ -725,6 +725,7 @@ float w_nexball_weapon(float req)
                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);
index f3afdf580c26b0ff2890ff28107c6c77ab1db964..f90c812d9bd0691ed332e4817bc2dd216c6338aa 100644 (file)
@@ -245,37 +245,43 @@ void spawnfunc_func_plat()
 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);