]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/bot_ai
authorterencehill <piuntn@gmail.com>
Mon, 2 Jul 2018 14:00:01 +0000 (16:00 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 2 Jul 2018 14:00:01 +0000 (16:00 +0200)
65 files changed:
.gitlab-ci.yml
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
bal-wep-xpm.cfg
effects-high.cfg
effects-low.cfg
effects-med.cfg
effects-normal.cfg
effects-omg.cfg
effects-ultimate.cfg
effects-ultra.cfg
models/items/a_rockets.md3
models/player/gak.iqm_0.txt
models/player/gakmasked.iqm_0.txt
models/player/ignismasked.iqm_0.txt
models/player/seraphinamasked.iqm_0.txt
physicsX07.cfg
qcsrc/client/commands/cl_cmd.qc
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/view.qc
qcsrc/common/gamemodes/gamemode/assault/assault.qc
qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/mapobjects/subs.qc
qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/t_items.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/ecs/systems/physics.qc
qcsrc/server/bot/default/bot.qc
qcsrc/server/bot/default/havocbot/havocbot.qc
qcsrc/server/client.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_damage.qh
qcsrc/server/mutators/events.qh
qcsrc/server/player.qc
qcsrc/server/resources.qc
qcsrc/server/resources.qh
scripts/explosiveammo.shader [new file with mode: 0644]
textures/items/a_rocket_bottom.jpg [deleted file]
textures/items/a_rocket_box.jpg [deleted file]
textures/items/a_rocket_gre.jpg [deleted file]
textures/items/a_rocket_gre_glow.jpg [deleted file]
textures/items/a_rocket_roc.jpg [deleted file]
textures/items/a_rocket_roc_gloss.jpg [deleted file]
textures/items/a_rocket_roc_glow.jpg [deleted file]
textures/items/a_rocket_roc_norm.jpg [deleted file]
textures/items/a_rocket_tag.jpg [deleted file]
textures/items/explosiveammo.tga [new file with mode: 0644]
textures/items/explosiveammo_gloss.tga [new file with mode: 0644]
textures/items/explosiveammo_glow.tga [new file with mode: 0644]
textures/items/explosiveammo_icon_01.tga [new file with mode: 0644]
textures/items/explosiveammo_icon_01_glow.tga [new file with mode: 0644]
textures/items/explosiveammo_icon_02.tga [new file with mode: 0644]
textures/items/explosiveammo_icon_02_glow.tga [new file with mode: 0644]
textures/items/explosiveammo_icon_03.tga [new file with mode: 0644]
textures/items/explosiveammo_icon_03_glow.tga [new file with mode: 0644]
textures/items/explosiveammo_icon_blank.tga [new file with mode: 0644]
textures/items/explosiveammo_norm.tga [new file with mode: 0644]
textures/items/explosiveammo_reflect.tga [new file with mode: 0644]
xonotic-server.cfg

index 8243f0d9ba5af67ff036301b93dfb84e9510ca87..153b172f2bc2986096b04662f7ec1e011bfe617f 100644 (file)
@@ -29,7 +29,7 @@ test_sv_game:
     - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
     - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
     - make
-    - EXPECT=de6a7d95ce65fb6c66558a93a9fb994f
+    - EXPECT=b8f4fa5002af1f9f2d5ac3d1809ed188
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 380d93ed47acc76f5aae18c560b77962a49ad531..1816f3f2e921ce4de93ceabcc2bad978861fcdd4 100644 (file)
@@ -322,7 +322,7 @@ set g_balance_crylink_primary_spread 0.08
 set g_balance_crylink_reload_ammo 0
 set g_balance_crylink_reload_time 2
 set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_ammo 2
+set g_balance_crylink_secondary_ammo 3
 set g_balance_crylink_secondary_animtime 0.2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_bounces 0
index fcf68678d197f048f1b4bad1a270890eea1d7cd4..2e0e74aa3d7a993b7a97f1ac1b43f9ead3bbc797 100644 (file)
@@ -256,7 +256,7 @@ set g_balance_crylink_primary_spread 0.08
 set g_balance_crylink_reload_ammo 0
 set g_balance_crylink_reload_time 2
 set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_ammo 2
+set g_balance_crylink_secondary_ammo 3
 set g_balance_crylink_secondary_animtime 0.2
 set g_balance_crylink_secondary_bouncedamagefactor 0
 set g_balance_crylink_secondary_bounces 0
@@ -392,7 +392,7 @@ set g_balance_devastator_guiderate 0
 set g_balance_devastator_guideratedelay 999
 set g_balance_devastator_guidestop 1
 set g_balance_devastator_health 30
-set g_balance_devastator_lifetime 100
+set g_balance_devastator_lifetime 20
 set g_balance_devastator_radius 110
 set g_balance_devastator_refire 0.9
 set g_balance_devastator_reload_ammo 0
index e55e860773424fdad08857e6b3c121c3b686c407..5c6ace7abd7c6649f82b9998570e562154431a8e 100644 (file)
@@ -256,7 +256,7 @@ set g_balance_crylink_primary_spread 0.08
 set g_balance_crylink_reload_ammo 0
 set g_balance_crylink_reload_time 2
 set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_ammo 2
+set g_balance_crylink_secondary_ammo 3
 set g_balance_crylink_secondary_animtime 0.2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_bounces 0
@@ -883,7 +883,7 @@ set g_balance_okmachinegun_primary_ammo 1
 set g_balance_okmachinegun_primary_damage 25
 set g_balance_okmachinegun_primary_force 5
 set g_balance_okmachinegun_primary_refire 0.1
-set g_balance_okmachinegun_primary_solidpenetration 13.1
+set g_balance_okmachinegun_primary_solidpenetration 63
 set g_balance_okmachinegun_primary_spread_add 0.012
 set g_balance_okmachinegun_primary_spread_max 0.05
 set g_balance_okmachinegun_primary_spread_min 0
index b16e787f5e5a95c029e1c679405b6b7d37d00a08..a5438d1b7c65a39ebe33f27da62dfb47e3c5e359 100644 (file)
@@ -256,7 +256,7 @@ set g_balance_crylink_primary_spread 0.08
 set g_balance_crylink_reload_ammo 0
 set g_balance_crylink_reload_time 2
 set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_ammo 2
+set g_balance_crylink_secondary_ammo 3
 set g_balance_crylink_secondary_animtime 0.2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_bounces 0
index 48c8253a3a2146538f1a9dfa6cc388f76b616ba4..597bb4660a9f0e063e6009652c8c0997dbbbd99e 100644 (file)
@@ -8,6 +8,8 @@ cl_spawn_point_particles 1
 cl_playerdetailreduction 4
 gl_flashblend 0
 gl_picmip -1
+gl_texturecompression_2d 0
+gl_texturecompression_sky 0
 mod_q3bsp_nolightmaps 0
 r_bloom 1
 r_coronas 1
index b7e9a98a3a7a78fa396023d1f3fe615cd4cb4c4a..c9549581bddb35ebfc0fa858b347760aed609b13 100644 (file)
@@ -8,6 +8,8 @@ cl_spawn_point_particles 0
 cl_playerdetailreduction 4
 gl_flashblend 1
 gl_picmip 1
+gl_texturecompression_2d 1
+gl_texturecompression_sky 1
 mod_q3bsp_nolightmaps 1
 r_bloom 0
 r_coronas 1
index 66eed5aa5d55dc897c6cd748848cd5ed82cb3efe..4ea20a1699d110c6742eab52260963c581b9ee66 100644 (file)
@@ -8,6 +8,8 @@ cl_spawn_point_particles 0
 cl_playerdetailreduction 4
 gl_flashblend 0
 gl_picmip 0
+gl_texturecompression_2d 0
+gl_texturecompression_sky 1
 mod_q3bsp_nolightmaps 0
 r_bloom 0
 r_coronas 1
index 63dcd134a066f0c4255c4ad380f085249e177d0a..c421e5b325b6925c89b17e2a926fe018e5a170b2 100644 (file)
@@ -8,6 +8,8 @@ cl_spawn_point_particles 1
 cl_playerdetailreduction 4
 gl_flashblend 0
 gl_picmip 0
+gl_texturecompression_2d 0
+gl_texturecompression_sky 1
 mod_q3bsp_nolightmaps 0
 r_bloom 0
 r_coronas 1
index 9018ee2c94375ba8740fa35f3357f55ff1d3cf15..7614417ce2027e42c4d711fce396faaaf7c1cd14 100644 (file)
@@ -8,6 +8,8 @@ cl_spawn_point_particles 0
 cl_playerdetailreduction 4
 gl_flashblend 1
 gl_picmip 1337
+gl_texturecompression_2d 1
+gl_texturecompression_sky 1
 mod_q3bsp_nolightmaps 1
 r_bloom 0
 r_coronas 1
index 0cf3a899cbcebf5fa385a66ffd3fc07f326ca3c0..3ce6f55a7f01483f9a6c94d1c4a9d53405abbe8b 100644 (file)
@@ -8,6 +8,8 @@ cl_spawn_point_particles 1
 cl_playerdetailreduction 0
 gl_flashblend 0
 gl_picmip -1
+gl_texturecompression_2d 0
+gl_texturecompression_sky 0
 mod_q3bsp_nolightmaps 0
 r_bloom 1
 r_coronas 1
index 5909f3b83dc956b18141d4c0111b251c60080813..d42d7c58ba07362f3d95b73bd5a6e8b90dab5835 100644 (file)
@@ -8,6 +8,8 @@ cl_spawn_point_particles 1
 cl_playerdetailreduction 0
 gl_flashblend 0
 gl_picmip -1
+gl_texturecompression_2d 0
+gl_texturecompression_sky 0
 mod_q3bsp_nolightmaps 0
 r_bloom 1
 r_coronas 1
index 3f1a594d0692979666b44cc660ac2493adf01597..3e9a8f82cb4290cb31780635013b9b5dde6f8dcc 100644 (file)
Binary files a/models/items/a_rockets.md3 and b/models/items/a_rockets.md3 differ
index 27b579027f93063f207b8fbf849e538a7ea4dff3..efdb0b2b075859d0ae67937c7dda6b8bf878f752 100644 (file)
@@ -10,3 +10,4 @@ bone_aim1 0.4 spine4
 bone_aim2 0.35 bip01 r hand
 bone_weapon bip01 r hand
 fixbone 1
+hidden 1
index 44843b7058baf5ccd13a0e37c88694b99620f9a1..fbc6b672c39d97411a589b4165d5ef2fc0b43095 100644 (file)
@@ -1,4 +1,4 @@
-name Gak Masked
+name Gak
 species alien
 sex Male
 weight 87
index 2610d2b92db356797a22a0b52605efc304c05f41..4a35d9099e9daff55753fd47e1a2157bbaaa4f0f 100644 (file)
@@ -11,3 +11,4 @@ bone_aim2 0.2 upperarm_L
 bone_aim3 0.35 bip01 r hand
 bone_weapon bip01 r hand
 fixbone 1
+hidden 1
index c997d01f36488d7771766fe38956f883b8bcc9bc..76ca617ba11dde4fba964e2babdaf156df10f5ef 100644 (file)
@@ -10,3 +10,4 @@ bone_aim1 0.4 spine4
 bone_aim2 0.35 bip01 r hand
 bone_weapon bip01 r hand
 fixbone 1
+hidden 1
index 8ae771f1cf468a9ac21ec05d4b94cdc4e2782708..61354633d517a6b9d04acc7a0ec66f0fc0ef199f 100644 (file)
@@ -1,5 +1,5 @@
 g_mod_physics Xonotic
-// current Xonotic physics
+// Xonotic 0.7 physics
 
 sv_gravity 800
 sv_maxspeed 360
index 034bb6336680e7ead16421fcaf5fba0c8f78d69c..1a6a9f88419d8cccc098c2fb78f6e925dc9bf5b7 100644 (file)
@@ -325,7 +325,8 @@ void LocalCommand_hud(int request, int argc)
 
                                case "clickradar":
                                {
-                                       HUD_Radar_Show_Maximized(!hud_panel_radar_mouse, 1);
+                                       if(!isdemo())
+                                               HUD_Radar_Show_Maximized(!hud_panel_radar_mouse, 1);
                                        return;
                                }
                        }
