]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/monsters
authorMario <mario.mario@y7mail.com>
Sat, 28 Sep 2013 08:08:52 +0000 (01:08 -0700)
committerMario <mario.mario@y7mail.com>
Sat, 28 Sep 2013 08:08:52 +0000 (01:08 -0700)
19 files changed:
balanceXPM.cfg
balanceXonotic.cfg
defaultXonotic.cfg
qcsrc/client/hud.qc
qcsrc/common/command/rpn.qc
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/csqcprojectile.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/t_items.qc
qcsrc/server/waypointsprites.qc

index 9d27ac66c9988af575a770ec3685fb1e52b22331..8c171476a1e126114ea1df373d399fe125741c21 100644 (file)
@@ -586,21 +586,21 @@ set g_balance_hagar_reload_ammo 0 //default: 25
 set g_balance_hagar_reload_time 2
 // }}}
 // {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 80
-set g_balance_rocketlauncher_edgedamage 40
+set g_balance_rocketlauncher_damage 70
+set g_balance_rocketlauncher_edgedamage 35
 set g_balance_rocketlauncher_force 450
 set g_balance_rocketlauncher_radius 110
 set g_balance_rocketlauncher_speed 1300
 set g_balance_rocketlauncher_speedaccel 1300
 set g_balance_rocketlauncher_speedstart 1000
 set g_balance_rocketlauncher_lifetime 10
-set g_balance_rocketlauncher_refire 1.1
+set g_balance_rocketlauncher_refire 1.2
 set g_balance_rocketlauncher_animtime 0.4
 set g_balance_rocketlauncher_ammo 4
 set g_balance_rocketlauncher_health 30 // 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 1 // low damage force scale so that it can still be affected by other hits, but not so much that it does a 90 degree turn
 set g_balance_rocketlauncher_detonatedelay 0.02 // 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 90 // max degrees per second
+set g_balance_rocketlauncher_guiderate 70 // 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.2 // delay before guiding kicks in
@@ -609,7 +609,7 @@ set g_balance_rocketlauncher_remote_damage 70
 set g_balance_rocketlauncher_remote_edgedamage 35
 set g_balance_rocketlauncher_remote_radius 110
 set g_balance_rocketlauncher_remote_force 400
-set g_balance_rocketlauncher_switchdelay_drop 0.2
+set g_balance_rocketlauncher_switchdelay_drop 0.3
 set g_balance_rocketlauncher_switchdelay_raise 0.2
 set g_balance_rocketlauncher_reload_ammo 0 //default: 25
 set g_balance_rocketlauncher_reload_time 2
index 6deba7604231d0244c560f7d84ae22e5de948f43..cdf3f201354aaebeb4351ee1d83f4af9f6d44490 100644 (file)
@@ -586,21 +586,21 @@ set g_balance_hagar_reload_ammo 0 //default: 25
 set g_balance_hagar_reload_time 2
 // }}}
 // {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 80
-set g_balance_rocketlauncher_edgedamage 40
+set g_balance_rocketlauncher_damage 70
+set g_balance_rocketlauncher_edgedamage 35
 set g_balance_rocketlauncher_force 450
 set g_balance_rocketlauncher_radius 110
 set g_balance_rocketlauncher_speed 1300
 set g_balance_rocketlauncher_speedaccel 1300
 set g_balance_rocketlauncher_speedstart 1000
 set g_balance_rocketlauncher_lifetime 10
-set g_balance_rocketlauncher_refire 1.1
+set g_balance_rocketlauncher_refire 1.2
 set g_balance_rocketlauncher_animtime 0.4
 set g_balance_rocketlauncher_ammo 4
 set g_balance_rocketlauncher_health 30 // 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 1 // low damage force scale so that it can still be affected by other hits, but not so much that it does a 90 degree turn
 set g_balance_rocketlauncher_detonatedelay 0.02 // 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 90 // max degrees per second
+set g_balance_rocketlauncher_guiderate 70 // 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.2 // delay before guiding kicks in
@@ -609,7 +609,7 @@ set g_balance_rocketlauncher_remote_damage 70
 set g_balance_rocketlauncher_remote_edgedamage 35
 set g_balance_rocketlauncher_remote_radius 110
 set g_balance_rocketlauncher_remote_force 400
