]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/terencehill/misc_bugfixes'
authorRudolf Polzer <divverent@alientrap.org>
Sat, 19 Feb 2011 16:32:06 +0000 (17:32 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 19 Feb 2011 16:32:06 +0000 (17:32 +0100)
30 files changed:
balanceSamual.cfg
defaultXonotic.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_xhair_minimal.cfg
hud_nexuiz.cfg
menu.dat.de.po
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc
qcsrc/client/scoreboard.qc
qcsrc/common/constants.qh
qcsrc/common/mapinfo.qc
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/mutators/gamemode_keepaway.qc
qcsrc/server/nexball.qc
qcsrc/server/scores_rules.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/t_plats.qc
qcsrc/server/t_quake3.qc
qcsrc/server/w_crylink.qc
quake.rc

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..d038dc523c1df5762333a6c82066c39f789511e4 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
@@ -2100,7 +2103,6 @@ exec ctfscoring-ai.cfg
 exec effects-normal.cfg
 exec physicsX0.cfg
 exec turrets.cfg
-exec font-xolonium.cfg
 
 // hud cvar descriptions
 exec _hud_descriptions.cfg
index a3f3ed39e51f0dd8961f77f80094f1f600986fd6..ca8ea38de05476976feaf3a64b31755697d7cd44 100644 (file)
@@ -108,6 +108,7 @@ seta hud_panel_notify_bg_alpha ""
 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
@@ -120,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 8e39416314bdf665e1ad59b1cfaf26119ee926a5..fef69f23fd52f73104af2e0f42558d132c931852 100644 (file)
@@ -108,6 +108,7 @@ seta hud_panel_notify_bg_alpha ""
 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
index 10f7afd149822e08d9b99e94521e17373d04dbf3..80fe445e48cb85ecce0e558606e43ac2b74dc14e 100644 (file)
@@ -107,6 +107,7 @@ seta hud_panel_notify_bg_alpha ""
 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
index 681b7378e01fa3ce213ba3b552b2cca169f6913c..cfa50af89acb4dd8add91079c3c9cfcc7a886954 100644 (file)
@@ -108,6 +108,7 @@ seta hud_panel_notify_bg_alpha "0"
 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
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 df78b4f35c3a2dda7f61af5ccef302cb7e48b09d..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;
@@ -206,6 +209,7 @@ float autocvar_hud_panel_modicons;
 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;
@@ -291,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 a383c355c9407cf9d9d57ece639623693c8cfa94..d55cfd86612c76b69034738b7bf0a7d714fe398f 100644 (file)
@@ -395,9 +395,9 @@ string MakeRaceString(float cp, float mytime, float histime, float lapdelta, str
        if(histime < 0)
                return strcat(col, cpname);
        else if(hisname == "")
-               return strcat(col, sprintf(_("%s (%s)")), cpname, timestr);
+               return strcat(col, sprintf(_("%s (%s)"), cpname, timestr));
        else
-               return strcat(col, sprintf(_("%s (%s %s)")), cpname, timestr, strcat(hisname, col, lapstr));
+               return strcat(col, sprintf(_("%s (%s %s)"), cpname, timestr, strcat(hisname, col, lapstr)));
 }
 
 // Check if the given name already exist in race rankings? In that case, where? (otherwise return 0)
@@ -3142,7 +3142,8 @@ void HUD_Notify (void)
        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;
@@ -3316,7 +3317,7 @@ void HUD_Notify (void)
                        }
                        
                        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 != "")
@@ -3402,8 +3403,8 @@ void HUD_Notify (void)
                        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 != "")
