]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge commit 'c5518de'
authorRudolf Polzer <divverent@alientrap.org>
Fri, 10 Dec 2010 23:43:32 +0000 (00:43 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 10 Dec 2010 23:43:32 +0000 (00:43 +0100)
12 files changed:
defaultXonotic.cfg
qcsrc/client/hud.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/items.qc
qcsrc/server/bot/havocbot/role_onslaught.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/t_items.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
xonotic-credits.txt

index 49f43b9c4dd9d8c2474636f89263955ba680f20c..f591fe31f9684d86facd08f53bc8ce49a8afc195 100644 (file)
@@ -437,9 +437,9 @@ set bot_ai_keyboard_treshold 0.57
 set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
 set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
 set bot_ai_custom_weapon_priority_distances "300 850"  "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
-set bot_ai_custom_weapon_priority_far   "minstanex nex campingrifle rocketlauncher minelayer grenadelauncher electro hagar hlac crylink laser uzi fireball seeker shotgun tuba"        "Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid   "minstanex rocketlauncher nex fireball seeker minelayer grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba"        "Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "minstanex nex uzi hlac tuba seeker hagar crylink minelayer grenadelauncher shotgun electro campingrifle rocketlauncher laser fireball"        "Desired weapons for close distances ordered by priority"
+set bot_ai_custom_weapon_priority_far   "minstanex nex campingrifle electro rocketlauncher grenadelauncher hagar hlac crylink laser uzi fireball seeker shotgun tuba minelayer"        "Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid   "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba minelayer"        "Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro campingrifle rocketlauncher laser fireball minelayer"        "Desired weapons for close distances ordered by priority"
 set bot_ai_weapon_combo 1      "Enable bots to do weapon combos"
 set bot_ai_weapon_combo_threshold 0.3  "Try to make a combo N seconds after the last attack"
 set bot_ai_friends_aware_pickup_radius "500"   "Bots will not pickup items if a team mate is this distance near the item"
index 5536cec21eb71663b621e0cce499372c3e9624a9..6cb1e4470f8324274c89e250c268c0132ac4b17d 100644 (file)
@@ -3562,7 +3562,7 @@ void HUD_Radar(void)
        if(hud_panel_radar_rotation == 0)
        {
                // max-min distance must fit the radar in any rotation
-               bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen2d(mi_max - mi_min));
+               bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen2d(mi_scale));
        }
        else
        {
@@ -3590,7 +3590,7 @@ void HUD_Radar(void)
                  f * bigsize
                + (1 - f) * normalsize;
        teamradar_origin3d_in_texcoord = teamradar_3dcoord_to_texcoord(
-                 f * (mi_min + mi_max) * 0.5
+                 f * mi_center
                + (1 - f) * view_origin);
 
        color1 = GetPlayerColor(player_localentnum-1);
index 8584d24f2b26a52fad6a308b753bfdf3dcab4463..2cd50789f14157b307380372329a1157a5e29c4d 100644 (file)
@@ -409,7 +409,7 @@ void Ent_WaypointSprite()
 
 void WaypointSprite_Load()
 {
-       waypointsprite_fadedistance = vlen(mi_max - mi_min);
+       waypointsprite_fadedistance = vlen(mi_scale);
        waypointsprite_normdistance = autocvar_g_waypointsprite_normdistance;
        waypointsprite_minscale = autocvar_g_waypointsprite_minscale;
        waypointsprite_minalpha = autocvar_g_waypointsprite_minalpha;
@@ -424,8 +424,8 @@ void WaypointSprite_Load()
        waypointsprite_crosshairfadedistance = autocvar_g_waypointsprite_crosshairfadedistance;
        waypointsprite_distancefadealpha = autocvar_g_waypointsprite_distancefadealpha;
        waypointsprite_distancefadescale = autocvar_g_waypointsprite_distancefadescale;
-       waypointsprite_distancefadedistance = vlen(mi_max - mi_min) * autocvar_g_waypointsprite_distancefadedistancemultiplier;
-       waypointsprite_alpha = autocvar_g_waypointsprite_alpha * (1 - autocvar__menu_alpha);
+       waypointsprite_distancefadedistance = waypointsprite_fadedistance * autocvar_g_waypointsprite_distancefadedistancemultiplier;
+       waypointsprite_alpha = autocvar_g_waypointsprite_alpha;
 
        if(!waypointsprite_initialized)
        {
@@ -461,6 +461,6 @@ void WaypointSprite_Load()
                        db_put(tempdb, sname, ftos(max(f, stof(db_get(tempdb, sname)))));
                }
                search_end(dh);
+               waypointsprite_initialized = true;
        }
-       waypointsprite_initialized = 1;
 }