-set g_balance_rocketlauncher_switchdelay_drop 0.2
+set g_balance_rocketlauncher_switchdelay_drop 0.3
 set g_balance_rocketlauncher_switchdelay_raise 0.2
 set g_balance_rocketlauncher_reload_ammo 0 //default: 25
 set g_balance_rocketlauncher_reload_time 2
index a7614d938ee2263ceedf6020a12a6c50eef5417a..45dee79d8d7ed5d99201437708f4d199644d93ca 100644 (file)
@@ -110,6 +110,33 @@ v_deathtilt 0 // needed for spectators (who are dead to avoid prediction)
 exec sRGB-disable.cfg
 vid_sRGB_fallback 2
 r_hdr_glowintensity 1
+// #define Image_LinearFloatFromsRGBFloat(c) (((c) <= 0.04045f) ? (c) * (1.0f / 12.92f) : (float)pow(((c) + 0.055f)*(1.0f/1.055f), 2.4f))
+set rpn_sRGB_to_linear "dup 0.055 add 1.055 div 2.4 pow exch 12.92 div dup 0.0031308 gt when"
+// #define Image_sRGBFloatFromLinearFloat(c) (((c) < 0.0031308f) ? (c) * 12.92f : 1.055f * (float)pow((c), 1.0f/2.4f) - 0.055f)
+set rpn_linear_to_sRGB "dup 1.0 2.4 div pow 1.055 mul 0.055 sub exch 12.92 mul dup 0.04045 ge when"
+
+// -nosRGB to -sRGB sky shader conversion:
+//
+// q3map_sunExt 1 0.6875 0.375 340 25 47 0 16
+//                                    ^^ elevation
+//                             ^^^ sunlight
+// q3map_skylight 110 3
+//                ^^^ skylight
+//
+// With that, do (the last parameter is the ratio of skylight you assume hits
+// the surfaces, about 0.25 for inner surfaces near sky, about 1.00 on
+// terrain):
+// ]skybox_nosRGB_to_sRGB 340 47 110 0.25
+// rpn: still on stack: new_sunlight:
+// rpn: still on stack: 380.464142
+// rpn: still on stack: new_skylight:
+// rpn: still on stack: 9.32523632
+//
+// The equivalent -sRGB shader then will have:
+//
+// q3map_sunExt 1 0.6875 0.375 380.464142 25 47 0 16
+// q3map_skylight 9.32523632 3
+alias skybox_nosRGB_to_sRGB "rpn $3 402.123 $4 div div $rpn_sRGB_to_linear 402.123 $4 div mul /new_skylight: $3 402.123 $4 div div $1 256 div $2 0.017453 mul sin mul add $rpn_sRGB_to_linear $3 402.123 $4 div div $rpn_sRGB_to_linear sub 256 mul $2 0.017453 mul sin div /new_sunlight:"
 
 // these settings determine how much the view is affected by movement/damage
 cl_smoothviewheight 0.05 // time of the averaging to the viewheight value so that it creates a smooth transition for crouching and such. 0 for instant transition
@@ -432,8 +459,6 @@ seta menu_monsters_edit_movetarget 1
 set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
 set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
 
-set welcome_message_time 8
-
 set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
 
 set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
@@ -924,7 +949,7 @@ seta scoreboard_border_thickness 1 "scoreboard border thickness"
 seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
 seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
 seta scoreboard_accuracy_nocolors 0 "don't use colors displaying accuracy stats"
-seta scoreboard_accuracy 0 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
+seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
 seta scoreboard_color_bg_r 0 "red color component of the scoreboard background"
 seta scoreboard_color_bg_g 0.4 "green color component of the scoreboard background"
 seta scoreboard_color_bg_b 0.6 "blue color component of the scoreboard background"