index c719985d033893428e5f84f4cf103224b4eaf59e..517065ac5dd02fade24a500103bdb580dc09e26e 100644 (file)
@@ -17,6 +17,7 @@ string TranslateScoresLabel(string l)
        switch(l)
        {
                case "bckills": return CTX(_("SCO^bckills"));
+               case "bctime": return CTX(_("SCO^bctime"));
                case "caps": return CTX(_("SCO^caps"));
                case "deaths": return CTX(_("SCO^deaths"));
                case "destroyed": return CTX(_("SCO^destroyed"));
@@ -252,7 +253,7 @@ void Cmd_HUD_Help(float argc)
        print(_("^3frags^7                    kills - suicides\n"));
        print(_("^3kd^7                       The kill-death ratio\n"));
        print(_("^3caps^7                     How often a flag (CTF) or a key (KeyHunt) was captured\n"));
-       print(_("^3pickups^7                  How often a flag (CTF) or a key (KeyHunt) was picked up\n"));
+       print(_("^3pickups^7                  How often a flag (CTF) or a key (KeyHunt) or a ball (Keepaway) was picked up\n"));
        print(_("^3fckills^7                  Number of flag carrier kills\n"));
        print(_("^3returns^7                  Number of flag returns\n"));
        print(_("^3drops^7                    Number of flag drops\n"));
@@ -267,6 +268,8 @@ void Cmd_HUD_Help(float argc)
        print(_("^3fastest^7                  Time of fastest lap (race/cts)\n"));
        print(_("^3ticks^7                    Number of ticks (DOM)\n"));
        print(_("^3takes^7                    Number of domination points taken (DOM)\n"));
+       print(_("^3bckills^7                  Number of ball carrier kills\n"));
+       print(_("^3bctime^7                   Total amount of time holding the ball in Keepaway\n"));
        print(_("^3score^7                    Total score\n\n"));
 
        print(_("Before a field you can put a + or - sign, then a comma separated list\n"
@@ -293,7 +296,7 @@ string HUD_DefaultColumnLayout()
                "+lms/lives +lms/rank ",
                "+kh/caps +kh/pushes +kh/destroyed ",
                "?+race/laps ?+race/time ?+race/fastest ",
-               "+as/objectives +nexball/faults +nexball/goals +ka/drops +ka/pickups +ka/bckills +ka/time +freezetag/revivals ",
+               "+as/objectives +nexball/faults +nexball/goals +ka/pickups +ka/bckills +ka/bctime +freezetag/revivals ",
                "-lms,race,nexball/score");
 }
 
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 741565f3d1decb20c5f70ed1a02ee47462f66595..58f0cc852a6e07383df3dadd8ce1d4e466c5a15a 100644 (file)
@@ -409,7 +409,6 @@ string _MapInfo_GetDefault(float t)
                case MAPINFO_TYPE_NEXBALL:         return "5 20 0";
                case MAPINFO_TYPE_CTS:             return "20 0 0";
                case MAPINFO_TYPE_FREEZETAG:       return "10 20 0";
-               case MAPINFO_TYPE_KEEPAWAY:        return "30 20 0";
                // NOTE: DO NOT ADD ANY MORE GAME TYPES HERE
                // THIS IS JUST LEGACY SUPPORT FOR NEXUIZ MAPS
                // ONLY ADD NEW STUFF TO _MapInfo_GetDefaultEx
@@ -470,6 +469,7 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
                s = cdr(s);
        }
 
