Added g_pickup_<item>_anyway to health/armor items (todo: add ammo), added defaultSam...
authorsamual <samual@samual-desktop.(none)>
Thu, 20 May 2010 20:42:57 +0000 (16:42 -0400)
committersamual <samual@samual-desktop.(none)>
Thu, 20 May 2010 20:42:57 +0000 (16:42 -0400)
balance.cfg
balance25.cfg
balanceSamual.cfg
balanceXPM.cfg
defaultSamual.cfg [new file with mode: 0644]
physicsSamual.cfg
qcsrc/server/miscfunctions.qc
qcsrc/server/t_items.qc

index cdb817080923749d7b041d6c4553fcd315cfbd1e..d8c62d1c1814934594a911dfdd3c1b5aaed1b7cf 100644 (file)
@@ -65,20 +65,28 @@ set g_pickup_fuel_jetpack 50
 set g_pickup_fuel_max 999
 set g_pickup_armorsmall 10
 set g_pickup_armorsmall_max 100
+set g_pickup_armorsmall_anyway 0
 set g_pickup_armormedium 25
 set g_pickup_armormedium_max 100
+set g_pickup_armormedium_anyway 0
 set g_pickup_armorbig 50
 set g_pickup_armorbig_max 100
+set g_pickup_armorbig_anyway 0
 set g_pickup_armorlarge 100
 set g_pickup_armorlarge_max 100
+set g_pickup_armorlarge_anyway 0
 set g_pickup_healthsmall 10
 set g_pickup_healthsmall_max 200
+set g_pickup_healthsmall_anyway 0
 set g_pickup_healthmedium 25
 set g_pickup_healthmedium_max 200
+set g_pickup_healthmedium_anyway 0
 set g_pickup_healthlarge 50
 set g_pickup_healthlarge_max 200
+set g_pickup_healthlarge_anyway 0
 set g_pickup_healthmega 100
 set g_pickup_healthmega_max 200
+set g_pickup_healthmega_anyway 0
 set g_pickup_respawntime_short 15
 set g_pickup_respawntime_medium 20
 set g_pickup_respawntime_long 30
index 7c1fa180c12c0bd435865f01f0ab38d9b93bb308..db772801e79ce2a325f3a1d1278cf53dba8bbf76 100644 (file)
@@ -65,20 +65,28 @@ set g_pickup_fuel_jetpack 50
 set g_pickup_fuel_max 999
 set g_pickup_armorsmall 5
 set g_pickup_armorsmall_max 999
+set g_pickup_armorsmall_anyway 0
 set g_pickup_armormedium 25
 set g_pickup_armormedium_max 999
+set g_pickup_armormedium_anyway 0
 set g_pickup_armorbig 50
 set g_pickup_armorbig_max 999
+set g_pickup_armorbig_anyway 0
 set g_pickup_armorlarge 100
 set g_pickup_armorlarge_max 999
+set g_pickup_armorlarge_anyway 0
 set g_pickup_healthsmall 5
 set g_pickup_healthsmall_max 999
+set g_pickup_healthsmall_anyway 0
 set g_pickup_healthmedium 25
 set g_pickup_healthmedium_max 999
+set g_pickup_healthmedium_anyway 0
 set g_pickup_healthlarge 50
 set g_pickup_healthlarge_max 999
+set g_pickup_healthlarge_anyway 0
 set g_pickup_healthmega 100
 set g_pickup_healthmega_max 999
+set g_pickup_healthmega_anyway 0
 set g_pickup_respawntime_short 15
 set g_pickup_respawntime_medium 20
 set g_pickup_respawntime_long 30
index a8cd085705bdd53fb07bc49ce263160a638fbe6a..e08c608a4634780fc9713206217d607ba51a4730 100644 (file)
@@ -16,7 +16,7 @@ set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always pro
 set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_fireball 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_seeker 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_balance_health_start 100
+set g_balance_health_start 125
 set g_balance_armor_start 0
 set g_start_ammo_shells 30
 set g_start_ammo_nails 0
@@ -65,20 +65,28 @@ set g_pickup_fuel_jetpack 50
 set g_pickup_fuel_max 999
 set g_pickup_armorsmall 10
 set g_pickup_armorsmall_max 200
+set g_pickup_armorsmall_anyway 1
 set g_pickup_armormedium 25
 set g_pickup_armormedium_max 200
+set g_pickup_armormedium_anyway 1
 set g_pickup_armorbig 50
 set g_pickup_armorbig_max 200
+set g_pickup_armorbig_anyway 1
 set g_pickup_armorlarge 100
 set g_pickup_armorlarge_max 200
+set g_pickup_armorlarge_anyway 1
 set g_pickup_healthsmall 10
 set g_pickup_healthsmall_max 200