index d151a535678400ace2f7465b2a802b3bbdfb3bd6..398078acecb09fb751a34d6006a7019da26ee3f2 100644 (file)
@@ -1416,7 +1416,7 @@ void HUD_HealthArmor(void)
        if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
        {
                vector v;
-               v = healtharmor_maxdamage(health, armor, armorblockpercent);
+               v = healtharmor_maxdamage(health, armor, armorblockpercent, DEATH_WEAPON);
 
                float x;
                x = floor(v_x + 1);
index 5cca2db1ce666145fb7f339925daacaf3ce8f756..66e8554a87d84f3cf539ca17ec9258726b567dd2 100644 (file)
@@ -46,8 +46,8 @@ void rpn_set(string s)
 
 float rpn_getf() { return stof(rpn_get()); }
 float rpn_popf() { return stof(rpn_pop()); }
-void rpn_pushf(float f) { return rpn_push(ftos(f)); }
-void rpn_setf(float f) { return rpn_set(ftos(f)); }
+void rpn_pushf(float f) { return rpn_push(sprintf("%.9g", f)); }
+void rpn_setf(float f) { return rpn_set(sprintf("%.9g", f)); }
 
 void GenericCommand_rpn(float request, float argc, string command)
 {
@@ -158,6 +158,31 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                f = rpn_popf();
                                                f2 = rpn_getf();
                                                rpn_setf(f2 - f * floor(f2 / f));
+                                       } else if(rpncmd == "pow" || rpncmd == "**") {
+                                               f = rpn_popf();
+                                               rpn_setf(pow(rpn_getf(), f));
+                                       } else if(rpncmd == "bitand" || rpncmd == "&") {
+                                               f = rpn_popf();
+                                               rpn_setf(rpn_getf() & f);
+                                       } else if(rpncmd == "bitor" || rpncmd == "|") {
+                                               f = rpn_popf();
+                                               rpn_setf(rpn_getf() | f);
+                                       } else if(rpncmd == "bitxor" || rpncmd == "^") {
+                                               f = rpn_popf();
+                                               rpn_setf(rpn_getf() ^ f);
+                                       } else if(rpncmd == "and" || rpncmd == "&&") {
+                                               f = rpn_popf();
+                                               rpn_setf(rpn_getf() && f);
+                                       } else if(rpncmd == "or" || rpncmd == "||") {
+                                               f = rpn_popf();
+                                               rpn_setf(rpn_getf() || f);
+                                       } else if(rpncmd == "xor" || rpncmd == "^^") {
+                                               f = rpn_popf();
+                                               rpn_setf(!rpn_getf() != !f);
+                                       } else if(rpncmd == "bitnot") {
+                                               rpn_setf(~rpn_popf());
+                                       } else if(rpncmd == "not") {
+                                               rpn_setf(!rpn_popf());
                                        } else if(rpncmd == "abs") {
                                                rpn_setf(fabs(rpn_getf()));
                                        } else if(rpncmd == "sgn") {
@@ -174,6 +199,14 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                rpn_setf(floor(rpn_getf()));
                                        } else if(rpncmd == "ceil" || rpncmd == "c") {
                                                rpn_setf(ceil(rpn_getf()));
+                                       } else if(rpncmd == "exp") {
+                                               rpn_setf(exp(rpn_getf()));
+                                       } else if(rpncmd == "log") {
+                                               rpn_setf(exp(rpn_getf()));
+                                       } else if(rpncmd == "sin") {
+                                               rpn_setf(sin(rpn_getf()));
+                                       } else if(rpncmd == "cos") {
+                                               rpn_setf(cos(rpn_getf()));
                                        } else if(rpncmd == "max") {
                                                f = rpn_popf();
                                                f2 = rpn_getf();
@@ -528,9 +561,12 @@ void GenericCommand_rpn(float request, float argc, string command)
                        print("    x x exch --------------------------> x x : swap the top two\n");
                        print("    /cvarname load --------------------> x   : loads a cvar\n");
                        print("    /cvarname x def ------------------->     : writes to a cvar\n");
-                       print("    f f add|sub|mul|div|mod|max|min ---> f   : adds/... two numbers\n");
-                       print("    f f eq|ne|gt|ge|lt|le -------------> f   : compares two numbers\n");
+                       print("    f f add|sub|mul|div|mod|pow -------> f   : adds/... two numbers\n");
+                       print("    f f and|or|xor|bitand|bitor|bitxor > f   : logical and bitwise operations\n");
+                       print("    f f eq|ne|gt|ge|lt|le|max|min -----> f   : compares two numbers\n");
                        print("    f neg|abs|sgn|rand|floor|ceil------> f   : negates/... a number\n");
+                       print("    f not|bitnot ----------------------> f   : logical and bitwise negation\n");
+                       print("    f exp|log|sin|cos -----------------> f   : exponential function & Co.\n");
                        print("    f f f bound -----------------------> f   : bounds the middle number\n");
                        print("    f1 f2 b when ----------------------> f   : f1 if b, f2 otherwise\n");
                        print("    s s union|intersection|difference -> s   : set operations\n");
index 16e572615b1ca4899f9a1fbfc13261339c34f267..7949b4c2257e840cd9ee6d1831bf6634f8cda50a 100644 (file)
@@ -992,6 +992,10 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
                {
                        MapInfo_Map_flags |= MAPINFO_FLAG_FRUSTRATING;
                }
+               else if(t == "noautomaplist")
+               {
+                       MapInfo_Map_flags |= MAPINFO_FLAG_NOAUTOMAPLIST;
+               }
                else if(t == "type")
                {
                        t = car(s); s = cdr(s);
index d8b84709b3739951025f801b070a8384f3d23e7b..d2a9409e310213df929f572f6713558d73e74e01 100644 (file)
@@ -88,6 +88,7 @@ const float MAPINFO_FEATURE_TURRETS       = 4;
 const float MAPINFO_FLAG_HIDDEN           = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
 const float MAPINFO_FLAG_FORBIDDEN        = 2; // don't even allow the map by a cvar setting that allows hidden maps
 const float MAPINFO_FLAG_FRUSTRATING      = 4; // this map is near impossible to play, enable at your own risk
+const float MAPINFO_FLAG_NOAUTOMAPLIST    = 8; // do not include when automatically building maplist (counts as hidden for maplist building purposes)
 
 float MapInfo_count;
 
index afd5b3bcd12e3b5971125b2783e0016c95fd16cd..965431773e3d572162192da7b5ce2a2076c133c8 100644 (file)
@@ -1831,10 +1831,13 @@ void RandomSelection_Add(entity e, float f, string s, float weight, float priori
        }
 }
 
-vector healtharmor_maxdamage(float h, float a, float armorblock)
+#ifndef MENUQC
+vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype)
 {
        // NOTE: we'll always choose the SMALLER value...
        float healthdamage, armordamage, armorideal;
+       if (deathtype == DEATH_DROWN)  // Why should armor help here...
+               armorblock = 0;
        vector v;
        healthdamage = (h - 1) / (1 - armorblock); // damage we can take if we could use more health
        armordamage = a + (h - 1); // damage we can take if we could use more armor
@@ -1853,14 +1856,17 @@ vector healtharmor_maxdamage(float h, float a, float armorblock)
        return v;
 }
 
-vector healtharmor_applydamage(float a, float armorblock, float damage)
+vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage)
 {
        vector v;
+       if (deathtype == DEATH_DROWN)  // Why should armor help here...
+               armorblock = 0;
        v_y = bound(0, damage * armorblock, a); // save
        v_x = bound(0, damage - v_y, damage); // take
        v_z = 0;
        return v;
 }