+       /* keepaway wuz here
        if(pWantedType == MAPINFO_TYPE_KEEPAWAY)
        {
                sa = car(s);
@@ -477,7 +477,8 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
                        cvar_set("fraglimit", sa);
                s = cdr(s);
        }
-
+       */
+       
        // rc = timelimit timelimit_qualification laps laps_teamplay
        if(pWantedType == MAPINFO_TYPE_RACE)
        {
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..32ff5ab9879b081ac040d18da992e4442a3feeb1 100644 (file)
@@ -84,8 +84,6 @@ float maxclients;
 .vector        pos1, pos2;
 .vector        mangle;
 
-.float cvar_cl_hitsound;
-
 .float pain_finished;                  //Added by Supajoe
 .float pain_frame;                     //"
 .float statdraintime;                  // record the one-second intervals between draining health and armour when they're over 100
@@ -402,10 +400,6 @@ float assault_attacker_team;
 .float speedrunning;
 
 // Q3 support
-.float notteam;
-.float notsingle;
-.float notfree;
-.float notq3a;
 float q3acompat_machineshotgunswap;
 
 // database
@@ -605,6 +599,9 @@ string matchid;
 
 .float last_pickup;
 
+.float hit_time; 
+.float typehit_time; 
+
 .float stat_leadlimit;
 
 float radar_showennemies;
index e1ee5706856c05e98fd49c717c20bb6dee0277eb..22497c99d978eb9ba4cc74511d5d6c96cc793b7b 100644 (file)
@@ -789,15 +789,12 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                {
                                        if(damage > 0)
                                        {
-                                               if(attacker.weapon != WEP_LASER
-                                               && (attacker.weapon != WEP_ELECTRO || !autocvar_g_balance_electro_lightning)
-                                               && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+                                               if(deathtype != DEATH_FIRE)
                                                {
                                                        if(targ.BUTTON_CHAT)
                                                                attacker.typehitsound += 1;
                                                        else
                                                                attacker.hitsound += 1;
-                                                       attacker.prevhitsound = time;
                                                }
 
                                                damage_goodhits += 1;
@@ -822,11 +819,9 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                }
                                else
                                {
-                                       if(deathtype != DEATH_FIRE
-                                       && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+                                       if(deathtype != DEATH_FIRE)
                                        {
                                                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..84402f0139441e3eda2e1e2945443006a013c67a 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");
-                       else if(self.enemy.hitsound && self.cvar_cl_hitsound)
-                               play2(self, "misc/hit.wav");
+                               self.typehit_time = time;
+                       else if(self.enemy.hitsound)
+                               self.hit_time = time;
                }
                else
                {
                        if(self.typehitsound)
-                               play2(self, "misc/typehit.wav");
-                       else if(self.hitsound && self.cvar_cl_hitsound)
-                               play2(self, "misc/hit.wav");
+                               self.typehit_time = time;
+                       else if(self.hitsound)
+                               self.hit_time = time;
                }
        }
        altime = time + frametime * (1 + autocvar_g_antilag_nudge);
index 508957b4aa4c6b14edb98c49d50f48216afc4dcd..364c925991a893ccb2a75749cb57d9bd8a573104 100644 (file)
@@ -603,7 +603,6 @@ void GetCvars(float f)
        GetCvars_handleFloat(s, f, cvar_cl_noantilag, "cl_noantilag");
        GetCvars_handleFloat(s, f, cvar_cl_voice_directional, "cl_voice_directional");
        GetCvars_handleFloat(s, f, cvar_cl_voice_directional_taunt_attenuation, "cl_voice_directional_taunt_attenuation");
-       GetCvars_handleFloat(s, f, cvar_cl_hitsound, "cl_hitsound");
        GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_share, "cl_accuracy_data_share");
        GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_receive, "cl_accuracy_data_receive");
 
@@ -1639,8 +1638,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 a23169c37346758fb1c7adbec38f8586f74d30f7..60c39d43410498bc752265a9d0d9e1f645da9ca2 100644 (file)
@@ -172,7 +172,7 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los
        sound(other, CHAN_AUTO, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);   // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
-       PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1);
+       // PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless.
        
        // waypoints
        WaypointSprite_Spawn("ka-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, FALSE);
@@ -200,7 +200,7 @@ void ka_TimeScoring()
                if(autocvar_g_keepaway_score_timepoints)
                        PlayerScore_Add(self.owner, SP_SCORE, autocvar_g_keepaway_score_timepoints);
                        
-               PlayerScore_Add(self.owner, SP_KEEPAWAY_TIME, (autocvar_g_keepaway_score_timeinterval / 1)); // interval is divided by 1 so that time always shows "seconds"
+               PlayerScore_Add(self.owner, SP_KEEPAWAY_BCTIME, (autocvar_g_keepaway_score_timeinterval / 1)); // interval is divided by 1 so that time always shows "seconds"
                self.nextthink = time + autocvar_g_keepaway_score_timeinterval;
        }
 }
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 18c780d8147a2499d6869c02c9b9b448af361c96..2e75fefb9f41402bfa09193dfb313b1e3d452dd1 100644 (file)
@@ -190,15 +190,13 @@ void ScoreRules_nexball(float teams)
 // Keep Away stuff
 #define SP_KEEPAWAY_PICKUPS 4
 #define SP_KEEPAWAY_CARRIERKILLS 5
-#define SP_KEEPAWAY_DROPS 6
-#define SP_KEEPAWAY_TIME 7
+#define SP_KEEPAWAY_BCTIME 6
 void ScoreRules_keepaway()
 {
        ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, 0, TRUE); // SFL_SORT_PRIO_PRIMARY
        ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_PICKUPS,                     "pickups",              0);
        ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_CARRIERKILLS,        "bckills",              0);
-       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_DROPS,                       "drops",                SFL_LOWER_IS_BETTER);
-       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_TIME,                        "time",                 SFL_SORT_PRIO_SECONDARY);
+       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_BCTIME,                      "bctime",                       SFL_SORT_PRIO_SECONDARY);
        ScoreRules_basics_end();
 }
 
index a40e8144d6656904d11f7843bcc4d81e7b68431d..68a86e9c479e7f68a9908fc12230831f2bb50803 100644 (file)
@@ -232,6 +232,7 @@ void StartFrame (void)
 .float anglejitter;
 .string gametypefilter;
 .string cvarfilter;
+float DoesQ3ARemoveThisEntity();
 void SV_OnEntityPreSpawnFunction()
 {
        if(self.gametypefilter != "")
@@ -350,6 +351,12 @@ void SV_OnEntityPreSpawnFunction()
                }
        }
 
+       if(DoesQ3ARemoveThisEntity())
+       {
+               remove(self);
+               return;
+       }
+
        // support special -1 and -2 angle from radiant
        if (self.angles == '0 -1 0')
                self.angles = '-90 0 0';
