]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
jetpack, activated by holding jump key tzork/overkill_v2
authorJakob MG <tzork@xonotic.org>
Mon, 26 Jan 2015 00:55:39 +0000 (01:55 +0100)
committerJakob MG <tzork@xonotic.org>
Mon, 26 Jan 2015 00:55:39 +0000 (01:55 +0100)
balance-overkill.cfg
overkill.cfg [new file with mode: 0644]
qcsrc/server/mutators/mutator_overkill.qc

index bf390c2197ac126c23cf6acf59b6e5e3fe03d676..027da5e60bd541bb3038181bbc75894cac254c46 100644 (file)
@@ -1,7 +1,7 @@
 g_mod_balance Overkill
 
 // {{{ starting gear
-set g_balance_health_start 100
+set g_balance_health_start 110
 set g_balance_armor_start 0
 set g_start_ammo_shells 15
 set g_start_ammo_nails 0
@@ -125,16 +125,16 @@ set g_balance_armor_regenstable 100
 set g_balance_armor_rotstable 0
 set g_balance_armor_limit 999
 set g_balance_armor_blockpercent 0.7
-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
-set g_balance_fuel_rot 0.05
-set g_balance_fuel_rotlinear 0
+set g_balance_fuel_regen 0 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
+set g_balance_fuel_regenlinear 30
+set g_balance_pause_fuel_regen 1 // other than this, fuel uses the health regen counter
+set g_balance_fuel_rot 0
+set g_balance_fuel_rotlinear 10
 set g_balance_pause_fuel_rot 5
 set g_balance_pause_fuel_rot_spawn 10
 set g_balance_fuel_regenstable 50
 set g_balance_fuel_rotstable 100
-set g_balance_fuel_limit 999
+set g_balance_fuel_limit 100
 // }}}
 
 // {{{ misc
@@ -204,7 +204,7 @@ set g_jetpack_acceleration_side 1200 "acceleration of the jetpack in xy directio
 set g_jetpack_acceleration_up 600 "acceleration of the jetpack in z direction (note: you have to factor in gravity here, if antigravity is not 1)"
 set g_jetpack_maxspeed_side 1200 "max speed of the jetpack in xy direction"
 set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
-set g_jetpack_fuel 8 "fuel per second for jetpack"
+set g_jetpack_fuel 20 "fuel per second for jetpack"
 set g_jetpack_attenuation 2 "jetpack sound attenuation"
 
 set g_grappling_hook_tarzan 2 // 2: can also pull players