+#endif
 
 string getcurrentmod()
 {
index 47865428c18f5a8869e295f42a0e99eebfda886f..1150dbbaac07cc9b34c7b0e3303cb24b1122fabe 100644 (file)
@@ -220,8 +220,10 @@ string RandomSelection_chosen_string;
 void RandomSelection_Init();
 void RandomSelection_Add(entity e, float f, string s, float weight, float priority);
 
-vector healtharmor_maxdamage(float h, float a, float armorblock); // returns vector: maxdamage, armorideal, 1 if fully armored
-vector healtharmor_applydamage(float a, float armorblock, float damage); // returns vector: take, save, 0
+#ifndef MENUQC
+vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype); // returns vector: maxdamage, armorideal, 1 if fully armored
+vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage); // returns vector: take, save, 0
+#endif
 
 string getcurrentmod();
 
index 5ba3733f012f4bcfb3d39dd3c9ee169d0da25ae3..18c376b503dda2463b9b3f776de54e66048ad2ed 100644 (file)
@@ -80,7 +80,7 @@ string XonoticMutatorsDialog_toString(entity me)
                s = strcat(s, ", ", WeaponArenaString());
        if(cvar("g_start_weapon_laser") == 0)
                s = strcat(s, ", ", _("No start weapons"));
-       if(cvar("sv_gravity") < 800)
+       if(cvar("sv_gravity") < stof(cvar_defstring("sv_gravity")))
                s = strcat(s, ", ", _("Low gravity"));
        if(cvar("g_cloaked"))
                s = strcat(s, ", ", _("Cloaked"));
