]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/TeamplayOverhaul
authorLyberta <lyberta@lyberta.net>
Fri, 15 Jun 2018 04:51:33 +0000 (07:51 +0300)
committerLyberta <lyberta@lyberta.net>
Fri, 15 Jun 2018 04:51:33 +0000 (07:51 +0300)
79 files changed:
bal-wep-mario.cfg
balance-mario.cfg
qcsrc/client/commands/cl_cmd.qc
qcsrc/client/commands/cl_cmd.qh
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/csqcmodel_hooks.qh
qcsrc/client/hud/hud.qc
qcsrc/client/hud/hud.qh
qcsrc/client/hud/hud_config.qc
qcsrc/client/hud/hud_config.qh
qcsrc/client/hud/panel/ammo.qc
qcsrc/client/hud/panel/infomessages.qc
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/client/hud/panel/quickmenu.qh
qcsrc/client/hud/panel/radar.qh
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/client/mapvoting.qc
qcsrc/client/view.qc
qcsrc/client/view.qh
qcsrc/client/weapons/projectile.qc
qcsrc/common/gamemodes/gamemode/ctf/ctf.qc
qcsrc/common/gamemodes/gamemode/lms/lms.qc
qcsrc/common/mapobjects/target/music.qh
qcsrc/common/minigames/cl_minigames.qh
qcsrc/common/minigames/cl_minigames_hud.qh
qcsrc/common/mutators/mutator/buffs/buffs.qh
qcsrc/common/mutators/mutator/nades/effects.inc
qcsrc/common/mutators/mutator/nades/nades.qh
qcsrc/common/net_notice.qh
qcsrc/common/t_items.qh
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/sv_turrets.qh
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/turret/walker.qc
qcsrc/common/turrets/util.qh
qcsrc/common/vehicles/sv_vehicles.qh
qcsrc/common/weapons/all.qh
qcsrc/common/weapons/weapon/crylink.qh
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/porto.qh
qcsrc/server/bot/api.qh
qcsrc/server/bot/default/navigation.qc
qcsrc/server/bot/default/waypoints.qc
qcsrc/server/cheats.qc
qcsrc/server/cheats.qh
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/command/banning.qh
qcsrc/server/command/cmd.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qh
qcsrc/server/compat/quake3.qc
qcsrc/server/compat/quake3.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_hook.qh
qcsrc/server/g_world.qc
qcsrc/server/g_world.qh
qcsrc/server/ipban.qc
qcsrc/server/ipban.qh
qcsrc/server/item_key.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/events.qh
qcsrc/server/pathlib/debug.qc
qcsrc/server/pathlib/debug.qh
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/pathlib.qh
qcsrc/server/portals.qc
qcsrc/server/portals.qh
qcsrc/server/race.qc
qcsrc/server/race.qh
qcsrc/server/steerlib.qc
qcsrc/server/sv_main.qc
qcsrc/server/weapons/weaponsystem.qc
ruleset-XDF.cfg
ruleset-XPM.cfg
xonotic-server.cfg

index a4c4bedda1e60924fad98ed710e54804bb34054a..89e2e62fa09ea7c9b968edc9928e4dd6b1828ea0 100644 (file)
@@ -1,6 +1,6 @@
 // {{{ #1: Blaster
 set g_balance_blaster_primary_animtime 0.2
-set g_balance_blaster_primary_damage 25
+set g_balance_blaster_primary_damage 20
 set g_balance_blaster_primary_delay 0
 set g_balance_blaster_primary_edgedamage 12.5
 set g_balance_blaster_primary_force 300
@@ -60,8 +60,8 @@ set g_balance_shotgun_secondary_alt_animtime 0.2
 set g_balance_shotgun_secondary_alt_refire 1.2
 set g_balance_shotgun_switchdelay_drop 0.2
 set g_balance_shotgun_switchdelay_raise 0.2
-set g_balance_shotgun_weaponreplace ""
-set g_balance_shotgun_weaponstart 1
+set g_balance_shotgun_weaponreplace "shockwave"
+set g_balance_shotgun_weaponstart 0
 set g_balance_shotgun_weaponstartoverride -1
 set g_balance_shotgun_weaponthrowable 1
 // }}}
@@ -75,7 +75,7 @@ set g_balance_machinegun_burst_speed 0
 set g_balance_machinegun_first 1
 set g_balance_machinegun_first_ammo 1
 set g_balance_machinegun_first_damage 14
-set g_balance_machinegun_first_force 5
+set g_balance_machinegun_first_force 3
 set g_balance_machinegun_first_refire 0.125
 set g_balance_machinegun_first_spread 0.03
 set g_balance_machinegun_mode 1
@@ -87,12 +87,12 @@ set g_balance_machinegun_spread_max 0.05
 set g_balance_machinegun_spread_min 0.02
 set g_balance_machinegun_sustained_ammo 1
 set g_balance_machinegun_sustained_damage 10
-set g_balance_machinegun_sustained_force 5
+set g_balance_machinegun_sustained_force 3
 set g_balance_machinegun_sustained_refire 0.1
 set g_balance_machinegun_sustained_spread 0.03
 set g_balance_machinegun_switchdelay_drop 0.2
 set g_balance_machinegun_switchdelay_raise 0.2
-set g_balance_machinegun_weaponreplace ""
+set g_balance_machinegun_weaponreplace "arc"
 set g_balance_machinegun_weaponstart 0
 set g_balance_machinegun_weaponstartoverride -1
 set g_balance_machinegun_weaponthrowable 1
@@ -219,7 +219,7 @@ set g_balance_electro_secondary_speed 1000
 set g_balance_electro_secondary_speed_up 200
 set g_balance_electro_secondary_speed_z 0
 set g_balance_electro_secondary_spread 0
-set g_balance_electro_secondary_stick 1
+set g_balance_electro_secondary_stick 0
 set g_balance_electro_secondary_touchexplode 1
 set g_balance_electro_switchdelay_drop 0.2
 set g_balance_electro_switchdelay_raise 0.2
@@ -251,7 +251,7 @@ set g_balance_crylink_primary_other_lifetime 5
 set g_balance_crylink_primary_radius 80
 set g_balance_crylink_primary_refire 0.7
 set g_balance_crylink_primary_shots 6
-set g_balance_crylink_primary_speed 2000
+set g_balance_crylink_primary_speed 4000
 set g_balance_crylink_primary_spread 0.08
 set g_balance_crylink_reload_ammo 0
 set g_balance_crylink_reload_time 2
@@ -260,9 +260,9 @@ set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_animtime 0.2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_damage 10
-set g_balance_crylink_secondary_edgedamage 5
-set g_balance_crylink_secondary_force -250
+set g_balance_crylink_secondary_damage 8
+set g_balance_crylink_secondary_edgedamage 4
+set g_balance_crylink_secondary_force -200
 set g_balance_crylink_secondary_joindelay 0
 set g_balance_crylink_secondary_joinexplode 0
 set g_balance_crylink_secondary_joinexplode_damage 0
@@ -304,7 +304,7 @@ set g_balance_vortex_charge_velocity_rate 0
 set g_balance_vortex_primary_ammo 6
 set g_balance_vortex_primary_animtime 0.4
 set g_balance_vortex_primary_armorpierce 0
-set g_balance_vortex_primary_damage 70
+set g_balance_vortex_primary_damage 65
 set g_balance_vortex_primary_damagefalloff_forcehalflife 0
 set g_balance_vortex_primary_damagefalloff_halflife 0
 set g_balance_vortex_primary_damagefalloff_maxdist 0
@@ -373,7 +373,7 @@ set g_balance_hagar_secondary_speed 2000
 set g_balance_hagar_secondary_spread 0
 set g_balance_hagar_switchdelay_drop 0.2
 set g_balance_hagar_switchdelay_raise 0.2
-set g_balance_hagar_weaponreplace ""
+set g_balance_hagar_weaponreplace "0"
 set g_balance_hagar_weaponstart 0
 set g_balance_hagar_weaponstartoverride -1
 set g_balance_hagar_weaponthrowable 1
@@ -725,7 +725,7 @@ set g_balance_shockwave_melee_traces 10
 set g_balance_shockwave_switchdelay_drop 0.2
 set g_balance_shockwave_switchdelay_raise 0.2
 set g_balance_shockwave_weaponreplace ""
-set g_balance_shockwave_weaponstart 0
+set g_balance_shockwave_weaponstart 1
 set g_balance_shockwave_weaponstartoverride -1
 set g_balance_shockwave_weaponthrowable 0
 // }}}
@@ -753,7 +753,7 @@ set g_balance_arc_beam_heat 0
 set g_balance_arc_burst_heat 5
 set g_balance_arc_beam_maxangle 10
 set g_balance_arc_beam_nonplayerdamage 80
-set g_balance_arc_beam_range 1000
+set g_balance_arc_beam_range 1250
 set g_balance_arc_beam_refire 0.25
 set g_balance_arc_beam_returnspeed 8
 set g_balance_arc_beam_tightness 0.5
@@ -847,3 +847,116 @@ set g_balance_okrpc_weaponstart 0
 set g_balance_okrpc_weaponstartoverride 0
 set g_balance_okrpc_weaponthrowable 0
 // }}}