diff --git a/overkill.cfg b/overkill.cfg
new file mode 100644 (file)
index 0000000..1eff76a
--- /dev/null
@@ -0,0 +1,129 @@
+g_overkill 1
+
+g_overkill_ammo_start 50
+g_overkill_ammo_max   100
+g_overkill_ammo_regen 2.52
+g_overkill_superguns_builtin 0
+
+g_use_ammunition 1
+g_pickup_items 0
+sv_gibhealth 120
+g_spawnshieldtime 0.5
+
+g_balance_health_regen 0
+g_balance_health_regenlinear 100
+g_balance_health_rot 0
+g_balance_health_rotstable 200 // needs this too, else it rots towards 100 even with g_balance_health_rot 0
+g_balance_armor_rotstable 0
+g_balance_armor_rotlinear 1
+g_balance_armor_rot 0
+g_balance_pause_health_regen 2
+
+// g_balance_laser_primary_force_velocitybias 1.2  // sorry i realy hate this
+
+g_balance_shotgun_primary_damage 17
+g_balance_shotgun_primary_bullets 10
+g_balance_shotgun_primary_force 80
+g_balance_shotgun_primary_spread 0.07
+g_balance_shotgun_primary_animtime 0.65
+g_balance_shotgun_primary_ammo 6.25
+g_balance_shotgun_reload_ammo 50
+g_balance_shotgun_reload_time 2
+g_balance_shotgun_primary_bulletconstant 3000
+
+g_balance_uzi_mode 1
+g_balance_uzi_sustained_damage 25
+g_balance_uzi_sustained_refire 0.1
+g_balance_uzi_sustained_spread 0.01
+g_balance_uzi_sustained_force 5
+g_balance_uzi_reload_ammo 30
+g_balance_uzi_reload_time 1.5
+g_balance_uzi_spread_min 0
+g_balance_uzi_spread_add 0.0015
+g_balance_uzi_bulletconstant 500
+
+g_balance_hmg_spread_min 0.01
+g_balance_hmg_spread_max 0.06
+g_balance_hmg_spread_add 0.005
+
+g_balance_hmg_sustained_damage 30
+g_balance_hmg_sustained_headshotaddeddamage 0
+g_balance_hmg_sustained_force 10
+g_balance_hmg_sustained_spread 0.03
+g_balance_hmg_sustained_refire 0.05
+g_balance_hmg_sustained_ammo 1
+
+g_balance_hmg_speed 24000
+g_balance_hmg_bulletconstant 115 // 13.1qu
+
+g_balance_hmg_reload_ammo 100 //default: 30
+g_balance_hmg_reload_time 1
+
+g_balance_nex_primary_damage 100
+g_balance_nex_primary_force 500
+g_balance_nex_primary_refire 1
+g_balance_nex_primary_animtime 0.95
+g_balance_nex_primary_ammo 10
+g_balance_nex_primary_damagefalloff_mindist 0
+g_balance_nex_primary_damagefalloff_maxdist 0
+g_balance_nex_primary_damagefalloff_halflife 0
+g_balance_nex_primary_damagefalloff_forcehalflife 0
+
+g_balance_nex_secondary 1
+g_balance_nex_charge 0
+g_balance_nex_reload_ammo 50
+g_balance_nex_reload_time 2
+
+g_balance_rpc_ammo 10
+g_balance_rpc_animtime 1
+g_balance_rpc_damage 150
+g_balance_rpc_damage2 500
+g_balance_rpc_damageforcescale 2
+g_balance_rpc_edgedamage 50
+g_balance_rpc_force 400
+g_balance_rpc_health 25
+g_balance_rpc_lifetime 30
+g_balance_rpc_radius 300
+g_balance_rpc_refire 1
+g_balance_rpc_speed 2500
+g_balance_rpc_speedaccel 5000
+g_balance_rpc_reload_ammo 50
+g_balance_rpc_reload_time 1
+
+g_projectiles_newton_style_2_minfactor 1 // rocket will never fly below default speed, even you you move backwards
+
+g_overkill_spawnsystem 1                // Experimental spawnsystem
+g_overkill_spawnsystem_delay 2.5        // How long to wait before its OK to spawn at a player after someone just spawned at this player
+g_overkill_spawnsystem_delay_death 0    // How long to wait before its OK to spawn at a player after death 
+g_overkill_spawnsystem_check_health 1   // Only allow spawn at this player if hes health is full
+g_overkill_spawnsystem_close2death 1    // Spawn as close as possible to where we died?
+g_overkill_spawnsystem_give_nade 1      // Give nade at spawn
+
+g_overkill_nade_lifetime 3.5
+g_overkill_nade_minforce 400
+g_overkill_nade_maxforce 2000
+g_overkill_nade_health 25
+g_overkill_nade_refire 10
+
+g_overkill_nade_damage 225
+g_overkill_nade_edgedamage 90
+g_overkill_nade_radius 300
+g_overkill_nade_force 650
+g_overkill_nade_newton_style 0
+
+g_pickup_healthmega_anyway 0
+g_pikup_armorsmall_max 20
+g_pickup_armorsmall_anyway 0
+g_pickup_healthmega_max 200
+g_pickup_healthmega_anyway 0
+
+g_overkill_100a_anyway 1
+g_overkill_100h_anyway 1
+g_overkill_powerups_repalce 1
+g_overkill_superguns_onemag 1
+g_overkill_superguns_respawn_time 20
+
+sv_defaultcharacter 1
+sv_defaultplayermodel "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
+sv_defaultplayermodel_red "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm"
+sv_defaultplayermodel_blue "models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
index d3710712db84f0dd9168741233246d4cb968ea98..10630e3f3825ecfe7302bf89378c01d3c8160bb9 100644 (file)
@@ -97,14 +97,6 @@ MUTATOR_HOOKFUNCTION(ok_PlayerRegen)
        {
                self.armorvalue = CalcRotRegen(self.armorvalue, autocvar_g_balance_armor_regenstable, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, 1 * frametime * (time > self.ok_pauseregen_finished), 0, 0, 1, 1 * frametime * (time > self.pauserotarmor_finished), autocvar_g_balance_armor_limit);
                self.health = CalcRotRegen(self.health, autocvar_g_balance_health_regenstable, 0, 100, 1 * frametime * (time > self.ok_pauseregen_finished), 200, 0, autocvar_g_balance_health_rotlinear, 1 * frametime * (time > self.pauserothealth_finished), autocvar_g_balance_health_limit);
-
-               float minf, maxf, limitf;
-
-               maxf = autocvar_g_balance_fuel_rotstable;
-               minf = autocvar_g_balance_fuel_regenstable;
-               limitf = autocvar_g_balance_fuel_limit;
-
-               self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > self.pauserotfuel_finished), limitf);
        }
        return TRUE; // return TRUE anyway, as frozen uses no regen
 }