index 72558a443f0fa9f259c11fbed06201f8908a4084..189ef8ac33c258f353721dd3846213ea1e443bbf 100644 (file)
@@ -1205,7 +1205,6 @@ float autocvar_timelimit_overtimes;
 float autocvar_timelimit_suddendeath;
 #define autocvar_utf8_enable cvar("utf8_enable")
 float autocvar_waypoint_benchmark;
-float autocvar_welcome_message_time;
 float autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
 float autocvar_g_trueaim_minrange;
 float autocvar_g_debug_defaultsounds;
index 0c27100fe99ac49e044f82e741d11ca44213646b..a70c32bd2267f48830329c8705ef4ac901abec6d 100644 (file)
@@ -299,7 +299,13 @@ void FixPlayermodel()
 
                n = tokenize_console(defaultmodel);
                if(n > 0)
+               {
                        defaultmodel = argv(floor(n * self.model_randomizer));
+                       // However, do NOT randomize if the player-selected model is in the list.
+                       for (i = 0; i < n; ++i)
+                               if ((argv(i) == self.playermodel && defaultskin == stof(self.playerskin)) || argv(i) == strcat(self.playermodel, ":", self.playerskin))
+                                       defaultmodel = argv(i);
+               }
 
                i = strstrofs(defaultmodel, ":", 0);
                if(i >= 0)
@@ -2048,7 +2054,7 @@ void PrintWelcomeMessage()
        {
                if(self.BUTTON_INFO) // BUTTON_INFO hides initial MOTD
                        self.motd_actived_time = -2; // wait until BUTTON_INFO gets released
-               else if(self.motd_actived_time == -2 || IS_PLAYER(self) || time - self.jointime > autocvar_welcome_message_time)
+               else if(self.motd_actived_time == -2 || IS_PLAYER(self))
                {
                        // instanctly hide MOTD
                        self.motd_actived_time = 0;
@@ -2613,7 +2619,7 @@ void PlayerPostThink (void)
        //pointparticles(particleeffectnum("machinegun_impact"), self.origin + self.view_ofs + '0 0 7', '0 0 0', 1);
 
        if(self.waypointsprite_attachedforcarrier)
-               WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent));
+               WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
 
        playerdemo_write();
 
index 07da206f663f26ceb08eb2f405577912a239e829..f47ac57e4142a25e591759a4a9414ba16ab6d5a9 100644 (file)
@@ -276,7 +276,7 @@ void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float
        // damage resistance (ignore most of the damage from a bullet or similar)
        damage = max(damage - 5, 1);
 
-       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, damage);
        take = v_x;
        save = v_y;
 
@@ -372,7 +372,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker);
 
 
-       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, damage);
        take = v_x;
        save = v_y;
 
index 3554f1ff67235142f837507183b772c41c841c09..ac58a90c3e36715d3c020156d3a5dab3c9d69f47 100644 (file)
@@ -85,6 +85,10 @@ void CSQCProjectile(entity e, float clientanimate, float type, float docull)
        e.csqcprojectile_type = type;
 }
 