index 37ffb25e7c3cff3b49e3581dc69a179048483212..5387c05aae1cac4d2d26d1aae4172536be840326 100644 (file)
@@ -1,5 +1,5 @@
 // WEAPON PLUGIN SYSTEM
-entity weapon_info[24];
+entity weapon_info[WEP_MAXCOUNT];
 entity dummy_weapon_info;
 
 void register_weapon(float id, float(float) func, float ammotype, float i, float weapontype, float pickupbasevalue, string modelname, string shortname, string wname)
@@ -43,7 +43,7 @@ void register_weapons_done()
 
        float i;
        weaponorder_byid = "";
-       for(i = 24; i >= 1; --i)
+       for(i = WEP_MAXCOUNT; i >= 1; --i)
                if(weapon_info[i-1])
                        weaponorder_byid = strcat(weaponorder_byid, " ", ftos(i));
        weaponorder_byid = strzone(substring(weaponorder_byid, 1, strlen(weaponorder_byid) - 1));
index af6eeb686d07537a54d956131e4385c17af66b52..bc84340287ff8938e5e3b60d80d9073f41443095 100644 (file)
@@ -35,7 +35,7 @@ void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float s
                needarmor = TRUE;
 
        // Needs weapons?
-       for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+       for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
        {
                // Find weapon
                if(power2of(i-1) & self.weapons)
index 8e052e8377a0688a3b143abaf181375b6090274b..11c97cc110e0975c33a25b70a6743316f6082a85 100644 (file)
@@ -981,16 +981,23 @@ void readplayerstartcvars()
        if (g_weaponarena)
        {
                start_weapons = g_weaponarena;
-               if (g_weaponarena & (WEPBIT_GRENADE_LAUNCHER | WEPBIT_MINE_LAYER | WEPBIT_HAGAR | WEPBIT_ROCKET_LAUNCHER))
-                       start_ammo_rockets = 999;
-               if (g_weaponarena & WEPBIT_SHOTGUN)
-                       start_ammo_shells = 999;
-               if (g_weaponarena & (WEPBIT_ELECTRO | WEPBIT_CRYLINK | WEPBIT_NEX | WEPBIT_MINSTANEX | WEPBIT_HLAC | WEPBIT_HOOK))
-                       start_ammo_cells = 999;
-               if (g_weaponarena & (WEPBIT_UZI | WEPBIT_CAMPINGRIFLE))
-                       start_ammo_nails = 999;
-               if (g_weaponarena & WEPBIT_HOOK)
-                       start_ammo_fuel = 999;
+               for (j = WEP_FIRST; j <= WEP_LAST; ++j)
+               {
+                       e = get_weaponinfo(j);
+                       if(start_weapons & e.weapons)
+                       {
+                               if(e.items & IT_ROCKETS)
+                                       start_ammo_rockets = 999;
+                               if(e.items & IT_SHELLS)
+                                       start_ammo_shells = 999;
+                               if(e.items & IT_CELLS)
+                                       start_ammo_cells = 999;
+                               if(e.items & IT_NAILS)
+                                       start_ammo_nails = 999;
+                               if(e.items & IT_FUEL)
+                                       start_ammo_fuel = 999;
+                       }
+               }
                start_items |= IT_UNLIMITED_AMMO;
        }
        else if (g_minstagib)
index 5a86bee8391a617e719bc3d3e419b2eed2780b9a..143b3be4879d79cc2993a685f275e0a1cc2e0bee 100644 (file)
@@ -590,7 +590,7 @@ float weapon_pickupevalfunc(entity player, entity item)
        // If custom weapon priorities for bots is enabled rate most wanted weapons higher
        if( bot_custom_weapon && c )
        {
-               for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+               for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
                {
                        // Find weapon
                        if( (get_weaponinfo(i)).weapons & item.weapons  != item.weapons )
@@ -630,7 +630,7 @@ float commodity_pickupevalfunc(entity player, entity item)
        c = 0;
 
        // Detect needed ammo
-       for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+       for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
        {
                wi = get_weaponinfo(i);
 
index d1f4e5d5ecc9b04852885fb5c26f1809bc820374..4495b720c54e02eecd3ab2ca62e772aa31771adb 100644 (file)
@@ -177,27 +177,27 @@ void W_Crylink_LinkJoinEffect_Think()
                                if(autocvar_g_balance_crylink_secondary_joinexplode)
                                {
                                        n = n / autocvar_g_balance_crylink_secondary_shots;
-                                       RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_joinexplode_damage * n, 
-                                                                       autocvar_g_balance_crylink_secondary_joinexplode_edgedamage * n, 
-                                                                       autocvar_g_balance_crylink_secondary_joinexplode_radius * n, e.realowner, 
+                                       RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_joinexplode_damage * n,
+                                                                       autocvar_g_balance_crylink_secondary_joinexplode_edgedamage * n,
+                                                                       autocvar_g_balance_crylink_secondary_joinexplode_radius * n, e.realowner,
                                                                        autocvar_g_balance_crylink_secondary_joinexplode_force * n, e.projectiledeathtype, other);
 
                                        pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
-                               }                               
+                               }
                        }
                        else
                        {
                                if(autocvar_g_balance_crylink_primary_joinexplode)
                                {
                                        n = n / autocvar_g_balance_crylink_primary_shots;
-                                       RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_joinexplode_damage * n, 
-                                                                       autocvar_g_balance_crylink_primary_joinexplode_edgedamage * n, 
-                                                                       autocvar_g_balance_crylink_primary_joinexplode_radius * n, e.realowner, 
+                                       RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_joinexplode_damage * n,
+                                                                       autocvar_g_balance_crylink_primary_joinexplode_edgedamage * n,
+                                                                       autocvar_g_balance_crylink_primary_joinexplode_radius * n, e.realowner,
                                                                        autocvar_g_balance_crylink_primary_joinexplode_force * n, e.projectiledeathtype, other);
 
                                        pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
-                               }                               
-                       }                       
+                               }
+                       }
                }
        }
        remove(self);