+set g_pickup_healthsmall_anyway 1
 set g_pickup_healthmedium 25
 set g_pickup_healthmedium_max 200
+set g_pickup_healthmedium_anyway 1
 set g_pickup_healthlarge 50
 set g_pickup_healthlarge_max 200
+set g_pickup_healthlarge_anyway 1
 set g_pickup_healthmega 100
 set g_pickup_healthmega_max 200
+set g_pickup_healthmega_anyway 1
 set g_pickup_respawntime_short 15
 set g_pickup_respawntime_medium 20
 set g_pickup_respawntime_long 30
@@ -108,13 +116,13 @@ set g_balance_health_limit 999
 set g_balance_armor_regen 0
 set g_balance_armor_regenlinear 3
 set g_balance_armor_rot 0
-set g_balance_armor_rotlinear 0
+set g_balance_armor_rotlinear 3
 set g_balance_pause_armor_rot 1
 set g_balance_pause_armor_rot_spawn 1
 set g_balance_armor_regenstable 100
 set g_balance_armor_rotstable 100
 set g_balance_armor_limit 999
-set g_balance_armor_blockpercent 0.5
+set g_balance_armor_blockpercent 0.6
 set g_balance_fuel_regen 0.1 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
 set g_balance_fuel_regenlinear 0
 set g_balance_pause_fuel_regen 2 // other than this, fuel uses the health regen counter
@@ -128,7 +136,7 @@ set g_balance_fuel_limit 999
 // }}}
 
 // {{{ misc
-set g_balance_selfdamagepercent 0.6
+set g_balance_selfdamagepercent 0.75
 set g_balance_weaponswitchdelay 0.15
 set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
 set g_weaponratefactor 1 "weapon fire rate multiplier"
index e47e1a8858ebb745c9b049246fa440c0703e9071..faf5d247287aa8138320408491c8cd774bdb128f 100644 (file)
@@ -65,20 +65,28 @@ set g_pickup_fuel_jetpack 50
 set g_pickup_fuel_max 999
 set g_pickup_armorsmall 5
 set g_pickup_armorsmall_max 200
+set g_pickup_armorsmall_anyway 0
 set g_pickup_armormedium 25
 set g_pickup_armormedium_max 200
+set g_pickup_armormedium_anyway 0
 set g_pickup_armorbig 50
 set g_pickup_armorbig_max 200
+set g_pickup_armorbig_anyway 0
 set g_pickup_armorlarge 100
 set g_pickup_armorlarge_max 200
+set g_pickup_armorlarge_anyway 0
 set g_pickup_healthsmall 5
 set g_pickup_healthsmall_max 200
+set g_pickup_healthsmall_anyway 0
 set g_pickup_healthmedium 25
 set g_pickup_healthmedium_max 100
+set g_pickup_healthmedium_anyway 0
 set g_pickup_healthlarge 50
 set g_pickup_healthlarge_max 100
+set g_pickup_healthlarge_anyway 0
 set g_pickup_healthmega 100
 set g_pickup_healthmega_max 200
+set g_pickup_healthmega_anyway 0
 set g_pickup_respawntime_short 30
 set g_pickup_respawntime_medium 30
 set g_pickup_respawntime_long 30
diff --git a/defaultSamual.cfg b/defaultSamual.cfg
new file mode 100644 (file)
index 0000000..c0dce41
--- /dev/null
@@ -0,0 +1,31 @@
+// Samual's mod configuration file
+exec defaultXonotic.cfg
+
+// weapon replace options
+set g_weaponreplace_laser ""
+set g_weaponreplace_shotgun ""
+set g_weaponreplace_uzi ""
+set g_weaponreplace_grenadelauncher ""
+set g_weaponreplace_electro ""
+set g_weaponreplace_crylink ""
+set g_weaponreplace_nex ""
+set g_weaponreplace_hagar ""
+set g_weaponreplace_rocketlauncher ""
+set g_weaponreplace_porto ""
+set g_weaponreplace_minstanex ""
+set g_weaponreplace_hook ""
+set g_weaponreplace_hlac 0 // Maybe will be enabled later after I figure out what I want to do with it
+set g_weaponreplace_campingrifle ""
+set g_weaponreplace_tuba "" 
+set g_weaponreplace_fireball 0 // Same with this
+set g_weaponreplace_seeker 0 // Same with this
+set sv_q3acompat_machineshotgunswap 0
+
+// other options
+set sv_fragmessage_information_ping 1
+set sv_fragmessage_information_handicap 2
+set sv_fragmessage_information_stats 1
+set sv_fragmessage_information_typefrag 1
+
+exec physicsSamual.cfg
+exec balanceSamual.cfg
index 3631c8011f140dd4871badad981bfe414f65044e..9a3f1e113c9dfc5cc5bcc380e85d65bc727ddb09 100644 (file)
@@ -1,13 +1,14 @@
-sv_gravity 880
+// Mix of 2.3 physics and NANL physics, goal of going for faster movement
+sv_gravity 800
 sv_maxspeed 420
 sv_maxairspeed 235
 sv_stopspeed 200
 sv_accelerate 6
 sv_airaccelerate 6
 sv_friction 4