+// FIXME HACK
+float ItemSend(entity to, float sf);
+void ItemUpdate(entity item);
+// END HACK
 void UpdateCSQCProjectile(entity e)
 {
        if(e.SendEntity == CSQCProjectile_SendEntity)
@@ -92,6 +96,12 @@ void UpdateCSQCProjectile(entity e)
                // send new origin data
                e.SendFlags |= 0x01;
        }
+// FIXME HACK
+       else if(e.SendEntity == ItemSend)
+       {
+               ItemUpdate(e);
+       }
+// END HACK
 }
 
 void UpdateCSQCProjectileAfterTeleport(entity e)
index 4cae47770ddfdc312e9ff249107dca8ae314ce2a..f3516c274145ac3c495fb073f8639d88cf3cf1d4 100644 (file)
@@ -714,7 +714,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 
                                                        if(autocvar_g_mirrordamage_virtual)
                                                        {
-                                                               vector v  = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
+                                                               vector v  = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, mirrordamage);
                                                                attacker.dmg_take += v_x;
                                                                attacker.dmg_save += v_y;
                                                                attacker.dmg_inflictor = inflictor;
@@ -724,7 +724,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 
                                                        if(autocvar_g_friendlyfire_virtual)
                                                        {
-                                                               vector v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+                                                               vector v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, damage);
                                                                targ.dmg_take += v_x;
                                                                targ.dmg_save += v_y;
                                                                targ.dmg_inflictor = inflictor;
index 750f1c4f06f4ba6e9974e7e237580b8289c5f02a..3b83d6e1ef4da7ce8e18dc5119fba1ddb3a5c1ae 100644 (file)
@@ -323,7 +323,6 @@ void cvar_changes_init()
                BADCVAR("sv_fraginfo");
                BADCVAR("sv_timeout");
                BADPREFIX("sv_timeout_");
-               BADCVAR("welcome_message_time");
                BADPREFIX("crypto_");
                BADPREFIX("g_chat_");
                BADPREFIX("g_ctf_captimerecord_");
@@ -1059,6 +1058,8 @@ float() MaplistMethod_Iterate = // usual method
 {
        float pass, i;
 
+       dprint("Trying MaplistMethod_Iterate\n");
+
        for(pass = 1; pass <= 2; ++pass)
        {
                for(i = 1; i < Map_Count; ++i)
@@ -1074,6 +1075,8 @@ float() MaplistMethod_Iterate = // usual method
 
 float() MaplistMethod_Repeat = // fallback method
 {
+       dprint("Trying MaplistMethod_Repeat\n");
+
        if(Map_Check(Map_Current, 2))
                return Map_Current;
        return -2;
@@ -1083,6 +1086,8 @@ float() MaplistMethod_Random = // random map selection
 {
        float i, imax;
 
+       dprint("Trying MaplistMethod_Random\n");
+
        imax = 42;
 
        for(i = 0; i <= imax; ++i)
@@ -1101,6 +1106,8 @@ float(float exponent) MaplistMethod_Shuffle = // more clever shuffling
 {
        float i, j, imax, insertpos;
 
+       dprint("Trying MaplistMethod_Shuffle\n");
+
        imax = 42;
 
        for(i = 0; i <= imax; ++i)
@@ -1135,10 +1142,14 @@ float(float exponent) MaplistMethod_Shuffle = // more clever shuffling
 void Maplist_Init()
 {
        Map_Count = tokenizebyseparator(autocvar_g_maplist, " ");
-       if(Map_Count == 0)
+       float i;
+       for (i = 0; i < Map_Count; ++i)
+               if (Map_Check(i, 2))
+                       break;
+       if (i == Map_Count)
        {
-               bprint( "Maplist is empty!  Resetting it to default map list.\n" );
-               cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
+               bprint( "Maplist contains no usable maps!  Resetting it to default map list.\n" );
+               cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags() | MAPINFO_FLAG_NOAUTOMAPLIST));
                if(autocvar_g_maplist_shuffle)
                        ShuffleMaplist();
                localcmd("\nmenu_cmd sync\n");
@@ -1241,31 +1252,12 @@ void GotoNextMap(float reinit)
                return;
        alreadychangedlevel = TRUE;
 
-       {
-               string nextMap;
-               float allowReset;
+       string nextMap;
 
-               for(allowReset = 1; allowReset >= 0; --allowReset)
-               {
-                       nextMap = GetNextMap();
-                       if(nextMap != "")
-                               break;
-
-                       if(allowReset)
-                       {
-                               bprint( "Maplist contains no single playable map!  Resetting it to default map list.\n" );
-                               cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
-                               if(autocvar_g_maplist_shuffle)
-                                       ShuffleMaplist();
-                               localcmd("\nmenu_cmd sync\n");
-                       }
-                       else
-                       {
-                               error("Everything is broken - not even the default map list works. Please report this to the developers.");
-                       }
-               }
-               Map_Goto(reinit);
-       }
+       nextMap = GetNextMap();
+       if(nextMap == "")
+               error("Everything is broken - cannot find a next map. Please report this to the developers.");
+       Map_Goto(reinit);
 }
 
 
index a5de5b276d20630de61fbab6a3ca1d75fe22c478..cf0c4787040ad52f01d134bc727ee4544ff24eb7 100644 (file)
@@ -44,8 +44,8 @@ void ctf_CaptureRecord(entity flag, entity player)
 void ctf_FlagcarrierWaypoints(entity player)
 {
        WaypointSprite_Spawn("flagcarrier", 0, 0, player, FLAG_WAYPOINT_OFFSET, world, player.team, player, wps_flagcarrier, TRUE, RADARICON_FLAG, WPCOLOR_FLAGCARRIER(player.team));
-       WaypointSprite_UpdateMaxHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent) * 2);
-       WaypointSprite_UpdateHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent));
+       WaypointSprite_UpdateMaxHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON) * 2);
+       WaypointSprite_UpdateHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
        WaypointSprite_UpdateTeamRadar(player.wps_flagcarrier, RADARICON_FLAGCARRIER, WPCOLOR_FLAGCARRIER(player.team));
 }
 