+// {{{ Overkill Shotgun
+set g_balance_okshotgun_primary_ammo 3
+set g_balance_okshotgun_primary_animtime 0.65
+set g_balance_okshotgun_primary_bot_range 512
+set g_balance_okshotgun_primary_bullets 10
+set g_balance_okshotgun_primary_damage 17
+set g_balance_okshotgun_primary_force 80
+set g_balance_okshotgun_primary_refire 0.75
+set g_balance_okshotgun_primary_solidpenetration 3.8
+set g_balance_okshotgun_primary_spread 0.07
+set g_balance_okshotgun_reload_ammo 24
+set g_balance_okshotgun_reload_time 2
+set g_balance_okshotgun_secondary_animtime 0.2
+set g_balance_okshotgun_secondary_damage 25
+set g_balance_okshotgun_secondary_delay 0
+set g_balance_okshotgun_secondary_edgedamage 12.5
+set g_balance_okshotgun_secondary_force 300
+set g_balance_okshotgun_secondary_lifetime 5
+set g_balance_okshotgun_secondary_radius 70
+set g_balance_okshotgun_secondary_refire 0.7
+set g_balance_okshotgun_secondary_refire_type 1
+set g_balance_okshotgun_secondary_shotangle 0
+set g_balance_okshotgun_secondary_speed 6000
+set g_balance_okshotgun_secondary_spread 0
+set g_balance_okshotgun_switchdelay_drop 0.2
+set g_balance_okshotgun_switchdelay_raise 0.2
+set g_balance_okshotgun_weaponreplace ""
+set g_balance_okshotgun_weaponstart 0
+set g_balance_okshotgun_weaponstartoverride -1
+set g_balance_okshotgun_weaponthrowable 1
+// }}}
+// {{{ Overkill Machine Gun
+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_spread_add 0.012
+set g_balance_okmachinegun_primary_spread_max 0.05
+set g_balance_okmachinegun_primary_spread_min 0
+set g_balance_okmachinegun_reload_ammo 30
+set g_balance_okmachinegun_reload_time 1.5
+set g_balance_okmachinegun_secondary_animtime 0.2
+set g_balance_okmachinegun_secondary_damage 25
+set g_balance_okmachinegun_secondary_delay 0
+set g_balance_okmachinegun_secondary_edgedamage 12.5
+set g_balance_okmachinegun_secondary_force 300
+set g_balance_okmachinegun_secondary_lifetime 5
+set g_balance_okmachinegun_secondary_radius 70
+set g_balance_okmachinegun_secondary_refire 0.7
+set g_balance_okmachinegun_secondary_refire_type 1
+set g_balance_okmachinegun_secondary_shotangle 0
+set g_balance_okmachinegun_secondary_speed 6000
+set g_balance_okmachinegun_secondary_spread 0
+set g_balance_okmachinegun_switchdelay_drop 0.2
+set g_balance_okmachinegun_switchdelay_raise 0.2
+set g_balance_okmachinegun_weaponreplace ""
+set g_balance_okmachinegun_weaponstart 0
+set g_balance_okmachinegun_weaponstartoverride -1
+set g_balance_okmachinegun_weaponthrowable 1
+// }}}
+// {{{ Overkill Nex
+set g_balance_oknex_charge 0
+set g_balance_oknex_charge_animlimit 0.5
+set g_balance_oknex_charge_limit 1
+set g_balance_oknex_charge_maxspeed 800
+set g_balance_oknex_charge_mindmg 40
+set g_balance_oknex_charge_minspeed 400
+set g_balance_oknex_charge_rate 0.6
+set g_balance_oknex_charge_rot_pause 0
+set g_balance_oknex_charge_rot_rate 0
+set g_balance_oknex_charge_shot_multiplier 0
+set g_balance_oknex_charge_start 0.5
+set g_balance_oknex_charge_velocity_rate 0
+set g_balance_oknex_primary_ammo 10
+set g_balance_oknex_primary_animtime 0.65
+set g_balance_oknex_primary_damage 100
+set g_balance_oknex_primary_damagefalloff_forcehalflife 0
+set g_balance_oknex_primary_damagefalloff_halflife 0
+set g_balance_oknex_primary_damagefalloff_maxdist 0
+set g_balance_oknex_primary_damagefalloff_mindist 0
+set g_balance_oknex_primary_force 500
+set g_balance_oknex_primary_refire 1
+set g_balance_oknex_reload_ammo 50
+set g_balance_oknex_reload_time 2
+set g_balance_oknex_secondary 2
+set g_balance_oknex_secondary_ammo 0
+set g_balance_oknex_secondary_animtime 0.2
+set g_balance_oknex_secondary_chargepool 0
+set g_balance_oknex_secondary_chargepool_pause_regen 1
+set g_balance_oknex_secondary_chargepool_regen 0.15
+set g_balance_oknex_secondary_damage 25
+set g_balance_oknex_secondary_damagefalloff_forcehalflife 0
+set g_balance_oknex_secondary_damagefalloff_halflife 0
+set g_balance_oknex_secondary_damagefalloff_maxdist 0
+set g_balance_oknex_secondary_damagefalloff_mindist 0
+set g_balance_oknex_secondary_force 300
+set g_balance_oknex_secondary_refire 0.7
+set g_balance_oknex_secondary_refire_type 1
+set g_balance_oknex_secondary_delay 0
+set g_balance_oknex_secondary_edgedamage 12.5
+set g_balance_oknex_secondary_lifetime 5
+set g_balance_oknex_secondary_radius 70
+set g_balance_oknex_secondary_shotangle 0
+set g_balance_oknex_secondary_speed 6000
+set g_balance_oknex_secondary_spread 0
+set g_balance_oknex_switchdelay_drop 0.2
+set g_balance_oknex_switchdelay_raise 0.2
+set g_balance_oknex_weaponreplace ""
+set g_balance_oknex_weaponstart 0
+set g_balance_oknex_weaponstartoverride -1
+set g_balance_oknex_weaponthrowable 1
+// }}}
index 4dda8bdc8842318701f1dcc39e95db6a87f8f7c3..1974ad6c811d130e2ad129424d24e5824b5135c9 100644 (file)
@@ -101,7 +101,7 @@ set g_pickup_respawntime_powerup 120
 set g_pickup_respawntime_weapon 10
 set g_pickup_respawntime_superweapon 120
 set g_pickup_respawntime_ammo 10
-set g_pickup_respawntime_initial_random 2
+set g_pickup_respawntime_initial_random 1
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
@@ -132,7 +132,7 @@ set g_balance_pause_armor_rot_spawn 5
 set g_balance_armor_regenstable 100
 set g_balance_armor_rotstable 100
 set g_balance_armor_limit 200
-set g_balance_armor_blockpercent 0.7
+set g_balance_armor_blockpercent 0.55
 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
@@ -199,7 +199,7 @@ set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone i
 
 // {{{ powerups
 set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken
-set g_balance_powerup_invincible_takeforce 1
+set g_balance_powerup_invincible_takeforce 0.33
 set g_balance_powerup_invincible_time 30
 set g_balance_powerup_strength_damage 3
 set g_balance_powerup_strength_force 3
index 5a53be8e7967983a316bda15262dce7d2433aac9..034bb6336680e7ead16421fcaf5fba0c8f78d69c 100644 (file)
 #include "../autocvars.qh"
 #include "../defs.qh"
 #include <client/hud/_mod.qh>
+#include <client/hud/panel/quickmenu.qh>
+#include <client/hud/panel/radar.qh>
 #include "../main.qh"
 #include "../mapvoting.qh"
 #include "../miscfunctions.qh"
 
 #include <client/mutators/_mod.qh>
 
+#include <common/minigames/cl_minigames_hud.qh>
+
 #include <common/mapinfo.qh>
 
 void DrawDebugModel(entity this)
@@ -249,16 +253,6 @@ void LocalCommand_handlevote(int request, int argc)
        }
 }
 
-bool QuickMenu_IsOpened();
-void QuickMenu_Close();
-bool QuickMenu_Open(string mode, string submenu, string file);
-
-bool HUD_MinigameMenu_IsOpened();
-void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger);
-void HUD_MinigameMenu_Open();
-
-void HUD_Radar_Show_Maximized(bool doshow, bool clickable);
-
 void LocalCommand_hud(int request, int argc)
 {
     TC(int, request); TC(int, argc);
index f1be4315fe5df1caeaaca2b6e29b62031bae2001..f6f96501aee2abb928a8de29ca923f602f80ea6b 100644 (file)
@@ -2,6 +2,7 @@
 
 void Cmd_Scoreboard_SetFields(int);
 void Cmd_Scoreboard_Help();
+void ConsoleCommand_macro_init();
 
 // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
 void LocalCommand_macro_write_aliases(int fh);
index 37e18bd8e0b17f4a4e5e4e4a08a3766fba9993aa..d8f6d26a33895e91fd40fb6a8d1b42e723de8575 100644 (file)
@@ -18,8 +18,6 @@
 .float death_time;
 .int modelflags;
 
-void CSQCModel_Hook_PreDraw(entity this, bool isplayer);
-
 .bool isplayermodel;
 
 // FEATURE: LOD
index 56a3fb4a549097a12295e15ce5c409b7b7e12cfe..8ed256379ff2e6d60b6bbf5a8598472f185999b4 100644 (file)
@@ -24,3 +24,5 @@ const int MF_TRACER3 =  BIT(7);  // purple trail
 .int csqcmodel_traileffect;
 
 void CSQCModel_Effects_Apply(entity this);
+
+void CSQCModel_Hook_PreDraw(entity this, bool isplayer);
index 55d7ffeaa8bd1a106f1621bf9ca7b8f1c3f6dd33..2b8eed95f7705578fc5ae34a083e8187c0f45a0b 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <client/defs.qh>
 #include <client/miscfunctions.qh>
+#include <client/view.qh>
 #include "panel/scoreboard.qh"
 #include "hud_config.qh"
 #include "../mapvoting.qh"
 #include <common/items/_mod.qh>
 #include <common/mapinfo.qh>
 #include <common/vehicles/all.qh>
+#include <common/vehicles/vehicle/bumblebee.qh>
 #include <common/mutators/mutator/waypoints/all.qh>
 #include <common/stats.qh>
 #include <lib/csqcmodel/cl_player.qh>
+#include <lib/csqcmodel/cl_model.qh>
 #include <common/gamemodes/_mod.qh>
 
 
@@ -395,8 +398,6 @@ Main HUD system
 ==================
 */
 
-void CSQC_BUMBLE_GUN_HUD();
-
 void HUD_Vehicle()
 {
        if(autocvar__hud_configure) return;
@@ -485,8 +486,6 @@ bool Hud_Shake_Update()
        return true;
 }
 
-entity CSQCModel_server2csqc(int i);
-void calc_followmodel_ofs(entity view);
 void Hud_Dynamic_Frame()
 {
        vector ofs = '0 0 0';
index 496d775efe4f3ad39c0a1a26196753bfb089b82a..950dee17ad5ec77799cab431c5bc3229f13d58af 100644 (file)
@@ -175,8 +175,6 @@ vector hud_shift;
 vector hud_shift_current = '0 0 0';
 vector hud_scale_center;
 
-float stringwidth_colors(string s, vector theSize);
-float stringwidth_nocolors(string s, vector theSize);
 void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag);
 
 .int panel_showflags;
index 3c93a6d64ca1b5723817c94eaa4287a16c28e745..e8ec807be5bc4f9c4e0f59e9410b748da1520757 100644 (file)
@@ -660,12 +660,10 @@ void HUD_Panel_Arrow_Action(float nPrimary)
        }
 }
 
-void HUD_Panel_EnableMenu();
 entity tab_panels[hud_panels_MAX];
 entity tab_panel;
 vector tab_panel_pos;
 float tab_backward;