-edgefriction 0
+edgefriction 1
 sv_stepheight 34
-sv_jumpvelocity 330
+sv_jumpvelocity 300
 sv_wateraccelerate -1
 sv_waterfriction -1
 sv_airaccel_sideways_friction 0.3
index 22f5458309f520be8948c73b868da2fe362c7c57..ebb3ee1444a9a660a45e234c5e23ed57ac06717e 100644 (file)
@@ -825,20 +825,28 @@ float g_pickup_fuel_jetpack;
 float g_pickup_fuel_max;
 float g_pickup_armorsmall;
 float g_pickup_armorsmall_max;
+float g_pickup_armorsmall_anyway;
 float g_pickup_armormedium;
 float g_pickup_armormedium_max;
+float g_pickup_armormedium_anyway;
 float g_pickup_armorbig;
 float g_pickup_armorbig_max;
+float g_pickup_armorbig_anyway;
 float g_pickup_armorlarge;
 float g_pickup_armorlarge_max;
+float g_pickup_armorlarge_anyway;
 float g_pickup_healthsmall;
 float g_pickup_healthsmall_max;
+float g_pickup_healthsmall_anyway;
 float g_pickup_healthmedium;
 float g_pickup_healthmedium_max;
+float g_pickup_healthmedium_anyway;
 float g_pickup_healthlarge;
 float g_pickup_healthlarge_max;
+float g_pickup_healthlarge_anyway;
 float g_pickup_healthmega;
 float g_pickup_healthmega_max;
+float g_pickup_healthmega_anyway;
 float g_weaponarena;
 float g_weaponarena_random;
 string g_weaponarena_list;
@@ -1262,20 +1270,28 @@ void readlevelcvars(void)
        g_pickup_fuel_max = cvar("g_pickup_fuel_max");
        g_pickup_armorsmall = cvar("g_pickup_armorsmall");
        g_pickup_armorsmall_max = cvar("g_pickup_armorsmall_max");
+       g_pickup_armorsmall_anyway = cvar("g_pickup_armorsmall_anyway");
        g_pickup_armormedium = cvar("g_pickup_armormedium");
        g_pickup_armormedium_max = cvar("g_pickup_armormedium_max");
+       g_pickup_armormedium_anyway = cvar("g_pickup_armormedium_anyway");
        g_pickup_armorbig = cvar("g_pickup_armorbig");
        g_pickup_armorbig_max = cvar("g_pickup_armorbig_max");
+       g_pickup_armorbig_anyway = cvar("g_pickup_armorbig_anyway");
        g_pickup_armorlarge = cvar("g_pickup_armorlarge");
        g_pickup_armorlarge_max = cvar("g_pickup_armorlarge_max");
+       g_pickup_armorlarge_anyway = cvar("g_pickup_armorlarge_anyway");
        g_pickup_healthsmall = cvar("g_pickup_healthsmall");
        g_pickup_healthsmall_max = cvar("g_pickup_healthsmall_max");
+       g_pickup_healthsmall_anyway = cvar("g_pickup_healthsmall_anyway");
        g_pickup_healthmedium = cvar("g_pickup_healthmedium");
        g_pickup_healthmedium_max = cvar("g_pickup_healthmedium_max");
+       g_pickup_healthmedium_anyway = cvar("g_pickup_healthmedium_anyway");
        g_pickup_healthlarge = cvar("g_pickup_healthlarge");
        g_pickup_healthlarge_max = cvar("g_pickup_healthlarge_max");
+       g_pickup_healthlarge_anyway = cvar("g_pickup_healthlarge_anyway");
        g_pickup_healthmega = cvar("g_pickup_healthmega");
        g_pickup_healthmega_max = cvar("g_pickup_healthmega_max");
+       g_pickup_healthmega_anyway = cvar("g_pickup_healthmega_anyway");
 
        g_pinata = cvar("g_pinata");
 
index 280195807633846a062c532eee4c2631c8ea2c09..ee56acc9ca696b95ede26343e20d08a80a98a955 100644 (file)
@@ -40,6 +40,7 @@ string Item_CounterFieldName(float it)
 }
 
 .float max_armorvalue;