index 143b3be4879d79cc2993a685f275e0a1cc2e0bee..5cd714b652a64f832e7c03633e40567596f6111f 100644 (file)
@@ -735,36 +735,6 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
                        waypoint_spawnforitem(self);
                }
 
-               if(teams_matter)
-               {
-                       if(self.notteam)
-                       {
-                               print("removed non-teamplay ", self.classname, "\n");
-                               startitem_failed = TRUE;
-                               remove (self);
-                               return;
-                       }
-               }
-               else
-               {
-                       if(self.notfree)
-                       {
-                               print("removed non-FFA ", self.classname, "\n");
-                               startitem_failed = TRUE;
-                               remove (self);
-                               return;
-                       }
-               }
-
-               if(self.notq3a)
-               {
-                       // We aren't TA or something like that, so we keep the Q3A entities
-                       print("removed non-Q3A ", self.classname, "\n");
-                       startitem_failed = TRUE;
-                       remove (self);
-                       return;
-               }
-
                /*
                 * can't do it that way, as it would break maps
                 * TODO make a target_give like entity another way, that perhaps has
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);
index 11bf880e60bf102b1d992c25698e8ff471973fbd..8cc7e479791b6a3fc8bec91c48383355953f2563 100644 (file)
@@ -130,3 +130,54 @@ void spawnfunc_team_CTF_redspawn()   { spawnfunc_info_player_team1();  }
 void spawnfunc_team_CTF_bluespawn()  { spawnfunc_info_player_team2();  }
 
 void spawnfunc_item_flight()         { spawnfunc_item_jetpack();       }
+
+.float notteam;
+.float notsingle;
+.float notfree;
+.float notq3a;
+.float notta;
+.string gametype;
+float DoesQ3ARemoveThisEntity()
+{
+       // Q3 style filters (DO NOT USE, THIS IS COMPAT ONLY)
+
+       if(self.notq3a)
+               if(!teams_matter || g_tdm || g_ctf)
+                       return 1;
+
+       if(self.notta)
+               if not(!teams_matter || g_tdm || g_ctf)
+                       return 1;
+
+       if(self.notsingle)
+               if(maxclients == 1)
+                       return 1;
+
+       if(self.notteam)
+               if(teams_matter)
+                       return 1;
+
+       if(self.notfree)
+               if(!teams_matter)
+                       return 1;
+
+       if(self.gametype)
+       {
+               string gametypename;
+               // static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"};
+               gametypename = "ffa";
+               if(teams_matter)
+                       gametypename = "team";
+               if(g_arena)
+                       gametypename = "tournament";
+               if(g_ctf)
+                       gametypename = "ctf";
+               if(maxclients == 1)
+                       gametypename = "single";
+               // we do not have the other types (oneflag, obelisk, harvester, teamtournament)
+               if(strstrofs(self.gametype, gametypename, 0) < 0)
+                       return 1;
+       }
+
+       return 0;
+}
index aa5029c0a6ca623e7154672d045e3179702a841b..93a110dad8d2e44273c06ef6318e74021e528167 100644 (file)
@@ -57,7 +57,10 @@ void W_Crylink_LinkExplode (entity e, entity e2)
        if(e == e.realowner.crylink_lastgroup)
                e.realowner.crylink_lastgroup = world;
 
-       RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other);
+       if(e.projectiledeathtype & HITTYPE_SECONDARY)
+               RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_damage * a, autocvar_g_balance_crylink_secondary_edgedamage * a, autocvar_g_balance_crylink_secondary_radius, world, autocvar_g_balance_crylink_secondary_force * a, e.projectiledeathtype, other);
+       else
+               RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other);
 
        if(e.queuenext != e2)
                W_Crylink_LinkExplode(e.queuenext, e2);
@@ -279,7 +282,7 @@ void W_Crylink_Touch2 (void)
        }
 
        float a;
-       a = 1 - (time - self.fade_time) * self.fade_rate;
+       a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
 
        finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
        if(finalhit)
index a85fbab69b2c430a37a44b7c9bb3e6c885cf4e05..2c0f409ea23841e6dc4d41c39eda608da611b9cf 100644 (file)
--- a/quake.rc
+++ b/quake.rc
@@ -3,6 +3,7 @@ exec config.cfg
 maxplayers $menu_maxplayers
 exec data/campaign.cfg
 exec config_update.cfg
+exec font-xolonium.cfg
 exec autoexec.cfg
 stuffcmds
 //startdemos demos/demo1 demos/demo2 demos/demo3