index 5b8964d0d3962a913033d672c7ad4366d9605b06..91d9f6f70d9757635c97ffe4136d504e325925dd 100644 (file)
@@ -294,8 +294,11 @@ void Cmd_Scoreboard_Help()
 {
        LOG_INFO(_("You can modify the scoreboard using the ^2scoreboard_columns_set command."));
        LOG_INFO(_("Usage:"));
-       LOG_INFO("^2scoreboard_columns_set default");
-       LOG_INFO(_("^2scoreboard_columns_set ^7field1 field2 ..."));
+       LOG_INFO("^2scoreboard_columns_set ^3default");
+       LOG_INFO(_("^2scoreboard_columns_set ^3field1 field2 ..."));
+       LOG_INFO(_("^2scoreboard_columns_set ^7without arguments reads the arguments from the cvar scoreboard_columns"));
+       LOG_INFO(_("  ^5Note: ^7scoreboard_columns_set without arguments is executed on every map start"));
+       LOG_INFO(_("^2scoreboard_columns_set ^3expand_default ^7loads default layout and expands it into the cvar scoreboard_columns so you can edit it"));
        LOG_INFO(_("You can use a ^3|^7 to start the right-aligned fields."));
        LOG_INFO(_("The following field names are recognized (case insensitive):"));
        LOG_INFO("");
@@ -401,8 +404,12 @@ void Cmd_Scoreboard_SetFields(int argc)
 
        if(argc == 3)
        {
-               if(argv(2) == "default")
+               if(argv(2) == "default" || argv(2) == "expand_default")
+               {
+                       if(argv(2) == "expand_default")
+                               cvar_set("scoreboard_columns", SCOREBOARD_DEFAULT_COLUMNS);
                        argc = tokenizebyseparator(strcat("0 1 ", SCOREBOARD_DEFAULT_COLUMNS), " ");
+               }
                else if(argv(2) == "all")
                {
                        string s = "ping pl name |"; // scores without a label
index 4d355fb2a177fd5fe102c19ff5b7783381abf227..2538299475c3b43980a56483ca0995470d5fff97 100644 (file)
@@ -491,9 +491,8 @@ vector GetCurrentFov(float fov)
        if(zoomfactor < 1 || zoomfactor > 30)
                zoomfactor = 2.5;
        zoomspeed = autocvar_cl_zoomspeed;
-       if(zoomspeed >= 0)
-       if(zoomspeed < 0.5 || zoomspeed > 16)
-                       zoomspeed = 3.5;
+       if (zoomspeed >= 0 && (zoomspeed < 0.5 || zoomspeed > 16))
+               zoomspeed = 3.5;
 
        zoomdir = button_zoom;
 
@@ -526,7 +525,11 @@ vector GetCurrentFov(float fov)
 
        if(zoomdir) { zoomin_effect = 0; }
 
-       if(camera_active)
+       if (spectatee_status > 0 && STAT(CAMERA_SPECTATOR) == 2)
+       {
+               current_viewzoom = 1;
+       }
+       else if (camera_active)
        {
                current_viewzoom = min(1, current_viewzoom + drawframetime);
        }
@@ -570,10 +573,10 @@ vector GetCurrentFov(float fov)
 
        if(autocvar_cl_velocityzoom_enabled && autocvar_cl_velocityzoom_type) // _type = 0 disables velocity zoom too
        {
-               if(intermission) { curspeed = 0; }
+               if (intermission || (spectatee_status > 0 && STAT(CAMERA_SPECTATOR) == 2))
+                       curspeed = 0;
                else
                {
-
                        makevectors(view_angles);
                        v = pmove_vel;
                        if(csqcplayer)
index 6d119799add9293451f8886580d0aafa024b28ed..710f03095b5402c0e837ec8e3e8867576067b9bd 100644 (file)
@@ -31,7 +31,8 @@ void assault_objective_use(entity this, entity actor, entity trigger)
 
 vector target_objective_spawn_evalfunc(entity this, entity player, entity spot, vector current)
 {
-       if(GetResourceAmount(this, RESOURCE_HEALTH) < 0 || GetResourceAmount(this, RESOURCE_HEALTH) >= ASSAULT_VALUE_INACTIVE)
+       float hlth = GetResourceAmount(this, RESOURCE_HEALTH);
+       if (hlth < 0 || hlth >= ASSAULT_VALUE_INACTIVE)
                return '-1 0 0';
        return current;
 }
@@ -61,16 +62,17 @@ void assault_objective_decrease_use(entity this, entity actor, entity trigger)
        else
                return; // already activated! cannot activate again!
 
-       if(GetResourceAmount(this.enemy, RESOURCE_HEALTH) < ASSAULT_VALUE_INACTIVE)
+       float hlth = GetResourceAmount(this.enemy, RESOURCE_HEALTH);
+       if (hlth < ASSAULT_VALUE_INACTIVE)
        {
-               if(GetResourceAmount(this.enemy, RESOURCE_HEALTH) - this.dmg > 0.5)
+               if (hlth - this.dmg > 0.5)
                {
                        GameRules_scoring_add_team(actor, SCORE, this.dmg);
                        TakeResource(this.enemy, RESOURCE_HEALTH, this.dmg);
                }
                else
                {
-                       GameRules_scoring_add_team(actor, SCORE, GetResourceAmount(this.enemy, RESOURCE_HEALTH));
+                       GameRules_scoring_add_team(actor, SCORE, hlth);
                        GameRules_scoring_add_team(actor, ASSAULT_OBJECTIVES, 1);
                        SetResourceAmountExplicit(this.enemy, RESOURCE_HEALTH, -1);
 
@@ -334,7 +336,8 @@ spawnfunc(target_objective_decrease)
 bool destructible_heal(entity targ, entity inflictor, float amount, float limit)
 {
        float true_limit = ((limit != RESOURCE_LIMIT_NONE) ? limit : targ.max_health);
-       if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
+       float hlth = GetResourceAmount(targ, RESOURCE_HEALTH);
+       if (hlth <= 0 || hlth >= true_limit)
                return false;
 
        GiveResourceWithLimit(targ, RESOURCE_HEALTH, amount, true_limit);
@@ -411,7 +414,8 @@ void havocbot_goalrating_ast_targets(entity this, float ratingscale)
                entity destr = it;
                IL_EACH(g_assault_objectivedecreasers, it.targetname == destr.target,
                {
-                       if(GetResourceAmount(it.enemy, RESOURCE_HEALTH) > 0 && GetResourceAmount(it.enemy, RESOURCE_HEALTH) < ASSAULT_VALUE_INACTIVE)
+                       float hlth = GetResourceAmount(it.enemy, RESOURCE_HEALTH);
+                       if (hlth > 0 && hlth < ASSAULT_VALUE_INACTIVE)
                        {
                                found = true;
                                break;
index 2ca0ba6a98fc30e7aca211160421942a13bacaaf..d2ea25e17c7b774418d8fc65c499a02550f68d84 100644 (file)
@@ -17,10 +17,10 @@ void freezetag_count_alive_players()
        FOREACH_CLIENT(IS_PLAYER(it), {
                switch(it.team)
                {
-                       case NUM_TEAM_1: ++total_players; if(GetResourceAmount(it, RESOURCE_HEALTH) >= 1 && STAT(FROZEN, it) != 1) ++redalive; break;
-                       case NUM_TEAM_2: ++total_players; if(GetResourceAmount(it, RESOURCE_HEALTH) >= 1 && STAT(FROZEN, it) != 1) ++bluealive; break;
-                       case NUM_TEAM_3: ++total_players; if(GetResourceAmount(it, RESOURCE_HEALTH) >= 1 && STAT(FROZEN, it) != 1) ++yellowalive; break;
-                       case NUM_TEAM_4: ++total_players; if(GetResourceAmount(it, RESOURCE_HEALTH) >= 1 && STAT(FROZEN, it) != 1) ++pinkalive; break;
+                       case NUM_TEAM_1: ++total_players; if(STAT(FROZEN, it) != 1 && GetResourceAmount(it, RESOURCE_HEALTH) >= 1) ++redalive; break;
+                       case NUM_TEAM_2: ++total_players; if(STAT(FROZEN, it) != 1 && GetResourceAmount(it, RESOURCE_HEALTH) >= 1) ++bluealive; break;
+                       case NUM_TEAM_3: ++total_players; if(STAT(FROZEN, it) != 1 && GetResourceAmount(it, RESOURCE_HEALTH) >= 1) ++yellowalive; break;
+                       case NUM_TEAM_4: ++total_players; if(STAT(FROZEN, it) != 1 && GetResourceAmount(it, RESOURCE_HEALTH) >= 1) ++pinkalive; break;
                }
        });
        FOREACH_CLIENT(IS_REAL_CLIENT(it), {
@@ -141,14 +141,14 @@ float freezetag_CheckWinner()
 entity freezetag_LastPlayerForTeam(entity this)
 {
        entity last_pl = NULL;
-       FOREACH_CLIENT(IS_PLAYER(it) && it != this, {
-               if(GetResourceAmount(it, RESOURCE_HEALTH) >= 1)
-               if(!STAT(FROZEN, it))
-               if(SAME_TEAM(it, this))
-               if(!last_pl)
-                       last_pl = it;
-               else
-                       return NULL;
+       FOREACH_CLIENT(IS_PLAYER(it) && it != this && SAME_TEAM(it, this), {
+               if (!STAT(FROZEN, it) && GetResourceAmount(it, RESOURCE_HEALTH) >= 1)
+               {
+                       if (!last_pl)
+                               last_pl = it;
+                       else
+                               return NULL;
+               }
        });
        return last_pl;
 }
@@ -182,6 +182,7 @@ void freezetag_Add_Score(entity targ, entity attacker)
        // else nothing - got frozen by the game type rules themselves
 }
 
+// to be called when the player is frozen by freezetag (on death, spectator join etc), gives the score
 void freezetag_Freeze(entity targ, entity attacker)
 {
        if(STAT(FROZEN, targ))
@@ -197,14 +198,6 @@ void freezetag_Freeze(entity targ, entity attacker)
        freezetag_Add_Score(targ, attacker);
 }
 
-void freezetag_Unfreeze(entity this)
-{
-       this.freezetag_frozen_time = 0;
-       this.freezetag_frozen_timeout = 0;
-
-       Unfreeze(this);
-}
-
 float freezetag_isEliminated(entity e)
 {
        if(IS_PLAYER(e) && (STAT(FROZEN, e) == 1 || IS_DEAD(e)))
@@ -324,7 +317,7 @@ void ft_RemovePlayer(entity this)
        SetResourceAmountExplicit(this, RESOURCE_HEALTH, 0); // neccessary to update correctly alive stats
        if(!STAT(FROZEN, this))
                freezetag_LastPlayerForTeam_Notify(this);
-       freezetag_Unfreeze(this);
+       Unfreeze(this);
        freezetag_count_alive_players();
 }
 
@@ -353,7 +346,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerDies)
        if(round_handler_CountdownRunning())
        {
                if(STAT(FROZEN, frag_target))
-                       freezetag_Unfreeze(frag_target);
+                       Unfreeze(frag_target);
                freezetag_count_alive_players();
                return true; // let the player die so that he can respawn whenever he wants
        }
@@ -371,7 +364,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerDies)
                        freezetag_LastPlayerForTeam_Notify(frag_target);
                }
                else
-                       freezetag_Unfreeze(frag_target); // remove ice
+                       Unfreeze(frag_target); // remove ice
                SetResourceAmountExplicit(frag_target, RESOURCE_HEALTH, 0); // Unfreeze resets health
                frag_target.freezetag_frozen_timeout = -2; // freeze on respawn
                return true;
@@ -440,6 +433,15 @@ MUTATOR_HOOKFUNCTION(ft, GiveFragsForKill, CBC_ORDER_FIRST)
        return true;
 }
 
+MUTATOR_HOOKFUNCTION(ft, Unfreeze)
+{
+       entity targ = M_ARGV(0, entity);
+       targ.freezetag_frozen_time = 0;
+       targ.freezetag_frozen_timeout = 0;
+
+       freezetag_count_alive_players();
+}
+
 MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
 {
        if(game_stopped)
@@ -485,7 +487,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
 
                if(STAT(REVIVE_PROGRESS, player) >= 1)
                {
-                       freezetag_Unfreeze(player);
+                       Unfreeze(player);
                        freezetag_count_alive_players();
 
                        if(n == -1)
@@ -581,8 +583,8 @@ MUTATOR_HOOKFUNCTION(ft, FragCenterMessage)
                return; // target was already frozen, so this is just pushing them off the cliff
 
        Send_Notification(NOTIF_ONE, frag_attacker, MSG_CHOICE, CHOICE_FRAG_FREEZE, frag_target.netname, kill_count_to_attacker, (IS_BOT_CLIENT(frag_target) ? -1 : CS(frag_target).ping));
-       Send_Notification(NOTIF_ONE, frag_target, MSG_CHOICE, CHOICE_FRAGGED_FREEZE, frag_attacker.netname, kill_count_to_target, 
-                                                                               GetResourceAmount(frag_attacker, RESOURCE_HEALTH), GetResourceAmount(frag_attacker, RESOURCE_ARMOR), (IS_BOT_CLIENT(frag_attacker) ? -1 : CS(frag_attacker).ping));
+       Send_Notification(NOTIF_ONE, frag_target, MSG_CHOICE, CHOICE_FRAGGED_FREEZE, frag_attacker.netname, kill_count_to_target,
+               GetResourceAmount(frag_attacker, RESOURCE_HEALTH), GetResourceAmount(frag_attacker, RESOURCE_ARMOR), (IS_BOT_CLIENT(frag_attacker) ? -1 : CS(frag_attacker).ping));
 
        return true;
 }
@@ -595,7 +597,7 @@ void freezetag_Initialize()
 
        freezetag_teams = BITS(bound(2, freezetag_teams, 4));
        GameRules_scoring(freezetag_teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, {
-           field(SP_FREEZETAG_REVIVALS, "revivals", 0);
+               field(SP_FREEZETAG_REVIVALS, "revivals", 0);
        });
 
        round_handler_Spawn(freezetag_CheckTeams, freezetag_CheckWinner, func_null);
index 739523dd66c97df4d20622c802aac90fed779e6f..9b175f179a7cc6ff0dc95de64cd6a4564c80fac0 100644 (file)
@@ -449,15 +449,17 @@ void ons_ControlPoint_Icon_Damage(entity this, entity inflictor, entity attacker
 
 bool ons_ControlPoint_Icon_Heal(entity targ, entity inflictor, float amount, float limit)
 {
+       float hlth = GetResourceAmount(targ, RESOURCE_HEALTH);
        float true_limit = ((limit != RESOURCE_LIMIT_NONE) ? limit : targ.max_health);
-       if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
+       if (hlth <= 0 || hlth >= true_limit)
                return false;
 
        GiveResourceWithLimit(targ, RESOURCE_HEALTH, amount, true_limit);
+       hlth = GetResourceAmount(targ, RESOURCE_HEALTH);
        if(targ.owner.iscaptured)
-               WaypointSprite_UpdateHealth(targ.owner.sprite, GetResourceAmount(targ, RESOURCE_HEALTH));
+               WaypointSprite_UpdateHealth(targ.owner.sprite, hlth);
        else
-               WaypointSprite_UpdateBuildFinished(targ.owner.sprite, time + (targ.max_health - GetResourceAmount(targ, RESOURCE_HEALTH)) / (targ.count / ONS_CP_THINKRATE));
+               WaypointSprite_UpdateBuildFinished(targ.owner.sprite, time + (targ.max_health - hlth) / (targ.count / ONS_CP_THINKRATE));
        targ.SendFlags |= CPSF_STATUS;
        return true;
 }
@@ -904,13 +906,14 @@ void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float d
                }
        }
        TakeResource(this, RESOURCE_HEALTH, damage);
-       WaypointSprite_UpdateHealth(this.sprite, GetResourceAmount(this, RESOURCE_HEALTH));
+       float hlth = GetResourceAmount(this, RESOURCE_HEALTH);
+       WaypointSprite_UpdateHealth(this.sprite, hlth);
        // choose an animation frame based on health
-       this.frame = 10 * bound(0, (1 - GetResourceAmount(this, RESOURCE_HEALTH) / this.max_health), 1);
+       this.frame = 10 * bound(0, (1 - hlth / this.max_health), 1);
        // see if the generator is still functional, or dying
-       if (GetResourceAmount(this, RESOURCE_HEALTH) > 0)
+       if (hlth > 0)
        {
-               this.lasthealth = GetResourceAmount(this, RESOURCE_HEALTH);
+               this.lasthealth = hlth;
        }
        else
        {
@@ -964,13 +967,15 @@ void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float d
 bool ons_GeneratorHeal(entity targ, entity inflictor, float amount, float limit)
 {
        float true_limit = ((limit != RESOURCE_LIMIT_NONE) ? limit : targ.max_health);
-       if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
+       float hlth = GetResourceAmount(targ, RESOURCE_HEALTH);
+       if (hlth <= 0 || hlth >= true_limit)
                return false;
 
        GiveResourceWithLimit(targ, RESOURCE_HEALTH, amount, true_limit);
-       WaypointSprite_UpdateHealth(targ.sprite, GetResourceAmount(targ, RESOURCE_HEALTH));
-       targ.frame = 10 * bound(0, (1 - GetResourceAmount(targ, RESOURCE_HEALTH) / targ.max_health), 1);
-       targ.lasthealth = GetResourceAmount(targ, RESOURCE_HEALTH);
+       hlth = GetResourceAmount(targ, RESOURCE_HEALTH);
+       WaypointSprite_UpdateHealth(targ.sprite, hlth);
+       targ.frame = 10 * bound(0, (1 - hlth / targ.max_health), 1);
+       targ.lasthealth = hlth;
        targ.SendFlags |= GSF_STATUS;
        return true;
 }
index 4877d0fb499589034306574c0194d4f63b1b60b9..f9e50dcf8f19d819509c9c6a460050da0a120954 100644 (file)
@@ -553,7 +553,7 @@ void InitTrigger(entity this)
 // to mean no restrictions, so use a yaw of 360 instead.
        SetMovedir(this);
        this.solid = SOLID_TRIGGER;
-       SetBrushEntityModel(this);
+       SetBrushEntityModelNoLOD(this);
        set_movetype(this, MOVETYPE_NONE);
        this.modelindex = 0;
        this.model = "";
@@ -565,7 +565,7 @@ void InitSolidBSPTrigger(entity this)
 // to mean no restrictions, so use a yaw of 360 instead.
        SetMovedir(this);
        this.solid = SOLID_BSP;
-       SetBrushEntityModel(this);
+       SetBrushEntityModelNoLOD(this);
        set_movetype(this, MOVETYPE_NONE); // why was this PUSH? -div0
 //     this.modelindex = 0;
        this.model = "";
index b88d96d700307fbf05480fb88befac6a4824b6bd..d9eacaae0c4e7a1cf2821d4574bb255a572c3bd5 100644 (file)
@@ -4,7 +4,7 @@ AUTOCVAR(sv_damagetext, int, 2, "<= 0: disabled, >= 1: visible to spectators, >=
 
 REGISTER_MUTATOR(damagetext, true);
 
-#define SV_DAMAGETEXT_DISABLED()        (autocvar_sv_damagetext <= 0 || MUTATOR_IS_ENABLED(mutator_instagib))
+#define SV_DAMAGETEXT_DISABLED()        (autocvar_sv_damagetext <= 0)
 #define SV_DAMAGETEXT_SPECTATORS_ONLY() (autocvar_sv_damagetext >= 1)
 #define SV_DAMAGETEXT_PLAYERS()         (autocvar_sv_damagetext >= 2)
 #define SV_DAMAGETEXT_ALL()             (autocvar_sv_damagetext >= 3)
@@ -16,6 +16,7 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) {
     const float armor = M_ARGV(3, float);
     const int deathtype = M_ARGV(5, int);
     const float potential_damage = M_ARGV(6, float);
+    if(DEATH_WEAPONOF(deathtype) == WEP_VAPORIZER) return;
     FOREACH_CLIENT(IS_REAL_CLIENT(it), {
         if (
             (SV_DAMAGETEXT_ALL()) ||
index 3fe2808583b94254d580b3c3960b2610c9192e6f..9ac3e4299901db21051d4ea2f206fe8636bbfa30 100644 (file)
@@ -351,37 +351,50 @@ void _Movetype_LinkEdict_TouchAreaGrid(entity this)  // SV_LinkEdict_TouchAreaGr
     });
 }
 
+bool autocvar__movetype_debug = false;
 void _Movetype_LinkEdict(entity this, bool touch_triggers)  // SV_LinkEdict
 {
-       vector mi, ma;
-       if(this.solid == SOLID_BSP)
+       if(autocvar__movetype_debug)
        {
-               // TODO set the absolute bbox
-               mi = this.mins;
-               ma = this.maxs;
-       }
-       else
-       {
-               mi = this.mins;
-               ma = this.maxs;
-       }
-       mi += this.origin;
-       ma += this.origin;
+               vector mi, ma;
+               if(this.solid == SOLID_BSP)
+               {
+                       // TODO set the absolute bbox
+                       mi = this.mins;
+                       ma = this.maxs;
+               }
+               else
+               {
+                       mi = this.mins;
+                       ma = this.maxs;
+               }
+               mi += this.origin;
+               ma += this.origin;
 
-       if(this.flags & FL_ITEM)
-       {
-               mi -= '15 15 1';
-               ma += '15 15 1';
+               if(this.flags & FL_ITEM)
+               {
+                       mi -= '15 15 1';
+                       ma += '15 15 1';
+               }
+               else
+               {
+                       mi -= '1 1 1';
+                       ma += '1 1 1';
+               }
+
+               this.absmin = mi;
+               this.absmax = ma;
        }
        else
        {
-               mi -= '1 1 1';
-               ma += '1 1 1';
+               setorigin(this, this.origin); // calls SV_LinkEdict
+       #ifdef CSQC
+               // NOTE: CSQC's version of setorigin doesn't expand
+               this.absmin -= '1 1 1';
+               this.absmax += '1 1 1';
+       #endif
        }
 
-       this.absmin = mi;
-       this.absmax = ma;
-
        if(touch_triggers)
                _Movetype_LinkEdict_TouchAreaGrid(this);
 }
@@ -519,6 +532,8 @@ void _Movetype_Physics_Frame(entity this, float movedt)
                case MOVETYPE_FLY:
                case MOVETYPE_FLY_WORLDONLY:
                        _Movetype_Physics_Toss(this, movedt);
+                       if(wasfreed(this))
+                               return;
                        _Movetype_LinkEdict(this, true);
                        break;
                case MOVETYPE_PHYSICS:
index 68fa7ef578ee302b29fd3697e22f89b5a2b6d856..140b619c5ec09cae3f8c62fcf1e87bb6c4b61c2b 100644 (file)
@@ -742,14 +742,14 @@ float Item_GiveAmmoTo(entity item, entity player, int resource_type, float ammom
                {
                        return false;
                }
-               GiveResourceWithLimit(player, resource_type, amount, ammomax);
+               GiveOrTakeResourceWithLimit(player, resource_type, amount, ammomax);
                return true;
        }
        if (g_weapon_stay != 2)
        {
                return false;
        }
-       GiveResourceWithLimit(player, resource_type, amount, min(amount, ammomax));
+       GiveOrTakeResourceWithLimit(player, resource_type, amount, min(amount, ammomax));
        return true;
 }
 
index df0f5d91693946c7230fb95d37f0dfb6b773aecd..214109c97b5fcbb8a45e4f73ddc46972b065f6c5 100644 (file)
@@ -811,7 +811,6 @@ void vehicles_exit(entity vehic, bool eject)
 
        vehicles_exit_running = true;
 
-       // TODO: this was in an IS_CLIENT check, make sure it isn't actually needed!
        if(vehic.vehicle_flags & VHF_PLAYERSLOT)
        {
                vehic.vehicle_exit(vehic, eject);
index c7066e6fbd34720e16d0852f305c6fa36d426323..e78e10a3641d772427a9c053170db903a70e2fb0 100644 (file)
@@ -633,7 +633,7 @@ METHOD(Arc, wr_think, void(entity thiswep, entity actor, .entity weaponentity, i
     }
     else if(fire & 2)
     {
-        if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(arc, bolt_refire)))
+        if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR(arc, bolt_refire)))
         {
             W_Arc_Attack_Bolt(thiswep, actor, weaponentity);
             weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(arc, bolt_refire), w_ready);
index 7e76ffb1cedf9616c6a9cdff802e61074197543d..03855e316e7c1c9f4be758095ad057c06fa5c835 100644 (file)
@@ -255,7 +255,7 @@ void W_Hagar_Attack2_Load_Release(entity actor, .entity weaponentity)
 void W_Hagar_Attack2_Load(Weapon thiswep, entity actor, .entity weaponentity)
 {
        // loadable hagar secondary attack, must always run each frame
-       if(!weapon_prepareattack_check(thiswep, actor, weaponentity, true, -1))
+       if(time < game_starttime || time < actor.race_penalty || timeout_status == TIMEOUT_ACTIVE)
                return;
 
        bool loaded = actor.(weaponentity).hagar_load >= WEP_CVAR_SEC(hagar, load_max);
index 057ef3f03a756b6c3d337a7257fada47c88ebd51..4acceed7184c924af8ffca37017fe3b8794191b4 100644 (file)
@@ -69,7 +69,7 @@ void W_Shotgun_Melee_Think(entity this)
                        + (v_up * swing_factor * WEP_CVAR_SEC(shotgun, melee_swing_up))
                        + (v_right * swing_factor * WEP_CVAR_SEC(shotgun, melee_swing_side)));
 
-               WarpZone_traceline_antilag(this, this.realowner.origin + this.realowner.view_ofs, targpos, false, this.realowner, ((IS_CLIENT(this.realowner)) ? ANTILAG_LATENCY(this.realowner) : 0));
+               WarpZone_traceline_antilag(this.realowner, this.realowner.origin + this.realowner.view_ofs, targpos, false, this.realowner, ((IS_CLIENT(this.realowner)) ? ANTILAG_LATENCY(this.realowner) : 0));
 
                // draw lightning beams for debugging
                //te_lightning2(NULL, targpos, this.realowner.origin + this.realowner.view_ofs + v_forward * 5 - v_up * 5);
@@ -78,7 +78,7 @@ void W_Shotgun_Melee_Think(entity this)
                is_player = (IS_PLAYER(trace_ent) || trace_ent.classname == "body" || IS_MONSTER(trace_ent));
 
                if((trace_fraction < 1) // if trace is good, apply the damage and remove this
-                       && (trace_ent.takedamage == DAMAGE_AIM)
+                       && (trace_ent.takedamage != DAMAGE_NO)
                        && (trace_ent != this.swing_alreadyhit)
                        && (is_player || WEP_CVAR_SEC(shotgun, melee_nonplayerdamage)))
                {
index 8896b5a442ba42d78c4420ee3c0332dacb2956c6..ae5f119e7fe8db0eea039a57032af553cd4d7d24 100644 (file)
@@ -6,6 +6,8 @@
 void sys_phys_simulate(entity this, float dt);
 void sys_phys_simulate_simple(entity this, float dt);
 
+void sys_phys_postupdate(entity this);
+
 void sys_phys_update(entity this, float dt)
 {
        if (!IS_CLIENT(this)) {
@@ -63,7 +65,8 @@ void sys_phys_update(entity this, float dt)
                        // if(pointcontents(midpoint + '0 0 2') == CONTENT_WATER)
                        // { this.velocity_z = 70; }
                }
-               goto end;
+               sys_phys_postupdate(this);
+               return;
        }
 
        PM_check_slick(this);
@@ -153,7 +156,11 @@ void sys_phys_update(entity this, float dt)
                this.com_phys_air = false;
        }
 
-       LABEL(end)
+       sys_phys_postupdate(this);
+}
+
+void sys_phys_postupdate(entity this)
+{
        if (IS_ONGROUND(this)) { this.lastground = time; }
 // conveyors: then break velocity again
        if (this.conveyor.active) { this.velocity += this.conveyor.movedir; }
index 712872dc94c7799ed928089dec8a85e4c376b0f0..b3a143b9a7b02a6142dd7019694df6521957e153 100644 (file)
@@ -252,16 +252,23 @@ void bot_setnameandstuff(entity this)
                name = bot_name;
 
        // number bots with identical names
-       int j = 0;
-       FOREACH_CLIENT(IS_BOT_CLIENT(it), {
-               if(it.cleanname == name)
-                       ++j;
-       });
-       if (j)
-               this.netname = this.netname_freeme = strzone(strcat(prefix, name, "(", ftos(j), ")", suffix));
-       else
+       if (name == "")
+       {
+               name = ftos(etof(this));
                this.netname = this.netname_freeme = strzone(strcat(prefix, name, suffix));
-
+       }
+       else
+       {
+               int j = 0;
+               FOREACH_CLIENT(IS_BOT_CLIENT(it), {
+                       if(it.cleanname == name)
+                               ++j;
+               });
+               if (j)
+                       this.netname = this.netname_freeme = strzone(strcat(prefix, name, "(", ftos(j), ")", suffix));
+               else
+                       this.netname = this.netname_freeme = strzone(strcat(prefix, name, suffix));
+       }
        this.cleanname = strzone(name);
 
        // pick the model and skin
index 50a706d7fa49e9bb28b6d27820e505e6c029607b..b66d423d98fa31337b3e3ab8cb411d9042ae70ca 100644 (file)
@@ -498,13 +498,13 @@ void havocbot_movetogoal(entity this)
                {
                        // Calculate brake distance in xy
                        float d = vlen(vec2(this.origin - (this.goalcurrent.absmin + this.goalcurrent.absmax) * 0.5));
-                       float v = vlen(vec2(this.velocity));
-                       float db = ((v ** 2) / (autocvar_g_jetpack_acceleration_side * 2)) + 100;
+                       float vel2 = vlen2(vec2(this.velocity));
+                       float db = (vel2 / (autocvar_g_jetpack_acceleration_side * 2)) + 100;
                        //LOG_INFOF("distance %d, velocity %d, brake at %d ", ceil(d), ceil(v), ceil(db));
                        if(d < db || d < 500)
                        {
                                // Brake
-                               if(v > maxspeed * 0.3)
+                               if (vel2 > (maxspeed * 0.3) ** 2)
                                {
                                        CS(this).movement_x = dir * v_forward * -maxspeed;
                                        return;
@@ -721,9 +721,10 @@ void havocbot_movetogoal(entity this)
                else
                        PHYS_INPUT_BUTTON_JUMP(this) = false;
                makevectors(this.v_angle.y * '0 1 0');
-               CS(this).movement_x = dir * v_forward * maxspeed;
-               CS(this).movement_y = dir * v_right * maxspeed;
-               CS(this).movement_z = dir * v_up * maxspeed;
+               vector v = dir * maxspeed;
+               CS(this).movement.x = v * v_forward;
+               CS(this).movement.y = v * v_right;
+               CS(this).movement.z = v * v_up;
        }
 
        // if there is nowhere to go, exit
index cf114e5f058860e6a55ef47febf11f0e17a31f63..9214900f36af170cce29422d8735673e91ff5779 100644 (file)
@@ -750,12 +750,18 @@ void PutPlayerInServer(entity this)
                this.(weaponentity).weaponname = "";
                this.(weaponentity).m_switchingweapon = WEP_Null;
                this.(weaponentity).cnt = -1;
-
-               W_WeaponFrame(this, weaponentity);
        }
 
        MUTATOR_CALLHOOK(PlayerWeaponSelect, this);
 
+       if (CS(this).impulse) ImpulseCommands(this);
+
+       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+       {
+               .entity weaponentity = weaponentities[slot];
+               W_WeaponFrame(this, weaponentity);
+       }
+
        if (!warmup_stage && !this.alivetime)
                this.alivetime = time;
 
index cc0c71be5d56e32a1ad721a1e8fe1a9726645a43..38284c30decd8a5b3adae3fbebe9039ef7e560ef 100644 (file)
@@ -477,9 +477,9 @@ void Ice_Think(entity this)
        this.nextthink = time;
 }
 
-void Freeze (entity targ, float revivespeed, float frozen_type, float show_waypoint)
+void Freeze(entity targ, float revivespeed, int frozen_type, bool show_waypoint)
 {
-       if(!IS_PLAYER(targ) && !IS_MONSTER(targ)) // only specified entities can be freezed
+       if(!IS_PLAYER(targ) && !IS_MONSTER(targ)) // TODO: only specified entities can be freezed
                return;
 
        if(STAT(FROZEN, targ))
@@ -524,11 +524,11 @@ void Freeze (entity targ, float revivespeed, float frozen_type, float show_waypo
        });
 
        // add waypoint
-       if(show_waypoint)
+       if(MUTATOR_CALLHOOK(Freeze, targ, revivespeed, frozen_type) || show_waypoint)
                WaypointSprite_Spawn(WP_Frozen, 0, 0, targ, '0 0 64', NULL, targ.team, targ, waypointsprite_attached, true, RADARICON_WAYPOINT);
 }
 
-void Unfreeze (entity targ)
+void Unfreeze(entity targ)
 {
        if(!STAT(FROZEN, targ))
                return;
@@ -562,6 +562,8 @@ void Unfreeze (entity targ)
        if(targ.iceblock)
                delete(targ.iceblock);
        targ.iceblock = NULL;
+
+       MUTATOR_CALLHOOK(Unfreeze, targ);
 }
 
 void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
index 88fbf134422134492c3ee1756549d4b2131fa8ab..0af110c9e890f29925db0803eedcd8d29f4eba04 100644 (file)
@@ -83,7 +83,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en
 
 void Ice_Think(entity this);
 
-void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypoint);
+void Freeze(entity targ, float freeze_time, int frozen_type, bool show_waypoint);
 
 void Unfreeze (entity targ);
 
index de21a59035a5d4d913ab3ba33aa9b2e1ffbbef14..a4cf9df8ef30cc5e6554f4403112a28723a07e84 100644 (file)
@@ -1174,3 +1174,21 @@ enum {
     MUT_VOTEPARSE_INVALID, // return -1 (vote parsed but counted as invalid, no action or vote)
     MUT_VOTEPARSE_UNACCEPTABLE // return 0 (vote parameter counted as unacceptable, warns caller)
 };
+
+/**
+ * Called when freezing an entity (monster or player), return true to force showing a waypoint
+ */
+#define EV_Freeze(i, o) \
+    /** targ */             i(entity, MUTATOR_ARGV_0_entity) \
+    /** revive speed */     i(float, MUTATOR_ARGV_1_float) \
+    /** frozen type */      i(int, MUTATOR_ARGV_2_int) \
+    /**/
+MUTATOR_HOOKABLE(Freeze, EV_Freeze);
+
+/**
+ * Called when an entity (monster or player) is defrosted
+ */
+#define EV_Unfreeze(i, o) \
+    /** targ */             i(entity, MUTATOR_ARGV_0_entity) \
+    /**/
+MUTATOR_HOOKABLE(Unfreeze, EV_Unfreeze);
index cc58cdc6d7ca7e2bc493b9c2bd1518a3aaa3bbe2..5bd4b59894e964fcd6b0850a3f67232c8f38a79c 100644 (file)
@@ -462,6 +462,16 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                                this.v_angle_y = this.v_angle.y + (random() * 2 - 1) * shake;
                                this.v_angle_x = bound(-90, this.v_angle.x, 90);
                        }
+
+                       if (this != attacker) {
+                               float realdmg = damage - excess;
+                               if (IS_PLAYER(attacker)) {
+                                       GameRules_scoring_add(attacker, DMG, realdmg);
+                               }
+                               if (IS_PLAYER(this)) {
+                                       GameRules_scoring_add(this, DMGTAKEN, realdmg);
+                               }
+                       }
                }
                else
                        this.max_armorvalue += (save + take);
@@ -470,16 +480,6 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
        this.dmg_take = this.dmg_take + take;//max(take - 10, 0);
        this.dmg_inflictor = inflictor;
 
-       if (this != attacker) {
-               float realdmg = damage - excess;
-               if (IS_PLAYER(attacker)) {
-                       GameRules_scoring_add(attacker, DMG, realdmg);
-               }
-               if (IS_PLAYER(this)) {
-                       GameRules_scoring_add(this, DMGTAKEN, realdmg);
-               }
-       }
-
        bool abot = (IS_BOT_CLIENT(attacker));
        bool vbot = (IS_BOT_CLIENT(this));
 
index b3b19095ae8b14e7832b386d1f5614c891a3d93f..74a0c55788a71a2f19de6accaeaacba47f1c9c3b 100644 (file)
@@ -232,13 +232,38 @@ void TakeResourceWithLimit(entity receiver, int resource_type, float amount,
                return;
        }
        float current_amount = GetResourceAmount(receiver, resource_type);
-       if (current_amount - amount < limit)
+       if (current_amount - amount < -limit)
        {
-               amount = limit + current_amount;
+               amount = -limit + current_amount;
        }
        TakeResource(receiver, resource_type, amount);
 }
 
+void GiveOrTakeResource(entity receiver, int resource_type, float amount)
+{
+       if(amount < 0)
+       {
+               TakeResource(receiver, resource_type, amount * -1);
+       }
+       else
+       {
+               GiveResource(receiver, resource_type, amount);
+       }
+}
+
+void GiveOrTakeResourceWithLimit(entity receiver, int resource_type, float amount,
+       float limit)
+{
+       if(amount < 0)
+       {
+               TakeResourceWithLimit(receiver, resource_type, amount * -1, limit);
+       }
+       else
+       {
+               GiveResourceWithLimit(receiver, resource_type, amount, limit);
+       }
+}
+
 int GetResourceType(.float resource_field)
 {
        switch (resource_field)
index e4631ab5605ad30d7953826cdaddf6ef78ea7bd7..15433b264fde16ba7b34d98510743ead0accf3b8 100644 (file)
@@ -67,6 +67,22 @@ void TakeResource(entity receiver, int resource_type, float amount);
 void TakeResourceWithLimit(entity receiver, int resource_type, float amount,
        float limit);
 
+/// \brief Gives to or takes from an entity resource.
+/// \param[in,out] receiver Entity to give or take resource.
+/// \param[in] resource_type Type of the resource (a RESOURCE_* constant).
+/// \param[in] amount Amount of resource to give or take.
+/// \return No return.
+void GiveOrTakeResource(entity receiver, int resource_type, float amount);
+
+/// \brief Gives to or takes from an entity resource but not more/less than a limit.
+/// \param[in,out] receiver Entity to give or take resource.
+/// \param[in] resource_type Type of the resource (a RESOURCE_* constant).
+/// \param[in] amount Amount of resource to give or take.
+/// \param[in] limit Limit of resources to give or take.
+/// \return No return.
+void GiveOrTakeResourceWithLimit(entity receiver, int resource_type, float amount,
+       float limit);
+
 // ===================== Legacy and/or internal API ===========================
 
 /// \brief Converts an entity field to resource type.
diff --git a/scripts/explosiveammo.shader b/scripts/explosiveammo.shader
new file mode 100644 (file)
index 0000000..d6c3a90
--- /dev/null
@@ -0,0 +1,20 @@
+explosive_ammo
+{
+       dpreflectcube cubemaps/default/sky
+       {
+               map textures/items/explosiveammo.tga
+               rgbgen lightingDiffuse
+       }
+}
+explosive_ammo_icons
+{
+       {
+       
+       animMap 2 textures/items/explosiveammo_icon_01.tga textures/items/explosiveammo_icon_01.tga textures/items/explosiveammo_icon_01.tga textures/items/explosiveammo_icon_blank.tga textures/items/explosiveammo_icon_02.tga textures/items/explosiveammo_icon_02.tga textures/items/explosiveammo_icon_02.tga textures/items/explosiveammo_icon_blank.tga textures/items/explosiveammo_icon_03.tga textures/items/explosiveammo_icon_03.tga textures/items/explosiveammo_icon_03.tga  textures/items/explosiveammo_icon_blank.tga 
+       blendFunc GL_ONE GL_ONE
+       rgbGen wave sawtooth 0 1 0 10
+       }
+
+}
+
+
diff --git a/textures/items/a_rocket_bottom.jpg b/textures/items/a_rocket_bottom.jpg
deleted file mode 100644 (file)
index b2db595..0000000
Binary files a/textures/items/a_rocket_bottom.jpg and /dev/null differ
diff --git a/textures/items/a_rocket_box.jpg b/textures/items/a_rocket_box.jpg
deleted file mode 100644 (file)
index a29505b..0000000
Binary files a/textures/items/a_rocket_box.jpg and /dev/null differ
diff --git a/textures/items/a_rocket_gre.jpg b/textures/items/a_rocket_gre.jpg
deleted file mode 100644 (file)
index 66fbc3c..0000000
Binary files a/textures/items/a_rocket_gre.jpg and /dev/null differ
diff --git a/textures/items/a_rocket_gre_glow.jpg b/textures/items/a_rocket_gre_glow.jpg
deleted file mode 100644 (file)
index b26e87d..0000000
Binary files a/textures/items/a_rocket_gre_glow.jpg and /dev/null differ
diff --git a/textures/items/a_rocket_roc.jpg b/textures/items/a_rocket_roc.jpg
deleted file mode 100644 (file)
index 300b2b9..0000000
Binary files a/textures/items/a_rocket_roc.jpg and /dev/null differ
diff --git a/textures/items/a_rocket_roc_gloss.jpg b/textures/items/a_rocket_roc_gloss.jpg
deleted file mode 100644 (file)
index 0e6f937..0000000
Binary files a/textures/items/a_rocket_roc_gloss.jpg and /dev/null differ
diff --git a/textures/items/a_rocket_roc_glow.jpg b/textures/items/a_rocket_roc_glow.jpg
deleted file mode 100644 (file)
index 2bb921a..0000000
Binary files a/textures/items/a_rocket_roc_glow.jpg and /dev/null differ
diff --git a/textures/items/a_rocket_roc_norm.jpg b/textures/items/a_rocket_roc_norm.jpg
deleted file mode 100644 (file)
index 8073764..0000000
Binary files a/textures/items/a_rocket_roc_norm.jpg and /dev/null differ
diff --git a/textures/items/a_rocket_tag.jpg b/textures/items/a_rocket_tag.jpg
deleted file mode 100644 (file)
index 1314605..0000000
Binary files a/textures/items/a_rocket_tag.jpg and /dev/null differ
diff --git a/textures/items/explosiveammo.tga b/textures/items/explosiveammo.tga
new file mode 100644 (file)
index 0000000..45aa786
Binary files /dev/null and b/textures/items/explosiveammo.tga differ
diff --git a/textures/items/explosiveammo_gloss.tga b/textures/items/explosiveammo_gloss.tga
new file mode 100644 (file)
index 0000000..22d3f1e
Binary files /dev/null and b/textures/items/explosiveammo_gloss.tga differ
diff --git a/textures/items/explosiveammo_glow.tga b/textures/items/explosiveammo_glow.tga
new file mode 100644 (file)
index 0000000..0f1bdb1
Binary files /dev/null and b/textures/items/explosiveammo_glow.tga differ
diff --git a/textures/items/explosiveammo_icon_01.tga b/textures/items/explosiveammo_icon_01.tga
new file mode 100644 (file)
index 0000000..e368ea4
Binary files /dev/null and b/textures/items/explosiveammo_icon_01.tga differ
diff --git a/textures/items/explosiveammo_icon_01_glow.tga b/textures/items/explosiveammo_icon_01_glow.tga
new file mode 100644 (file)
index 0000000..22f1624
Binary files /dev/null and b/textures/items/explosiveammo_icon_01_glow.tga differ
diff --git a/textures/items/explosiveammo_icon_02.tga b/textures/items/explosiveammo_icon_02.tga
new file mode 100644 (file)
index 0000000..e368ea4
Binary files /dev/null and b/textures/items/explosiveammo_icon_02.tga differ
diff --git a/textures/items/explosiveammo_icon_02_glow.tga b/textures/items/explosiveammo_icon_02_glow.tga
new file mode 100644 (file)
index 0000000..d1dcd8b
Binary files /dev/null and b/textures/items/explosiveammo_icon_02_glow.tga differ
diff --git a/textures/items/explosiveammo_icon_03.tga b/textures/items/explosiveammo_icon_03.tga
new file mode 100644 (file)
index 0000000..e368ea4
Binary files /dev/null and b/textures/items/explosiveammo_icon_03.tga differ
diff --git a/textures/items/explosiveammo_icon_03_glow.tga b/textures/items/explosiveammo_icon_03_glow.tga
new file mode 100644 (file)
index 0000000..44a05dc
Binary files /dev/null and b/textures/items/explosiveammo_icon_03_glow.tga differ
diff --git a/textures/items/explosiveammo_icon_blank.tga b/textures/items/explosiveammo_icon_blank.tga
new file mode 100644 (file)
index 0000000..e368ea4
Binary files /dev/null and b/textures/items/explosiveammo_icon_blank.tga differ
diff --git a/textures/items/explosiveammo_norm.tga b/textures/items/explosiveammo_norm.tga
new file mode 100644 (file)
index 0000000..67c93ed
Binary files /dev/null and b/textures/items/explosiveammo_norm.tga differ
diff --git a/textures/items/explosiveammo_reflect.tga b/textures/items/explosiveammo_reflect.tga
new file mode 100644 (file)
index 0000000..6e2731b
Binary files /dev/null and b/textures/items/explosiveammo_reflect.tga differ
index 9d4064949c5ea8a1dd4c5a17974e2ac1056b4a31..4898cb6afcae4c7e3aac4726d479fab8c3645536 100644 (file)
@@ -343,9 +343,9 @@ set g_maplist_votable_nodetail 0    "nodetail only shows total count instead of all
 set g_maplist_votable_abstain 0        "when 1, you can abstain from your vote"
 set g_maplist_votable_screenshot_dir "maps levelshots" "where to look for map screenshots"
 
-set sv_vote_gametype 0 "show a vote screen for gametypes before map vote screen"
+set sv_vote_gametype 1 "show a vote screen for gametypes before map vote screen"
 set sv_vote_gametype_keeptwotime 10 "show only 2 options after this amount of time during gametype vote screen"
-set sv_vote_gametype_options "dm tdm ctf"
+set sv_vote_gametype_options "dm tdm ctf" "Keep the identifiers short, otherwise you'll run into issues with too long alias names (max is 31 characters) when using sv_vote_gametype_hook_*"
 set sv_vote_gametype_timeout 20
 set sv_vote_gametype_default_current 1 "Keep the current gametype if no one votes"