+.float pickup_anyway;
 
 float Item_Customize()
 {
@@ -429,14 +430,14 @@ float Item_GiveTo(entity item, entity player)
                        }
 
                        if (item.health)
-                       if (player.health < item.max_health)
+                       if ((player.health < item.max_health) || item.pickup_anyway)
                        {
                                pickedup = TRUE;
                                player.health = min(player.health + item.health, item.max_health);
                                player.pauserothealth_finished = max(player.pauserothealth_finished, time + cvar("g_balance_pause_health_rot"));
                        }
                        if (item.armorvalue)
-                       if (player.armorvalue < item.max_armorvalue)
+                       if ((player.armorvalue < item.max_armorvalue) || item.pickup_anyway)
                        {
                                pickedup = TRUE;
                                player.armorvalue = min(player.armorvalue + item.armorvalue, item.max_armorvalue);
@@ -1195,6 +1196,8 @@ void spawnfunc_item_armor_small (void) {
                self.armorvalue = g_pickup_armorsmall;
        if(!self.max_armorvalue)
                self.max_armorvalue = g_pickup_armorsmall_max;
+       if(!self.pickup_anyway)
+               self.pickup_anyway = g_pickup_armorsmall_anyway;
        StartItem ("models/items/g_a1.md3", "misc/armor1.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "5 Armor", IT_ARMOR_SHARD, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
 }
 
@@ -1203,6 +1206,8 @@ void spawnfunc_item_armor_medium (void) {
                self.armorvalue = g_pickup_armormedium;
        if(!self.max_armorvalue)
                self.max_armorvalue = g_pickup_armormedium_max;
+       if(!self.pickup_anyway)
+               self.pickup_anyway = g_pickup_armormedium_anyway;
        StartItem ("models/items/g_armormedium.md3", "misc/armor10.wav", g_pickup_respawntime_medium, g_pickup_respawntimejitter_medium, "25 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID);
 }
 
@@ -1211,6 +1216,8 @@ void spawnfunc_item_armor_big (void) {
                self.armorvalue = g_pickup_armorbig;
        if(!self.max_armorvalue)
                self.max_armorvalue = g_pickup_armorbig_max;
+       if(!self.pickup_anyway)
+               self.pickup_anyway = g_pickup_armorbig_anyway;
        StartItem ("models/items/g_a50.md3", "misc/armor17_5.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "50 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, 20000);
 }
 
@@ -1219,6 +1226,8 @@ void spawnfunc_item_armor_large (void) {
                self.armorvalue = g_pickup_armorlarge;
        if(!self.max_armorvalue)
                self.max_armorvalue = g_pickup_armorlarge_max;
+       if(!self.pickup_anyway)
+               self.pickup_anyway = g_pickup_armorlarge_anyway;
        StartItem ("models/items/g_a25.md3", "misc/armor25.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "100 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
 }
 
@@ -1227,6 +1236,8 @@ void spawnfunc_item_health_small (void) {
                self.max_health = g_pickup_healthsmall_max;
        if(!self.health)
                self.health = g_pickup_healthsmall;
+       if(!self.pickup_anyway)
+               self.pickup_anyway = g_pickup_healthsmall_anyway;
        StartItem ("models/items/g_h1.md3", "misc/minihealth.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "5 Health", IT_5HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
 }
 
@@ -1235,6 +1246,8 @@ void spawnfunc_item_health_medium (void) {
                self.max_health = g_pickup_healthmedium_max;
        if(!self.health)
                self.health = g_pickup_healthmedium;
+       if(!self.pickup_anyway)
+               self.pickup_anyway = g_pickup_healthmedium_anyway;
        StartItem ("models/items/g_h25.md3", "misc/mediumhealth.wav", g_pickup_respawntime_short, g_pickup_respawntimejitter_short, "25 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID);
 }
 
@@ -1243,6 +1256,8 @@ void spawnfunc_item_health_large (void) {
                self.max_health = g_pickup_healthlarge_max;
        if(!self.health)
                self.health = g_pickup_healthlarge;
+       if(!self.pickup_anyway)
+               self.pickup_anyway = g_pickup_healthlarge_anyway;
        StartItem ("models/items/g_h50.md3", "misc/mediumhealth.wav", g_pickup_respawntime_medium, g_pickup_respawntimejitter_medium, "50 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_MID);
 }
 
@@ -1260,6 +1275,8 @@ void spawnfunc_item_health_mega (void) {
                        self.max_health = g_pickup_healthmega_max;
                if(!self.health)
                        self.health = g_pickup_healthmega;
+               if(!self.pickup_anyway)
+                       self.pickup_anyway = g_pickup_healthmega_anyway;
                StartItem ("models/items/g_h100.md3", "misc/megahealth.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "100 Health", IT_HEALTH, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
        }
 }