@@ -195,6 +187,38 @@ MUTATOR_HOOKFUNCTION(ok_PlayerSpawn)
        return FALSE;
 }
 
+.float jump_btn_time;
+.float jump_btn_was_down;
+MUTATOR_HOOKFUNCTION(ok_PlayerPhysics)
+{
+    if(!self.BUTTON_JUMP)
+    {
+               float maxf = autocvar_g_balance_fuel_rotstable;
+               float minf = autocvar_g_balance_fuel_regenstable;
+               float limitf = autocvar_g_balance_fuel_limit;
+               self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > self.pauserotfuel_finished), limitf);
+
+        self.jump_btn_was_down = FALSE;
+        self.jump_btn_time = 0;
+
+        return FALSE;
+    }
+
+    if(!self.jump_btn_was_down && self.BUTTON_JUMP)
+    {
+        self.jump_btn_was_down = TRUE;
+        self.jump_btn_time = time + 0.2;
+    }
+
+    if(time > self.jump_btn_time && self.ammo_fuel > 0)
+    {
+        self.BUTTON_JETPACK = TRUE;
+        self.ammo_fuel -= autocvar_g_jetpack_fuel * frametime;
+    }
+
+    return FALSE;
+}
+
 MUTATOR_HOOKFUNCTION(ok_OnEntityPreSpawn)
 {
        if(autocvar_g_powerups)
@@ -268,6 +292,7 @@ MUTATOR_HOOKFUNCTION(ok_StartItems)
        if((get_weaponinfo(WEP_HMG)).weaponstart > 0) { ok_start_items |= WEPSET_HMG; }
 
        start_items |= IT_UNLIMITED_WEAPON_AMMO;
+       start_items |= IT_JETPACK;
        start_weapons = warmup_start_weapons = ok_start_items;
 
        return FALSE;
@@ -348,6 +373,7 @@ MUTATOR_DEFINITION(mutator_overkill)
        MUTATOR_HOOK(BuildMutatorsString, ok_BuildMutatorsString, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsPrettyString, ok_BuildMutatorsPrettyString, CBC_ORDER_ANY);
        MUTATOR_HOOK(SetModname, ok_SetModname, CBC_ORDER_ANY);
+       MUTATOR_HOOK(PlayerPhysics, ok_PlayerPhysics, CBC_ORDER_FIRST);
 
        MUTATOR_ONADD
        {