-void HUD_Panel_FirstInDrawQ(float id);
 void reset_tab_panels()
 {
        for (int i = 0; i < hud_panels_COUNT; ++i)
index 6ab64f6aed2a7548f5b51dc36bbb012713c8c9e7..d91fe370e1d997cd213e661dfeb69adb63ab6312 100644 (file)
@@ -23,3 +23,7 @@ void HUD_Configure_Frame();
 void HUD_Configure_PostDraw();
 
 float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary);
+
+void HUD_Panel_EnableMenu();
+
+void HUD_Panel_FirstInDrawQ(float id);
index 0636f3f2e972cfc551eb991b4631732d90aa79ab..01ce50cdbb6f87e03291c9f57232dc683aff76c9 100644 (file)
@@ -6,6 +6,7 @@
 #include <client/view.qh>
 #include <common/t_items.qh>
 #include <common/wepent.qh>
+#include <common/mutators/mutator/nades/nades.qh>
 
 // Ammo (#1)
 
@@ -19,8 +20,6 @@ void DrawNadeProgressBar(vector myPos, vector mySize, float progress, vector col
                autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
 }
 
-void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expand_time); // TODO: mutator
-
 void DrawAmmoItem(vector myPos, vector mySize, int ammoType, bool isCurrent, bool isInfinite)
 {
     TC(bool, isCurrent); TC(bool, isInfinite);
index 1e5a0c9f2f293403c18408e3ff0cdae1fc72d649..7b7d82b4445c376ea46a019daf14ee2488b0c5dc 100644 (file)
@@ -33,7 +33,6 @@ int img_select(int group_id)
        return img_cur_msg[group_id];
 }
 
-float stringwidth_colors(string s, vector theSize);
 vector InfoMessages_drawstring(string s, vector pos, vector sz, float a, vector fontsize)
 {
        getWrappedLine_remaining = s;
index b84066b84f4de86723d9944b6de302d2711e23f3..29f69b3d4d9c506efc1676f48055af6c13011c4e 100644 (file)
@@ -57,8 +57,6 @@ void QuickMenu_Page_ClearEntry(int i)
        QuickMenu_Page_Command_Type[i] = 0;
 }
 
-float QuickMenu_Page_Load(string target_submenu, float new_page);
-void QuickMenu_Default(string submenu);
 bool QuickMenu_Open(string mode, string submenu, string file)
 {
        int fh = -1;
@@ -225,7 +223,6 @@ bool QuickMenu_IsOpened()
        return (QuickMenu_Page_Entries > 0);
 }
 
-void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me);
 bool HUD_Quickmenu_PlayerListEntries_Create(string cmd, int teamplayers, bool without_me)
 {
     TC(int, teamplayers); TC(bool, without_me);
index aad86e6bd689ed786280f6c1b8210e96b69ec6a3..694f0d1d7e0c439cedea395241f62d248e445473 100644 (file)
@@ -4,3 +4,8 @@
 bool QuickMenu_InputEvent(float bInputType, float nPrimary, float nSecondary);
 bool QuickMenu_IsOpened();
 void QuickMenu_Mouse();
+float QuickMenu_Page_Load(string target_submenu, float new_page);
+void QuickMenu_Default(string submenu);
+void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me);
+void QuickMenu_Close();
+bool QuickMenu_Open(string mode, string submenu, string file);
index 6db88c68b39ee50fce1f8acce9c778465a3223ae..d2fbc8f6b25ce5bb6a5afe05bb2637dfe53bd08c 100644 (file)
@@ -1,2 +1,4 @@
 #pragma once
 #include "../panel.qh"
+
+void HUD_Radar_Show_Maximized(bool doshow, bool clickable);
index 96d30aa52ce8559e6c4cc7dc234d74a44f2e9a99..5b8964d0d3962a913033d672c7ad4366d9605b06 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <client/autocvars.qh>
 #include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 #include "quickmenu.qh"
 #include <common/ent_cs.qh>
@@ -70,10 +71,6 @@ bool autocvar_hud_panel_scoreboard_spectators_showping = true;
 bool autocvar_hud_panel_scoreboard_spectators_aligned = false;
 float autocvar_hud_panel_scoreboard_minwidth = 0.4;
 
-
-void drawstringright(vector, string, vector, vector, float, float);
-void drawstringcenter(vector, string, vector, vector, float, float);
-
 // wrapper to put all possible scores titles through gettext
 string TranslateScoresLabel(string l)
 {
@@ -150,7 +147,6 @@ void Scoreboard_InitScores()
        Cmd_Scoreboard_SetFields(0);
 }
 