@@ -1719,7 +1719,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink)
        
        // update the health of the flag carrier waypointsprite
        if(self.wps_flagcarrier) 
-               WaypointSprite_UpdateHealth(self.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent));
+               WaypointSprite_UpdateHealth(self.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
        
        return FALSE;
 }
@@ -1741,7 +1741,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDamage) // for changing damage and force values t
        }
        else if(frag_target.flagcarried && (frag_target.deadflag == DEAD_NO) && DIFF_TEAM(frag_target, frag_attacker)) // if the target is a flagcarrier
        {
-               if(autocvar_g_ctf_flagcarrier_auto_helpme_damage > ('1 0 0' * healtharmor_maxdamage(frag_target.health, frag_target.armorvalue, autocvar_g_balance_armor_blockpercent)))
+               if(autocvar_g_ctf_flagcarrier_auto_helpme_damage > ('1 0 0' * healtharmor_maxdamage(frag_target.health, frag_target.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON)))
                if(time > frag_target.wps_helpme_time + autocvar_g_ctf_flagcarrier_auto_helpme_time)
                {
                        frag_target.wps_helpme_time = time;
index b1873a4bd63c71665b7d6e924b11846e3004653a..4f5391537c88184842933d9d0128363788d6baca 100644 (file)
@@ -268,6 +268,10 @@ float ItemSend(entity to, float sf)
     return TRUE;
 }
 
+void ItemUpdate(entity item)
+{
+       item.SendFlags |= ISF_LOCATION;
+}
 
 float have_pickup_item(void)
 {
index a5817fa502addef565a946eaaa55a7bd544f60ff..6454838ebdd68a674b3e541945612b874f2b2768 100644 (file)
@@ -462,8 +462,8 @@ entity WaypointSprite_AttachCarrier(
        e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', world, carrier.team, carrier, waypointsprite_attachedforcarrier, FALSE, icon, rgb);
        if(e)
        {
-               WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent) * 2);
-               WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent));
+               WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON) * 2);
+               WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
        }
        return e;
 }