@@ -511,7 +511,7 @@ float w_crylink(float req)
 {
        if (req == WR_AIM)
        {
-               if (random() > 0.15)
+               if (random() < 0.10)
                        self.BUTTON_ATCK = bot_aim(autocvar_g_balance_crylink_primary_speed, 0, autocvar_g_balance_crylink_primary_middle_lifetime, FALSE);
                else
                        self.BUTTON_ATCK2 = bot_aim(autocvar_g_balance_crylink_secondary_speed, 0, autocvar_g_balance_crylink_secondary_middle_lifetime, FALSE);
@@ -549,21 +549,21 @@ float w_crylink(float req)
                                {
                                        vector pos;
                                        entity linkjoineffect;
-                                       
-                                       
+
+
                                        if(self.crylink_waitrelease == 1)
                                        {
                                                pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_primary_joinspread * autocvar_g_balance_crylink_primary_speed, autocvar_g_balance_crylink_primary_jointime);
-                                               
+
                                        }
                                        else
                                        {
                                                pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_secondary_joinspread * autocvar_g_balance_crylink_secondary_speed, autocvar_g_balance_crylink_secondary_jointime);
                                        }
-                                       
+
                                        linkjoineffect = spawn();
                                        linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
-                                       linkjoineffect.classname = "linkjoineffect";                                    
+                                       linkjoineffect.classname = "linkjoineffect";
                                        linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
                                        linkjoineffect.owner = self;
                                        setorigin(linkjoineffect, pos);
index da29a441843d3f9122f683f0522276feb57d724d..1ae02b1613e47c5f1e7ba97a347688cd0a35b2ce 100644 (file)
@@ -62,7 +62,7 @@ void W_Plasma_Explode_Combo (void)
 void W_Plasma_Touch (void)
 {
        //self.velocity = self.velocity  * 0.1;
-       
+
        PROJECTILE_TOUCH;
        if (other.takedamage == DAMAGE_AIM) {
                W_Plasma_Explode ();
@@ -178,10 +178,10 @@ void W_Electro_Attack2()
        proj.health = autocvar_g_balance_electro_secondary_health;
        proj.event_damage = W_Plasma_Damage;
        proj.flags = FL_PROJECTILE;
-       
+
        proj.bouncefactor = autocvar_g_balance_electro_secondary_bouncefactor;
        proj.bouncestop = autocvar_g_balance_electro_secondary_bouncestop;
-       
+
 #if 0
        entity p2;
        p2 = spawn();
@@ -351,7 +351,14 @@ float w_electro(float req)
                        self.bot_secondary_electromooth = 0;
                if(self.bot_secondary_electromooth == 0)
                {
-                       if(bot_aim(autocvar_g_balance_electro_primary_speed, 0, autocvar_g_balance_electro_primary_lifetime, FALSE))
+                       float shoot;
+
+                       if(autocvar_g_balance_electro_primary_speed)
+                               shoot = bot_aim(autocvar_g_balance_electro_primary_speed, 0, autocvar_g_balance_electro_primary_lifetime, FALSE);
+                       else
+                               shoot = bot_aim(1000000, 0, 0.001, FALSE);
+
+                       if(shoot)
                        {
                                self.BUTTON_ATCK = TRUE;
                                if(random() < 0.01) self.bot_secondary_electromooth = 1;
index 4ab7f4f22e34dc0a215bb8c54cc5bf4967a6c4ed..eb64dddd802875bbbdcc2b98d76025e55a0b02d7 100644 (file)
@@ -158,7 +158,7 @@ void Seeker_Fire_Missile(vector f_diff)
 {
        local entity missile;
 
-       if not(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)
+       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - autocvar_g_balance_seeker_missile_ammo;
 
        makevectors(self.v_angle);
index d9bb056ee6c6c8e65678509ba6c4ff1b91041411..08c4a901e12083d7bdd972ed8755e3010cf97d9e 100644 (file)
@@ -100,10 +100,10 @@ void spawnfunc_weapon_shotgun(); // defined in t_items.qc
 float w_shotgun(float req)
 {
        if (req == WR_AIM)
-               if(vlen(self.origin-self.enemy.origin)>200)
-                       self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE);
-               else
+               if(vlen(self.origin-self.enemy.origin) <= autocvar_g_balance_shotgun_secondary_melee_range)
                        self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, FALSE);
+               else
+                       self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE);
        else if (req == WR_THINK)
        {
                if (self.BUTTON_ATCK)
index 0e4cb86289e81aecac9046e00f6c15e27c3739b8..ec46525c90a1ec87dea004ba58f94e62ad837625 100644 (file)
@@ -20,6 +20,10 @@ FruitieX (game / web)
 *3D Art
 morphed
 
+*Concept Art
+LJFHutch
+theShadow
+
 *Level Design
 FruitieX
 MirceaKitsune