-float SetTeam(entity pl, float Team);
 //float lastpnum;
 void Scoreboard_UpdatePlayerTeams()
 {
index efb1fa204eed951d8014b976eee0528865dc8f94..3de8cefeb661084515be0ebe365d88f73888ede5 100644 (file)
@@ -8,11 +8,13 @@
 #include <common/effects/all.qh>
 #include <common/effects/all.inc>
 #include "hud/_mod.qh"
+#include "commands/cl_cmd.qh"
 #include "mapvoting.qh"
 #include <client/mutators/_mod.qh>
 #include "hud/panel/scoreboard.qh"
 #include "hud/panel/quickmenu.qh"
 #include "shownames.qh"
+#include "view.qh"
 #include <common/t_items.qh>
 #include "weapons/projectile.qh"
 #include <common/deathtypes/all.qh>
@@ -90,7 +92,6 @@ void LoadMenuSkinValues()
 // CSQC_Init : Called every time the CSQC code is initialized (essentially at map load)
 // Useful for precaching things
 
-void ConsoleCommand_macro_init();
 void CSQC_Init()
 {
        prvm_language = strzone(cvar_string("prvm_language"));
@@ -342,7 +343,6 @@ void Playerchecker_Think(entity this)
        this.nextthink = time + 0.2;
 }
 
-void TrueAim_Init();
 void PostInit()
 {
        entity playerchecker = new_pure(playerchecker);
@@ -388,8 +388,6 @@ float CSQC_InputEvent(int bInputType, float nPrimary, float nSecondary)
 // --------------------------------------------------------------------------
 // BEGIN OPTIONAL CSQC FUNCTIONS
 
-void Ent_Remove(entity this);
-
 void Ent_RemovePlayerScore(entity this)
 {
        if(this.owner) {
@@ -946,7 +944,6 @@ void Fog_Force()
                localcmd(sprintf("\nfog %s\nr_fog_exp2 0\nr_drawfog 1\n", forcefog));
 }
 
-void Gamemode_Init();
 NET_HANDLE(ENT_CLIENT_SCORES_INFO, bool isnew)
 {
        make_pure(this);
index 70189b3a23b2a36099f342cfd7f410017f4930c3..a95acd5739672b5fe096b1e2891220ab92fe3f40 100644 (file)
@@ -21,6 +21,14 @@ void draw_cursor(vector pos, vector ofs, string img, vector col, float a);
 void draw_cursor_normal(vector pos, vector col, float a);
 void LoadMenuSkinValues();
 
+void PostInit();
+
+void Ent_Remove(entity this);
+
+void Gamemode_Init();
+
+float SetTeam(entity pl, float Team);
+
 vector hud_fontsize;
 
 float RANKINGS_RECEIVED_CNT;
index 87b6d585b38c769cd8d20d65d0be24ad3303d52d..8412bd757964ffdec471381121b8a923af5a152c 100644 (file)
@@ -321,7 +321,6 @@ float MapVote_Selection(vector topleft, vector cellsize, float rows, float colum
        return mv_mouse_selection;
 }
 
-vector HUD_GetTableSize_BestItemAR(int item_count, vector psize, float item_aspect);
 void MapVote_Draw()
 {
        string map;
index a1b53fb82c54b09bc336c0ff9902ad1910f2511c..d036bd75df1b95e2552c59741658461796131d43 100644 (file)
@@ -17,6 +17,7 @@
 #include <common/anim.qh>
 #include <common/constants.qh>
 #include <common/net_linked.qh>
+#include <common/net_notice.qh>
 #include <common/debug.qh>
 #include <common/mapinfo.qh>
 #include <common/gamemodes/_mod.qh>
@@ -31,6 +32,7 @@
 #include <common/vehicles/all.qh>
 #include <common/weapons/_all.qh>
 #include <common/mutators/mutator/overkill/oknex.qh>
+#include <common/mutators/mutator/waypoints/all.qh>
 #include <common/viewloc.qh>
 #include <common/mapobjects/trigger/viewloc.qh>
 #include <common/minigames/cl_minigames.qh>
@@ -400,7 +402,6 @@ STATIC_INIT(fpscounter_init)
        showfps_prevfps_time = currentTime; // we must initialize it to avoid an instant low frame sending
 }
 
-void Porto_Draw(entity this);
 STATIC_INIT(Porto)
 {
        entity e = new_pure(porto);
@@ -768,8 +769,6 @@ float TrueAimCheck(entity wepent)
        return SHOTTYPE_HITWORLD;
 }
 
-void PostInit();
-void CSQC_Demo_Camera();
 float camera_mode;
 const float CAMERA_FREE = 1;
 const float CAMERA_CHASE = 2;
@@ -1561,12 +1560,9 @@ float oldr_novis;
 float oldr_useportalculling;
 float oldr_useinfinitefarclip;
 
-void cl_notice_run();
-
 float prev_myteam;
 int lasthud;
 float vh_notice_time;
-void WaypointSprite_Load();
 void CSQC_UpdateView(entity this, float w, float h)
 {
     TC(int, w); TC(int, h);
index 0a2c5c0c7066263f5a893538c5c26c152490f342..93af4255e2b95570cd5ab278b22af71110b8368e 100644 (file)
@@ -4,6 +4,14 @@
 
 vector crosshair_getcolor(entity this, float health_stat);
 
+void calc_followmodel_ofs(entity view);
+
+void Porto_Draw(entity this);
+
+void CSQC_Demo_Camera();
+
+void TrueAim_Init();
+
 entity viewmodels[MAX_WEAPONSLOTS];
 
 vector viewloc_mousepos;
index 444fb27431136a3c6540830276987daba1a474f7..41b97694496616fa4de17b8f73aa2c163cb2fa6d 100644 (file)
@@ -11,6 +11,8 @@
 #include <common/net_linked.qh>
 #include <common/physics/movetypes/movetypes.qh>
 
+#include <common/mutators/mutator/nades/nades.qh>
+
 #include <lib/csqcmodel/interpolate.qh>
 
 #include <lib/warpzone/anglestransform.qh>
@@ -50,8 +52,6 @@ void Projectile_DrawTrail(entity this, vector to)
        }
 }
 
-bool Projectile_isnade(int proj); // TODO: remove
-
 void Projectile_Draw(entity this)
 {
        vector rot;
index 0fdbf3ab25b700173e6b416b6187d6017574ee8c..322f8979d9fadba5c583c0adfb3fb2e587fd9a4d 100644 (file)
@@ -1377,7 +1377,8 @@ void havocbot_ctf_calculate_middlepoint()
        havocbot_middlepoint = s / n;
        havocbot_middlepoint_radius = vlen(fo - havocbot_middlepoint);
 
-       havocbot_symmetryaxis_equation = '0 0 0';
+       havocbot_symmetry_axis_m = 0;
+       havocbot_symmetry_axis_q = 0;
        if(n == 2)
        {
                // for symmetrical editing of waypoints
@@ -1385,11 +1386,10 @@ void havocbot_ctf_calculate_middlepoint()
                entity f2 = f1.ctf_worldflagnext;
                float m = -(f1.origin.y - f2.origin.y) / (f1.origin.x - f2.origin.x);
                float q = havocbot_middlepoint.y - m * havocbot_middlepoint.x;
-               havocbot_symmetryaxis_equation.x = m;
-               havocbot_symmetryaxis_equation.y = q;
+               havocbot_symmetry_axis_m = m;
+               havocbot_symmetry_axis_q = q;
        }
-       // store number of flags in this otherwise unused vector component
-       havocbot_symmetryaxis_equation.z = n;
+       havocbot_symmetry_origin_order = n;
 }
 
 
index 5e97248c6f3e620b04da3079b74ad7c71e8a1054..b6bfb4ef4f9a57d419c63263eb21b0b0ba20d11b 100644 (file)
@@ -233,7 +233,10 @@ MUTATOR_HOOKFUNCTION(lms, ClientDisconnect)
 
 MUTATOR_HOOKFUNCTION(lms, MakePlayerObserver)
 {
-    entity player = M_ARGV(0, entity);
+       entity player = M_ARGV(0, entity);
+
+       if (!IS_PLAYER(player))
+               return true;
 
        lms_RemovePlayer(player);
        return true;  // prevent team reset
@@ -243,9 +246,6 @@ MUTATOR_HOOKFUNCTION(lms, ClientConnect)
 {
        entity player = M_ARGV(0, entity);
 
-       TRANSMUTE(Player, player);
-       campaign_bots_may_start = true;
-
        if(GameRules_scoring_add(player, LMS_LIVES, LMS_NewPlayerLives()) <= 0)
        {
                GameRules_scoring_add(player, LMS_RANK, 666); // mark as forced spectator for the hud code
@@ -253,6 +253,13 @@ MUTATOR_HOOKFUNCTION(lms, ClientConnect)
        }
 }
 
+MUTATOR_HOOKFUNCTION(lms, AutoJoinOnConnection)
+{
+       if(autocvar_g_campaign)
+               return false;
+       return true;
+}
+
 MUTATOR_HOOKFUNCTION(lms, PlayerPreThink)
 {
        entity player = M_ARGV(0, entity);
@@ -382,7 +389,7 @@ MUTATOR_HOOKFUNCTION(lms, Bot_FixCount, CBC_ORDER_EXCLUSIVE)
 
 MUTATOR_HOOKFUNCTION(lms, ClientCommand_Spectate)
 {
-    entity player = M_ARGV(0, entity);
+       entity player = M_ARGV(0, entity);
 
        if(warmup_stage || player.lms_spectate_warning)
        {
index ccf3f674e6f069394ec256b6a086df3eb1076aee..fac00152a8eb78ed9545f8fe2c0d98ce7cc10e06 100644 (file)
@@ -25,4 +25,6 @@ void Ent_TriggerMusic_Remove(entity this);
 
 #elif defined(SVQC)
 void target_music_kill();
+
+void TargetMusic_RestoreGame();
 #endif
index a0f6195d1232f6ec6ca994d4514de840b099c58a..415984a2a8a914b17822a98a69a861d927315c2d 100644 (file)
@@ -1,5 +1,7 @@
 #pragma once
 
+#include "cl_minigames_hud.qh"
+
 // Get a square in the center of the avaliable area
 // \note macro to pass by reference pos and mySize
 #define minigame_hud_fitsqare(pos, mySize) \
@@ -92,12 +94,6 @@ void minigame_cmd_workaround(float dummy, string...cmdargc);
 // (ie: it's their turn and they should get back to the minigame)
 void minigame_prompt();
 
-float HUD_MinigameMenu_IsOpened();
-void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger);
-
-// Adds a game-specific entry to the menu
-void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_arg);
-
 
 #define FOREACH_MINIGAME_ENTITY(entityvar) \
        entityvar=NULL; \
index ef44ea025f5633635496415635e9ce6665293075..c14985f627ceb8497b37b7854c5071cd6a7abe75 100644 (file)
@@ -2,3 +2,9 @@
 
 float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary);
 void HUD_Minigame_Mouse();
+
+float HUD_MinigameMenu_IsOpened();
+void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger);
+
+// Adds a game-specific entry to the menu
+void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_arg);
index d6cf1ca82e0fa4a4b77b86efe26e77ffdbfebb5a..35005e7a8fea65285d869afd82a8f247da833f78 100644 (file)
@@ -64,6 +64,7 @@ STATIC_INIT(REGISTER_BUFFS) {
 #endif
 
 string Buff_UndeprecateName(string buffname);
+entity buff_FirstFromFlags(int _buffs);
 
 REGISTER_BUFF(Null);
 BUFF_SPAWNFUNCS(random, BUFF_Null)
index cde0016f1bffe7112f2692a83ab49894caa8cbb5..83cf74247fcdf2275c5a2bcc4df83025925700fb 100644 (file)
@@ -1,3 +1,5 @@
+#include <common/effects/all.qh>
+
 EFFECT(0, NADE_EXPLODE_RED,         "nade_red_explode")
 EFFECT(0, NADE_EXPLODE_BLUE,        "nade_blue_explode")
 EFFECT(0, NADE_EXPLODE_YELLOW,      "nade_yellow_explode")
index e109fa7a35ddbddab0f90e18357a8a72daccbc30..2729316a88b4fd8c95eb24f1afc1580b3d7126f3 100644 (file)
@@ -99,3 +99,9 @@ void nades_GiveBonus(entity player, float score);
 MUTATOR_HOOKABLE(Nade_Damage, EV_Nade_Damage);
 
 #endif
+
+#ifdef CSQC
+bool Projectile_isnade(int proj); // TODO: remove
+
+void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expand_time); // TODO: mutator
+#endif
index 1134205185474bda2be0142568448d3e711ac494..0eecd6bdf317e9a4bc67dfd45a9d5582a69062a6 100644 (file)
@@ -11,4 +11,6 @@ void sv_notice_join(entity _to);
 
 #ifdef CSQC
 void cl_notice_read();
+
+void cl_notice_run();
 #endif
index bd46599aa39ed1ae750ebdca4dcc2f57c802a5a7..50228a0a8f02c94a2f79b6a8c1f13d7b741e7b2b 100644 (file)
@@ -124,6 +124,8 @@ void GiveSound(entity e, float v0, float v1, float t, Sound snd_incr, Sound snd_
 
 void GiveRot(entity e, float v0, float v1, .float rotfield, float rottime, .float regenfield, float regentime);
 
+spawnfunc(target_items);
+
 #define PREGIVE_WEAPONS(e) WepSet save_weapons; save_weapons = STAT(WEAPONS, e)
 #define PREGIVE(e,f) float save_##f; save_##f = (e).f
 #define POSTGIVE_WEAPON(e,b,snd_incr,snd_decr) GiveSound((e), !!(save_weapons & WepSet_FromWeapon(b)), !!(STAT(WEAPONS, e) & WepSet_FromWeapon(b)), 0, snd_incr, snd_decr)
index 2a7c41c98c9a8a7175a5b9b5af8acc07d31f6cff..06f8bab9c92a1543b953245fe22af8a1ff3dde62 100644 (file)
@@ -1239,6 +1239,12 @@ void turret_initparams(entity tur)
        #undef TRY
 }
 
+bool turret_closetotarget(entity this, vector targ)
+{
+       vector path_extra_size = '64 64 64';
+       return boxesoverlap(targ - path_extra_size, targ + path_extra_size, this.absmin - path_extra_size, this.absmax + path_extra_size);
+}
+
 void turret_findtarget(entity this)
 {
        entity e = find(NULL, classname, "turret_manager");
index 41a7bd962dc6e8a19ffcef03eb4291db7e55ed29..deee313ab109204ce7e1acbba2cb1aaaa6921aac 100644 (file)
@@ -89,6 +89,9 @@ void turrets_setframe(entity this, float _frame, float client_only);
 
 bool turret_initialize(entity this, Turret tur);
 
+// returns true when box overlaps with a given location
+bool turret_closetotarget(entity this, vector targ);
+
 /// Function to use for target evaluation. usualy turret_targetscore_generic
 .float(entity _turret, entity _target) turret_score_target;
 
index 5625d23fc935e8be8453afb9517ef40e333243a8..9a9001c42d39a99c14434ae662ef4602e3835536 100644 (file)
@@ -17,7 +17,7 @@ const int ewheel_anim_bck_fast = 4;
 void ewheel_move_path(entity this)
 {
     // Are we close enough to a path node to switch to the next?
-    if(vdist(this.origin - this.pathcurrent.origin, <, 64))
+    if(turret_closetotarget(this, this.pathcurrent.origin))
     {
 #ifdef EWHEEL_FANCYPATH
         if (this.pathcurrent.path_next == NULL)
@@ -49,7 +49,6 @@ void ewheel_move_path(entity this)
 
     if (this.pathcurrent)
     {
-
         this.moveto = this.pathcurrent.origin;
         this.steerto = steerlib_attract2(this, this.moveto, 0.5, 500, 0.95);
 
index 8cf795a93895887139b2b014543af8c1623a6d97..93b9483defa5fc06cc1f91ff0dfba51d840934c8 100644 (file)
@@ -281,7 +281,8 @@ void walker_move_path(entity this)
 {
 #ifdef WALKER_FANCYPATHING
     // Are we close enougth to a path node to switch to the next?
-    if(vdist(this.origin - this.pathcurrent.origin, <, 64))
+    if(turret_closetotarget(this, this.pathcurrent.origin))
+    {
         if (this.pathcurrent.path_next == NULL)
         {
             // Path endpoint reached
@@ -304,13 +305,14 @@ void walker_move_path(entity this)
         }
         else
             this.pathcurrent = this.pathcurrent.path_next;
+    }
 
     this.moveto = this.pathcurrent.origin;
     this.steerto = steerlib_attract2(this, this.moveto,0.5,500,0.95);
     walker_move_to(this, this.moveto, 0);
 
 #else
-    if(vdist(this.origin - this.pathcurrent.origin, <, 64))
+    if(turret_closetotarget(this, this.pathcurrent.origin))
         this.pathcurrent = this.pathcurrent.enemy;
 
     if(!this.pathcurrent)
@@ -352,7 +354,7 @@ METHOD(WalkerTurret, tr_think, void(WalkerTurret thistur, entity it))
 {
     fixedmakevectors(it.angles);
 
-    if (it.spawnflags & TSF_NO_PATHBREAK && it.pathcurrent)
+    if ((it.spawnflags & TSF_NO_PATHBREAK) && it.pathcurrent)
         walker_move_path(it);
     else if (it.enemy == NULL)
     {
index 4c84f268d3024679102f158cf5e017bf229ff28a..4e5cb0d5b970a1b7cd57413db2fd5ca6649bf137 100644 (file)
@@ -5,4 +5,10 @@
 float turret_tag_fire_update(entity this);
 void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float f_velfactor, float deathtype);
 
+#ifdef TURRET_DEBUG
+void mark_error(vector where,float lifetime);
+void mark_info(vector where,float lifetime);
+entity mark_misc(vector where,float lifetime);
+#endif
+
 #endif
index 0ddd02aa7e0ce77125b2a9dc835df604c54d8cf0..d0f63c96a3d77258d25ff5d80ed98208b6ddd677 100644 (file)
@@ -107,6 +107,7 @@ bool vehicle_initialize(entity this, Vehicle info, float nodrop);
 bool vehicle_impulse(entity this, int imp);
 bool vehicles_crushable(entity e);
 float vehicle_altitude(entity this, float amax);
+void vehicles_enter(entity pl, entity veh);
 
 IntrusiveList g_vehicle_returners;
 STATIC_INIT(g_vehicle_returners) { g_vehicle_returners = IL_NEW(); }
index 2a151d1afcc0d402acc31fd6689ace7f50b0624e..9b4c0b46814308dfb037375345a6100c14d444f4 100644 (file)
@@ -367,4 +367,8 @@ ENUMCLASS_END(WFRAME)
 
 vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn);
 void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
+
+#ifdef SVQC
+void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim);
+#endif
 #endif
index e48bf5fb3481e8db22c4698662997a648adc3db0..77e0b734e2e7e2c1009ee42fb400691a9bca8ed1 100644 (file)
@@ -71,4 +71,6 @@ SPAWNFUNC_WEAPON(weapon_crylink, WEP_CRYLINK)
 
 .entity queuenext;
 .entity queueprev;
+
+void W_Crylink_Dequeue(entity e);
 #endif
index 9f79bf440c44bf6b42950d5595c1e99af5f39c16..243f5bc34af0497394cfd9cf1c83ffe9739f991e 100644 (file)
@@ -2,6 +2,7 @@
 
 #ifdef SVQC
 #include <common/mapobjects/trigger/jumppads.qh>
+#include <server/weapons/throwing.qh>
 
 REGISTER_MUTATOR(porto_ticker, true);
 MUTATOR_HOOKFUNCTION(porto_ticker, SV_StartFrame) {
@@ -20,7 +21,6 @@ void W_Porto_Success(entity this)
        delete(this);
 }
 
-string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vector velo, .entity weaponentity);
 void W_Porto_Fail(entity this, float failhard)
 {
        if(this.realowner == NULL)
index 93b3a6e9f7da4d73251da4dd731ab1810390227c..a77093944b6e0fbab37bb5ca42aafc5eacc39174 100644 (file)
@@ -44,4 +44,6 @@ SPAWNFUNC_WEAPON(weapon_porto, WEP_PORTO)
 .float porto_v_angle_held;
 .vector right_vector;
 .float porto_forbidden;
+
+void W_Porto_Fail(entity this, float failhard);
 #endif
index 51ac148fc13c42c1185866cd87d6430165f61b8e..0ecd7b87725b41f7ca894570f7343836a845d3da 100644 (file)
@@ -79,7 +79,9 @@ bool havocbot_goalrating_item_pickable_check_players(entity this, vector org, en
 
 vector havocbot_middlepoint;
 float havocbot_middlepoint_radius;
-vector havocbot_symmetryaxis_equation;
+float havocbot_symmetry_axis_m;
+float havocbot_symmetry_axis_q;
+float havocbot_symmetry_origin_order;
 
 .float goalentity_lock_timeout;
 .float ignoregoaltime;
index 9334f011a6773289eb3df36e4cbbd66569e5e867..9c3bae8e7992f37c5ce9157bfdd7d688808346a8 100644 (file)
@@ -246,6 +246,7 @@ vector resurface_limited(vector org, float lim, vector m1)
 // rough simulation of walking from one point to another to test if a path
 // can be traveled, used for waypoint linking and havocbot
 // if end_height is > 0 destination is any point in the vertical segment [end, end + end_height * eZ]
+// INFO: the command sv_cmd trace walk is useful to test this function in game
 bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float end_height, float movemode)
 {
        if(autocvar_bot_debug_tracewalk)
@@ -1838,7 +1839,7 @@ void navigation_unstuck(entity this)
                float d = vlen2(this.origin - bot_waypoint_queue_goal.origin);
                LOG_DEBUG(this.netname, " evaluating ", bot_waypoint_queue_goal.classname, " with distance ", ftos(d));
                set_tracewalk_dest(bot_waypoint_queue_goal, this.origin, false);
-               if (tracewalk(bot_waypoint_queue_goal, this.origin, STAT(PL_MIN, this), STAT(PL_MAX, this),
+               if (tracewalk(this, this.origin, STAT(PL_MIN, this), STAT(PL_MAX, this),
                        tracewalk_dest, tracewalk_dest_height, bot_navigation_movemode))
                {
                        if( d > bot_waypoint_queue_bestgoalrating)
index bc29b31da1da5e2a667027ce6df521783fc80202..674ab634a1c768889ff3ac4025ea07008221b813 100644 (file)
@@ -141,8 +141,8 @@ vector waypoint_getSymmetricalOrigin(vector org, int ctf_flags)
        }
        else if (fabs(autocvar_g_waypointeditor_symmetrical) == 2)
        {
-               float m = havocbot_symmetryaxis_equation.x;
-               float q = havocbot_symmetryaxis_equation.y;
+               float m = havocbot_symmetry_axis_m;
+               float q = havocbot_symmetry_axis_q;
                if (autocvar_g_waypointeditor_symmetrical == -2)
                {
                        m = autocvar_g_waypointeditor_symmetrical_axis.x;
@@ -246,15 +246,12 @@ void waypoint_spawn_fromeditor(entity pl)
 {
        entity e;
        vector org = pl.origin;
-       int ctf_flags = havocbot_symmetryaxis_equation.z;
+       int ctf_flags = havocbot_symmetry_origin_order;
        bool sym = ((autocvar_g_waypointeditor_symmetrical > 0 && ctf_flags >= 2)
                   || (autocvar_g_waypointeditor_symmetrical < 0));
-       int order = ctf_flags;
        if(autocvar_g_waypointeditor_symmetrical_order >= 2)
-       {
-               order = autocvar_g_waypointeditor_symmetrical_order;
-               ctf_flags = order;
-       }
+               ctf_flags = autocvar_g_waypointeditor_symmetrical_order;
+       int wp_num = ctf_flags;
 
        if(!PHYS_INPUT_BUTTON_CROUCH(pl))
        {
@@ -285,8 +282,8 @@ void waypoint_spawn_fromeditor(entity pl)
                org = waypoint_getSymmetricalOrigin(e.origin, ctf_flags);
                if (vdist(org - pl.origin, >, 32))
                {
-                       if(order > 2)
-                               order--;
+                       if(wp_num > 2)
+                               wp_num--;
                        else
                                sym = false;
                        goto add_wp;
@@ -309,15 +306,12 @@ void waypoint_remove_fromeditor(entity pl)
 {
        entity e = navigation_findnearestwaypoint(pl, false);
 
-       int ctf_flags = havocbot_symmetryaxis_equation.z;
+       int ctf_flags = havocbot_symmetry_origin_order;
        bool sym = ((autocvar_g_waypointeditor_symmetrical > 0 && ctf_flags >= 2)
                   || (autocvar_g_waypointeditor_symmetrical < 0));
-       int order = ctf_flags;
        if(autocvar_g_waypointeditor_symmetrical_order >= 2)
-       {
-               order = autocvar_g_waypointeditor_symmetrical_order;
-               ctf_flags = order;
-       }
+               ctf_flags = autocvar_g_waypointeditor_symmetrical_order;
+       int wp_num = ctf_flags;
 
        LABEL(remove_wp);
        if (!e) return;
@@ -348,8 +342,8 @@ void waypoint_remove_fromeditor(entity pl)
        if (sym && wp_sym)
        {
                e = wp_sym;
-               if(order > 2)
-                       order--;
+               if(wp_num > 2)
+                       wp_num--;
                else
                        sym = false;
                goto remove_wp;
@@ -567,6 +561,9 @@ void waypoint_think(entity this)
 
        bot_calculate_stepheightvec();
 
+       int dphitcontentsmask_save = this.dphitcontentsmask;
+       this.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
+
        bot_navigation_movemode = ((autocvar_bot_navigation_ignoreplayers) ? MOVE_NOMONSTERS : MOVE_NORMAL);
 
        //dprint("waypoint_think wpisbox = ", ftos(this.wpisbox), "\n");
@@ -619,7 +616,7 @@ void waypoint_think(entity this)
                                relink_walkculled += 0.5;
                        else
                        {
-                               if (tracewalk(it, ev, PL_MIN_CONST, PL_MAX_CONST, sv2, sv2_height, MOVE_NOMONSTERS))
+                               if (tracewalk(this, ev, PL_MIN_CONST, PL_MAX_CONST, sv2, sv2_height, MOVE_NOMONSTERS))
                                        waypoint_addlink(it, this);
                                else
                                        relink_walkculled += 0.5;
@@ -628,6 +625,7 @@ void waypoint_think(entity this)
        });
        navigation_testtracewalk = 0;
        this.wplinked = true;
+       this.dphitcontentsmask = dphitcontentsmask_save;
 }
 
 void waypoint_clearlinks(entity wp)
index f71cb494b9beb1b07ba3ed3d75f8a108201b1e7f..1dcdab7381af4f18bb37ee3f9d55194ee443b767 100644 (file)
@@ -6,6 +6,7 @@
 #include <server/resources.qh>
 
 #include "g_damage.qh"
+#include "player.qh"
 #include "race.qh"
 #include "../common/mapobjects/teleporters.qh"
 
@@ -33,8 +34,6 @@
 #include "../lib/warpzone/anglestransform.qh"
 #include "../lib/warpzone/util_server.qh"
 
-void CopyBody(entity this, float keepvelocity);
-
 #ifdef NOCHEATS
 
 float CheatImpulse(entity this, int imp) { return 0; }
@@ -292,7 +291,6 @@ float CheatImpulse(entity this, int imp)
        END_CHEAT_FUNCTION();
 }
 
-void DragBox_Think(entity this);
 float drag_lastcnt;
 float CheatCommand(entity this, int argc)
 {
@@ -712,18 +710,6 @@ float CheatCommand(entity this, int argc)
        END_CHEAT_FUNCTION();
 }
 
-float Drag(entity this, float force_allow_pick, float ischeat);
-void Drag_Begin(entity dragger, entity draggee, vector touchpoint);
-void Drag_Finish(entity dragger);
-float Drag_IsDraggable(entity draggee);
-float Drag_MayChangeAngles(entity draggee);
-void Drag_MoveForward(entity dragger);
-void Drag_SetSpeed(entity dragger, float s);
-void Drag_MoveBackward(entity dragger);
-void Drag_Update(entity dragger);
-float Drag_CanDrag(entity dragger);
-float Drag_IsDragging(entity dragger);
-void Drag_MoveDrag(entity from, entity to);
 .entity dragentity;
 
 float CheatFrame(entity this)
index 1bf08064106c410874df00f9607d9222929ab1c0..0dc6a92d9c45b5f103e432fabaa59f8c3db45bb1 100644 (file)
@@ -15,3 +15,16 @@ float CheatFrame(entity this);
 const float CHRAME_DRAG = 8;
 
 void Drag_MoveDrag(entity from, entity to); // call this from CopyBody
+void DragBox_Think(entity this);
+float Drag(entity this, float force_allow_pick, float ischeat);
+void Drag_Begin(entity dragger, entity draggee, vector touchpoint);
+void Drag_Finish(entity dragger);
+float Drag_IsDraggable(entity draggee);
+float Drag_MayChangeAngles(entity draggee);
+void Drag_MoveForward(entity dragger);
+void Drag_SetSpeed(entity dragger, float s);
+void Drag_MoveBackward(entity dragger);
+void Drag_Update(entity dragger);
+float Drag_CanDrag(entity dragger);
+float Drag_IsDragging(entity dragger);
+void Drag_MoveDrag(entity from, entity to);
index b30a69f149156011312259e297f5477a82274abf..0d344b7f2d6807c96768f7b2e5eca6e819e8fb4f 100644 (file)
@@ -17,6 +17,7 @@
 #include "handicap.qh"
 #include "g_hook.qh"
 #include "command/common.qh"
+#include "command/vote.qh"
 #include "cheats.qh"
 #include "g_world.qh"
 #include "race.qh"
@@ -46,6 +47,8 @@
 #include "../common/net_linked.qh"
 #include "../common/physics/player.qh"
 
+#include <common/vehicles/sv_vehicles.qh>
+
 #include "../common/items/_mod.qh"
 
 #include "../common/mutators/mutator/waypoints/all.qh"
@@ -75,8 +78,6 @@ STATIC_METHOD(Client, Add, void(Client this, int _team))
     PutClientInServer(this);
 }
 
-void PutObserverInServer(entity this);
-
 STATIC_METHOD(Client, Remove, void(Client this))
 {
     TRANSMUTE(Observer, this);
@@ -167,9 +168,6 @@ void ClientData_Touch(entity e)
        });
 }
 
-void SetSpectatee(entity this, entity spectatee);
-void SetSpectatee_status(entity this, int spectatee_num);
-
 
 /*
 =============
@@ -223,7 +221,6 @@ void setplayermodel(entity e, string modelname)
                UpdatePlayerSounds(e);
 }
 
-void FixPlayermodel(entity player);
 /** putting a client as observer in the server */
 void PutObserverInServer(entity this)
 {
@@ -789,8 +786,6 @@ void PutClientInServer(entity this)
        }
 }
 
-void ClientInit_misc(entity this);
-
 // TODO do we need all these fields, or should we stop autodetecting runtime
 // changes and just have a console command to update this?
 bool ClientInit_SendEntity(entity this, entity to, int sf)
@@ -1296,16 +1291,7 @@ void ClientConnect(entity this)
        TeamBalance_JoinBestTeam(this, false); // if the team number is valid, keep it
        this.playerid = playerid_save;
 
-       if (autocvar_sv_spectate || autocvar_g_campaign || this.team_forced < 0) {
-               TRANSMUTE(Observer, this);
-       } else {
-               if (!teamplay || autocvar_g_balance_teams) {
-                       TRANSMUTE(Player, this);
-                       campaign_bots_may_start = true;
-               } else {
-                       TRANSMUTE(Observer, this); // do it anyway
-               }
-       }
+       TRANSMUTE(Observer, this);
 
        PlayerStats_GameReport_AddEvent(sprintf("kills-%d", this.playerid));
 
@@ -1406,7 +1392,6 @@ Called when a client disconnects from the server
 =============
 */
 .entity chatbubbleentity;
-void ReadyCount();
 void ClientDisconnect(entity this)
 {
        assert(IS_CLIENT(this), return);
@@ -2263,9 +2248,11 @@ void PrintWelcomeMessage(entity this)
        }
 }
 
+const int MIN_SPEC_TIME = 1;
 bool joinAllowed(entity this)
 {
        if (CS(this).version_mismatch) return false;
+       if (time < CS(this).jointime + MIN_SPEC_TIME) return false;
        if (!nJoinAllowed(this, this)) return false;
        if (teamplay && lockteams) return false;
        if (MUTATOR_CALLHOOK(ForbidSpawn, this)) return false;
@@ -2523,7 +2510,6 @@ void SpectatorThink(entity this)
        this.flags |= FL_CLIENT | FL_NOTARGET;
 }
 
-void vehicles_enter (entity pl, entity veh);
 void PlayerUseKey(entity this)
 {
        if (!IS_PLAYER(this))
@@ -2704,6 +2690,8 @@ void PlayerPreThink (entity this)
                PrintWelcomeMessage(this);
 
        if (IS_PLAYER(this)) {
+               if (IS_REAL_CLIENT(this) && time < CS(this).jointime + MIN_SPEC_TIME)
+                       error("Client can't be spawned as player on connection!");
                if(!PlayerThink(this))
                        return;
        }
@@ -2712,6 +2700,20 @@ void PlayerPreThink (entity this)
                        IntermissionThink(this);
                return;
        }
+       else if (IS_REAL_CLIENT(this) && !CS(this).autojoin_checked && time >= CS(this).jointime + MIN_SPEC_TIME)
+       {
+               CS(this).autojoin_checked = true;
+               // don't do this in ClientConnect
+               // many things can go wrong if a client is spawned as player on connection
+               if (MUTATOR_CALLHOOK(AutoJoinOnConnection, this)
+                       || (!(autocvar_sv_spectate || autocvar_g_campaign || this.team_forced < 0)
+                               && (!teamplay || autocvar_g_balance_teams)))
+               {
+                       campaign_bots_may_start = true;
+                       Join(this);
+                       return;
+               }
+       }
        else if (IS_OBSERVER(this)) {
                ObserverThink(this);
        }
index b2495c0f6a88d95d0ea4b7d86dcbe73aa7e28b31..2d3a099b3988bc715589d9f5018fd310be1fc7f6 100644 (file)
@@ -114,6 +114,7 @@ CLASS(Client, Object)
     ATTRIB(Client, cmd_floodtime, float, this.cmd_floodtime);
     ATTRIB(Client, wasplayer, bool, this.wasplayer);
     ATTRIB(Client, weaponorder_byimpulse, string, this.weaponorder_byimpulse);
+    ATTRIB(Client, autojoin_checked, bool, this.wasplayer);
 
     // networked cvars
 
@@ -262,5 +263,21 @@ float CalcRotRegen(float current, float regenstable, float regenfactor, float re
 
 bool Spectate(entity this, entity pl);
 
+void ClientInit_Spawn();
+
+void PutObserverInServer(entity this);
+
+void SetSpectatee(entity this, entity spectatee);
+void SetSpectatee_status(entity this, int spectatee_num);
+
+void FixPlayermodel(entity player);
+
+void ClientInit_misc(entity this);
+
+void ClientKill_TeamChange(entity this, float targetteam);  // 0 = don't change, -1 = auto, -2 = spec
+
+bool joinAllowed(entity this);
+void Join(entity this);
+
 #define SPECTATE_COPY() ACCUMULATE void SpectateCopy(entity this, entity spectatee)
 #define SPECTATE_COPYFIELD(fld) SPECTATE_COPY() { this.(fld) = spectatee.(fld); }
index d6b1ae60f0f779511ca65dd6830323c134c91fe3..3cbaaf978e2950d7ad241a4147fab59953db3c11 100644 (file)
@@ -8,11 +8,6 @@
 #define GET_BAN_ARG(v, d) if (argc > reason_arg) { if ((v = stof(argv(reason_arg))) != 0) ++reason_arg; else v = d; } else { v = d; }
 #define GET_BAN_REASON(v, d) if (argc > reason_arg) v = substring(command, argv_start_index(reason_arg), strlen(command) - argv_start_index(reason_arg)); else v = d;
 
-void Ban_KickBanClient(entity client, float bantime, float masksize, string reason);
-void Ban_View();
-float Ban_Insert(string ip, float bantime, string reason, float dosync);
-float Ban_Delete(float i);
-
 // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
 void BanCommand_macro_write_aliases(float fh);
 
index 68273dddd16714df19b70ff6f64bc60ccac6689d..0e6781e374120ba2c964ff7edd444715cb13b729 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "../campaign.qh"
 #include "../cheats.qh"
+#include "../client.qh"
 #include "../player.qh"
 #include "../ipban.qh"
 #include "../mapvoting.qh"
@@ -41,8 +42,6 @@
 
 #include <lib/warpzone/common.qh>
 
-void ClientKill_TeamChange(entity this, float targetteam);  // 0 = don't change, -1 = auto, -2 = spec
-
 // =========================================================
 //  Server side networked commands code, reworked by Samual
 //  Last updated: December 28th, 2011
@@ -166,8 +165,6 @@ void ClientCommand_mv_getpicture(entity caller, float request, float argc)  // i
        }
 }
 
-bool joinAllowed(entity this);
-void Join(entity this);
 void ClientCommand_join(entity caller, float request)
 {
        switch (request)
index 103ca4e34f558ffdd81898da0a66bc037e69cd8b..3a776f05472531a06815c4012d9b3df4a2c6081d 100644 (file)
 
 #include <common/monsters/sv_monsters.qh>
 
-
-void PutObserverInServer(entity this);
-
-// =====================================================
-//  Server side game commands code, reworked by Samual
-// =====================================================
-
 //  used by GameCommand_make_mapinfo()
 void make_mapinfo_Think(entity this)
 {
@@ -1628,10 +1621,13 @@ void GameCommand_trace(float request, float argc)
                                        if (argc == 4 || argc == 5)
                                        {
                                                e = nextent(NULL);
+                                               int dphitcontentsmask_save = e.dphitcontentsmask;
+                                               e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
                                                if (tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), stof(argv(4)), MOVE_NORMAL))
                                                        LOG_INFO("can walk");
                                                else
                                                        LOG_INFO("cannot walk");
+                                               e.dphitcontentsmask = dphitcontentsmask_save;
                                                return;
                                        }
                                }
index 7b10b37eb70bcf2a0e50a45fb105b14846d7b59c..d5c3bc0ad0e937d9569d1ec95cc539cd09c78897 100644 (file)
@@ -54,3 +54,4 @@ void reset_map(float dorespawn);
 void ReadyCount();
 void ReadyRestart_force();
 void VoteCount(float first_count);
+void Nagger_Init();
index de069be87d38570ce238752613199bca88558192..85b063a68233d14afb17e33db69a658253125ddf 100644 (file)
@@ -4,11 +4,10 @@
 #include <server/miscfunctions.qh>
 #include <server/items.qh>
 #include <server/resources.qh>
+#include <common/t_items.qh>
 #include <common/mapobjects/triggers.qh>
 #include <common/weapons/_all.qh>
 
-spawnfunc(target_items);
-
 //***********************
 //QUAKE 3 ENTITIES - So people can play quake3 maps with the xonotic weapons
 //***********************
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..342a829a187b12daa84a0b532bc0269aca79c16b 100644 (file)
@@ -1 +1,3 @@
 #pragma once
+
+bool DoesQ3ARemoveThisEntity(entity this);
index cefeb316a1f4ab6e5fac98ecf52421b8564cc1b6..4bb38780d2d035cdd12d7ea30eb268eb0195059b 100644 (file)
@@ -14,6 +14,7 @@
 #include "../common/items/_mod.qh"
 #include "../common/mutators/mutator/waypoints/waypointsprites.qh"
 #include "../common/mutators/mutator/instagib/sv_instagib.qh"
+#include "../common/mutators/mutator/buffs/buffs.qh"
 #include "weapons/accuracy.qh"
 #include "weapons/csqcprojectile.qh"
 #include "weapons/selection.qh"
@@ -221,7 +222,6 @@ bool frag_centermessage_override(entity attacker, entity targ, int deathtype, in
        return MUTATOR_CALLHOOK(FragCenterMessage, attacker, targ, deathtype, kill_count_to_attacker, kill_count_to_target);
 }
 
-entity buff_FirstFromFlags(int _buffs);
 void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity)
 {
        // Sanity check
index 0d732e0ca4b6daba40fc5b33db54ade2db1c7501..09135d4827913c2f13229356f9f6bba604cb486f 100644 (file)
@@ -110,7 +110,6 @@ void GrapplingHookReset(entity this)
        RemoveHook(this);
 }
 
-void GrapplingHookThink(entity this);
 void GrapplingHook_Stop(entity this)
 {
        Send_Effect(EFFECT_HOOK_IMPACT, this.origin, '0 0 0', 1);
index 719bf5b605bdbfc1832761610f0f0ac8a3c88670..c0df31662a7d5cea6c95584dd7a13bfd7d969dad 100644 (file)
@@ -2,6 +2,7 @@
 
 // Wazat's grappling hook
 .entity                hook;
+void GrapplingHookThink(entity this);
 void RemoveGrapplingHooks(entity pl);
 void RemoveHook(entity this);
 // (note: you can change the hook impulse #'s to whatever you please)
index df0c1d2cb94539ef3ec61309c3a869c83f2b7aea..f66ebcb0eed04adfb8ccd36e064d66b1eb4e61e4 100644 (file)
@@ -92,8 +92,6 @@ const float SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS = 1;
 string redirection_target;
 float world_initialized;
 
-void ShuffleMaplist();
-
 void SetDefaultAlpha()
 {
        if (!MUTATOR_CALLHOOK(SetDefaultAlpha))
@@ -362,6 +360,7 @@ void cvar_changes_init()
                BADPREFIX("gameversion_");
                BADPREFIX("g_chat_");
                BADPREFIX("g_ctf_captimerecord_");
+               BADPREFIX("g_hats_");
                BADPREFIX("g_maplist_");
                BADPREFIX("g_mod_");
                BADPREFIX("g_respawn_");
@@ -631,10 +630,6 @@ void InitGameplayMode()
 
 void Map_MarkAsRecent(string m);
 float world_already_spawned;
-void Nagger_Init();
-void ClientInit_Spawn();
-void WeaponStats_Init();
-void WeaponStats_Shutdown();
 spawnfunc(worldspawn)
 {
        server_is_dedicated = boolean(stof(cvar_defstring("is_dedicated")));
@@ -1108,7 +1103,7 @@ void Map_Goto(float reinit)
 // return codes of map selectors:
 //   -1 = temporary failure (that is, try some method that is guaranteed to succeed)
 //   -2 = permanent failure
-float() MaplistMethod_Iterate = // usual method
+float MaplistMethod_Iterate() // usual method
 {
        float pass, i;
 
@@ -1127,7 +1122,7 @@ float() MaplistMethod_Iterate = // usual method
        return -1;
 }
 
-float() MaplistMethod_Repeat = // fallback method
+float MaplistMethod_Repeat() // fallback method
 {
        LOG_TRACE("Trying MaplistMethod_Repeat");
 
@@ -1136,7 +1131,7 @@ float() MaplistMethod_Repeat = // fallback method
        return -2;
 }
 
-float() MaplistMethod_Random = // random map selection
+float MaplistMethod_Random() // random map selection
 {
        float i, imax;
 
@@ -1154,7 +1149,7 @@ float() MaplistMethod_Random = // random map selection
        return -1;
 }
 
-float(float exponent) MaplistMethod_Shuffle = // more clever shuffling
+float MaplistMethod_Shuffle(float exponent) // more clever shuffling
 // the exponent sets a bias on the map selection:
 // the higher the exponent, the less likely "shortly repeated" same maps are
 {
@@ -2170,7 +2165,6 @@ float RedirectionThink()
        return true;
 }
 
-void TargetMusic_RestoreGame();
 void RestoreGame()
 {
        // Loaded from a save game
index 531987997362741908c94a674d79926dab00c304..da950f18575e28a410fbed9955b90a0a5ced4ed7 100644 (file)
@@ -27,5 +27,7 @@ string GetNextMap();
 void ShuffleMaplist();
 void Map_Goto_SetStr(string nextmapname);
 void Map_Goto(float reinit);
+void Map_MarkAsRecent(string m);
 float DoNextMapOverride(float reinit);
 void CheckRules_World();
+float RedirectionThink();
index cf0eb13b77b7e22a94e598937a24cc5b74b75a59..2c0af1c8f2ac12ab4d214bfc84e51dbc94388158 100644 (file)
@@ -31,8 +31,6 @@
 
 #define MAX_IPBAN_URIS (URI_GET_IPBAN_END - URI_GET_IPBAN + 1)
 
-float Ban_Insert(string ip, float bantime, string reason, float dosync);
-
 void OnlineBanList_SendBan(string ip, float bantime, string reason)
 {
        string uri;
index 946f44f9351a14b3be143cadf3bdecf5da0dc38f..330d8b7dff1e8c509ee6b419fddc14442423ec2e 100644 (file)
@@ -6,4 +6,9 @@ float Ban_MaybeEnforceBan(entity client);
 float Ban_MaybeEnforceBanOnce(entity client);
 float BanCommand(string command);
 
+float Ban_Insert(string ip, float bantime, string reason, float dosync);
+void Ban_KickBanClient(entity client, float bantime, float masksize, string reason);
+void Ban_View();
+float Ban_Delete(float i);
+
 void OnlineBanList_URI_Get_Callback(float id, float status, string data);
index e939a5faac4196a2378ef7111a1523f04e4dae70..2bfdc49b767b626aa66e778174914c54ddda9565 100644 (file)
@@ -87,7 +87,7 @@ void item_key_touch(entity this, entity toucher)
        this.message = "";
        SUB_UseTargets(this, toucher, toucher); // TODO: should we be using toucher for the trigger here?
        this.message = oldmsg;
-};
+}
 
 /**
  * Spawn a key with given model, key code and color.
@@ -124,7 +124,7 @@ void spawn_item_key(entity this)
        }
 
        settouch(this, item_key_touch);
-};
+}
 
 
 /*QUAKED item_key (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING
@@ -265,7 +265,7 @@ spawnfunc(item_key1)
        this.classname = "item_key";
        this.itemkeys = ITEM_KEY_BIT(1);
        spawnfunc_item_key(this);
-};
+}
 
 /*QUAKED item_key2 (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING
 GOLD key.
@@ -284,4 +284,4 @@ spawnfunc(item_key2)
        this.classname = "item_key";
        this.itemkeys = ITEM_KEY_BIT(0);
        spawnfunc_item_key(this);
-};
+}
index d6d3c63b6f30c148e33b0d04a2449598a4ca2b7b..ecaf2faab1ba1e1bd0cd3e11e74984b73af71085 100644 (file)
@@ -16,6 +16,7 @@
 #include "../common/command/_mod.qh"
 #include "../common/constants.qh"
 #include <common/net_linked.qh>
+#include <common/weapons/weapon/crylink.qh>
 #include "../common/deathtypes/all.qh"
 #include "../common/mapinfo.qh"
 #include "../common/notifications/all.qh"
@@ -1085,7 +1086,6 @@ bool SUB_NoImpactCheck(entity this, entity toucher)
 
 #define SUB_OwnerCheck(ent,oth) ((oth) && ((oth) == (ent).owner))
 
-void W_Crylink_Dequeue(entity e);
 bool WarpZone_Projectile_Touch_ImpactFilter_Callback(entity this, entity toucher)
 {
        if(SUB_OwnerCheck(this, toucher))
index d43c5009c407f872a7257826b2b7470ac65ebda5..f02808eadade62aafca4817236c13a22dbc18a7a 100644 (file)
@@ -27,6 +27,12 @@ MUTATOR_HOOKABLE(PutClientInServer, EV_PutClientInServer);
     /**/
 MUTATOR_HOOKABLE(ForbidSpawn, EV_ForbidSpawn);
 
+/** returns true if client should be put as player on connection */
+#define EV_AutoJoinOnConnection(i, o) \
+    /** player */ i(entity, MUTATOR_ARGV_0_entity) \
+    /**/
+MUTATOR_HOOKABLE(AutoJoinOnConnection, EV_AutoJoinOnConnection);
+
 /** called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them. */
 #define EV_ForbidRandomStartWeapons(i, o) \
        /** player */ i(entity, MUTATOR_ARGV_0_entity) \
index b84ae6414e20ba637d8f81c86bf946040bf37cb5..13dbda5200b7fbbb48a7329a8d4b1407a4922892 100644 (file)
@@ -8,9 +8,7 @@ MODEL(SQUARE_BAD,   "models/pathlib/badsquare.md3");
 MODEL(EDGE,         "models/pathlib/edge.md3");
 
 #ifdef TURRET_DEBUG
-void mark_error(vector where,float lifetime);
-void mark_info(vector where,float lifetime);
-entity mark_misc(vector where,float lifetime);
+#include <common/turrets/util.qh>
 #endif
 
 void pathlib_showpath(entity start)
index 811c031aff3d968a056e6dffa974179a409ce321..6f1bd989502c7b3ac086655f74a6f5806d3fb33f 100644 (file)
@@ -1,2 +1,8 @@
 #pragma once
 #include "pathlib.qh"
+
+#if DEBUGPATHING
+void pathlib_showpath(entity start);
+void pathlib_showpath2(entity path);
+void pathlib_showsquare(vector where,float goodsquare,float _lifetime);
+#endif
index c2f33260302c7899dbba85212c3df2eeece69172..1aeae109c34610f31e05c6a6e174f684d2223e9f 100644 (file)
@@ -30,9 +30,7 @@ void dumpnode(entity n)
 }
 
 #if DEBUGPATHING
-void pathlib_showpath(entity start);
-void pathlib_showpath2(entity path);
-void pathlib_showsquare(vector where,float goodsquare,float _lifetime);
+#include "debug.qh"
 #endif
 
 
index 21ef8b3cbc5286f50a89ca72dde12a3454c7f7a1..d1bafe392a892e2fae67b165eb9c8b32d1a41a9a 100644 (file)
@@ -15,11 +15,6 @@ const vector PLIB_FORWARD = '0 1 0';
 const vector PLIB_RIGHT = '1 0 0';
 //#define PLIB_LEFT    '-1 0 0'
 
-#if DEBUGPATHING
-void pathlib_showpath(entity start);
-void pathlib_showpath2(entity path);
-#endif
-
 entity openlist;
 entity closedlist;
 
index 758c69bccd4c2f03e3347fca67b367cf6c1087d1..64d7f0a8e0a94aa53cfa8d13541a1895438d375a 100644 (file)
@@ -323,7 +323,6 @@ void Portal_Touch(entity this, entity toucher)
                                toucher.effects += EF_BLUE - EF_RED;
 }
 
-void Portal_Think(entity this);
 void Portal_MakeBrokenPortal(entity portal)
 {
        portal.skin = 2;
index f3528d081072ce7e4314a5ca80b4a6a03bdff8ee..20a2bd930c6f23b4e40b76159943f9fb6d12d24f 100644 (file)
@@ -11,3 +11,5 @@ void Portal_ClearWithID(entity own, float id);
 
 vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle);
 void Portal_ClearAll_PortalsOnly(entity own);
+
+void Portal_Think(entity this);
index 183da23f9a6944ce0c5424ee1e17ff94086c5edf..5286032fb5715900836945008816d06f2e987241 100644 (file)
@@ -14,6 +14,7 @@
 #include <common/gamemodes/rules.qh>
 #include <common/net_linked.qh>
 #include <common/state.qh>
+#include <common/weapons/weapon/porto.qh>
 #include "../common/mapobjects/subs.qh"
 #include <common/mapobjects/triggers.qh>
 #include "../lib/warpzone/util_server.qh"
@@ -30,8 +31,6 @@ void race_InitSpectator()
                        race_SendNextCheckpoint(msg_entity.enemy, 1);
 }
 
-void W_Porto_Fail(entity this, float failhard);
-
 float race_readTime(string map, float pos)
 {
        string rr = ((g_cts) ? CTS_RECORD : ((g_ctf) ? CTF_RECORD : RACE_RECORD));
@@ -105,8 +104,6 @@ string race_readName(string map, float pos)
 
 const float MAX_CHECKPOINTS = 255;
 
-spawnfunc(target_checkpoint);
-
 .float race_penalty;
 .float race_penalty_accumulator;
 .string race_penalty_reason;
index 32edca781768165a32e3309433c9e8774e9c238f..4402e22568ce1f027c26f93e6cba1a0e339f278c 100644 (file)
@@ -70,3 +70,5 @@ void race_SendRankings(float pos, float prevpos, float del, float msg);
 void race_RetractPlayer(entity this);
 
 void race_InitSpectator();
+
+spawnfunc(target_checkpoint);
index 0a4dd6095ee915f4c846b4d46162792b49849a19..92c918f00ca2281d360282312cfc3b3b9e1fc5df 100644 (file)
@@ -29,11 +29,8 @@ vector steerlib_push(entity this, vector point)
 **/
 vector steerlib_arrive(entity this, vector point, float maximal_distance)
 {
-    float distance;
-    vector direction;
-
-    distance = bound(0.001,vlen(this.origin - point),maximal_distance);
-    direction = normalize(point - this.origin);
+    float distance = bound(0.001,vlen(this.origin - point),maximal_distance);
+    vector direction = normalize(point - this.origin);
     return  direction * (distance / maximal_distance);
 }
 
@@ -42,25 +39,18 @@ vector steerlib_arrive(entity this, vector point, float maximal_distance)
 **/
 vector steerlib_attract(entity this, vector point, float maximal_distance)
 {
-    float distance;
-    vector direction;
-
-    distance = bound(0.001,vlen(this.origin - point),maximal_distance);
-    direction = normalize(point - this.origin);
+    float distance = bound(0.001,vlen(this.origin - point),maximal_distance);
+    vector direction = normalize(point - this.origin);
 
     return  direction * (1-(distance / maximal_distance));
 }
 
 vector steerlib_attract2(entity this, vector point, float min_influense,float max_distance,float max_influense)
 {
-    float distance;
-    vector direction;
-    float influense;
-
-    distance  = bound(0.00001,vlen(this.origin - point),max_distance);
-    direction = normalize(point - this.origin);
+    float distance  = bound(0.00001,vlen(this.origin - point),max_distance);
+    vector direction = normalize(point - this.origin);
 
-    influense = 1 - (distance / max_distance);
+    float influense = 1 - (distance / max_distance);
     influense = min_influense + (influense * (max_influense - min_influense));
 
     return  direction * influense;
index 326c8d96092cd16c167bbe4a5edd5e53854a1131..539b30d294ce0c68e43e80d81f9b0d7732353199 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <server/mutators/_mod.qh>
 #include "weapons/csqcprojectile.qh"
+#include <server/compat/quake3.qh>
 
 #include "../common/constants.qh"
 #include "../common/deathtypes/all.qh"
@@ -167,7 +168,6 @@ Called before each frame by the server
 bool game_delay_last;
 
 bool autocvar_sv_autopause = false;
-float RedirectionThink();
 void systems_update();
 void sys_phys_update(entity this, float dt);
 void StartFrame()
@@ -248,7 +248,6 @@ void StartFrame()
 .float anglejitter;
 .string gametypefilter;
 .string cvarfilter;
-bool DoesQ3ARemoveThisEntity(entity this);
 
 /**
  * Evaluate an expression of the form: [+ | -]? [var[op]val | [op]var | val | var] ...
index 9c62ec22e4eed0c7843e5af10566ee1b77c7c5ff..ab600f33172af58fcf220fe200917d269eaa3174 100644 (file)
@@ -332,8 +332,6 @@ bool weapon_prepareattack(Weapon thiswep, entity actor, .entity weaponentity, bo
        return false;
 }
 
-void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim);
-
 /**
  * @param t defer thinking until time + t
  * @param func next think function
index b37f01dcff30513ddf050bc88b2e93e3309aa76f..20740d9a86482beef2dfb4c14e375453ffc71ec0 100644 (file)
@@ -7,7 +7,7 @@ exec balance-xdf.cfg
 exec physicsXDF.cfg
 
 // general gameplay
-set g_jump_grunt 1 // make enemies even easier to hear when they're jumping around
+// set g_jump_grunt 1 // just no
 set g_shootfromcenter 1 // hit where you point at with the crosshair (almost so, no shooteye because it's really ugly)
 set g_balance_kill_antispam 0
 set g_forced_respawn 1
index f3607bb2f86cbc696f06eb2ffe46154b21f38279..eb682aa55ce7a2b2fb3880753146d9833e716a27 100644 (file)
@@ -24,3 +24,4 @@ set g_monsters 0
 set g_turrets 0
 set g_vehicles 0
 set sv_showspectators 0
+set sv_taunt 0
index 240a2254c6afde8f941640426a4dcdeb3132ca0e..13e38ebe049428928e1b4c57ce3f88125afb4df9 100644 (file)
@@ -43,7 +43,7 @@ set sv_timeout_number 2       "how many timeouts one player is allowed to call (gets r
 set sv_timeout_leadtime 4      "how long the players will be informed that a timeout was called before it starts, in seconds"
 set sv_timeout_resumetime 3    "how long the remaining timeout-time will be after a player called the timein command"
 
-set g_allow_oldvortexbeam 0 "If enabled, clients are allowed to use old v2.3 Vortex beam"
+set g_allow_oldvortexbeam 1 "If enabled, clients are allowed to use old v2.3 Vortex beam"
 
 set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of someone who is teleporting"
 set g_telefrags_teamplay 1 "never telefrag team mates"