From: Mario Date: Tue, 4 Aug 2015 02:30:37 +0000 (+1000) Subject: Merge branch 'master' into Mario/buff_updates X-Git-Tag: xonotic-v0.8.1~18^2~4 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=0e3eea33053f3a86b7b44b755c31b3147075598e;hp=92284fbdefe87a7d201579e267d71bb7ae4e07a9;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into Mario/buff_updates # Conflicts: # effectinfo.txt # qcsrc/common/notifications.qh # qcsrc/common/stats.qh --- diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index 5cabda2f6..c37b4fb64 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -25,6 +25,8 @@ seta hud_progressbar_nexball_color "" "R G B vector of the progress bar backgrou seta hud_progressbar_speed_color "" "R G B vector of the progress bar background color" seta hud_progressbar_acceleration_color "" "R G B vector of the progress bar background color" seta hud_progressbar_acceleration_neg_color "" "R G B vector of the progress bar background color" +seta hud_progressbar_vehicles_ammo1_color "" "R G B vector of the progress bar background color" +seta hud_progressbar_vehicles_ammo2_color "" "R G B vector of the progress bar background color" seta _hud_panelorder "" "contains order in which panels are to be drawn" @@ -62,6 +64,8 @@ seta hud_panel_weapons_label_scale "" "scale of the weapon text label" seta hud_panel_weapons_accuracy "" "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars" seta hud_panel_weapons_ammo "" "show ammo as a status bar" seta hud_panel_weapons_onlyowned "" "show only owned weapons" +seta hud_panel_weapons_noncurrent_alpha "" "alpha of noncurrent weapons" +seta hud_panel_weapons_noncurrent_scale "" "scale of noncurrent weapons, relative to the current weapon" seta hud_panel_ammo "" "enable/disable this panel" seta hud_panel_ammo_pos "" "position of this panel" diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index c0d585e9f..ced5e6d97 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -72,7 +72,7 @@ seta cl_velocityzoom_time 0.2 "time value for averaging speed values" seta cl_spawnzoom 1 "zoom effect immediately when a player spawns" seta cl_spawnzoom_speed 1 "speed at which zooming occurs while spawning" seta cl_spawnzoom_factor 2 "factor of zoom while spawning" -seta cl_zoomfactor 5 "how much +zoom will zoom (1-16)" +seta cl_zoomfactor 5 "how much +zoom will zoom (1-30)" seta cl_zoomspeed 8 "how fast it will zoom (0.5-16), negative values mean instant zoom" seta cl_zoomsensitivity 0 "how zoom changes sensitivity (0 = weakest, 1 = strongest)" @@ -1132,11 +1132,6 @@ set g_mapinfo_settemp_acl "+*" "ACL for mapinfo setting cvars" seta cl_casings_maxcount 100 "maximum amount of shell casings (must be at least 1)" seta cl_gibs_maxcount 100 "maximum amount of gibs (must be at least 1)" -seta cl_vehicle_spiderbot_cross_alpha 0.6 -seta cl_vehicle_spiderbot_cross_size 1 -seta cl_vehicles_hudscale 0.5 -seta cl_vehicles_hudalpha 0.75 -seta cl_vehicles_hud_tactical 1 //cl_gunalign calculator seta menu_cl_gunalign 3 "Gun alignment; 1 = center (if allowed by g_shootfromclient) or right, 2 = center (if allowed by g_shootfromclient) or left, 3 = right only, 4 = left only" diff --git a/effectinfo.txt b/effectinfo.txt index 49ae480df..7990d74d7 100644 --- a/effectinfo.txt +++ b/effectinfo.txt @@ -9177,6 +9177,190 @@ effect arc_overheat_fire // arc overheat bouncing sparks liquidfriction 5 velocitymultiplier 80 +// yellowflag_touch -- effects for touching the yellow flag +// used nowhere in code +effect yellowflag_touch +count 35 +type spark +tex 40 40 +color 0xFFFF0F 0xFFFF0F +size 1 3 +alpha 0 256 556 +gravity 1 +bounce 1.5 +originjitter 1 1 1 +velocityjitter 300 300 300 +velocitymultiplier 0.5 +airfriction 3 + +// pinkflag_touch -- effects for touching the pink flag +// used nowhere in code +effect pinkflag_touch +count 35 +type spark +tex 40 40 +color 0xFF0FFF 0xFF0FFF +size 1 3 +alpha 0 256 556 +gravity 1 +bounce 1.5 +originjitter 1 1 1 +velocityjitter 300 300 300 +velocitymultiplier 0.5 +airfriction 3 + +// neutralflag_touch -- effects for touching the neutral flag +// used nowhere in code +effect neutralflag_touch +count 35 +type spark +tex 40 40 +color 0xFFFFFF 0xFFFFFF +size 1 3 +alpha 0 256 556 +gravity 1 +bounce 1.5 +originjitter 1 1 1 +velocityjitter 300 300 300 +velocitymultiplier 0.5 +airfriction 3 + +// yellow_pass +// used nowhere in code +effect yellow_pass +trailspacing 64 +color 0xFFFF0F 0xFFFF0F +size 2 2 +tex 32 32 +alpha 64 128 64 +airfriction 5 +sizeincrease 2 +type static +effect yellow_pass +trailspacing 12 +color 0xFFFF0F 0xFFFF0F +size 1 1 +tex 0 8 +alpha 32 64 32 +airfriction 9 +sizeincrease 8 +velocityjitter 64 64 64 +type static +effect yellow_pass +trailspacing 12 +color 0xFFFF0F 0xFFFF0F +size 4 4 +//tex 48 55 +alpha 256 256 1280 +type static + +// pink_pass +// used nowhere in code +effect pink_pass +trailspacing 64 +color 0xFFFFFF 0xFFFFFF +size 2 2 +tex 32 32 +alpha 64 128 64 +airfriction 5 +sizeincrease 2 +type static +effect pink_pass +trailspacing 12 +color 0xFFFFFF 0xFFFFFF +size 1 1 +tex 0 8 +alpha 32 64 32 +airfriction 9 +sizeincrease 8 +velocityjitter 64 64 64 +type static +effect pink_pass +trailspacing 12 +color 0xFFFFFF 0xFFFFFF +size 4 4 +//tex 48 55 +alpha 256 256 1280 +type static + +// neutral_pass +// used nowhere in code +effect neutral_pass +trailspacing 64 +color 0xFFFFFF 0xFFFFFF +size 2 2 +tex 32 32 +alpha 64 128 64 +airfriction 5 +sizeincrease 2 +type static +effect neutral_pass +trailspacing 12 +color 0xFFFFFF 0xFFFFFF +size 1 1 +tex 0 8 +alpha 32 64 32 +airfriction 9 +sizeincrease 8 +velocityjitter 64 64 64 +type static +effect neutral_pass +trailspacing 12 +color 0xFFFFFF 0xFFFFFF +size 4 4 +//tex 48 55 +alpha 256 256 1280 +type static + +// yellow_cap -- yellow team capture effect +effect yellow_cap +count 500 +type spark +tex 64 64 +color 0xFFFF0F 0xFFFF0F +size 1 1 +alpha 0 256 100 +stretchfactor 2 +//gravity 1 +bounce 1.5 +originjitter 1 1 1 +velocityjitter 1000 1000 1500 +velocitymultiplier 0.5 +airfriction 2 +stretchfactor 0.6 +effect yellow_cap +countabsolute 1 +type smoke +tex 65 65 +size 150 150 +alpha 190 190 180 +sizeincrease -80 +color 0xFFFF0F 0xFFFF0F + +// pink_cap -- pink team capture effect +effect pink_cap +count 500 +type spark +tex 64 64 +color 0xFF0FFF 0xFF0FFF +size 1 1 +alpha 0 256 100 +stretchfactor 2 +//gravity 1 +bounce 1.5 +originjitter 1 1 1 +velocityjitter 1000 1000 1500 +velocitymultiplier 0.5 +airfriction 2 +stretchfactor 0.6 +effect pink_cap +countabsolute 1 +type smoke +tex 65 65 +size 150 150 +alpha 190 190 180 +sizeincrease -80 +color 0xFF0FFF 0xFF0FFF // relic_resistance effect, used by the relics mutator // used in qcsrc/server/mutators/relics.qc: pointparticles(particleeffectnum(mdl), e.origin, '0 0 0', 1); diff --git a/gamemodes.cfg b/gamemodes.cfg index d660aa123..7f444e444 100644 --- a/gamemodes.cfg +++ b/gamemodes.cfg @@ -254,6 +254,10 @@ set g_ca_teams 0 // capture the flag // ================== set g_ctf 0 "Capture The Flag: take the enemy flag and bring it to yours at your base to score" +set g_ctf_oneflag 1 "Allow oneflag CTF mode on maps that support it" +set g_ctf_oneflag_reverse 0 "apply reverse mode to oneflag CTF (take flag to enemy bases to cap), overrides g_ctf_reverse only in oneflag, g_ctf_reverse still affects oneflag" +set g_ctf_flag_return 1 "auto return the flag to base when touched by a teammate" +set g_ctf_flag_return_carried_radius 100 "allow flags to be returned by carrier if base is within this radius" set g_ctf_flag_return_time 15 set g_ctf_flag_return_dropped 100 set g_ctf_flag_return_damage 0 @@ -311,6 +315,12 @@ set g_ctf_flag_red_model "models/ctf/flags.md3" set g_ctf_flag_red_skin 0 set g_ctf_flag_blue_model "models/ctf/flags.md3" set g_ctf_flag_blue_skin 1 +set g_ctf_flag_yellow_model "models/ctf/flags.md3" +set g_ctf_flag_yellow_skin 2 +set g_ctf_flag_pink_model "models/ctf/flags.md3" +set g_ctf_flag_pink_skin 3 +set g_ctf_flag_neutral_model "models/ctf/flags.md3" +set g_ctf_flag_neutral_skin 4 set g_ctf_flag_glowtrails 1 set g_ctf_fullbrightflags 0 set g_ctf_dynamiclights 0 diff --git a/gfx/crosshair55.tga b/gfx/crosshair55.tga index adf195049..8709b58cc 100644 Binary files a/gfx/crosshair55.tga and b/gfx/crosshair55.tga differ diff --git a/gfx/hud/default/flag_neutral_carrying.tga b/gfx/hud/default/flag_neutral_carrying.tga new file mode 100644 index 000000000..0e555133e Binary files /dev/null and b/gfx/hud/default/flag_neutral_carrying.tga differ diff --git a/gfx/hud/default/flag_neutral_lost.tga b/gfx/hud/default/flag_neutral_lost.tga new file mode 100644 index 000000000..7cb1d73be Binary files /dev/null and b/gfx/hud/default/flag_neutral_lost.tga differ diff --git a/gfx/hud/default/flag_neutral_shielded.tga b/gfx/hud/default/flag_neutral_shielded.tga new file mode 100644 index 000000000..7e83e4d25 Binary files /dev/null and b/gfx/hud/default/flag_neutral_shielded.tga differ diff --git a/gfx/hud/default/flag_neutral_taken.tga b/gfx/hud/default/flag_neutral_taken.tga new file mode 100644 index 000000000..e35b8311b Binary files /dev/null and b/gfx/hud/default/flag_neutral_taken.tga differ diff --git a/gfx/hud/default/flag_pink_carrying.tga b/gfx/hud/default/flag_pink_carrying.tga new file mode 100644 index 000000000..920adfdd6 Binary files /dev/null and b/gfx/hud/default/flag_pink_carrying.tga differ diff --git a/gfx/hud/default/flag_pink_lost.tga b/gfx/hud/default/flag_pink_lost.tga new file mode 100644 index 000000000..87d114151 Binary files /dev/null and b/gfx/hud/default/flag_pink_lost.tga differ diff --git a/gfx/hud/default/flag_pink_shielded.tga b/gfx/hud/default/flag_pink_shielded.tga new file mode 100644 index 000000000..5f9241675 Binary files /dev/null and b/gfx/hud/default/flag_pink_shielded.tga differ diff --git a/gfx/hud/default/flag_pink_taken.tga b/gfx/hud/default/flag_pink_taken.tga new file mode 100644 index 000000000..4f8bab32a Binary files /dev/null and b/gfx/hud/default/flag_pink_taken.tga differ diff --git a/gfx/hud/default/flag_yellow_carrying.tga b/gfx/hud/default/flag_yellow_carrying.tga new file mode 100644 index 000000000..48ed50175 Binary files /dev/null and b/gfx/hud/default/flag_yellow_carrying.tga differ diff --git a/gfx/hud/default/flag_yellow_lost.tga b/gfx/hud/default/flag_yellow_lost.tga new file mode 100644 index 000000000..f930414ef Binary files /dev/null and b/gfx/hud/default/flag_yellow_lost.tga differ diff --git a/gfx/hud/default/flag_yellow_shielded.tga b/gfx/hud/default/flag_yellow_shielded.tga new file mode 100644 index 000000000..92ee3b1db Binary files /dev/null and b/gfx/hud/default/flag_yellow_shielded.tga differ diff --git a/gfx/hud/default/flag_yellow_taken.tga b/gfx/hud/default/flag_yellow_taken.tga new file mode 100644 index 000000000..274e4ceb9 Binary files /dev/null and b/gfx/hud/default/flag_yellow_taken.tga differ diff --git a/gfx/hud/default/nade_bg.tga b/gfx/hud/default/nade_bg.tga deleted file mode 100644 index ffe0e0f6b..000000000 Binary files a/gfx/hud/default/nade_bg.tga and /dev/null differ diff --git a/gfx/hud/default/nade_heal.tga b/gfx/hud/default/nade_heal.tga new file mode 100644 index 000000000..5ab82a097 Binary files /dev/null and b/gfx/hud/default/nade_heal.tga differ diff --git a/gfx/hud/default/nade_ice.tga b/gfx/hud/default/nade_ice.tga new file mode 100644 index 000000000..51a8dc997 Binary files /dev/null and b/gfx/hud/default/nade_ice.tga differ diff --git a/gfx/hud/default/nade_monster.tga b/gfx/hud/default/nade_monster.tga new file mode 100644 index 000000000..fbd516d24 Binary files /dev/null and b/gfx/hud/default/nade_monster.tga differ diff --git a/gfx/hud/default/nade_napalm.tga b/gfx/hud/default/nade_napalm.tga new file mode 100644 index 000000000..12af433d3 Binary files /dev/null and b/gfx/hud/default/nade_napalm.tga differ diff --git a/gfx/hud/default/nade_nbg.tga b/gfx/hud/default/nade_nbg.tga deleted file mode 100644 index 18683746a..000000000 Binary files a/gfx/hud/default/nade_nbg.tga and /dev/null differ diff --git a/gfx/hud/default/nade_normal.tga b/gfx/hud/default/nade_normal.tga new file mode 100644 index 000000000..499322d41 Binary files /dev/null and b/gfx/hud/default/nade_normal.tga differ diff --git a/gfx/hud/default/nade_spawn.tga b/gfx/hud/default/nade_spawn.tga new file mode 100644 index 000000000..91c0bbb2f Binary files /dev/null and b/gfx/hud/default/nade_spawn.tga differ diff --git a/gfx/hud/default/nade_translocate.tga b/gfx/hud/default/nade_translocate.tga new file mode 100644 index 000000000..ac2de0652 Binary files /dev/null and b/gfx/hud/default/nade_translocate.tga differ diff --git a/gfx/hud/default/notify_nade.tga b/gfx/hud/default/notify_nade.tga deleted file mode 100644 index 78dd0e2af..000000000 Binary files a/gfx/hud/default/notify_nade.tga and /dev/null differ diff --git a/gfx/hud/default/notify_nade_heal.tga b/gfx/hud/default/notify_nade_heal.tga deleted file mode 100644 index 17e240860..000000000 Binary files a/gfx/hud/default/notify_nade_heal.tga and /dev/null differ diff --git a/gfx/hud/default/notify_nade_ice.tga b/gfx/hud/default/notify_nade_ice.tga deleted file mode 100644 index f75280888..000000000 Binary files a/gfx/hud/default/notify_nade_ice.tga and /dev/null differ diff --git a/gfx/hud/default/notify_nade_napalm.tga b/gfx/hud/default/notify_nade_napalm.tga deleted file mode 100644 index bb84101fa..000000000 Binary files a/gfx/hud/default/notify_nade_napalm.tga and /dev/null differ diff --git a/gfx/hud/default/vehicle_bar_northeast.tga b/gfx/hud/default/vehicle_bar_northeast.tga new file mode 100644 index 000000000..b01df47ee Binary files /dev/null and b/gfx/hud/default/vehicle_bar_northeast.tga differ diff --git a/gfx/hud/default/vehicle_bar_northwest.tga b/gfx/hud/default/vehicle_bar_northwest.tga new file mode 100644 index 000000000..de06fc103 Binary files /dev/null and b/gfx/hud/default/vehicle_bar_northwest.tga differ diff --git a/gfx/hud/default/vehicle_bar_southeast.tga b/gfx/hud/default/vehicle_bar_southeast.tga new file mode 100644 index 000000000..cd3919653 Binary files /dev/null and b/gfx/hud/default/vehicle_bar_southeast.tga differ diff --git a/gfx/hud/default/vehicle_bar_southwest.tga b/gfx/hud/default/vehicle_bar_southwest.tga new file mode 100644 index 000000000..9c0dbb910 Binary files /dev/null and b/gfx/hud/default/vehicle_bar_southwest.tga differ diff --git a/gfx/hud/default/vehicle_bumble.tga b/gfx/hud/default/vehicle_bumble.tga new file mode 100644 index 000000000..8795ae469 Binary files /dev/null and b/gfx/hud/default/vehicle_bumble.tga differ diff --git a/gfx/hud/default/vehicle_bumble_weapon1.tga b/gfx/hud/default/vehicle_bumble_weapon1.tga new file mode 100644 index 000000000..034bd3569 Binary files /dev/null and b/gfx/hud/default/vehicle_bumble_weapon1.tga differ diff --git a/gfx/hud/default/vehicle_bumble_weapon2.tga b/gfx/hud/default/vehicle_bumble_weapon2.tga new file mode 100644 index 000000000..d34cba3a5 Binary files /dev/null and b/gfx/hud/default/vehicle_bumble_weapon2.tga differ diff --git a/gfx/hud/default/vehicle_frame.tga b/gfx/hud/default/vehicle_frame.tga new file mode 100644 index 000000000..9a687b920 Binary files /dev/null and b/gfx/hud/default/vehicle_frame.tga differ diff --git a/gfx/hud/default/vehicle_gunner.tga b/gfx/hud/default/vehicle_gunner.tga new file mode 100644 index 000000000..c4af48b4c Binary files /dev/null and b/gfx/hud/default/vehicle_gunner.tga differ diff --git a/gfx/hud/default/vehicle_gunner_weapon1.tga b/gfx/hud/default/vehicle_gunner_weapon1.tga new file mode 100644 index 000000000..ef4f7b417 Binary files /dev/null and b/gfx/hud/default/vehicle_gunner_weapon1.tga differ diff --git a/gfx/hud/default/vehicle_icon_ammo1.tga b/gfx/hud/default/vehicle_icon_ammo1.tga new file mode 100644 index 000000000..b65db01f3 Binary files /dev/null and b/gfx/hud/default/vehicle_icon_ammo1.tga differ diff --git a/gfx/hud/default/vehicle_icon_ammo2.tga b/gfx/hud/default/vehicle_icon_ammo2.tga new file mode 100644 index 000000000..56c5b255a Binary files /dev/null and b/gfx/hud/default/vehicle_icon_ammo2.tga differ diff --git a/gfx/hud/default/vehicle_icon_health.tga b/gfx/hud/default/vehicle_icon_health.tga new file mode 100644 index 000000000..59bb1b964 Binary files /dev/null and b/gfx/hud/default/vehicle_icon_health.tga differ diff --git a/gfx/hud/default/vehicle_icon_shield.tga b/gfx/hud/default/vehicle_icon_shield.tga new file mode 100644 index 000000000..edb9c9e9f Binary files /dev/null and b/gfx/hud/default/vehicle_icon_shield.tga differ diff --git a/gfx/hud/default/vehicle_racer.tga b/gfx/hud/default/vehicle_racer.tga new file mode 100644 index 000000000..1eb39629f Binary files /dev/null and b/gfx/hud/default/vehicle_racer.tga differ diff --git a/gfx/hud/default/vehicle_racer_weapon1.tga b/gfx/hud/default/vehicle_racer_weapon1.tga new file mode 100644 index 000000000..1a682863a Binary files /dev/null and b/gfx/hud/default/vehicle_racer_weapon1.tga differ diff --git a/gfx/hud/default/vehicle_racer_weapon2.tga b/gfx/hud/default/vehicle_racer_weapon2.tga new file mode 100644 index 000000000..f0c71c6c6 Binary files /dev/null and b/gfx/hud/default/vehicle_racer_weapon2.tga differ diff --git a/gfx/hud/default/vehicle_raptor.tga b/gfx/hud/default/vehicle_raptor.tga new file mode 100644 index 000000000..4f9f5b577 Binary files /dev/null and b/gfx/hud/default/vehicle_raptor.tga differ diff --git a/gfx/hud/default/vehicle_raptor_weapon1.tga b/gfx/hud/default/vehicle_raptor_weapon1.tga new file mode 100644 index 000000000..03d4e5e4d Binary files /dev/null and b/gfx/hud/default/vehicle_raptor_weapon1.tga differ diff --git a/gfx/hud/default/vehicle_raptor_weapon2.tga b/gfx/hud/default/vehicle_raptor_weapon2.tga new file mode 100644 index 000000000..3696f2e92 Binary files /dev/null and b/gfx/hud/default/vehicle_raptor_weapon2.tga differ diff --git a/gfx/hud/default/vehicle_shield.tga b/gfx/hud/default/vehicle_shield.tga new file mode 100644 index 000000000..0d6c0771f Binary files /dev/null and b/gfx/hud/default/vehicle_shield.tga differ diff --git a/gfx/hud/default/vehicle_spider.tga b/gfx/hud/default/vehicle_spider.tga new file mode 100644 index 000000000..d0c4b25f5 Binary files /dev/null and b/gfx/hud/default/vehicle_spider.tga differ diff --git a/gfx/hud/default/vehicle_spider_weapon1.tga b/gfx/hud/default/vehicle_spider_weapon1.tga new file mode 100644 index 000000000..cdc14241e Binary files /dev/null and b/gfx/hud/default/vehicle_spider_weapon1.tga differ diff --git a/gfx/hud/default/vehicle_spider_weapon2.tga b/gfx/hud/default/vehicle_spider_weapon2.tga new file mode 100644 index 000000000..05ae2eff0 Binary files /dev/null and b/gfx/hud/default/vehicle_spider_weapon2.tga differ diff --git a/gfx/hud/luma/border_shadow_east.tga b/gfx/hud/luma/border_shadow_east.tga new file mode 100644 index 000000000..4a420e723 Binary files /dev/null and b/gfx/hud/luma/border_shadow_east.tga differ diff --git a/gfx/hud/luma/border_shadow_north.tga b/gfx/hud/luma/border_shadow_north.tga new file mode 100644 index 000000000..957466031 Binary files /dev/null and b/gfx/hud/luma/border_shadow_north.tga differ diff --git a/gfx/hud/luma/border_shadow_south.tga b/gfx/hud/luma/border_shadow_south.tga new file mode 100644 index 000000000..7eea1eae7 Binary files /dev/null and b/gfx/hud/luma/border_shadow_south.tga differ diff --git a/gfx/hud/luma/border_shadow_west.tga b/gfx/hud/luma/border_shadow_west.tga new file mode 100644 index 000000000..f5378ec91 Binary files /dev/null and b/gfx/hud/luma/border_shadow_west.tga differ diff --git a/gfx/hud/luma/border_tab_east.tga b/gfx/hud/luma/border_tab_east.tga index 974fb6bb8..8cd0ede0c 100644 Binary files a/gfx/hud/luma/border_tab_east.tga and b/gfx/hud/luma/border_tab_east.tga differ diff --git a/gfx/hud/luma/border_tab_north.tga b/gfx/hud/luma/border_tab_north.tga index 62e379306..0a64f3041 100644 Binary files a/gfx/hud/luma/border_tab_north.tga and b/gfx/hud/luma/border_tab_north.tga differ diff --git a/gfx/hud/luma/border_tab_south.tga b/gfx/hud/luma/border_tab_south.tga index c6212d5a8..ef60b1558 100644 Binary files a/gfx/hud/luma/border_tab_south.tga and b/gfx/hud/luma/border_tab_south.tga differ diff --git a/gfx/hud/luma/border_tab_west.tga b/gfx/hud/luma/border_tab_west.tga index 007efa8ed..ea95be07d 100644 Binary files a/gfx/hud/luma/border_tab_west.tga and b/gfx/hud/luma/border_tab_west.tga differ diff --git a/gfx/hud/luma/nade_bg.tga b/gfx/hud/luma/nade_bg.tga deleted file mode 100644 index 0aa070014..000000000 Binary files a/gfx/hud/luma/nade_bg.tga and /dev/null differ diff --git a/gfx/hud/luma/nade_heal.tga b/gfx/hud/luma/nade_heal.tga new file mode 100644 index 000000000..4a4623794 Binary files /dev/null and b/gfx/hud/luma/nade_heal.tga differ diff --git a/gfx/hud/luma/nade_ice.tga b/gfx/hud/luma/nade_ice.tga new file mode 100644 index 000000000..24e31ace8 Binary files /dev/null and b/gfx/hud/luma/nade_ice.tga differ diff --git a/gfx/hud/luma/nade_monster.tga b/gfx/hud/luma/nade_monster.tga new file mode 100644 index 000000000..b042d6245 Binary files /dev/null and b/gfx/hud/luma/nade_monster.tga differ diff --git a/gfx/hud/luma/nade_napalm.tga b/gfx/hud/luma/nade_napalm.tga new file mode 100644 index 000000000..9fb16bc0a Binary files /dev/null and b/gfx/hud/luma/nade_napalm.tga differ diff --git a/gfx/hud/luma/nade_nbg.tga b/gfx/hud/luma/nade_nbg.tga deleted file mode 100644 index 80f19863e..000000000 Binary files a/gfx/hud/luma/nade_nbg.tga and /dev/null differ diff --git a/gfx/hud/luma/nade_normal.tga b/gfx/hud/luma/nade_normal.tga new file mode 100644 index 000000000..ca15dd397 Binary files /dev/null and b/gfx/hud/luma/nade_normal.tga differ diff --git a/gfx/hud/luma/nade_spawn.tga b/gfx/hud/luma/nade_spawn.tga new file mode 100644 index 000000000..2b985690e Binary files /dev/null and b/gfx/hud/luma/nade_spawn.tga differ diff --git a/gfx/hud/luma/nade_translocate.tga b/gfx/hud/luma/nade_translocate.tga new file mode 100644 index 000000000..a2736e4e4 Binary files /dev/null and b/gfx/hud/luma/nade_translocate.tga differ diff --git a/gfx/hud/luma/notify_nade.tga b/gfx/hud/luma/notify_nade.tga deleted file mode 100644 index c163e50c7..000000000 Binary files a/gfx/hud/luma/notify_nade.tga and /dev/null differ diff --git a/gfx/hud/luma/notify_nade_heal.tga b/gfx/hud/luma/notify_nade_heal.tga deleted file mode 100644 index 4a4623794..000000000 Binary files a/gfx/hud/luma/notify_nade_heal.tga and /dev/null differ diff --git a/gfx/hud/luma/notify_nade_ice.tga b/gfx/hud/luma/notify_nade_ice.tga deleted file mode 100644 index 24e31ace8..000000000 Binary files a/gfx/hud/luma/notify_nade_ice.tga and /dev/null differ diff --git a/gfx/hud/luma/notify_nade_napalm.tga b/gfx/hud/luma/notify_nade_napalm.tga deleted file mode 100644 index 9fb16bc0a..000000000 Binary files a/gfx/hud/luma/notify_nade_napalm.tga and /dev/null differ diff --git a/gfx/hud/luma/powerup_invisibility.tga b/gfx/hud/luma/powerup_invisibility.tga index d1aa0c72a..073c227ef 100644 Binary files a/gfx/hud/luma/powerup_invisibility.tga and b/gfx/hud/luma/powerup_invisibility.tga differ diff --git a/gfx/hud/luma/shield.tga b/gfx/hud/luma/shield.tga index 3101dbb4d..9962fa63e 100644 Binary files a/gfx/hud/luma/shield.tga and b/gfx/hud/luma/shield.tga differ diff --git a/gfx/hud/luma/vehicle_bar_northeast.tga b/gfx/hud/luma/vehicle_bar_northeast.tga new file mode 100644 index 000000000..de9fea79b Binary files /dev/null and b/gfx/hud/luma/vehicle_bar_northeast.tga differ diff --git a/gfx/hud/luma/vehicle_bar_northwest.tga b/gfx/hud/luma/vehicle_bar_northwest.tga new file mode 100644 index 000000000..4c8146163 Binary files /dev/null and b/gfx/hud/luma/vehicle_bar_northwest.tga differ diff --git a/gfx/hud/luma/vehicle_bar_southeast.tga b/gfx/hud/luma/vehicle_bar_southeast.tga new file mode 100644 index 000000000..82fb43f89 Binary files /dev/null and b/gfx/hud/luma/vehicle_bar_southeast.tga differ diff --git a/gfx/hud/luma/vehicle_bar_southwest.tga b/gfx/hud/luma/vehicle_bar_southwest.tga new file mode 100644 index 000000000..2b65269c3 Binary files /dev/null and b/gfx/hud/luma/vehicle_bar_southwest.tga differ diff --git a/gfx/hud/luma/vehicle_bumble.tga b/gfx/hud/luma/vehicle_bumble.tga new file mode 100644 index 000000000..82bac94ed Binary files /dev/null and b/gfx/hud/luma/vehicle_bumble.tga differ diff --git a/gfx/hud/luma/vehicle_bumble_weapon1.tga b/gfx/hud/luma/vehicle_bumble_weapon1.tga new file mode 100644 index 000000000..09451a6dd Binary files /dev/null and b/gfx/hud/luma/vehicle_bumble_weapon1.tga differ diff --git a/gfx/hud/luma/vehicle_bumble_weapon2.tga b/gfx/hud/luma/vehicle_bumble_weapon2.tga new file mode 100644 index 000000000..39150cd44 Binary files /dev/null and b/gfx/hud/luma/vehicle_bumble_weapon2.tga differ diff --git a/gfx/hud/luma/vehicle_frame.tga b/gfx/hud/luma/vehicle_frame.tga new file mode 100644 index 000000000..3309f4f7b Binary files /dev/null and b/gfx/hud/luma/vehicle_frame.tga differ diff --git a/gfx/hud/luma/vehicle_gunner.tga b/gfx/hud/luma/vehicle_gunner.tga new file mode 100644 index 000000000..d217975c0 Binary files /dev/null and b/gfx/hud/luma/vehicle_gunner.tga differ diff --git a/gfx/hud/luma/vehicle_gunner_weapon1.tga b/gfx/hud/luma/vehicle_gunner_weapon1.tga new file mode 100644 index 000000000..c8969d8a6 Binary files /dev/null and b/gfx/hud/luma/vehicle_gunner_weapon1.tga differ diff --git a/gfx/hud/luma/vehicle_icon_ammo1.tga b/gfx/hud/luma/vehicle_icon_ammo1.tga new file mode 100644 index 000000000..ae90b9efa Binary files /dev/null and b/gfx/hud/luma/vehicle_icon_ammo1.tga differ diff --git a/gfx/hud/luma/vehicle_icon_ammo2.tga b/gfx/hud/luma/vehicle_icon_ammo2.tga new file mode 100644 index 000000000..14a64b7e1 Binary files /dev/null and b/gfx/hud/luma/vehicle_icon_ammo2.tga differ diff --git a/gfx/hud/luma/vehicle_icon_health.tga b/gfx/hud/luma/vehicle_icon_health.tga new file mode 100644 index 000000000..56ba0f1c9 Binary files /dev/null and b/gfx/hud/luma/vehicle_icon_health.tga differ diff --git a/gfx/hud/luma/vehicle_icon_shield.tga b/gfx/hud/luma/vehicle_icon_shield.tga new file mode 100644 index 000000000..82c8369b2 Binary files /dev/null and b/gfx/hud/luma/vehicle_icon_shield.tga differ diff --git a/gfx/hud/luma/vehicle_racer.tga b/gfx/hud/luma/vehicle_racer.tga new file mode 100644 index 000000000..b97f32546 Binary files /dev/null and b/gfx/hud/luma/vehicle_racer.tga differ diff --git a/gfx/hud/luma/vehicle_racer_weapon1.tga b/gfx/hud/luma/vehicle_racer_weapon1.tga new file mode 100644 index 000000000..2de4bf4ac Binary files /dev/null and b/gfx/hud/luma/vehicle_racer_weapon1.tga differ diff --git a/gfx/hud/luma/vehicle_racer_weapon2.tga b/gfx/hud/luma/vehicle_racer_weapon2.tga new file mode 100644 index 000000000..327e56fa1 Binary files /dev/null and b/gfx/hud/luma/vehicle_racer_weapon2.tga differ diff --git a/gfx/hud/luma/vehicle_raptor.tga b/gfx/hud/luma/vehicle_raptor.tga new file mode 100644 index 000000000..1316e20b2 Binary files /dev/null and b/gfx/hud/luma/vehicle_raptor.tga differ diff --git a/gfx/hud/luma/vehicle_raptor_weapon1.tga b/gfx/hud/luma/vehicle_raptor_weapon1.tga new file mode 100644 index 000000000..b6f317135 Binary files /dev/null and b/gfx/hud/luma/vehicle_raptor_weapon1.tga differ diff --git a/gfx/hud/luma/vehicle_raptor_weapon2.tga b/gfx/hud/luma/vehicle_raptor_weapon2.tga new file mode 100644 index 000000000..e2925073b Binary files /dev/null and b/gfx/hud/luma/vehicle_raptor_weapon2.tga differ diff --git a/gfx/hud/luma/vehicle_shield.tga b/gfx/hud/luma/vehicle_shield.tga new file mode 100644 index 000000000..cd26a8a80 Binary files /dev/null and b/gfx/hud/luma/vehicle_shield.tga differ diff --git a/gfx/hud/luma/vehicle_spider.tga b/gfx/hud/luma/vehicle_spider.tga new file mode 100644 index 000000000..a25cd1a0a Binary files /dev/null and b/gfx/hud/luma/vehicle_spider.tga differ diff --git a/gfx/hud/luma/vehicle_spider_weapon1.tga b/gfx/hud/luma/vehicle_spider_weapon1.tga new file mode 100644 index 000000000..b15cf6bed Binary files /dev/null and b/gfx/hud/luma/vehicle_spider_weapon1.tga differ diff --git a/gfx/hud/luma/vehicle_spider_weapon2.tga b/gfx/hud/luma/vehicle_spider_weapon2.tga new file mode 100644 index 000000000..0c6de644c Binary files /dev/null and b/gfx/hud/luma/vehicle_spider_weapon2.tga differ diff --git a/gfx/hud/luma/weapon_accuracy.tga b/gfx/hud/luma/weapon_accuracy.tga index 1bdcdd50f..b0d906db0 100644 Binary files a/gfx/hud/luma/weapon_accuracy.tga and b/gfx/hud/luma/weapon_accuracy.tga differ diff --git a/gfx/hud/luma/weapon_accuracy_north.tga b/gfx/hud/luma/weapon_accuracy_north.tga deleted file mode 100644 index 03cc0ffb6..000000000 Binary files a/gfx/hud/luma/weapon_accuracy_north.tga and /dev/null differ diff --git a/gfx/hud/luma/weapon_accuracy_south.tga b/gfx/hud/luma/weapon_accuracy_south.tga deleted file mode 100644 index 7aa8069b6..000000000 Binary files a/gfx/hud/luma/weapon_accuracy_south.tga and /dev/null differ diff --git a/gfx/hud/luma/weapon_accuracy_west.tga b/gfx/hud/luma/weapon_accuracy_west.tga deleted file mode 100644 index 965c9ad62..000000000 Binary files a/gfx/hud/luma/weapon_accuracy_west.tga and /dev/null differ diff --git a/gfx/hud/luma/weapon_ammo.tga b/gfx/hud/luma/weapon_ammo.tga index 0a688f71d..8d42c3863 100644 Binary files a/gfx/hud/luma/weapon_ammo.tga and b/gfx/hud/luma/weapon_ammo.tga differ diff --git a/gfx/hud/luma/weapon_current_bg.tga b/gfx/hud/luma/weapon_current_bg.tga index 6d3efb9a2..e0c6a5edb 100644 Binary files a/gfx/hud/luma/weapon_current_bg.tga and b/gfx/hud/luma/weapon_current_bg.tga differ diff --git a/gfx/hud/luma/weapon_current_bg_north.tga b/gfx/hud/luma/weapon_current_bg_north.tga deleted file mode 100644 index 8ad7ec2b7..000000000 Binary files a/gfx/hud/luma/weapon_current_bg_north.tga and /dev/null differ diff --git a/gfx/hud/luma/weapon_current_bg_south.tga b/gfx/hud/luma/weapon_current_bg_south.tga deleted file mode 100644 index a2b9bf712..000000000 Binary files a/gfx/hud/luma/weapon_current_bg_south.tga and /dev/null differ diff --git a/gfx/hud/luma/weapon_current_bg_west.tga b/gfx/hud/luma/weapon_current_bg_west.tga deleted file mode 100644 index d40e2a4f9..000000000 Binary files a/gfx/hud/luma/weapon_current_bg_west.tga and /dev/null differ diff --git a/gfx/hud/luma/weaponflak.tga b/gfx/hud/luma/weaponflak.tga new file mode 100644 index 000000000..8dd37f2f5 Binary files /dev/null and b/gfx/hud/luma/weaponflak.tga differ diff --git a/gfx/hud/old/flag_neutral_carrying.jpg b/gfx/hud/old/flag_neutral_carrying.jpg new file mode 100644 index 000000000..506a5a716 Binary files /dev/null and b/gfx/hud/old/flag_neutral_carrying.jpg differ diff --git a/gfx/hud/old/flag_neutral_carrying_alpha.jpg b/gfx/hud/old/flag_neutral_carrying_alpha.jpg new file mode 100644 index 000000000..71191073b Binary files /dev/null and b/gfx/hud/old/flag_neutral_carrying_alpha.jpg differ diff --git a/gfx/hud/old/flag_neutral_lost.jpg b/gfx/hud/old/flag_neutral_lost.jpg new file mode 100644 index 000000000..47a622c8e Binary files /dev/null and b/gfx/hud/old/flag_neutral_lost.jpg differ diff --git a/gfx/hud/old/flag_neutral_lost_alpha.jpg b/gfx/hud/old/flag_neutral_lost_alpha.jpg new file mode 100644 index 000000000..c164228c0 Binary files /dev/null and b/gfx/hud/old/flag_neutral_lost_alpha.jpg differ diff --git a/gfx/hud/old/flag_neutral_shielded.jpg b/gfx/hud/old/flag_neutral_shielded.jpg new file mode 100644 index 000000000..acec90dbf Binary files /dev/null and b/gfx/hud/old/flag_neutral_shielded.jpg differ diff --git a/gfx/hud/old/flag_neutral_shielded_alpha.jpg b/gfx/hud/old/flag_neutral_shielded_alpha.jpg new file mode 100644 index 000000000..df41fc5b9 Binary files /dev/null and b/gfx/hud/old/flag_neutral_shielded_alpha.jpg differ diff --git a/gfx/hud/old/flag_neutral_taken.jpg b/gfx/hud/old/flag_neutral_taken.jpg new file mode 100644 index 000000000..f241e3d96 Binary files /dev/null and b/gfx/hud/old/flag_neutral_taken.jpg differ diff --git a/gfx/hud/old/flag_neutral_taken_alpha.jpg b/gfx/hud/old/flag_neutral_taken_alpha.jpg new file mode 100644 index 000000000..8cf8ac63b Binary files /dev/null and b/gfx/hud/old/flag_neutral_taken_alpha.jpg differ diff --git a/gfx/hud/old/flag_pink_carrying.jpg b/gfx/hud/old/flag_pink_carrying.jpg new file mode 100644 index 000000000..98393c74b Binary files /dev/null and b/gfx/hud/old/flag_pink_carrying.jpg differ diff --git a/gfx/hud/old/flag_pink_carrying_alpha.jpg b/gfx/hud/old/flag_pink_carrying_alpha.jpg new file mode 100644 index 000000000..71191073b Binary files /dev/null and b/gfx/hud/old/flag_pink_carrying_alpha.jpg differ diff --git a/gfx/hud/old/flag_pink_lost.jpg b/gfx/hud/old/flag_pink_lost.jpg new file mode 100644 index 000000000..9b4a58d7d Binary files /dev/null and b/gfx/hud/old/flag_pink_lost.jpg differ diff --git a/gfx/hud/old/flag_pink_lost_alpha.jpg b/gfx/hud/old/flag_pink_lost_alpha.jpg new file mode 100644 index 000000000..c164228c0 Binary files /dev/null and b/gfx/hud/old/flag_pink_lost_alpha.jpg differ diff --git a/gfx/hud/old/flag_pink_shielded.jpg b/gfx/hud/old/flag_pink_shielded.jpg new file mode 100644 index 000000000..82e402570 Binary files /dev/null and b/gfx/hud/old/flag_pink_shielded.jpg differ diff --git a/gfx/hud/old/flag_pink_shielded_alpha.jpg b/gfx/hud/old/flag_pink_shielded_alpha.jpg new file mode 100644 index 000000000..df41fc5b9 Binary files /dev/null and b/gfx/hud/old/flag_pink_shielded_alpha.jpg differ diff --git a/gfx/hud/old/flag_pink_taken.jpg b/gfx/hud/old/flag_pink_taken.jpg new file mode 100644 index 000000000..e61ee7dd3 Binary files /dev/null and b/gfx/hud/old/flag_pink_taken.jpg differ diff --git a/gfx/hud/old/flag_pink_taken_alpha.jpg b/gfx/hud/old/flag_pink_taken_alpha.jpg new file mode 100644 index 000000000..8cf8ac63b Binary files /dev/null and b/gfx/hud/old/flag_pink_taken_alpha.jpg differ diff --git a/gfx/hud/old/flag_yellow_carrying.jpg b/gfx/hud/old/flag_yellow_carrying.jpg new file mode 100644 index 000000000..2f0ab0d22 Binary files /dev/null and b/gfx/hud/old/flag_yellow_carrying.jpg differ diff --git a/gfx/hud/old/flag_yellow_carrying_alpha.jpg b/gfx/hud/old/flag_yellow_carrying_alpha.jpg new file mode 100644 index 000000000..6e08ac23f Binary files /dev/null and b/gfx/hud/old/flag_yellow_carrying_alpha.jpg differ diff --git a/gfx/hud/old/flag_yellow_lost.jpg b/gfx/hud/old/flag_yellow_lost.jpg new file mode 100644 index 000000000..a5f6e8829 Binary files /dev/null and b/gfx/hud/old/flag_yellow_lost.jpg differ diff --git a/gfx/hud/old/flag_yellow_lost_alpha.jpg b/gfx/hud/old/flag_yellow_lost_alpha.jpg new file mode 100644 index 000000000..3d299387a Binary files /dev/null and b/gfx/hud/old/flag_yellow_lost_alpha.jpg differ diff --git a/gfx/hud/old/flag_yellow_shielded.jpg b/gfx/hud/old/flag_yellow_shielded.jpg new file mode 100644 index 000000000..a1343a9e3 Binary files /dev/null and b/gfx/hud/old/flag_yellow_shielded.jpg differ diff --git a/gfx/hud/old/flag_yellow_shielded_alpha.jpg b/gfx/hud/old/flag_yellow_shielded_alpha.jpg new file mode 100644 index 000000000..fc7715ab1 Binary files /dev/null and b/gfx/hud/old/flag_yellow_shielded_alpha.jpg differ diff --git a/gfx/hud/old/flag_yellow_taken.jpg b/gfx/hud/old/flag_yellow_taken.jpg new file mode 100644 index 000000000..d2e8c2269 Binary files /dev/null and b/gfx/hud/old/flag_yellow_taken.jpg differ diff --git a/gfx/hud/old/flag_yellow_taken_alpha.jpg b/gfx/hud/old/flag_yellow_taken_alpha.jpg new file mode 100644 index 000000000..6a88f1063 Binary files /dev/null and b/gfx/hud/old/flag_yellow_taken_alpha.jpg differ diff --git a/gfx/menu/luma/icon_aeslevel1.tga b/gfx/menu/luma/icon_aeslevel1.tga index 22aa0ff68..c32dd97a8 100644 Binary files a/gfx/menu/luma/icon_aeslevel1.tga and b/gfx/menu/luma/icon_aeslevel1.tga differ diff --git a/gfx/menu/luma/icon_aeslevel2.tga b/gfx/menu/luma/icon_aeslevel2.tga index 22aa0ff68..c32dd97a8 100644 Binary files a/gfx/menu/luma/icon_aeslevel2.tga and b/gfx/menu/luma/icon_aeslevel2.tga differ diff --git a/gfx/menu/luma/icon_ipv4.tga b/gfx/menu/luma/icon_ipv4.tga new file mode 100644 index 000000000..83659d08e Binary files /dev/null and b/gfx/menu/luma/icon_ipv4.tga differ diff --git a/gfx/menu/luma/icon_ipv6.tga b/gfx/menu/luma/icon_ipv6.tga new file mode 100644 index 000000000..43d9d4178 Binary files /dev/null and b/gfx/menu/luma/icon_ipv6.tga differ diff --git a/gfx/menu/luma/icon_mod_instagib.tga b/gfx/menu/luma/icon_mod_instagib.tga new file mode 100644 index 000000000..ce8c2d50d Binary files /dev/null and b/gfx/menu/luma/icon_mod_instagib.tga differ diff --git a/gfx/vehicles/axh-bracket.tga b/gfx/vehicles/axh-bracket.tga deleted file mode 100644 index 82f079660..000000000 Binary files a/gfx/vehicles/axh-bracket.tga and /dev/null differ diff --git a/gfx/vehicles/axh-cross.tga b/gfx/vehicles/axh-cross.tga deleted file mode 100644 index 69e1c0be0..000000000 Binary files a/gfx/vehicles/axh-cross.tga and /dev/null differ diff --git a/gfx/vehicles/axh-dropcross.tga b/gfx/vehicles/axh-dropcross.tga deleted file mode 100644 index e8ba095fd..000000000 Binary files a/gfx/vehicles/axh-dropcross.tga and /dev/null differ diff --git a/gfx/vehicles/axh-ring.tga b/gfx/vehicles/axh-ring.tga deleted file mode 100644 index bb3ade588..000000000 Binary files a/gfx/vehicles/axh-ring.tga and /dev/null differ diff --git a/gfx/vehicles/axh-rings.tga b/gfx/vehicles/axh-rings.tga deleted file mode 100644 index da68ff8d9..000000000 Binary files a/gfx/vehicles/axh-rings.tga and /dev/null differ diff --git a/gfx/vehicles/axh-special1.tga b/gfx/vehicles/axh-special1.tga deleted file mode 100644 index 184a065c0..000000000 Binary files a/gfx/vehicles/axh-special1.tga and /dev/null differ diff --git a/gfx/vehicles/axh-special2.tga b/gfx/vehicles/axh-special2.tga deleted file mode 100644 index caad1d71c..000000000 Binary files a/gfx/vehicles/axh-special2.tga and /dev/null differ diff --git a/gfx/vehicles/axh-tag.tga b/gfx/vehicles/axh-tag.tga deleted file mode 100644 index 4eb3b66c2..000000000 Binary files a/gfx/vehicles/axh-tag.tga and /dev/null differ diff --git a/gfx/vehicles/axh-target.tga b/gfx/vehicles/axh-target.tga deleted file mode 100644 index 8c05908f2..000000000 Binary files a/gfx/vehicles/axh-target.tga and /dev/null differ diff --git a/gfx/vehicles/axh-x.tga b/gfx/vehicles/axh-x.tga deleted file mode 100644 index f6a4fce77..000000000 Binary files a/gfx/vehicles/axh-x.tga and /dev/null differ diff --git a/gfx/vehicles/bar_dwn_left.tga b/gfx/vehicles/bar_dwn_left.tga deleted file mode 100644 index 011f9a9c3..000000000 Binary files a/gfx/vehicles/bar_dwn_left.tga and /dev/null differ diff --git a/gfx/vehicles/bar_dwn_right.tga b/gfx/vehicles/bar_dwn_right.tga deleted file mode 100644 index e93b5e600..000000000 Binary files a/gfx/vehicles/bar_dwn_right.tga and /dev/null differ diff --git a/gfx/vehicles/bar_up_left.tga b/gfx/vehicles/bar_up_left.tga deleted file mode 100644 index f49d205d0..000000000 Binary files a/gfx/vehicles/bar_up_left.tga and /dev/null differ diff --git a/gfx/vehicles/bar_up_right.tga b/gfx/vehicles/bar_up_right.tga deleted file mode 100644 index a3b591014..000000000 Binary files a/gfx/vehicles/bar_up_right.tga and /dev/null differ diff --git a/gfx/vehicles/bullets.tga b/gfx/vehicles/bullets.tga deleted file mode 100644 index ff853ee6b..000000000 Binary files a/gfx/vehicles/bullets.tga and /dev/null differ diff --git a/gfx/vehicles/bumb.tga b/gfx/vehicles/bumb.tga deleted file mode 100644 index 22883f40e..000000000 Binary files a/gfx/vehicles/bumb.tga and /dev/null differ diff --git a/gfx/vehicles/bumb_lgun.tga b/gfx/vehicles/bumb_lgun.tga deleted file mode 100644 index 23db1da64..000000000 Binary files a/gfx/vehicles/bumb_lgun.tga and /dev/null differ diff --git a/gfx/vehicles/bumb_rgun.tga b/gfx/vehicles/bumb_rgun.tga deleted file mode 100644 index f755681ee..000000000 Binary files a/gfx/vehicles/bumb_rgun.tga and /dev/null differ diff --git a/gfx/vehicles/bumb_side.tga b/gfx/vehicles/bumb_side.tga deleted file mode 100644 index 69fa4d814..000000000 Binary files a/gfx/vehicles/bumb_side.tga and /dev/null differ diff --git a/gfx/vehicles/bumb_side_gun.tga b/gfx/vehicles/bumb_side_gun.tga deleted file mode 100644 index c8fc81702..000000000 Binary files a/gfx/vehicles/bumb_side_gun.tga and /dev/null differ diff --git a/gfx/vehicles/crosshair_burst.tga b/gfx/vehicles/crosshair_burst.tga new file mode 100644 index 000000000..9f006cace Binary files /dev/null and b/gfx/vehicles/crosshair_burst.tga differ diff --git a/gfx/vehicles/crosshair_drop.tga b/gfx/vehicles/crosshair_drop.tga new file mode 100644 index 000000000..4215f326b Binary files /dev/null and b/gfx/vehicles/crosshair_drop.tga differ diff --git a/gfx/vehicles/crosshair_guide.tga b/gfx/vehicles/crosshair_guide.tga new file mode 100644 index 000000000..46a67c224 Binary files /dev/null and b/gfx/vehicles/crosshair_guide.tga differ diff --git a/gfx/vehicles/crosshair_heal.tga b/gfx/vehicles/crosshair_heal.tga new file mode 100644 index 000000000..887c278a7 Binary files /dev/null and b/gfx/vehicles/crosshair_heal.tga differ diff --git a/gfx/vehicles/crosshair_hint.tga b/gfx/vehicles/crosshair_hint.tga new file mode 100644 index 000000000..41cc167b6 Binary files /dev/null and b/gfx/vehicles/crosshair_hint.tga differ diff --git a/gfx/vehicles/crosshair_lock.tga b/gfx/vehicles/crosshair_lock.tga new file mode 100644 index 000000000..716853052 Binary files /dev/null and b/gfx/vehicles/crosshair_lock.tga differ diff --git a/gfx/vehicles/crosshair_rain.tga b/gfx/vehicles/crosshair_rain.tga new file mode 100644 index 000000000..2fdc13809 Binary files /dev/null and b/gfx/vehicles/crosshair_rain.tga differ diff --git a/gfx/vehicles/energy.tga b/gfx/vehicles/energy.tga deleted file mode 100644 index de06ecce7..000000000 Binary files a/gfx/vehicles/energy.tga and /dev/null differ diff --git a/gfx/vehicles/frame.tga b/gfx/vehicles/frame.tga deleted file mode 100644 index 92a657361..000000000 Binary files a/gfx/vehicles/frame.tga and /dev/null differ diff --git a/gfx/vehicles/health.tga b/gfx/vehicles/health.tga deleted file mode 100644 index 3956a3ff2..000000000 Binary files a/gfx/vehicles/health.tga and /dev/null differ diff --git a/gfx/vehicles/raptor.tga b/gfx/vehicles/raptor.tga deleted file mode 100644 index 9a2519a95..000000000 Binary files a/gfx/vehicles/raptor.tga and /dev/null differ diff --git a/gfx/vehicles/raptor_bombs.tga b/gfx/vehicles/raptor_bombs.tga deleted file mode 100644 index 9012fb259..000000000 Binary files a/gfx/vehicles/raptor_bombs.tga and /dev/null differ diff --git a/gfx/vehicles/raptor_guns.tga b/gfx/vehicles/raptor_guns.tga deleted file mode 100644 index 0d0012a53..000000000 Binary files a/gfx/vehicles/raptor_guns.tga and /dev/null differ diff --git a/gfx/vehicles/rocket.tga b/gfx/vehicles/rocket.tga deleted file mode 100644 index f0385b97f..000000000 Binary files a/gfx/vehicles/rocket.tga and /dev/null differ diff --git a/gfx/vehicles/sbot.tga b/gfx/vehicles/sbot.tga deleted file mode 100644 index 706c87ec2..000000000 Binary files a/gfx/vehicles/sbot.tga and /dev/null differ diff --git a/gfx/vehicles/sbot_mguns.tga b/gfx/vehicles/sbot_mguns.tga deleted file mode 100644 index a6816f903..000000000 Binary files a/gfx/vehicles/sbot_mguns.tga and /dev/null differ diff --git a/gfx/vehicles/sbot_rpods.tga b/gfx/vehicles/sbot_rpods.tga deleted file mode 100644 index 2170960eb..000000000 Binary files a/gfx/vehicles/sbot_rpods.tga and /dev/null differ diff --git a/gfx/vehicles/shield.tga b/gfx/vehicles/shield.tga deleted file mode 100644 index 916268f05..000000000 Binary files a/gfx/vehicles/shield.tga and /dev/null differ diff --git a/gfx/vehicles/turret_moving.tga b/gfx/vehicles/turret_moving.tga new file mode 100644 index 000000000..04daf70de Binary files /dev/null and b/gfx/vehicles/turret_moving.tga differ diff --git a/gfx/vehicles/turret_stationary.tga b/gfx/vehicles/turret_stationary.tga new file mode 100644 index 000000000..9bbbb25d8 Binary files /dev/null and b/gfx/vehicles/turret_stationary.tga differ diff --git a/gfx/vehicles/vh-shield.tga b/gfx/vehicles/vh-shield.tga deleted file mode 100644 index bd728e283..000000000 Binary files a/gfx/vehicles/vh-shield.tga and /dev/null differ diff --git a/gfx/vehicles/vth-mover.tga b/gfx/vehicles/vth-mover.tga deleted file mode 100644 index d831896ff..000000000 Binary files a/gfx/vehicles/vth-mover.tga and /dev/null differ diff --git a/gfx/vehicles/vth-stationary.tga b/gfx/vehicles/vth-stationary.tga deleted file mode 100644 index 31703bcfe..000000000 Binary files a/gfx/vehicles/vth-stationary.tga and /dev/null differ diff --git a/gfx/vehicles/waki.tga b/gfx/vehicles/waki.tga deleted file mode 100644 index 10089d23e..000000000 Binary files a/gfx/vehicles/waki.tga and /dev/null differ diff --git a/gfx/vehicles/waki_e.tga b/gfx/vehicles/waki_e.tga deleted file mode 100644 index 0de1b6a7b..000000000 Binary files a/gfx/vehicles/waki_e.tga and /dev/null differ diff --git a/gfx/vehicles/waki_guns.tga b/gfx/vehicles/waki_guns.tga deleted file mode 100644 index 2b0705e60..000000000 Binary files a/gfx/vehicles/waki_guns.tga and /dev/null differ diff --git a/gfx/vehicles/waki_rockets.tga b/gfx/vehicles/waki_rockets.tga deleted file mode 100644 index 538243c01..000000000 Binary files a/gfx/vehicles/waki_rockets.tga and /dev/null differ diff --git a/hud_luma.cfg b/hud_luma.cfg index ae0b5f0d9..0edab56db 100644 --- a/hud_luma.cfg +++ b/hud_luma.cfg @@ -23,6 +23,8 @@ seta hud_progressbar_nexball_color "0.2 0.65 0.93" seta hud_progressbar_speed_color "0.77 0.67 0" seta hud_progressbar_acceleration_color "0.2 0.65 0.93" seta hud_progressbar_acceleration_neg_color "0.86 0.35 0" +seta hud_progressbar_vehicles_ammo1_color "0.77 0.67 0" +seta hud_progressbar_vehicles_ammo2_color "0.86 0.35 0" seta _hud_panelorder "15 12 9 5 10 6 14 0 7 4 11 2 1 3 8 13 16 " @@ -31,7 +33,7 @@ seta hud_configure_grid_xsize "0.005000" seta hud_configure_grid_ysize "0.005000" seta hud_panel_weapons 1 -seta hud_panel_weapons_pos "0.965000 0.120000" +seta hud_panel_weapons_pos "0.965000 0.125000" seta hud_panel_weapons_size "0.035000 0.770000" seta hud_panel_weapons_bg "border_default_east" seta hud_panel_weapons_bg_color "" @@ -60,10 +62,12 @@ seta hud_panel_weapons_timeout_fadefgmin "0.4" seta hud_panel_weapons_timeout_speed_in "0.25" seta hud_panel_weapons_timeout_speed_out "0.75" seta hud_panel_weapons_onlyowned "1" +seta hud_panel_weapons_noncurrent_alpha "0.8" +seta hud_panel_weapons_noncurrent_scale "0.9" seta hud_panel_ammo 1 -seta hud_panel_ammo_pos "0.330000 0.865000" -seta hud_panel_ammo_size "0.340000 0.060000" +seta hud_panel_ammo_pos "0.315000 0.865000" +seta hud_panel_ammo_size "0.370000 0.060000" seta hud_panel_ammo_bg "border_tab_south" seta hud_panel_ammo_bg_color "" seta hud_panel_ammo_bg_color_team "" @@ -80,17 +84,17 @@ seta hud_panel_ammo_progressbar_xoffset "0" seta hud_panel_ammo_text "1" seta hud_panel_powerups 1 -seta hud_panel_powerups_pos "0 0.270000" -seta hud_panel_powerups_size "0.040000 0.415000" -seta hud_panel_powerups_bg "border_default_west" +seta hud_panel_powerups_pos "0.325000 0.820000" +seta hud_panel_powerups_size "0.350000 0.050000" +seta hud_panel_powerups_bg "border_shadow_south" seta hud_panel_powerups_bg_color "" seta hud_panel_powerups_bg_color_team "" seta hud_panel_powerups_bg_alpha "" seta hud_panel_powerups_bg_border "" -seta hud_panel_powerups_bg_padding "2" +seta hud_panel_powerups_bg_padding "" seta hud_panel_powerups_flip "1" -seta hud_panel_powerups_iconalign "1" -seta hud_panel_powerups_baralign "1" +seta hud_panel_powerups_iconalign "2" +seta hud_panel_powerups_baralign "2" seta hud_panel_powerups_progressbar "1" seta hud_panel_powerups_progressbar_strength "progressbar" seta hud_panel_powerups_progressbar_shield "progressbar" @@ -206,7 +210,7 @@ seta hud_panel_modicons_dom_layout "1" seta hud_panel_modicons_freezetag_layout "1" seta hud_panel_pressedkeys 1 -seta hud_panel_pressedkeys_pos "0.445000 0.730000" +seta hud_panel_pressedkeys_pos "0.445000 0.710000" seta hud_panel_pressedkeys_size "0.110000 0.090000" seta hud_panel_pressedkeys_bg " " seta hud_panel_pressedkeys_bg_color "" @@ -251,7 +255,7 @@ seta hud_panel_infomessages_bg_padding "0" seta hud_panel_infomessages_flip "1" seta hud_panel_physics 3 -seta hud_panel_physics_pos "0.410000 0.630000" +seta hud_panel_physics_pos "0.410000 0.625000" seta hud_panel_physics_size "0.180000 0.080000" seta hud_panel_physics_bg "0" seta hud_panel_physics_bg_color "" @@ -300,8 +304,8 @@ seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" seta hud_panel_buffs 1 -seta hud_panel_buffs_pos "0.435000 0.840000" -seta hud_panel_buffs_size "0.125000 0.035000" +seta hud_panel_buffs_pos "0.325000 0.820000" +seta hud_panel_buffs_size "0.350000 0.050000" seta hud_panel_buffs_bg "0" seta hud_panel_buffs_bg_color "" seta hud_panel_buffs_bg_color_team "" diff --git a/hud_luminos.cfg b/hud_luminos.cfg index 4d95e94f7..b15e82c52 100644 --- a/hud_luminos.cfg +++ b/hud_luminos.cfg @@ -23,6 +23,8 @@ seta hud_progressbar_nexball_color "0.7 0.1 0" seta hud_progressbar_speed_color "1 0.75 0" seta hud_progressbar_acceleration_color "0.5 0.75 1" seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" +seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0" +seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0" seta _hud_panelorder "15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 " @@ -60,6 +62,8 @@ seta hud_panel_weapons_timeout_fadefgmin "0.4" seta hud_panel_weapons_timeout_speed_in "0.25" seta hud_panel_weapons_timeout_speed_out "0.75" seta hud_panel_weapons_onlyowned "1" +seta hud_panel_weapons_noncurrent_alpha "1" +seta hud_panel_weapons_noncurrent_scale "1" seta hud_panel_ammo 1 seta hud_panel_ammo_pos "0.330000 0.960000" diff --git a/hud_luminos_minimal.cfg b/hud_luminos_minimal.cfg index e0a381c6f..299417659 100644 --- a/hud_luminos_minimal.cfg +++ b/hud_luminos_minimal.cfg @@ -23,6 +23,8 @@ seta hud_progressbar_nexball_color "0.7 0.1 0" seta hud_progressbar_speed_color "1 0.75 0" seta hud_progressbar_acceleration_color "0.5 0.75 1" seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" +seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0" +seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0" seta _hud_panelorder "10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 " @@ -60,6 +62,8 @@ seta hud_panel_weapons_timeout_fadefgmin "0" seta hud_panel_weapons_timeout_speed_in "0.25" seta hud_panel_weapons_timeout_speed_out "0.75" seta hud_panel_weapons_onlyowned "1" +seta hud_panel_weapons_noncurrent_alpha "1" +seta hud_panel_weapons_noncurrent_scale "1" seta hud_panel_ammo 1 seta hud_panel_ammo_pos "0.650000 0.890000" diff --git a/hud_luminos_minimal_xhair.cfg b/hud_luminos_minimal_xhair.cfg index 2d72b3cd4..a1f79cb58 100644 --- a/hud_luminos_minimal_xhair.cfg +++ b/hud_luminos_minimal_xhair.cfg @@ -23,6 +23,8 @@ seta hud_progressbar_nexball_color "0.7 0.1 0" seta hud_progressbar_speed_color "1 0.75 0" seta hud_progressbar_acceleration_color "0.5 0.75 1" seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" +seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0" +seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0" seta _hud_panelorder "15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 " @@ -60,6 +62,8 @@ seta hud_panel_weapons_timeout_fadefgmin "0" seta hud_panel_weapons_timeout_speed_in "0.25" seta hud_panel_weapons_timeout_speed_out "0.75" seta hud_panel_weapons_onlyowned "1" +seta hud_panel_weapons_noncurrent_alpha "1" +seta hud_panel_weapons_noncurrent_scale "1" seta hud_panel_ammo 1 seta hud_panel_ammo_pos "0.450000 0.630000" diff --git a/hud_luminos_old.cfg b/hud_luminos_old.cfg index 88c0d8f41..b45c9f4bd 100644 --- a/hud_luminos_old.cfg +++ b/hud_luminos_old.cfg @@ -23,6 +23,8 @@ seta hud_progressbar_nexball_color "0.7 0.1 0" seta hud_progressbar_speed_color "1 0.75 0" seta hud_progressbar_acceleration_color "0.5 0.75 1" seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" +seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0" +seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0" seta _hud_panelorder "15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 " @@ -60,6 +62,8 @@ seta hud_panel_weapons_timeout_fadefgmin "0" seta hud_panel_weapons_timeout_speed_in "0.25" seta hud_panel_weapons_timeout_speed_out "0.75" seta hud_panel_weapons_onlyowned "1" +seta hud_panel_weapons_noncurrent_alpha "1" +seta hud_panel_weapons_noncurrent_scale "1" seta hud_panel_ammo 1 seta hud_panel_ammo_pos "0.190000 0.920000" diff --git a/hud_nexuiz.cfg b/hud_nexuiz.cfg index f3d9180be..9e4e174a2 100644 --- a/hud_nexuiz.cfg +++ b/hud_nexuiz.cfg @@ -23,6 +23,8 @@ seta hud_progressbar_nexball_color "0.7 0.1 0" seta hud_progressbar_speed_color "1 0.75 0" seta hud_progressbar_acceleration_color "0.5 0.75 1" seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" +seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0" +seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0" seta _hud_panelorder "15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 " @@ -60,6 +62,8 @@ seta hud_panel_weapons_timeout_fadefgmin "0" seta hud_panel_weapons_timeout_speed_in "0.25" seta hud_panel_weapons_timeout_speed_out "0.75" seta hud_panel_weapons_onlyowned "0" +seta hud_panel_weapons_noncurrent_alpha "1" +seta hud_panel_weapons_noncurrent_scale "1" seta hud_panel_ammo 1 seta hud_panel_ammo_pos "0.160000 0.910000" diff --git a/models/ctf/banner_blue_gloss.tga b/models/ctf/banner_blue_gloss.tga deleted file mode 100644 index 77168a8a8..000000000 Binary files a/models/ctf/banner_blue_gloss.tga and /dev/null differ diff --git a/models/ctf/banner_neutral.tga b/models/ctf/banner_neutral.tga new file mode 100644 index 000000000..5c3de9461 Binary files /dev/null and b/models/ctf/banner_neutral.tga differ diff --git a/models/ctf/banner_neutral_gloss.tga b/models/ctf/banner_neutral_gloss.tga new file mode 100644 index 000000000..77168a8a8 Binary files /dev/null and b/models/ctf/banner_neutral_gloss.tga differ diff --git a/models/ctf/banner_pink.tga b/models/ctf/banner_pink.tga new file mode 100644 index 000000000..68e65b6de Binary files /dev/null and b/models/ctf/banner_pink.tga differ diff --git a/models/ctf/banner_pink_gloss.tga b/models/ctf/banner_pink_gloss.tga new file mode 100644 index 000000000..77168a8a8 Binary files /dev/null and b/models/ctf/banner_pink_gloss.tga differ diff --git a/models/ctf/banner_yellow.tga b/models/ctf/banner_yellow.tga new file mode 100644 index 000000000..b398e880b Binary files /dev/null and b/models/ctf/banner_yellow.tga differ diff --git a/models/ctf/banner_yellow_gloss.tga b/models/ctf/banner_yellow_gloss.tga new file mode 100644 index 000000000..77168a8a8 Binary files /dev/null and b/models/ctf/banner_yellow_gloss.tga differ diff --git a/models/ctf/flag_neutral.tga b/models/ctf/flag_neutral.tga new file mode 100644 index 000000000..63feddd4e Binary files /dev/null and b/models/ctf/flag_neutral.tga differ diff --git a/models/ctf/flag_neutral_gloss.tga b/models/ctf/flag_neutral_gloss.tga new file mode 100644 index 000000000..3e92985b8 Binary files /dev/null and b/models/ctf/flag_neutral_gloss.tga differ diff --git a/models/ctf/flag_neutral_glow.tga b/models/ctf/flag_neutral_glow.tga new file mode 100644 index 000000000..77191aba0 Binary files /dev/null and b/models/ctf/flag_neutral_glow.tga differ diff --git a/models/ctf/flag_neutral_norm.tga b/models/ctf/flag_neutral_norm.tga new file mode 100644 index 000000000..07d5e17aa Binary files /dev/null and b/models/ctf/flag_neutral_norm.tga differ diff --git a/models/ctf/flag_pink.tga b/models/ctf/flag_pink.tga new file mode 100644 index 000000000..63feddd4e Binary files /dev/null and b/models/ctf/flag_pink.tga differ diff --git a/models/ctf/flag_pink_gloss.tga b/models/ctf/flag_pink_gloss.tga new file mode 100644 index 000000000..3e92985b8 Binary files /dev/null and b/models/ctf/flag_pink_gloss.tga differ diff --git a/models/ctf/flag_pink_glow.tga b/models/ctf/flag_pink_glow.tga new file mode 100644 index 000000000..ba70c0854 Binary files /dev/null and b/models/ctf/flag_pink_glow.tga differ diff --git a/models/ctf/flag_pink_norm.tga b/models/ctf/flag_pink_norm.tga new file mode 100644 index 000000000..07d5e17aa Binary files /dev/null and b/models/ctf/flag_pink_norm.tga differ diff --git a/models/ctf/flag_yellow.tga b/models/ctf/flag_yellow.tga new file mode 100644 index 000000000..63feddd4e Binary files /dev/null and b/models/ctf/flag_yellow.tga differ diff --git a/models/ctf/flag_yellow_gloss.tga b/models/ctf/flag_yellow_gloss.tga new file mode 100644 index 000000000..3e92985b8 Binary files /dev/null and b/models/ctf/flag_yellow_gloss.tga differ diff --git a/models/ctf/flag_yellow_glow.tga b/models/ctf/flag_yellow_glow.tga new file mode 100644 index 000000000..0af88a942 Binary files /dev/null and b/models/ctf/flag_yellow_glow.tga differ diff --git a/models/ctf/flag_yellow_norm.tga b/models/ctf/flag_yellow_norm.tga new file mode 100644 index 000000000..07d5e17aa Binary files /dev/null and b/models/ctf/flag_yellow_norm.tga differ diff --git a/models/ctf/flags.md3_2.skin b/models/ctf/flags.md3_2.skin new file mode 100644 index 000000000..44fb67d27 --- /dev/null +++ b/models/ctf/flags.md3_2.skin @@ -0,0 +1,3 @@ +mesh,models/ctf/flag_yellow.tga +mesh2,models/ctf/banner_yellow.tga +mesh3,models/ctf/glow_yellow.tga \ No newline at end of file diff --git a/models/ctf/flags.md3_3.skin b/models/ctf/flags.md3_3.skin new file mode 100644 index 000000000..22d77d224 --- /dev/null +++ b/models/ctf/flags.md3_3.skin @@ -0,0 +1,3 @@ +mesh,models/ctf/flag_pink.tga +mesh2,models/ctf/banner_pink.tga +mesh3,models/ctf/glow_pink.tga \ No newline at end of file diff --git a/models/ctf/flags.md3_4.skin b/models/ctf/flags.md3_4.skin new file mode 100644 index 000000000..ba35e26c6 --- /dev/null +++ b/models/ctf/flags.md3_4.skin @@ -0,0 +1,3 @@ +mesh,models/ctf/flag_neutral.tga +mesh2,models/ctf/banner_neutral.tga +mesh3,models/ctf/glow_neutral.tga \ No newline at end of file diff --git a/models/ctf/glow_neutral.tga b/models/ctf/glow_neutral.tga new file mode 100644 index 000000000..5ffa098e3 Binary files /dev/null and b/models/ctf/glow_neutral.tga differ diff --git a/models/ctf/glow_neutral_glow.tga b/models/ctf/glow_neutral_glow.tga new file mode 100644 index 000000000..5ffa098e3 Binary files /dev/null and b/models/ctf/glow_neutral_glow.tga differ diff --git a/models/ctf/glow_pink.tga b/models/ctf/glow_pink.tga new file mode 100644 index 000000000..6a3bb8c06 Binary files /dev/null and b/models/ctf/glow_pink.tga differ diff --git a/models/ctf/glow_pink_glow.tga b/models/ctf/glow_pink_glow.tga new file mode 100644 index 000000000..8da95a975 Binary files /dev/null and b/models/ctf/glow_pink_glow.tga differ diff --git a/models/ctf/glow_yellow.tga b/models/ctf/glow_yellow.tga new file mode 100644 index 000000000..8562caadd Binary files /dev/null and b/models/ctf/glow_yellow.tga differ diff --git a/models/ctf/glow_yellow_glow.tga b/models/ctf/glow_yellow_glow.tga new file mode 100644 index 000000000..8562caadd Binary files /dev/null and b/models/ctf/glow_yellow_glow.tga differ diff --git a/models/items/g_invincible_luma.tga b/models/items/g_invincible_luma.tga index caa1938c6..99dd23464 100644 Binary files a/models/items/g_invincible_luma.tga and b/models/items/g_invincible_luma.tga differ diff --git a/models/items/powerup_invisibility_luma.tga b/models/items/powerup_invisibility_luma.tga index 8b1e8ed3c..cf186f08e 100644 Binary files a/models/items/powerup_invisibility_luma.tga and b/models/items/powerup_invisibility_luma.tga differ diff --git a/models/weapons/g_flak_luma.tga b/models/weapons/g_flak_luma.tga new file mode 100644 index 000000000..78ace259c Binary files /dev/null and b/models/weapons/g_flak_luma.tga differ diff --git a/models/weapons/g_sniperrifle_luma.tga b/models/weapons/g_sniperrifle_luma.tga new file mode 100644 index 000000000..5f8e13548 Binary files /dev/null and b/models/weapons/g_sniperrifle_luma.tga differ diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index b9a241da9..646415a8e 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -77,9 +77,9 @@ bool autocvar_cl_spawnzoom = 1; float autocvar_cl_spawnzoom_speed = 1; float autocvar_cl_spawnzoom_factor = 2; bool autocvar_cl_stripcolorcodes; -float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6; -float autocvar_cl_vehicle_spiderbot_cross_size = 1; bool autocvar_cl_vehicles_hud_tactical = 1; +float autocvar_cl_vehicles_hudscale = 0.5; +float autocvar_cl_vehicles_crosshair_size = 0.5; bool autocvar_cl_velocityzoom_enabled; float autocvar_cl_velocityzoom_factor; int autocvar_cl_velocityzoom_type = 3; @@ -356,6 +356,8 @@ float autocvar_hud_panel_weapons_complainbubble_time; int autocvar_hud_panel_weapons_label; float autocvar_hud_panel_weapons_label_scale = 0.5; bool autocvar_hud_panel_weapons_onlyowned; +float autocvar_hud_panel_weapons_noncurrent_alpha = 1; +float autocvar_hud_panel_weapons_noncurrent_scale = 1; float autocvar_hud_panel_weapons_timeout; int autocvar_hud_panel_weapons_timeout_effect; float autocvar_hud_panel_weapons_timeout_fadebgmin; @@ -373,6 +375,8 @@ vector autocvar_hud_progressbar_shield_color; vector autocvar_hud_progressbar_speed_color; vector autocvar_hud_progressbar_strength_color; vector autocvar_hud_progressbar_superweapons_color; +vector autocvar_hud_progressbar_vehicles_ammo1_color; +vector autocvar_hud_progressbar_vehicles_ammo2_color; bool autocvar_hud_showbinds; bool autocvar_hud_showbinds_limit; bool autocvar__hud_showbinds_reload; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index f30edcbdc..9b0e5895c 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -13,6 +13,9 @@ #include "../common/deathtypes.qh" #include "../common/mapinfo.qh" #include "../common/nades.qh" + +#include "../server/mutators/gamemode_ctf.qh" + #include "../common/stats.qh" #include "../csqcmodellib/cl_player.qh" @@ -789,11 +792,17 @@ void HUD_Weapons(void) // draw items row = column = 0; vector label_size = '1 1 0' * min(weapon_size.x, weapon_size.y) * bound(0, autocvar_hud_panel_weapons_label_scale, 1); + vector noncurrent_pos = '0 0 0'; + vector noncurrent_size = weapon_size * bound(0, autocvar_hud_panel_weapons_noncurrent_scale, 1); + float noncurrent_alpha = panel_fg_alpha * bound(0, autocvar_hud_panel_weapons_noncurrent_alpha, 1); + bool isCurrent; + for(i = 0; i <= WEP_LAST-WEP_FIRST; ++i) { // retrieve information about the current weapon to be drawn self = weaponorder[i]; weapon_id = self.impulse; + isCurrent = (self.weapon == switchweapon); // skip if this weapon doesn't exist if(!self || weapon_id < 0) { continue; } @@ -804,12 +813,12 @@ void HUD_Weapons(void) continue; // figure out the drawing position of weapon - weapon_pos = (panel_pos - + eX * column * weapon_size.x - + eY * row * weapon_size.y); + weapon_pos = (panel_pos + eX * column * weapon_size.x + eY * row * weapon_size.y); + noncurrent_pos.x = weapon_pos.x + (weapon_size.x - noncurrent_size.x) / 2; + noncurrent_pos.y = weapon_pos.y + (weapon_size.y - noncurrent_size.y) / 2; // draw background behind currently selected weapon - if(self.weapon == switchweapon) + if(isCurrent) drawpic_aspect_skin(weapon_pos, "weapon_current_bg", weapon_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); // draw the weapon accuracy @@ -827,7 +836,10 @@ void HUD_Weapons(void) if(weapons_stat & WepSet_FromWeapon(self.weapon)) { // draw the weapon image - drawpic_aspect_skin(weapon_pos, self.model2, weapon_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + if(isCurrent) + drawpic_aspect_skin(weapon_pos, self.model2, weapon_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + else + drawpic_aspect_skin(noncurrent_pos, self.model2, noncurrent_size, '1 1 1', noncurrent_alpha, DRAWFLAG_NORMAL); // draw weapon label string switch(autocvar_hud_panel_weapons_label) @@ -889,7 +901,7 @@ void HUD_Weapons(void) } else // draw a "ghost weapon icon" if you don't have the weapon { - drawpic_aspect_skin(weapon_pos, self.model2, weapon_size, '0 0 0', panel_fg_alpha * 0.5, DRAWFLAG_NORMAL); + drawpic_aspect_skin(noncurrent_pos, self.model2, noncurrent_size, '0.2 0.2 0.2', panel_fg_alpha * 0.5, DRAWFLAG_NORMAL); } // draw the complain message @@ -950,51 +962,48 @@ void HUD_Weapons(void) } // Ammo (#1) -void DrawNadeScoreBar(vector myPos, vector mySize, vector color) +void DrawNadeProgressBar(vector myPos, vector mySize, float progress, vector color) { - HUD_Panel_DrawProgressBar( myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize.x, mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize.x, autocvar_hud_panel_ammo_progressbar_name, - getstatf(STAT_NADE_BONUS_SCORE), 0, 0, color, + progress, 0, 0, color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - } void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expand_time) { - float theAlpha = 1, a, b; - vector nade_color, picpos, numpos; + float bonusNades = getstatf(STAT_NADE_BONUS); + float bonusProgress = getstatf(STAT_NADE_BONUS_SCORE); + float bonusType = getstati(STAT_NADE_BONUS_TYPE); + vector nadeColor = Nade_Color(bonusType); + string nadeIcon = Nade_Icon(bonusType); - nade_color = Nade_Color(getstati(STAT_NADE_BONUS_TYPE)); - - a = getstatf(STAT_NADE_BONUS); - b = getstatf(STAT_NADE_BONUS_SCORE); + vector iconPos, textPos; if(autocvar_hud_panel_ammo_iconalign) { - numpos = myPos; - picpos = myPos + eX * 2 * mySize.y; + iconPos = myPos + eX * 2 * mySize.y; + textPos = myPos; } else { - numpos = myPos + eX * mySize.y; - picpos = myPos; + iconPos = myPos; + textPos = myPos + eX * mySize.y; } - DrawNadeScoreBar(myPos, mySize, nade_color); - - if(b > 0 || a > 0) + if(bonusNades > 0 || bonusProgress > 0) { + DrawNadeProgressBar(myPos, mySize, bonusProgress, nadeColor); + if(autocvar_hud_panel_ammo_text) - drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); + drawstring_aspect(textPos, ftos(bonusNades), eX * (2/3) * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); if(draw_expanding) - drawpic_aspect_skin_expanding(picpos, "nade_nbg", '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL, expand_time); + drawpic_aspect_skin_expanding(iconPos, nadeIcon, '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, expand_time); - drawpic_aspect_skin(picpos, "nade_bg" , '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); - drawpic_aspect_skin(picpos, "nade_nbg" , '1 1 0' * mySize.y, nade_color, panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(iconPos, nadeIcon, '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); } } @@ -2316,7 +2325,7 @@ void HUD_Score(void) vector distribution_color; entity tm, pl, me; - me = playerslots[player_localentnum - 1]; + me = playerslots[current_player]; if((scores_flags[ps_primary] & SFL_TIME) && !teamplay) { // race/cts record display on HUD string timer, distrtimer; @@ -2854,154 +2863,184 @@ void HUD_Mod_CA(vector myPos, vector mySize) } // CTF HUD modicon section -float redflag_prevframe, blueflag_prevframe; // status during previous frame -int redflag_prevstatus, blueflag_prevstatus; // last remembered status -float redflag_statuschange_time, blueflag_statuschange_time; // time when the status changed +int redflag_prevframe, blueflag_prevframe, yellowflag_prevframe, pinkflag_prevframe, neutralflag_prevframe; // status during previous frame +int redflag_prevstatus, blueflag_prevstatus, yellowflag_prevstatus, pinkflag_prevstatus, neutralflag_prevstatus; // last remembered status +float redflag_statuschange_time, blueflag_statuschange_time, yellowflag_statuschange_time, pinkflag_statuschange_time, neutralflag_statuschange_time; // time when the status changed void HUD_Mod_CTF_Reset(void) { - redflag_prevstatus = blueflag_prevstatus = redflag_prevframe = blueflag_prevframe = redflag_statuschange_time = blueflag_statuschange_time = 0; + redflag_prevstatus = blueflag_prevstatus = yellowflag_prevstatus = pinkflag_prevstatus = neutralflag_prevstatus = 0; + redflag_prevframe = blueflag_prevframe = yellowflag_prevframe = pinkflag_prevframe = neutralflag_prevframe = 0; + redflag_statuschange_time = blueflag_statuschange_time = yellowflag_statuschange_time = pinkflag_statuschange_time = neutralflag_statuschange_time = 0; } void HUD_Mod_CTF(vector pos, vector mySize) { - vector redflag_pos, blueflag_pos; + vector redflag_pos, blueflag_pos, yellowflag_pos, pinkflag_pos, neutralflag_pos; vector flag_size; float f; // every function should have that - int redflag, blueflag; // current status - float redflag_statuschange_elapsedtime, blueflag_statuschange_elapsedtime; // time since the status changed - int stat_items; - - stat_items = getstati(STAT_ITEMS, 0, 24); - redflag = (stat_items/IT_RED_FLAG_TAKEN) & 3; - blueflag = (stat_items/IT_BLUE_FLAG_TAKEN) & 3; + int redflag, blueflag, yellowflag, pinkflag, neutralflag; // current status + float redflag_statuschange_elapsedtime, blueflag_statuschange_elapsedtime, yellowflag_statuschange_elapsedtime, pinkflag_statuschange_elapsedtime, neutralflag_statuschange_elapsedtime; // time since the status changed + bool ctf_oneflag; // one-flag CTF mode enabled/disabled + int stat_items = getstati(STAT_CTF_FLAGSTATUS, 0, 24); + float fs, fs2, fs3, size1, size2; + vector e1, e2; + + redflag = (stat_items/CTF_RED_FLAG_TAKEN) & 3; + blueflag = (stat_items/CTF_BLUE_FLAG_TAKEN) & 3; + yellowflag = (stat_items/CTF_YELLOW_FLAG_TAKEN) & 3; + pinkflag = (stat_items/CTF_PINK_FLAG_TAKEN) & 3; + neutralflag = (stat_items/CTF_NEUTRAL_FLAG_TAKEN) & 3; + + ctf_oneflag = (stat_items & CTF_FLAG_NEUTRAL); - if(redflag || blueflag) - mod_active = 1; - else - mod_active = 0; + mod_active = (redflag || blueflag || yellowflag || pinkflag || neutralflag); - if(autocvar__hud_configure) - { + if (autocvar__hud_configure) { redflag = 1; blueflag = 2; + if (team_count >= 3) + yellowflag = 2; + if (team_count >= 4) + pinkflag = 3; + ctf_oneflag = neutralflag = 0; // disable neutral flag in hud editor? } // when status CHANGES, set old status into prevstatus and current status into status - if (redflag != redflag_prevframe) - { - redflag_statuschange_time = time; - redflag_prevstatus = redflag_prevframe; - redflag_prevframe = redflag; - } - - if (blueflag != blueflag_prevframe) - { - blueflag_statuschange_time = time; - blueflag_prevstatus = blueflag_prevframe; - blueflag_prevframe = blueflag; - } - - redflag_statuschange_elapsedtime = time - redflag_statuschange_time; - blueflag_statuschange_elapsedtime = time - blueflag_statuschange_time; - - float BLINK_FACTOR = 0.15; - float BLINK_BASE = 0.85; + #define X(team) do { \ + if (team##flag != team##flag_prevframe) { \ + team##flag_statuschange_time = time; \ + team##flag_prevstatus = team##flag_prevframe; \ + team##flag_prevframe = team##flag; \ + } \ + team##flag_statuschange_elapsedtime = time - team##flag_statuschange_time; \ + } while (0) + X(red); + X(blue); + X(yellow); + X(pink); + X(neutral); + #undef X + + const float BLINK_FACTOR = 0.15; + const float BLINK_BASE = 0.85; // note: // RMS = sqrt(BLINK_BASE^2 + 0.5 * BLINK_FACTOR^2) // thus // BLINK_BASE = sqrt(RMS^2 - 0.5 * BLINK_FACTOR^2) // ensure RMS == 1 - float BLINK_FREQ = 5; // circle frequency, = 2*pi*frequency in hertz - - string red_icon, red_icon_prevstatus; - float red_alpha, red_alpha_prevstatus; - red_alpha = red_alpha_prevstatus = 1; - switch(redflag) { - case 1: red_icon = "flag_red_taken"; break; - case 2: red_icon = "flag_red_lost"; break; - case 3: red_icon = "flag_red_carrying"; red_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; - default: - if((stat_items & IT_CTF_SHIELDED) && (myteam == NUM_TEAM_2)) - red_icon = "flag_red_shielded"; - else - red_icon = string_null; - break; - } - switch(redflag_prevstatus) { - case 1: red_icon_prevstatus = "flag_red_taken"; break; - case 2: red_icon_prevstatus = "flag_red_lost"; break; - case 3: red_icon_prevstatus = "flag_red_carrying"; red_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; + const float BLINK_FREQ = 5; // circle frequency, = 2*pi*frequency in hertz + + #define X(team, cond) \ + string team##_icon, team##_icon_prevstatus; \ + int team##_alpha, team##_alpha_prevstatus; \ + team##_alpha = team##_alpha_prevstatus = 1; \ + do { \ + switch (team##flag) { \ + case 1: team##_icon = "flag_" #team "_taken"; break; \ + case 2: team##_icon = "flag_" #team "_lost"; break; \ + case 3: team##_icon = "flag_" #team "_carrying"; team##_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; \ + default: \ + if ((stat_items & CTF_SHIELDED) && (cond)) { \ + team##_icon = "flag_" #team "_shielded"; \ + } else { \ + team##_icon = string_null; \ + } \ + break; \ + } \ + switch (team##flag_prevstatus) { \ + case 1: team##_icon_prevstatus = "flag_" #team "_taken"; break; \ + case 2: team##_icon_prevstatus = "flag_" #team "_lost"; break; \ + case 3: team##_icon_prevstatus = "flag_" #team "_carrying"; team##_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; \ + default: \ + if (team##flag == 3) { \ + team##_icon_prevstatus = "flag_" #team "_carrying"; /* make it more visible */\ + } else if((stat_items & CTF_SHIELDED) && (cond)) { \ + team##_icon_prevstatus = "flag_" #team "_shielded"; \ + } else { \ + team##_icon_prevstatus = string_null; \ + } \ + break; \ + } \ + } while (0) + X(red, myteam != NUM_TEAM_1); + X(blue, myteam != NUM_TEAM_2); + X(yellow, myteam != NUM_TEAM_3); + X(pink, myteam != NUM_TEAM_4); + X(neutral, true); + #undef X + + if (ctf_oneflag) { + // hacky, but these aren't needed + red_icon = red_icon_prevstatus = blue_icon = blue_icon_prevstatus = yellow_icon = yellow_icon_prevstatus = pink_icon = pink_icon_prevstatus = string_null; + fs = fs2 = fs3 = 1; + } else switch (team_count) { default: - if(redflag == 3) - red_icon_prevstatus = "flag_red_carrying"; // make it more visible - else if((stat_items & IT_CTF_SHIELDED) && (myteam == NUM_TEAM_2)) - red_icon_prevstatus = "flag_red_shielded"; - else - red_icon_prevstatus = string_null; - break; + case 2: fs = 0.5; fs2 = 0.5; fs3 = 0.5; break; + case 3: fs = 1; fs2 = 0.35; fs3 = 0.35; break; + case 4: fs = 0.75; fs2 = 0.25; fs3 = 0.5; break; } - string blue_icon, blue_icon_prevstatus; - float blue_alpha, blue_alpha_prevstatus; - blue_alpha = blue_alpha_prevstatus = 1; - switch(blueflag) { - case 1: blue_icon = "flag_blue_taken"; break; - case 2: blue_icon = "flag_blue_lost"; break; - case 3: blue_icon = "flag_blue_carrying"; blue_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; - default: - if((stat_items & IT_CTF_SHIELDED) && (myteam == NUM_TEAM_1)) - blue_icon = "flag_blue_shielded"; - else - blue_icon = string_null; - break; - } - switch(blueflag_prevstatus) { - case 1: blue_icon_prevstatus = "flag_blue_taken"; break; - case 2: blue_icon_prevstatus = "flag_blue_lost"; break; - case 3: blue_icon_prevstatus = "flag_blue_carrying"; blue_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; - default: - if(blueflag == 3) - blue_icon_prevstatus = "flag_blue_carrying"; // make it more visible - else if((stat_items & IT_CTF_SHIELDED) && (myteam == NUM_TEAM_1)) - blue_icon_prevstatus = "flag_blue_shielded"; - else - blue_icon_prevstatus = string_null; - break; + if (mySize_x > mySize_y) { + size1 = mySize_x; + size2 = mySize_y; + e1 = eX; + e2 = eY; + } else { + size1 = mySize_y; + size2 = mySize_x; + e1 = eY; + e2 = eX; } - if(mySize.x > mySize.y) { - if (myteam == NUM_TEAM_1) { // always draw own flag on left + switch (myteam) { + default: + case NUM_TEAM_1: { redflag_pos = pos; - blueflag_pos = pos + eX * 0.5 * mySize.x; - } else { - blueflag_pos = pos; - redflag_pos = pos + eX * 0.5 * mySize.x; + blueflag_pos = pos + eX * fs2 * size1; + yellowflag_pos = pos - eX * fs2 * size1; + pinkflag_pos = pos + eX * fs3 * size1; + break; } - flag_size = eX * 0.5 * mySize.x + eY * mySize.y; - } else { - if (myteam == NUM_TEAM_1) { // always draw own flag on left - redflag_pos = pos; - blueflag_pos = pos + eY * 0.5 * mySize.y; - } else { + case NUM_TEAM_2: { + redflag_pos = pos + eX * fs2 * size1; blueflag_pos = pos; - redflag_pos = pos + eY * 0.5 * mySize.y; + yellowflag_pos = pos - eX * fs2 * size1; + pinkflag_pos = pos + eX * fs3 * size1; + break; + } + case NUM_TEAM_3: { + redflag_pos = pos + eX * fs3 * size1; + blueflag_pos = pos - eX * fs2 * size1; + yellowflag_pos = pos; + pinkflag_pos = pos + eX * fs2 * size1; + break; + } + case NUM_TEAM_4: { + redflag_pos = pos - eX * fs2 * size1; + blueflag_pos = pos + eX * fs3 * size1; + yellowflag_pos = pos + eX * fs2 * size1; + pinkflag_pos = pos; + break; } - flag_size = eY * 0.5 * mySize.y + eX * mySize.x; } - - f = bound(0, redflag_statuschange_elapsedtime*2, 1); - if(red_icon_prevstatus && f < 1) - drawpic_aspect_skin_expanding(redflag_pos, red_icon_prevstatus, flag_size, '1 1 1', panel_fg_alpha * red_alpha_prevstatus, DRAWFLAG_NORMAL, f); - if(red_icon) - drawpic_aspect_skin(redflag_pos, red_icon, flag_size, '1 1 1', panel_fg_alpha * red_alpha * f, DRAWFLAG_NORMAL); - - f = bound(0, blueflag_statuschange_elapsedtime*2, 1); - if(blue_icon_prevstatus && f < 1) - drawpic_aspect_skin_expanding(blueflag_pos, blue_icon_prevstatus, flag_size, '1 1 1', panel_fg_alpha * blue_alpha_prevstatus, DRAWFLAG_NORMAL, f); - if(blue_icon) - drawpic_aspect_skin(blueflag_pos, blue_icon, flag_size, '1 1 1', panel_fg_alpha * blue_alpha * f, DRAWFLAG_NORMAL); + neutralflag_pos = pos; + flag_size = e1 * fs * size1 + e2 * size2; + + #define X(team) do { \ + f = bound(0, team##flag_statuschange_elapsedtime * 2, 1); \ + if (team##_icon_prevstatus && f < 1) \ + drawpic_aspect_skin_expanding(team##flag_pos, team##_icon_prevstatus, flag_size, '1 1 1', panel_fg_alpha * team##_alpha_prevstatus, DRAWFLAG_NORMAL, f); \ + if (team##_icon) \ + drawpic_aspect_skin(team##flag_pos, team##_icon, flag_size, '1 1 1', panel_fg_alpha * team##_alpha * f, DRAWFLAG_NORMAL); \ + } while (0) + X(red); + X(blue); + X(yellow); + X(pink); + X(neutral); + #undef X } // Keyhunt HUD modicon section @@ -3782,7 +3821,7 @@ void HUD_InfoMessages(void) if(spectatee_status == -1) s = _("^1Observing"); else - s = sprintf(_("^1Spectating: ^7%s"), GetPlayerName(player_localentnum - 1)); + s = sprintf(_("^1Spectating: ^7%s"), GetPlayerName(current_player)); drawInfoMessage(s); if(spectatee_status == -1) @@ -4637,8 +4676,6 @@ void HUD_Main (void) hud_skin_prev = strzone(autocvar_hud_skin); } - current_player = player_localentnum; - // draw the dock if(autocvar_hud_dock != "" && autocvar_hud_dock != "0") { @@ -4658,11 +4695,11 @@ void HUD_Main (void) { string hud_dock_color = autocvar_hud_dock_color; if(hud_dock_color == "shirt") { - f = stof(getplayerkeyvalue(current_player - 1, "colors")); + f = stof(getplayerkeyvalue(current_player, "colors")); color = colormapPaletteColor(floor(f / 16), 0); } else if(hud_dock_color == "pants") { - f = stof(getplayerkeyvalue(current_player - 1, "colors")); + f = stof(getplayerkeyvalue(current_player, "colors")); color = colormapPaletteColor(f % 16, 1); } else diff --git a/qcsrc/client/hud.qh b/qcsrc/client/hud.qh index 3b61cb453..5bc2ca4a7 100644 --- a/qcsrc/client/hud.qh +++ b/qcsrc/client/hud.qh @@ -227,9 +227,9 @@ HUD_PANELS(HUD_PANEL) panel_bg_color = autocvar_hud_panel_bg_color; \ } else { \ if (panel_bg_color_str == "shirt") { \ - panel_bg_color = colormapPaletteColor(floor(stof(getplayerkeyvalue(current_player - 1, "colors")) / 16), 0);\ + panel_bg_color = colormapPaletteColor(floor(stof(getplayerkeyvalue(current_player, "colors")) / 16), 0); \ } else if (panel_bg_color_str == "pants") { \ - panel_bg_color = colormapPaletteColor(stof(getplayerkeyvalue(current_player - 1, "colors")) % 16, 1);\ + panel_bg_color = colormapPaletteColor(stof(getplayerkeyvalue(current_player, "colors")) % 16, 1); \ } else { \ panel_bg_color = stov(panel_bg_color_str); \ } \ diff --git a/qcsrc/client/hud_config.qc b/qcsrc/client/hud_config.qc index 696b1e705..72233a0ac 100644 --- a/qcsrc/client/hud_config.qc +++ b/qcsrc/client/hud_config.qc @@ -96,6 +96,8 @@ void HUD_Panel_ExportCfg(string cfgname) HUD_Write_PanelCvar_q("_timeout_speed_in"); HUD_Write_PanelCvar_q("_timeout_speed_out"); HUD_Write_PanelCvar_q("_onlyowned"); + HUD_Write_PanelCvar_q("_noncurrent_alpha"); + HUD_Write_PanelCvar_q("_noncurrent_scale"); break; case HUD_PANEL_AMMO: HUD_Write_PanelCvar_q("_onlycurrent"); diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 418e1db08..824483689 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -976,18 +976,39 @@ float HUD_WouldDrawScoreboard() { float average_accuracy; vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) { + WepSet weapons_stat = WepSet_GetFromStat(); + WepSet weapons_inmap = WepSet_GetFromStat_InMap(); int i; - int weapon_cnt = WEP_COUNT - 3; // either vaporizer/vortex are hidden, no port-o-launch, no tuba - float rows; - if(autocvar_scoreboard_accuracy_doublerows) + float weapon_stats; + int disownedcnt = 0; + for(i = WEP_FIRST; i <= WEP_LAST; ++i) + { + self = get_weaponinfo(i); + if(!self.weapon) + continue; + + weapon_stats = weapon_accuracy[i-WEP_FIRST]; + + if(weapon_stats < 0 && !(weapons_stat & WepSet_FromWeapon(i) || weapons_inmap & WepSet_FromWeapon(i))) + ++disownedcnt; + } + + int weapon_cnt = WEP_COUNT - disownedcnt; + + if(weapon_cnt <= 0) + return pos; + + int rows; + if(autocvar_scoreboard_accuracy_doublerows && weapon_cnt >= floor(WEP_COUNT * 0.5)) rows = 2; else rows = 1; + int count_perrow = rint(weapon_cnt / rows); float height = 40; float fontsize = height * 1/3; float weapon_height = height * 2/3; - float weapon_width = sbwidth / weapon_cnt; - float g_instagib = 0; + float weapon_width = sbwidth / weapon_cnt / rows; + bool g_instagib = false; drawstring(pos, sprintf(_("Accuracy stats (average %d%%)"), average_accuracy), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL); pos.y += 1.25 * hud_fontsize.y + autocvar_scoreboard_border_thickness; @@ -1002,7 +1023,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL); // column highlighting - for(i = 0; i < weapon_cnt/rows; ++i) + for(i = 0; i < count_perrow; ++i) { if(!(i % 2)) drawfill(pos + '1 0 0' * weapon_width * rows * i, '0 1 0' * height * rows + '1 0 0' * weapon_width * rows, '0 0 0', scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL); @@ -1015,29 +1036,31 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) } average_accuracy = 0; - float weapons_with_stats; - weapons_with_stats = 0; + int weapons_with_stats = 0; if(rows == 2) pos.x += weapon_width / 2; if(switchweapon == WEP_VAPORIZER) - g_instagib = 1; // TODO: real detection for instagib? + g_instagib = true; // TODO: real detection for instagib? - float weapon_stats; if(autocvar_scoreboard_accuracy_nocolors) rgb = '1 1 1'; else Accuracy_LoadColors(); + float oldposx = pos.x; + vector tmpos = pos; + for(i = WEP_FIRST; i <= WEP_LAST; ++i) { self = get_weaponinfo(i); if (!self.weapon) continue; - if ((i == WEP_VORTEX && g_instagib) || i == WEP_PORTO || (i == WEP_VAPORIZER && !g_instagib) || i == WEP_TUBA) // skip port-o-launch, vortex || vaporizer and tuba - continue; weapon_stats = weapon_accuracy[i-WEP_FIRST]; + if(weapon_stats < 0 && !(weapons_stat & WepSet_FromWeapon(i) || weapons_inmap & WepSet_FromWeapon(i))) + continue; + float weapon_alpha; if(weapon_stats >= 0) weapon_alpha = scoreboard_alpha_fg; @@ -1045,7 +1068,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) weapon_alpha = 0.2 * scoreboard_alpha_fg; // weapon icon - drawpic_aspect_skin(pos, self.model2, '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(tmpos, self.model2, '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL); // the accuracy if(weapon_stats >= 0) { weapons_with_stats += 1; @@ -1060,11 +1083,13 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) if(!autocvar_scoreboard_accuracy_nocolors) rgb = Accuracy_GetColor(weapon_stats); - drawstring(pos + '1 0 0' * padding + '0 1 0' * weapon_height, s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL); + drawstring(tmpos + '1 0 0' * padding + '0 1 0' * weapon_height, s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL); } + tmpos.x += weapon_width * rows; pos.x += weapon_width * rows; - if(rows == 2 && i == 6) { - pos.x -= sbwidth; + if(rows == 2 && i == count_perrow) { + tmpos.x = oldposx; + tmpos.y += height; pos.y += height; } } @@ -1077,7 +1102,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) pos.x -= sbwidth; pos.y += height; - pos.y += 1.25 * hud_fontsize.y; + pos.y += 1.25 * hud_fontsize.y; return pos; } diff --git a/qcsrc/client/tturrets.qc b/qcsrc/client/tturrets.qc index 58c031e4d..c87418ea4 100644 --- a/qcsrc/client/tturrets.qc +++ b/qcsrc/client/tturrets.qc @@ -286,12 +286,12 @@ void turret_draw2d() case HUD_RAPTOR: case HUD_BUMBLEBEE: if(self.turret_type == TID_EWHEEL || self.turret_type == TID_WALKER) - txt = "gfx/vehicles/vth-mover.tga"; + txt = "gfx/vehicles/turret_moving.tga"; else - txt = "gfx/vehicles/vth-stationary.tga"; + txt = "gfx/vehicles/turret_stationary.tga"; - vector pz = drawgetimagesize(txt) * 0.25; - drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.75, DRAWFLAG_NORMAL); + vector pz = drawgetimagesize(txt) * autocvar_cl_vehicles_crosshair_size; + drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.7, DRAWFLAG_NORMAL); break; } } diff --git a/qcsrc/client/vehicles/all.qc b/qcsrc/client/vehicles/all.qc index ba92d7c31..76bea7de0 100644 --- a/qcsrc/client/vehicles/all.qc +++ b/qcsrc/client/vehicles/all.qc @@ -16,108 +16,75 @@ .float cnt; -const string hud_bg = "gfx/vehicles/frame.tga"; -const string hud_sh = "gfx/vehicles/vh-shield.tga"; - -const string hud_hp_bar = "gfx/vehicles/bar_up_left.tga"; -const string hud_hp_ico = "gfx/vehicles/health.tga"; -const string hud_sh_bar = "gfx/vehicles/bar_dwn_left.tga"; -const string hud_sh_ico = "gfx/vehicles/shield.tga"; - -const string hud_ammo1_bar = "gfx/vehicles/bar_up_right.tga"; -const string hud_ammo1_ico = "gfx/vehicles/bullets.tga"; -const string hud_ammo2_bar = "gfx/vehicles/bar_dwn_right.tga"; -const string hud_ammo2_ico = "gfx/vehicles/rocket.tga"; -const string hud_energy = "gfx/vehicles/energy.tga"; - -const int SBRM_FIRST = 1; -const int SBRM_VOLLY = 1; -const int SBRM_GUIDE = 2; +const string vCROSS_BURST = "gfx/vehicles/crosshair_burst.tga"; +const string vCROSS_DROP = "gfx/vehicles/crosshair_drop.tga"; +const string vCROSS_GUIDE = "gfx/vehicles/crosshair_guide.tga"; +const string vCROSS_HEAL = "gfx/vehicles/crosshair_heal.tga"; +const string vCROSS_HINT = "gfx/vehicles/crosshair_hint.tga"; +const string vCROSS_LOCK = "gfx/vehicles/crosshair_lock.tga"; +const string vCROSS_RAIN = "gfx/vehicles/crosshair_rain.tga"; + +const int SBRM_FIRST = 1; +const int SBRM_VOLLY = 1; +const int SBRM_GUIDE = 2; const int SBRM_ARTILLERY = 3; -const int SBRM_LAST = 3; +const int SBRM_LAST = 3; const int RSM_FIRST = 1; -const int RSM_BOMB = 1; +const int RSM_BOMB = 1; const int RSM_FLARE = 2; -const int RSM_LAST = 2; - -entity dropmark; -float autocvar_cl_vehicles_hudscale = 0.5; -float autocvar_cl_vehicles_hudalpha = 0.75; - -const string raptor_ico = "gfx/vehicles/raptor.tga"; -const string raptor_gun = "gfx/vehicles/raptor_guns.tga"; -const string raptor_bomb = "gfx/vehicles/raptor_bombs.tga"; -const string raptor_drop = "gfx/vehicles/axh-dropcross.tga"; -string raptor_xhair; - - +const int RSM_LAST = 2; const int MAX_AXH = 4; entity AuxiliaryXhairs[MAX_AXH]; - entityclass(AuxiliaryXhair); class(AuxiliaryXhair) .string axh_image; class(AuxiliaryXhair) .float axh_fadetime; class(AuxiliaryXhair) .float axh_drawflag; -class(AuxiliaryXhair) .float axh_scale; -const string bumb_ico = "gfx/vehicles/bumb.tga"; -const string bumb_lgun = "gfx/vehicles/bumb_lgun.tga"; -const string bumb_rgun = "gfx/vehicles/bumb_rgun.tga"; - -const string bumb_gun_ico = "gfx/vehicles/bumb_side.tga"; -const string bumb_gun_gun = "gfx/vehicles/bumb_side_gun.tga"; - -const string spider_ico = "gfx/vehicles/sbot.tga"; -const string spider_rkt = "gfx/vehicles/sbot_rpods.tga"; -const string spider_mgun = "gfx/vehicles/sbot_mguns.tga"; -string spider_xhair; // = "gfx/vehicles/axh-special1.tga"; - -const string waki_ico = "gfx/vehicles/waki.tga"; -const string waki_eng = "gfx/vehicles/waki_e.tga"; -const string waki_gun = "gfx/vehicles/waki_guns.tga"; -const string waki_rkt = "gfx/vehicles/waki_rockets.tga"; -const string waki_xhair = "gfx/vehicles/axh-special1.tga"; +entity dropmark; float alarm1time; float alarm2time; int weapon2mode; + void AuxiliaryXhair_Draw2D() { - vector loc, psize; - - psize = self.axh_scale * draw_getimagesize(self.axh_image); - loc = project_3d_to_2d(self.move_origin) - 0.5 * psize; - if (!(loc.z < 0 || loc.x < 0 || loc.y < 0 || loc.x > vid_conwidth || loc.y > vid_conheight)) - { - loc.z = 0; - psize.z = 0; - drawpic(loc, self.axh_image, psize, self.colormod, self.alpha, self.axh_drawflag); - } - - if(time - self.cnt > self.axh_fadetime) - self.draw2d = func_null; + if (scoreboard_showscores) + return; + + vector size = draw_getimagesize(self.axh_image) * autocvar_cl_vehicles_crosshair_size; + vector pos = project_3d_to_2d(self.move_origin) - 0.5 * size; + + if (!(pos.z < 0 || pos.x < 0 || pos.y < 0 || pos.x > vid_conwidth || pos.y > vid_conheight)) + { + pos.z = 0; + size.z = 0; + drawpic(pos, self.axh_image, size, self.colormod, autocvar_crosshair_alpha * self.alpha, self.axh_drawflag); + } + + if(time - self.cnt > self.axh_fadetime) + self.draw2d = func_null; } void Net_AuXair2(bool bIsNew) { - int axh_id = bound(0, ReadByte(), MAX_AXH); - entity axh = AuxiliaryXhairs[axh_id]; - - if(axh == world || wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) - { - axh = spawn(); - axh.draw2d = func_null; - axh.drawmask = MASK_NORMAL; - axh.axh_drawflag = DRAWFLAG_ADDITIVE; - axh.axh_fadetime = 0.1; - axh.axh_image = "gfx/vehicles/axh-ring.tga"; - axh.axh_scale = 1; - axh.alpha = 1; + int axh_id = bound(0, ReadByte(), MAX_AXH); + entity axh = AuxiliaryXhairs[axh_id]; + + if(axh == world || wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) + { + axh = spawn(); + axh.draw2d = func_null; + axh.drawmask = MASK_NORMAL; + axh.axh_drawflag = DRAWFLAG_ADDITIVE; + axh.axh_fadetime = 0.1; + axh.axh_image = vCROSS_HINT; + axh.alpha = 1; + AuxiliaryXhairs[axh_id] = axh; - } + } axh.move_origin_x = ReadCoord(); axh.move_origin_y = ReadCoord(); @@ -125,876 +92,392 @@ void Net_AuXair2(bool bIsNew) axh.colormod_x = ReadByte() / 255; axh.colormod_y = ReadByte() / 255; axh.colormod_z = ReadByte() / 255; - axh.cnt = time; - axh.draw2d = AuxiliaryXhair_Draw2D; + axh.cnt = time; + axh.draw2d = AuxiliaryXhair_Draw2D; } void Net_VehicleSetup() { - int hud_id = ReadByte(); - - // Weapon update? - if(hud_id > HUD_VEHICLE_LAST) - { - weapon2mode = hud_id - HUD_VEHICLE_LAST; - return; - } - - // hud_id == 0 means we exited a vehicle, so stop alarm sound/s - if(hud_id == 0) - { - sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - return; - } - - hud_id = bound(HUD_VEHICLE_FIRST, hud_id, HUD_VEHICLE_LAST); - - // Init auxiliary crosshairs - int i; - for(i = 0; i < MAX_AXH; ++i) - { - entity axh = AuxiliaryXhairs[i]; - if(axh != world && !wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) - remove(axh); - - axh = spawn(); - axh.draw2d = func_null; - axh.drawmask = MASK_NORMAL; - axh.axh_drawflag = DRAWFLAG_NORMAL; - axh.axh_fadetime = 0.1; - axh.axh_image = "gfx/vehicles/axh-ring.tga"; - axh.axh_scale = 1; - axh.alpha = 1; - AuxiliaryXhairs[i] = axh; - } - - switch(hud_id) - { - case HUD_SPIDERBOT: - // Minigun1 - AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-ring.tga"; - AuxiliaryXhairs[0].axh_scale = 0.25; - // Minigun2 - AuxiliaryXhairs[1].axh_image = "gfx/vehicles/axh-ring.tga"; - AuxiliaryXhairs[1].axh_scale = 0.25; - // Rocket - AuxiliaryXhairs[2].axh_image = "gfx/vehicles/axh-special1.tga"; - AuxiliaryXhairs[2].axh_scale = 0.5; - break; - - case HUD_WAKIZASHI: - AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhairs[0].axh_scale = 0.25; - break; - - case HUD_RAPTOR: - AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-special2.tga"; - AuxiliaryXhairs[0].axh_scale = 0.5; - //AuxiliaryXhair[0].alpha = 0.5; - - AuxiliaryXhairs[1].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhairs[1].axh_scale = 0.25; - //AuxiliaryXhair[1].alpha = 0.75; - //AuxiliaryXhair[1].axh_drawflag = DRAWFLAG_NORMAL; - break; - - case HUD_BUMBLEBEE: - // Raygun-locked - AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhairs[0].axh_scale = 0.5; - - // Gunner1 - AuxiliaryXhairs[1].axh_image = "gfx/vehicles/axh-target.tga"; - AuxiliaryXhairs[1].axh_scale = 0.75; - - // Gunner2 - AuxiliaryXhairs[2].axh_image = "gfx/vehicles/axh-target.tga"; - AuxiliaryXhairs[2].axh_scale = 0.75; - break; - case HUD_BUMBLEBEE_GUN: - // Plasma cannons - AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhairs[0].axh_scale = 0.25; - // Raygun - AuxiliaryXhairs[1].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhairs[1].axh_scale = 0.25; - break; - } + int hud_id = ReadByte(); + + // Weapon update? + if(hud_id > HUD_VEHICLE_LAST) + { + weapon2mode = hud_id - HUD_VEHICLE_LAST; + return; + } + + // hud_id == 0 means we exited a vehicle, so stop alarm sound/s + if(hud_id == 0) + { + sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); + sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); + return; + } + + hud_id = bound(HUD_VEHICLE_FIRST, hud_id, HUD_VEHICLE_LAST); + + // Init auxiliary crosshairs + int i; + for(i = 0; i < MAX_AXH; ++i) + { + entity axh = AuxiliaryXhairs[i]; + + if(axh != world && !wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) + remove(axh); + + axh = spawn(); + axh.draw2d = func_null; + axh.drawmask = MASK_NORMAL; + axh.axh_drawflag = DRAWFLAG_NORMAL; + axh.axh_fadetime = 0.1; + axh.axh_image = vCROSS_HINT; + axh.alpha = 1; + AuxiliaryXhairs[i] = axh; + } + + switch(hud_id) + { + case HUD_SPIDERBOT: + AuxiliaryXhairs[0].axh_image = vCROSS_HINT; // Minigun1 + AuxiliaryXhairs[1].axh_image = vCROSS_HINT; // Minigun2 + break; + + case HUD_WAKIZASHI: + AuxiliaryXhairs[0].axh_image = vCROSS_LOCK; // Rocket + break; + + case HUD_RAPTOR: + AuxiliaryXhairs[1].axh_image = vCROSS_LOCK; + break; + + case HUD_BUMBLEBEE: + AuxiliaryXhairs[0].axh_image = vCROSS_LOCK; // Raygun-locked + AuxiliaryXhairs[1].axh_image = vCROSS_BURST; // Gunner1 + AuxiliaryXhairs[2].axh_image = vCROSS_BURST; // Gunner2 + break; + + case HUD_BUMBLEBEE_GUN: + AuxiliaryXhairs[0].axh_image = vCROSS_BURST; // Plasma cannons + AuxiliaryXhairs[1].axh_image = vCROSS_BURST; // Raygun + break; + } } -#define HUD_GETSTATS \ - int vh_health = getstati(STAT_VEHICLESTAT_HEALTH); \ - float shield = getstati(STAT_VEHICLESTAT_SHIELD); \ - noref int energy = getstati(STAT_VEHICLESTAT_ENERGY); \ - noref float ammo1 = getstati(STAT_VEHICLESTAT_AMMO1); \ - noref float reload1 = getstati(STAT_VEHICLESTAT_RELOAD1); \ - noref int ammo2 = getstati(STAT_VEHICLESTAT_AMMO2); \ - noref int reload2 = getstati(STAT_VEHICLESTAT_RELOAD2); -void CSQC_BUMBLE_HUD() +void Vehicles_drawHUD( + string vehicle, + string vehicleWeapon1, + string vehicleWeapon2, + string iconAmmo1, + vector colorAmmo1, + string iconAmmo2, + vector colorAmmo2, + string crosshair) { -/* - drawpic(hudloc, waki_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL); - drawpic(hudloc, waki_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL); - drawpic(hudloc, waki_r, picsize, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL); - drawpic(hudloc, waki_e, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL); -*/ if(autocvar_r_letterbox) - return; - - vector picsize, hudloc = '0 0 0', pic2size, picloc; - - // Fetch health & ammo stats - HUD_GETSTATS - - picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale; - hudloc.y = vid_conheight - picsize.y; - hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5; - - drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL); - - shield *= 0.01; - vh_health *= 0.01; - energy *= 0.01; - reload1 *= 0.01; - - pic2size = draw_getimagesize(bumb_ico) * (autocvar_cl_vehicles_hudscale * 0.8); - picloc = picsize * 0.5 - pic2size * 0.5; - - if(vh_health < 0.25) - drawpic(hudloc + picloc, bumb_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, bumb_ico, pic2size, '1 1 1' * vh_health + '1 0 0' * (1 - vh_health), 1, DRAWFLAG_NORMAL); - - drawpic(hudloc + picloc, bumb_lgun, pic2size, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, bumb_lgun, pic2size, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL); - -// Health bar - picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - vh_health)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale; - picloc = '37 65 0' * autocvar_cl_vehicles_hudscale; - if(vh_health < 0.25) - { - if(alarm1time < time) - { - alarm1time = time + 2; - sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE); - } - - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm1time) - { - sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm1time = 0; - } - } - -// Shield bar - picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 140 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - shield)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picloc = '40 136 0' * autocvar_cl_vehicles_hudscale; - picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale; - if(shield < 0.25) - { - if(alarm2time < time) - { - alarm2time = time + 1; - sound(self, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTEN_NONE); - } - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm2time) - { - sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm2time = 0; - } - } - - ammo1 *= 0.01; - ammo2 *= 0.01; - -// Gunner1 bar - picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale; - picloc = '450 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x, picloc.y, picsize.x * ammo1, vid_conheight); - drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); - -// Right gunner slot occupied? - if(!AuxiliaryXhairs[1].draw2d) + return; + + if(scoreboard_showscores) + return; + + // Initialize + vector hudSize = '0 0 0'; + vector hudPos = '0 0 0'; + vector tmpSize = '0 0 0'; + vector tmpPos = '0 0 0'; + + float hudAlpha = autocvar_hud_panel_fg_alpha; + float barAlpha = autocvar_hud_progressbar_alpha * hudAlpha; + float blinkValue = 0.55 + sin(time * 7) * 0.45; + + float health = getstati(STAT_VEHICLESTAT_HEALTH) * 0.01; + float shield = getstati(STAT_VEHICLESTAT_SHIELD) * 0.01; + float energy = getstati(STAT_VEHICLESTAT_ENERGY) * 0.01; + float ammo1 = getstati(STAT_VEHICLESTAT_AMMO1) * 0.01; + float reload1 = getstati(STAT_VEHICLESTAT_RELOAD1) * 0.01; + float ammo2 = getstati(STAT_VEHICLESTAT_AMMO2) * 0.01; + float reload2 = getstati(STAT_VEHICLESTAT_RELOAD2) * 0.01; + + // HACK to deal with the inconcistent use of the vehicle stats + ammo1 = (ammo1) ? ammo1 : energy; + + // Frame + string frame = strcat(hud_skin_path, "/vehicle_frame"); + if (precache_pic(frame) == "") + frame = "gfx/hud/default/vehicle_frame"; + + hudSize = draw_getimagesize(frame) * autocvar_cl_vehicles_hudscale; + hudPos.x = (vid_conwidth - hudSize.x) / 2; + hudPos.y = vid_conheight - hudSize.y; + + if(teamplay && autocvar_hud_panel_bg_color_team) + drawpic(hudPos, frame, hudSize, myteamcolors * autocvar_hud_panel_bg_color_team, autocvar_hud_panel_bg_alpha, DRAWFLAG_NORMAL); + else + drawpic(hudPos, frame, hudSize, autocvar_hud_panel_bg_color, autocvar_hud_panel_bg_alpha, DRAWFLAG_NORMAL); + + // Model + tmpSize.x = hudSize.x / 3; + tmpSize.y = hudSize.y; + tmpPos.x = hudPos.x + hudSize.x / 3; + tmpPos.y = hudPos.y; + + if(health < 0.25) + drawpic_skin(tmpPos, vehicle, tmpSize, '1 0 0' + '0 1 1' * blinkValue, hudAlpha, DRAWFLAG_NORMAL); + else + drawpic_skin(tmpPos, vehicle, tmpSize, '1 1 1' * health + '1 0 0' * (1 - health), hudAlpha, DRAWFLAG_NORMAL); + + if(vehicleWeapon1) + drawpic_skin(tmpPos, vehicleWeapon1, tmpSize, '1 1 1' * ammo1 + '1 0 0' * (1 - ammo1), hudAlpha, DRAWFLAG_NORMAL); + if(vehicleWeapon2) + drawpic_skin(tmpPos, vehicleWeapon2, tmpSize, '1 1 1' * ammo2 + '1 0 0' * (1 - ammo2), hudAlpha, DRAWFLAG_NORMAL); + + drawpic_skin(tmpPos, "vehicle_shield", tmpSize, '1 1 1' * shield + '1 0 0' * (1 - shield), hudAlpha * shield, DRAWFLAG_NORMAL); + + // Health bar + tmpSize.y = hudSize.y / 2; + tmpPos.x = hudPos.x + hudSize.x * (32/768); + tmpPos.y = hudPos.y; + + drawsetcliparea(tmpPos.x + (tmpSize.x * (1 - health)), tmpPos.y, tmpSize.x, tmpSize.y); + drawpic_skin(tmpPos, "vehicle_bar_northwest", tmpSize, autocvar_hud_progressbar_health_color, barAlpha, DRAWFLAG_NORMAL); + + // Shield bar + tmpPos.y = hudPos.y + hudSize.y / 2; + + drawsetcliparea(tmpPos.x + (tmpSize.x * (1 - shield)), tmpPos.y, tmpSize.x, tmpSize.y); + drawpic_skin(tmpPos, "vehicle_bar_southwest", tmpSize, autocvar_hud_progressbar_armor_color, barAlpha, DRAWFLAG_NORMAL); + + // Ammo1 bar + tmpPos.x = hudPos.x + hudSize.x * (480/768); + tmpPos.y = hudPos.y; + + if(ammo1) + drawsetcliparea(tmpPos.x, tmpPos.y, tmpSize.x * ammo1, tmpSize.y); + else + drawsetcliparea(tmpPos.x, tmpPos.y, tmpSize.x * reload1, tmpSize.y); + + drawpic_skin(tmpPos, "vehicle_bar_northeast", tmpSize, colorAmmo1, barAlpha, DRAWFLAG_NORMAL); + + // Ammo2 bar + tmpPos.y = hudPos.y + hudSize.y / 2; + + if(ammo2) + drawsetcliparea(tmpPos.x, tmpPos.y, tmpSize.x * ammo2, tmpSize.y); + else + drawsetcliparea(tmpPos.x, tmpPos.y, tmpSize.x * reload2, tmpSize.y); + + drawpic_skin(tmpPos, "vehicle_bar_southeast", tmpSize, colorAmmo2, barAlpha, DRAWFLAG_NORMAL); + drawresetcliparea(); + + // Health icon + tmpSize.x = hudSize.x * (80/768); + tmpSize.y = hudSize.y * (80/256); + tmpPos.x = hudPos.x + hudSize.x * (64/768); + tmpPos.y = hudPos.y + hudSize.y * (48/256); + + if(health < 0.25) + { + if(alarm1time < time) + { + alarm1time = time + 2; + sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE); + } + drawpic_skin(tmpPos, "vehicle_icon_health", tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL); + } + else { - shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No right gunner!"), false, '1 0 0' * picsize.y + '0 1 0' * picsize.y)); - drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL); - drawstring(hudloc + picloc + '1 0 0' * shield, _("No right gunner!"), '1 0 0' * picsize.y + '0 1 0' * picsize.y, '1 0 0' + '0 1 1' * sin(time * 10), 1, DRAWFLAG_NORMAL); + if(alarm1time) + { + sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); + alarm1time = 0; + } + drawpic_skin(tmpPos, "vehicle_icon_health", tmpSize, '1 1 1', hudAlpha, DRAWFLAG_NORMAL); } -// .. and icon - picsize = 1.5 * draw_getimagesize(hud_energy) * autocvar_cl_vehicles_hudscale; - picloc = '664 60 0' * autocvar_cl_vehicles_hudscale; - if(ammo1 < 0.2) - drawpic(hudloc + picloc, hud_energy, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, hud_energy, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - -// Gunner2 bar - picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale; - picloc = '450 140 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x, picloc.y, picsize.x * ammo2, vid_conheight); - drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// Left gunner slot occupied? - if(!AuxiliaryXhairs[2].draw2d) + // Shield icon + tmpPos.y = hudPos.y + hudSize.y / 2; + + if(shield < 0.25) + { + if(alarm2time < time) + { + alarm2time = time + 1; + sound(self, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTEN_NONE); + } + drawpic_skin(tmpPos, "vehicle_icon_shield", tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL); + } + else { - shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No left gunner!"), false, '1 0 0' * picsize.y + '0 1 0' * picsize.y)); - drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL); - drawstring(hudloc + picloc + '1 0 0' * shield, _("No left gunner!"), '1 0 0' * picsize.y + '0 1 0' * picsize.y, '1 0 0' + '0 1 1' * sin(time * 10), 1, DRAWFLAG_NORMAL); + if(alarm2time) + { + sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); + alarm2time = 0; + } + drawpic_skin(tmpPos, "vehicle_icon_shield", tmpSize, '1 1 1', hudAlpha, DRAWFLAG_NORMAL); } -// .. and icon - picsize = 1.5 * draw_getimagesize(hud_energy) * autocvar_cl_vehicles_hudscale; - picloc = '664 130 0' * autocvar_cl_vehicles_hudscale; - if(ammo2 < 0.2) - drawpic(hudloc + picloc, hud_energy, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, hud_energy, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); + // Ammo1 icon + tmpPos.x = hudPos.x + hudSize.x * (624/768); + tmpPos.y = hudPos.y + hudSize.y * (48/256); - if (scoreboard_showscores) - HUD_DrawScoreboard(); - else - { - picsize = draw_getimagesize(waki_xhair); - picsize.x *= 0.5; - picsize.y *= 0.5; - drawpic('0.5 0 0' * (vid_conwidth - picsize.x) + '0 0.5 0' * (vid_conheight - picsize.y), waki_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - } + if(iconAmmo1) + { + if(ammo1) + drawpic_skin(tmpPos, iconAmmo1, tmpSize, '1 1 1', hudAlpha, DRAWFLAG_NORMAL); + else + drawpic_skin(tmpPos, iconAmmo1, tmpSize, '1 1 1', hudAlpha * 0.2, DRAWFLAG_NORMAL); + } -} + // Ammo2 icon + tmpPos.y = hudPos.y + hudSize.y / 2; -void CSQC_BUMBLE_GUN_HUD() -{ + if(iconAmmo2) + { + if(ammo2) + drawpic_skin(tmpPos, iconAmmo2, tmpSize, '1 1 1', hudAlpha, DRAWFLAG_NORMAL); + else + drawpic_skin(tmpPos, iconAmmo2, tmpSize, '1 1 1', hudAlpha * 0.2, DRAWFLAG_NORMAL); + } - if(autocvar_r_letterbox) - return; - - vector picsize, hudloc = '0 0 0', pic2size, picloc; - - // Fetch health & ammo stats - HUD_GETSTATS - - picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale; - hudloc.y = vid_conheight - picsize.y; - hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5; - - drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL); - - shield *= 0.01; - vh_health *= 0.01; - energy *= 0.01; - reload1 *= 0.01; - - pic2size = draw_getimagesize(bumb_gun_ico) * (autocvar_cl_vehicles_hudscale * 0.8); - picloc = picsize * 0.5 - pic2size * 0.5; - - if(vh_health < 0.25) - drawpic(hudloc + picloc, bumb_gun_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, bumb_gun_ico, pic2size, '1 1 1' * vh_health + '1 0 0' * (1 - vh_health), 1, DRAWFLAG_NORMAL); - - drawpic(hudloc + picloc, bumb_gun_gun, pic2size, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL); - -// Health bar - picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - vh_health)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale; - picloc = '37 65 0' * autocvar_cl_vehicles_hudscale; - if(vh_health < 0.25) - { - if(alarm1time < time) - { - alarm1time = time + 2; - sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE); - } - - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm1time) - { - sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm1time = 0; - } - } - -// Shield bar - picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 140 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - shield)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picloc = '40 136 0' * autocvar_cl_vehicles_hudscale; - picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale; - if(shield < 0.25) - { - if(alarm2time < time) - { - alarm2time = time + 1; - sound(self, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTEN_NONE); - } - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm2time) - { - sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm2time = 0; - } - } - -// Gun bar - picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale; - picloc = '450 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x, picloc.y, picsize.x * energy, vid_conheight); - drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); - -// .. and icon - picsize = 1.5 * draw_getimagesize(hud_energy) * autocvar_cl_vehicles_hudscale; - picloc = '664 60 0' * autocvar_cl_vehicles_hudscale; - if(energy < 0.2) - drawpic(hudloc + picloc, hud_energy, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, hud_energy, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); + // Bumblebee gunner crosshairs + if(hud == HUD_BUMBLEBEE) + { + tmpSize = '1 1 1' * hud_fontsize; + tmpPos.x = hudPos.x + hudSize.x * (520/768); + + if(!AuxiliaryXhairs[1].draw2d) + { + tmpPos.y = hudPos.y + hudSize.y * (96/256) - tmpSize.y; + drawstring(tmpPos, _("No right gunner!"), tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL); + } + + if(!AuxiliaryXhairs[2].draw2d) + { + tmpPos.y = hudPos.y + hudSize.y * (160/256); + drawstring(tmpPos, _("No left gunner!"), tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL); + } + } - if (scoreboard_showscores) - HUD_DrawScoreboard(); - /* - else - { - picsize = draw_getimagesize(waki_xhair); - picsize_x *= 0.5; - picsize_y *= 0.5; - - - drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), waki_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - } - */ + // Raptor bomb crosshair + if(hud == HUD_RAPTOR && weapon2mode != RSM_FLARE) + { + vector where; + + if(!dropmark) + { + dropmark = spawn(); + dropmark.owner = self; + dropmark.gravity = 1; + } + + if(reload2 == 1) + { + setorigin(dropmark, pmove_org); + dropmark.velocity = pmove_vel; + tracetoss(dropmark, self); + + where = project_3d_to_2d(trace_endpos); + + setorigin(dropmark, trace_endpos); + tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size; + + if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight)) + { + where.x -= tmpSize.x * 0.5; + where.y -= tmpSize.y * 0.5; + where.z = 0; + drawpic(where, vCROSS_DROP, tmpSize, '0 1 0', autocvar_crosshair_alpha * 0.9, DRAWFLAG_ADDITIVE); + drawpic(where, vCROSS_DROP, tmpSize, '0 1 0', autocvar_crosshair_alpha * 0.6, DRAWFLAG_NORMAL); // Ensure visibility against bright bg + } + dropmark.cnt = time + 5; + } + else + { + if(dropmark.cnt > time) + { + where = project_3d_to_2d(dropmark.origin); + tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size * 1.25; + + if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight)) + { + where.x -= tmpSize.x * 0.5; + where.y -= tmpSize.y * 0.5; + where.z = 0; + drawpic(where, vCROSS_DROP, tmpSize, '1 0 0', autocvar_crosshair_alpha * 0.9, DRAWFLAG_ADDITIVE); + drawpic(where, vCROSS_DROP, tmpSize, '1 0 0', autocvar_crosshair_alpha * 0.6, DRAWFLAG_NORMAL); // Ensure visibility against bright bg + } + } + } + } + + // Crosshair + if(crosshair) + { + tmpSize = draw_getimagesize(crosshair) * autocvar_cl_vehicles_crosshair_size; + tmpPos.x = (vid_conwidth - tmpSize.x) / 2; + tmpPos.y = (vid_conheight - tmpSize.y) / 2; + + drawpic(tmpPos, crosshair, tmpSize, '1 1 1', autocvar_crosshair_alpha, DRAWFLAG_NORMAL); + } } +void CSQC_BUMBLE_HUD() +{ + Vehicles_drawHUD("vehicle_bumble", "vehicle_bumble_weapon1", "vehicle_bumble_weapon2", + "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color, + "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color, + vCROSS_HEAL); +} +void CSQC_BUMBLE_GUN_HUD() +{ + Vehicles_drawHUD("vehicle_gunner", "vehicle_gunner_weapon1", string_null, + "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color, + string_null, '0 0 0', + string_null); +} void CSQC_SPIDER_HUD() { - if(autocvar_r_letterbox) - return; - - vector picsize, hudloc = '0 0 0', pic2size, picloc; - int i; - - // Fetch health & ammo stats - HUD_GETSTATS - - picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale; - hudloc.y = vid_conheight - picsize.y; - hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5; - - drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL); - - ammo1 *= 0.01; - shield *= 0.01; - vh_health *= 0.01; - reload2 *= 0.01; - - pic2size = draw_getimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8); - picloc = picsize * 0.5 - pic2size * 0.5; - if(vh_health < 0.25) - drawpic(hudloc + picloc, spider_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, spider_ico, pic2size, '1 1 1' * vh_health + '1 0 0' * (1 - vh_health), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, spider_rkt, pic2size, '1 1 1' * reload2 + '1 0 0' * (1 - reload2), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, spider_mgun, pic2size, '1 1 1' * ammo1 + '1 0 0' * (1 - ammo1), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL); - -// Health bar - picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - vh_health)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale; - picloc = '37 65 0' * autocvar_cl_vehicles_hudscale; - if(vh_health < 0.25) - { - if(alarm1time < time) - { - alarm1time = time + 2; - sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE); - } - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm1time) - { - sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm1time = 0; - } - } -// Shield bar - picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 140 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - shield)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picloc = '40 136 0' * autocvar_cl_vehicles_hudscale; - picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale; - if(shield < 0.25) - { - if(alarm2time < time) - { - alarm2time = time + 1; - sound(self, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTEN_NONE); - } - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm2time) - { - sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm2time = 0; - } - } - -// Minigun bar - picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale; - picloc = '450 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x, picloc.y, picsize.x * ammo1, vid_conheight); - drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picsize = draw_getimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale; - picloc = '664 60 0' * autocvar_cl_vehicles_hudscale; - if(ammo1 < 0.2) - drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - -// Rocket ammo bar - picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale; - ammo1 = picsize.x / 8; - picloc = '450 140 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x, hudloc.y + picloc.y, picsize.x * reload2, vid_conheight); - drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); - -// .. and icons - pic2size = 0.35 * draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale; - picloc.x -= pic2size.x; - picloc.y += pic2size.y * 2.25; - if(ammo2 == 9) - { - for(i = 1; i < 9; ++i) - { - picloc.x += ammo1; - drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, ((8 * reload2 <= i) ? '0 0 0' : '1 1 1'), 0.75, DRAWFLAG_NORMAL); - } - } - else - { - for(i = 1; i < 9; ++i) - { - picloc.x += ammo1; - drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, ((i >= ammo2) ? '1 1 1' : '0 0 0'), 0.75, DRAWFLAG_NORMAL); - } - } - pic2size = draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale; - picloc = '664 130 0' * autocvar_cl_vehicles_hudscale; - if(ammo2 == 9) - drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 1 1', 1, DRAWFLAG_NORMAL); + string crosshair; - if (scoreboard_showscores) - HUD_DrawScoreboard(); - else - { - switch(weapon2mode) - { - case SBRM_VOLLY: - spider_xhair = "gfx/vehicles/axh-bracket.tga"; - break; - case SBRM_GUIDE: - spider_xhair = "gfx/vehicles/axh-cross.tga"; - break; - case SBRM_ARTILLERY: - spider_xhair = "gfx/vehicles/axh-tag.tga"; - break; - default: - spider_xhair= "gfx/vehicles/axh-tag.tga"; - } - - picsize = draw_getimagesize(spider_xhair); - picsize.x *= autocvar_cl_vehicle_spiderbot_cross_size; - picsize.y *= autocvar_cl_vehicle_spiderbot_cross_size; - - drawpic('0.5 0 0' * (vid_conwidth - picsize.x) + '0 0.5 0' * (vid_conheight - picsize.y), spider_xhair, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_ADDITIVE); - } + switch(weapon2mode) + { + case SBRM_VOLLY: crosshair = vCROSS_BURST; break; + case SBRM_GUIDE: crosshair = vCROSS_GUIDE; break; + case SBRM_ARTILLERY: crosshair = vCROSS_RAIN; break; + default: crosshair = vCROSS_BURST; + } + + Vehicles_drawHUD("vehicle_spider", "vehicle_spider_weapon1", "vehicle_spider_weapon2", + "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color, + "vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color, + crosshair); } void CSQC_RAPTOR_HUD() { - if(autocvar_r_letterbox) - return; - - vector picsize, hudloc = '0 0 0', pic2size, picloc; - - // Fetch health & ammo stats - HUD_GETSTATS - - picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale; - hudloc.y = vid_conheight - picsize.y; - hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5; - - drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL); - - ammo1 *= 0.01; - ammo2 *= 0.01; - shield *= 0.01; - vh_health *= 0.01; - energy *= 0.01; - reload1 = reload2 * 0.01; - //reload2 *= 0.01; - - pic2size = draw_getimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8); - picloc = picsize * 0.5 - pic2size * 0.5; - if(vh_health < 0.25) - drawpic(hudloc + picloc, raptor_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, raptor_ico, pic2size, '1 1 1' * vh_health + '1 0 0' * (1 - vh_health), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, raptor_bomb, pic2size, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, raptor_gun, pic2size, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL); - -// Health bar - picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - vh_health)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale; - picloc = '37 65 0' * autocvar_cl_vehicles_hudscale; - if(vh_health < 0.25) - { - if(alarm1time < time) - { - alarm1time = time + 2; - sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE); - } - - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm1time) - { - sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm1time = 0; - } - } - -// Shield bar - picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 140 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - shield)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picloc = '40 136 0' * autocvar_cl_vehicles_hudscale; - picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale; - if(shield < 0.25) - { - if(alarm2time < time) - { - alarm2time = time + 1; - sound(self, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTEN_NONE); - } - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm2time) - { - sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm2time = 0; - } - } - -// Gun bar - picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale; - picloc = '450 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x, picloc.y, picsize.x * energy, vid_conheight); - drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picsize = draw_getimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale; - picloc = '664 60 0' * autocvar_cl_vehicles_hudscale; - if(energy < 0.2) - drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - -// Bomb bar - picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale; - picloc = '450 140 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x, hudloc.y + picloc.y, picsize.x * reload1, vid_conheight); - drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - pic2size = draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale; - picloc = '664 130 0' * autocvar_cl_vehicles_hudscale; - if(reload1 != 1) - drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 1 1', 1, DRAWFLAG_NORMAL); - - if(weapon2mode == RSM_FLARE) - { - raptor_xhair = "gfx/vehicles/axh-bracket.tga"; - } - else - { - raptor_xhair = "gfx/vehicles/axh-ring.tga"; - - // Bombing crosshair - if(!dropmark) - { - dropmark = spawn(); - dropmark.owner = self; - dropmark.gravity = 1; - } - - if(reload2 == 100) - { - vector where; - - setorigin(dropmark, pmove_org); - dropmark.velocity = pmove_vel; - tracetoss(dropmark, self); - - where = project_3d_to_2d(trace_endpos); - - setorigin(dropmark, trace_endpos); - picsize = draw_getimagesize(raptor_drop) * 0.2; - - if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight)) - { - where.x -= picsize.x * 0.5; - where.y -= picsize.y * 0.5; - where.z = 0; - drawpic(where, raptor_drop, picsize, '0 2 0', 1, DRAWFLAG_ADDITIVE); - } - dropmark.cnt = time + 5; - } - else - { - vector where; - if(dropmark.cnt > time) - { - where = project_3d_to_2d(dropmark.origin); - picsize = draw_getimagesize(raptor_drop) * 0.25; - - if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight)) - { - where.x -= picsize.x * 0.5; - where.y -= picsize.y * 0.5; - where.z = 0; - drawpic(where, raptor_drop, picsize, '2 0 0', 1, DRAWFLAG_ADDITIVE); - } - } - } - } + string crosshair; - if (scoreboard_showscores) - HUD_DrawScoreboard(); - else - { - picsize = draw_getimagesize(raptor_xhair); - picsize.x *= 0.5; - picsize.y *= 0.5; - - drawpic('0.5 0 0' * (vid_conwidth - picsize.x) + '0 0.5 0' * (vid_conheight - picsize.y), raptor_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - } + switch(weapon2mode) + { + case RSM_FLARE: crosshair = vCROSS_RAIN; break; + case RSM_BOMB: crosshair = vCROSS_BURST; break; + default: crosshair = vCROSS_BURST; + } + + Vehicles_drawHUD("vehicle_raptor", "vehicle_raptor_weapon1", "vehicle_raptor_weapon2", + "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color, + "vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color, + crosshair); } void CSQC_WAKIZASHI_HUD() { -/* - drawpic(hudloc, waki_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL); - drawpic(hudloc, waki_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL); - drawpic(hudloc, waki_r, picsize, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL); - drawpic(hudloc, waki_e, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL); -*/ - if(autocvar_r_letterbox) - return; - - vector picsize, hudloc = '0 0 0', pic2size, picloc; - - // Fetch health & ammo stats - HUD_GETSTATS - - picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale; - hudloc.y = vid_conheight - picsize.y; - hudloc.x = vid_conwidth * 0.5 - picsize.x * 0.5; - - drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL); - - shield *= 0.01; - vh_health *= 0.01; - energy *= 0.01; - reload1 *= 0.01; - - pic2size = draw_getimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8); - picloc = picsize * 0.5 - pic2size * 0.5; - if(vh_health < 0.25) - drawpic(hudloc + picloc, waki_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, waki_ico, pic2size, '1 1 1' * vh_health + '1 0 0' * (1 - vh_health), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, waki_eng, pic2size, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, waki_gun, pic2size, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, waki_rkt, pic2size, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL); - drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL); - -// Health bar - picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - vh_health)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale; - picloc = '37 65 0' * autocvar_cl_vehicles_hudscale; - if(vh_health < 0.25) - { - if(alarm1time < time) - { - alarm1time = time + 2; - sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE); - } - - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm1time) - { - sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm1time = 0; - } - } - - -// Shield bar - picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale; - picloc = '69 140 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x + (picsize.x * (1 - shield)), 0, vid_conwidth, vid_conheight); - drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picloc = '40 136 0' * autocvar_cl_vehicles_hudscale; - picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale; - if(shield < 0.25) - { - if(alarm2time < time) - { - alarm2time = time + 1; - sound(self, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTEN_NONE); - } - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - } - else - { - drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - if(alarm2time) - { - sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE); - alarm2time = 0; - } - } - -// Gun bar - picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale; - picloc = '450 69 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x, picloc.y, picsize.x * energy, vid_conheight); - drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - picsize = draw_getimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale; - picloc = '664 60 0' * autocvar_cl_vehicles_hudscale; - if(energy < 0.2) - drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - -// Bomb bar - picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale; - picloc = '450 140 0' * autocvar_cl_vehicles_hudscale; - drawsetcliparea(hudloc.x + picloc.x, hudloc.y + picloc.y, picsize.x * reload1, vid_conheight); - drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - drawresetcliparea(); -// .. and icon - pic2size = draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale; - picloc = '664 130 0' * autocvar_cl_vehicles_hudscale; - if(reload1 != 1) - drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL); - else - drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 1 1', 1, DRAWFLAG_NORMAL); - - if (scoreboard_showscores) - HUD_DrawScoreboard(); - else - { - picsize = draw_getimagesize(waki_xhair); - picsize.x *= 0.5; - picsize.y *= 0.5; - - - drawpic('0.5 0 0' * (vid_conwidth - picsize.x) + '0 0.5 0' * (vid_conheight - picsize.y), waki_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); - } + Vehicles_drawHUD("vehicle_racer", "vehicle_racer_weapon1", "vehicle_racer_weapon2", + "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color, + "vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color, + vCROSS_GUIDE); } void Vehicles_Precache() @@ -1005,8 +488,8 @@ void Vehicles_Precache() precache_model("models/vehicles/rocket01.md3"); precache_model("models/vehicles/rocket02.md3"); - precache_sound ("vehicles/alarm.wav"); - precache_sound ("vehicles/alarm_shield.wav"); + precache_sound("vehicles/alarm.wav"); + precache_sound("vehicles/alarm_shield.wav"); } void RaptorCBShellfragDraw() @@ -1022,16 +505,16 @@ void RaptorCBShellfragDraw() self.alpha = bound(0, self.nextthink - time, 1); if(self.alpha < ALPHA_MIN_VISIBLE) - remove(self); + remove(self); } void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang) { - entity sfrag; + entity sfrag; - sfrag = spawn(); - setmodel(sfrag, "models/vehicles/clusterbomb_fragment.md3"); - setorigin(sfrag, _org); + sfrag = spawn(); + setmodel(sfrag, "models/vehicles/clusterbomb_fragment.md3"); + setorigin(sfrag, _org); sfrag.move_movetype = MOVETYPE_BOUNCE; sfrag.gravity = 0.15; @@ -1050,5 +533,5 @@ void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang) sfrag.nextthink = time + 3; sfrag.cnt = time + 2; sfrag.alpha = 1; - sfrag.drawmask = MASK_NORMAL; + sfrag.drawmask = MASK_NORMAL; } diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index ffdde41a9..ade9b35bf 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -124,7 +124,7 @@ vector GetCurrentFov(float fov) zoomsensitivity = autocvar_cl_zoomsensitivity; zoomfactor = autocvar_cl_zoomfactor; - if(zoomfactor < 1 || zoomfactor > 16) + if(zoomfactor < 1 || zoomfactor > 30) zoomfactor = 2.5; zoomspeed = autocvar_cl_zoomspeed; if(zoomspeed >= 0) @@ -155,7 +155,7 @@ vector GetCurrentFov(float fov) } else if(autocvar_cl_spawnzoom && zoomin_effect) { - float spawnzoomfactor = bound(1, autocvar_cl_spawnzoom_factor, 16); + float spawnzoomfactor = bound(1, autocvar_cl_spawnzoom_factor, 30); current_viewzoom += (autocvar_cl_spawnzoom_speed * (spawnzoomfactor - current_viewzoom) * drawframetime); current_viewzoom = bound(1 / spawnzoomfactor, current_viewzoom, 1); @@ -1054,7 +1054,11 @@ void CSQC_UpdateView(float w, float h) CSQCPlayer_SetCamera(); - myteam = GetPlayerColor(player_localentnum - 1); + if(player_localentnum <= maxclients) // is it a client? + current_player = player_localentnum - 1; + else // then player_localentnum is the vehicle I'm driving + current_player = player_localnum; + myteam = GetPlayerColor(current_player); if(myteam != prev_myteam) { diff --git a/qcsrc/client/waypointsprites.qc b/qcsrc/client/waypointsprites.qc index 0b32de7e9..0aede9726 100644 --- a/qcsrc/client/waypointsprites.qc +++ b/qcsrc/client/waypointsprites.qc @@ -220,6 +220,9 @@ string spritelookuptext(string s) case "keycarrier-red": return _("Key carrier"); case "keycarrier-yellow": return _("Key carrier"); case "redbase": return _("Red base"); + case "yellowbase": return _("Yellow base"); + case "neutralbase": return _("White base"); + case "pinkbase": return _("Pink base"); case "waypoint": return _("Waypoint"); case "ons-gen-red": return _("Generator"); case "ons-gen-blue": return _("Generator"); diff --git a/qcsrc/common/nades.qh b/qcsrc/common/nades.qh index 2b2aa857b..fe07101a3 100644 --- a/qcsrc/common/nades.qh +++ b/qcsrc/common/nades.qh @@ -38,15 +38,31 @@ vector Nade_Color(int nadeid) case NADE_TYPE_NORMAL: return '1 1 1'; case NADE_TYPE_NAPALM: return '2 0.5 0'; case NADE_TYPE_ICE: return '0 0.5 2'; - case NADE_TYPE_TRANSLOCATE: return '1 0.0625 1'; - case NADE_TYPE_SPAWN: return '1 0.9 0.06'; - case NADE_TYPE_HEAL: return '1 0 0'; - case NADE_TYPE_MONSTER: return '1 0.5 0'; + case NADE_TYPE_TRANSLOCATE: return '1 0 1'; + case NADE_TYPE_SPAWN: return '1 0.9 0'; + case NADE_TYPE_HEAL: return '1 0 0'; + case NADE_TYPE_MONSTER: return '0.25 0.75 0'; } return '0 0 0'; } +string Nade_Icon(int nadeid) +{ + switch(nadeid) + { + case NADE_TYPE_NORMAL: return "nade_normal"; + case NADE_TYPE_NAPALM: return "nade_napalm"; + case NADE_TYPE_ICE: return "nade_ice"; + case NADE_TYPE_TRANSLOCATE: return "nade_translocate"; + case NADE_TYPE_SPAWN: return "nade_spawn"; + case NADE_TYPE_HEAL: return "nade_heal"; + case NADE_TYPE_MONSTER: return "nade_monster"; + } + + return "nade_normal"; +} + int Nade_IDFromProjectile(float proj) { switch(proj) @@ -59,8 +75,8 @@ int Nade_IDFromProjectile(float proj) case PROJECTILE_NADE_ICE_BURN: return NADE_TYPE_ICE; case PROJECTILE_NADE_TRANSLOCATE: return NADE_TYPE_TRANSLOCATE; case PROJECTILE_NADE_SPAWN: return NADE_TYPE_SPAWN; - case PROJECTILE_NADE_HEAL: - case PROJECTILE_NADE_HEAL_BURN: return NADE_TYPE_HEAL; + case PROJECTILE_NADE_HEAL: + case PROJECTILE_NADE_HEAL_BURN: return NADE_TYPE_HEAL; case PROJECTILE_NADE_MONSTER: case PROJECTILE_NADE_MONSTER_BURN: return NADE_TYPE_MONSTER; } @@ -77,7 +93,7 @@ int Nade_ProjectileFromID(int proj, bool burn) case NADE_TYPE_ICE: return (burn) ? PROJECTILE_NADE_ICE_BURN : PROJECTILE_NADE_ICE; case NADE_TYPE_TRANSLOCATE: return PROJECTILE_NADE_TRANSLOCATE; case NADE_TYPE_SPAWN: return PROJECTILE_NADE_SPAWN; - case NADE_TYPE_HEAL: return (burn) ? PROJECTILE_NADE_HEAL_BURN : PROJECTILE_NADE_HEAL; + case NADE_TYPE_HEAL: return (burn) ? PROJECTILE_NADE_HEAL_BURN : PROJECTILE_NADE_HEAL; case NADE_TYPE_MONSTER: return (burn) ? PROJECTILE_NADE_MONSTER_BURN : PROJECTILE_NADE_MONSTER; } @@ -96,8 +112,8 @@ string Nade_TrailEffect(float proj, float nade_team) case PROJECTILE_NADE_ICE_BURN: return "wakizashi_rocket_thrust"; case PROJECTILE_NADE_TRANSLOCATE: return "TR_CRYLINKPLASMA"; case PROJECTILE_NADE_SPAWN: return "nade_yellow"; - case PROJECTILE_NADE_HEAL: return "nade_red"; - case PROJECTILE_NADE_HEAL_BURN: return "nade_red_burn"; + case PROJECTILE_NADE_HEAL: return "nade_red"; + case PROJECTILE_NADE_HEAL_BURN: return "nade_red_burn"; case PROJECTILE_NADE_MONSTER: return "nade_red"; case PROJECTILE_NADE_MONSTER_BURN: return "nade_red_burn"; } diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 13487ad83..d26f47b79 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -347,25 +347,34 @@ void Send_Notification_WOCOVA( #define MSG_INFO_NOTIFICATIONS \ MSG_INFO_NOTIF(2, INFO_CHAT_NOSPECTATORS, 0, 0, "", "", "", _("^F4NOTE: ^BGSpectator chat is not sent to players during the match"), "") \ + MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 4, 1, 0, "s1", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag"), "") \ + MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 4, 2, 2, "s1 f1p2dec s2 f2p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds"), "") \ + MSG_INFO_NOTIF(1, INFO_CTF_CAPTURE_NEUTRAL, 1, 0, "s1", "s1", "notify_%s_captured", _("^BG%s^BG captured the flag"), "") \ + MULTITEAM_INFO(1, INFO_CTF_CAPTURE_TIME_, 4, 1, 1, "s1 f1p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds"), "") \ + MULTITEAM_INFO(1, INFO_CTF_CAPTURE_UNBROKEN_, 4, 2, 2, "s1 f1p2dec s2 f2p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F2%s^BG seconds, failing to break ^BG%s^BG's previous record of ^F1%s^BG seconds"), "") \ + MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_ABORTRUN_, 4, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was returned to base by its owner"), "") \ + MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_ABORTRUN_NEUTRAL,0, 0, "", "", "", _("^BGThe flag was returned by its owner"), "") \ + MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DAMAGED_, 4, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was destroyed and returned to base"), "") \ + MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_DAMAGED_NEUTRAL, 0, 0, "", "", "", _("^BGThe flag was destroyed and returned to base"), "") \ + MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DROPPED_, 4, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was dropped in the base and returned itself"), "") \ + MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_DROPPED_NEUTRAL, 0, 0, "", "", "", _("^BGThe flag was dropped in the base and returned itself"), "") \ + MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_NEEDKILL_, 4, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag fell somewhere it couldn't be reached and returned to base"), "") \ + MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_NEEDKILL_NEUTRAL,0, 0, "", "", "", _("^BGThe flag fell somewhere it couldn't be reached and returned to base"), "") \ + MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_SPEEDRUN_, 4, 0, 1, "f1p2dec", "", "", _("^BGThe ^TC^TT^BG flag became impatient after ^F1%.2f^BG seconds and returned itself"), "") \ + MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_SPEEDRUN_NEUTRAL,0, 1, "f1p2dec", "", "", _("^BGThe flag became impatient after ^F1%.2f^BG seconds and returned itself"), "") \ + MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_TIMEOUT_, 4, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag has returned to the base"), "") \ + MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_TIMEOUT_NEUTRAL, 0, 0, "", "", "", _("^BGThe flag has returned to the base"), "") \ + MULTITEAM_INFO(1, INFO_CTF_LOST_, 4, 1, 0, "s1", "s1", "notify_%s_lost", _("^BG%s^BG lost the ^TC^TT^BG flag"), "") \ + MSG_INFO_NOTIF(1, INFO_CTF_LOST_NEUTRAL, 1, 0, "s1", "s1", "notify_%s_lost", _("^BG%s^BG lost the flag"), "") \ + MULTITEAM_INFO(1, INFO_CTF_PICKUP_, 4, 1, 0, "s1", "s1", "notify_%s_taken", _("^BG%s^BG got the ^TC^TT^BG flag"), "") \ + MSG_INFO_NOTIF(1, INFO_CTF_PICKUP_NEUTRAL, 1, 0, "s1", "s1", "notify_%s_taken", _("^BG%s^BG got the flag"), "") \ + MULTITEAM_INFO(1, INFO_CTF_RETURN_, 4, 1, 0, "s1", "s1", "notify_%s_returned", _("^BG%s^BG returned the ^TC^TT^BG flag"), "") \ + MULTITEAM_INFO(1, INFO_CTF_RETURN_MONSTER_, 4, 1, 0, "s1", "s1", "notify_%s_returned", _("^BG%s^BG returned the ^TC^TT^BG flag"), "") \ MSG_INFO_NOTIF(2, INFO_COINTOSS, 1, 0, "s1", "", "", _("^F2Throwing coin... Result: %s^F2!"), "") \ MSG_INFO_NOTIF(1, INFO_JETPACK_NOFUEL, 0, 0, "", "", "", _("^BGYou don't have any fuel for the ^F1Jetpack"), "") \ MSG_INFO_NOTIF(2, INFO_SUPERSPEC_MISSING_UID, 0, 0, "", "", "", _("^F2You lack a UID, superspec options will not be saved/restored"), "") \ MSG_INFO_NOTIF(1, INFO_CA_JOIN_LATE, 0, 0, "", "", "", _("^F1Round already started, you will join the game in the next round"), "") \ MSG_INFO_NOTIF(1, INFO_CA_LEAVE, 0, 0, "", "", "", _("^F2You will spectate in the next round"), "") \ - MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 2, 1, 0, "s1", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag"), "") \ - MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 2, 2, 2, "s1 f1p2dec s2 f2p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds"), "") \ - MULTITEAM_INFO(1, INFO_CTF_CAPTURE_TIME_, 2, 1, 1, "s1 f1p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds"), "") \ - MULTITEAM_INFO(1, INFO_CTF_CAPTURE_UNBROKEN_, 2, 2, 2, "s1 f1p2dec s2 f2p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F2%s^BG seconds, failing to break ^BG%s^BG's previous record of ^F1%s^BG seconds"), "") \ - MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_ABORTRUN_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was returned to base by its owner"), "") \ - MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DAMAGED_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was destroyed and returned to base"), "") \ - MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DROPPED_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was dropped in the base and returned itself"), "") \ - MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_NEEDKILL_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag fell somewhere it couldn't be reached and returned to base"), "") \ - MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_SPEEDRUN_, 2, 0, 1, "f1p2dec", "", "", _("^BGThe ^TC^TT^BG flag became impatient after ^F1%.2f^BG seconds and returned itself"), "") \ - MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_TIMEOUT_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag has returned to the base"), "") \ - MULTITEAM_INFO(1, INFO_CTF_LOST_, 2, 1, 0, "s1", "s1", "notify_%s_lost", _("^BG%s^BG lost the ^TC^TT^BG flag"), "") \ - MULTITEAM_INFO(1, INFO_CTF_PICKUP_, 2, 1, 0, "s1", "s1", "notify_%s_taken", _("^BG%s^BG got the ^TC^TT^BG flag"), "") \ - MULTITEAM_INFO(1, INFO_CTF_RETURN_, 2, 1, 0, "s1", "s1", "notify_%s_returned", _("^BG%s^BG returned the ^TC^TT^BG flag"), "") \ - MULTITEAM_INFO(1, INFO_CTF_RETURN_MONSTER_, 2, 1, 0, "s1", "s1", "notify_%s_returned", _("^BG%s^BG returned the ^TC^TT^BG flag"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_BUFF, 3, 3, "spree_inf s1 s2 f3buffname s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was killed by ^BG%s^K1's ^BG%s^K1 buff ^K1%s%s"), _("^BG%s%s^K1 was scored against by ^BG%s^K1's ^BG%s^K1 buff ^K1%s%s")) \ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_CHEAT, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was unfairly eliminated by ^BG%s^K1%s%s"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_DROWN, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_water", _("^BG%s%s^K1 was drowned by ^BG%s^K1%s%s"), "") \ @@ -373,11 +382,11 @@ void Send_Notification_WOCOVA( MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FIRE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was burnt up into a crisp by ^BG%s^K1%s%s"), _("^BG%s%s^K1 felt a little hot from ^BG%s^K1's fire^K1%s%s")) \ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_LAVA, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_lava", _("^BG%s%s^K1 was cooked by ^BG%s^K1%s%s"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_MONSTER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was pushed infront of a monster by ^BG%s^K1%s%s"), "") \ - MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_nade", _("^BG%s%s^K1 was blown up by ^BG%s^K1's Nade%s%s"), "") \ - MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_NAPALM, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_nade_napalm", _("^BG%s%s^K1 was burned to death by ^BG%s^K1's Napalm Nade%s%s"), _("^BG%s%s^K1 got too close to a napalm explosion%s%s")) \ - MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_ICE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_nade_ice", _("^BG%s%s^K1 was blown up by ^BG%s^K1's Ice Nade%s%s"), "") \ - MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_ICE_FREEZE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_nade_ice", _("^BG%s%s^K1 was frozen to death by ^BG%s^K1's Ice Nade%s%s"), "") \ - MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_HEAL, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_nade_heal", _("^BG%s%s^K1 has not been healed by ^BG%s^K1's Healing Nade%s%s"), "") \ + MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "nade_normal", _("^BG%s%s^K1 was blown up by ^BG%s^K1's Nade%s%s"), "") \ + MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_NAPALM, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "nade_napalm", _("^BG%s%s^K1 was burned to death by ^BG%s^K1's Napalm Nade%s%s"), _("^BG%s%s^K1 got too close to a napalm explosion%s%s")) \ + MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_ICE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "nade_ice", _("^BG%s%s^K1 was blown up by ^BG%s^K1's Ice Nade%s%s"), "") \ + MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_ICE_FREEZE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "nade_ice", _("^BG%s%s^K1 was frozen to death by ^BG%s^K1's Ice Nade%s%s"), "") \ + MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_HEAL, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "nade_heal", _("^BG%s%s^K1 has not been healed by ^BG%s^K1's Healing Nade%s%s"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SHOOTING_STAR, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_shootingstar", _("^BG%s%s^K1 was shot into space by ^BG%s^K1%s%s"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SLIME, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_slime", _("^BG%s%s^K1 was slimed by ^BG%s^K1%s%s"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SWAMP, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_slime", _("^BG%s%s^K1 was preserved by ^BG%s^K1%s%s"), "") \ @@ -414,11 +423,11 @@ void Send_Notification_WOCOVA( MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_WYVERN, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was fireballed by a Wyvern%s%s"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_ZOMBIE_JUMP, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 joins the Zombies%s%s"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_ZOMBIE_MELEE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was given kung fu lessons by a Zombie%s%s"), "") \ - MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_nade", _("^BG%s^K1 mastered the art of self-nading%s%s"), "") \ - MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_NAPALM, 2, 1, "s1 s2loc spree_lost", "s1", "notify_nade_napalm", _("^BG%s^K1 was burned to death by their own Napalm Nade%s%s"), _("^BG%s^K1 decided to take a look at the results of their napalm explosion%s%s")) \ - MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_ICE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_nade_ice", _("^BG%s^K1 mastered the art of self-nading%s%s"), "") \ - MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_ICE_FREEZE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_nade_ice", _("^BG%s^K1 was frozen to death by their own Ice Nade%s%s"), _("^BG%s^K1 felt a little chilly%s%s")) \ - MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_HEAL, 2, 1, "s1 s2loc spree_lost", "s1", "notify_nade_heal", _("^BG%s^K1's Healing Nade didn't quite heal them%s%s"), "") \ + MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE, 2, 1, "s1 s2loc spree_lost", "s1", "nade_normal", _("^BG%s^K1 mastered the art of self-nading%s%s"), "") \ + MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_NAPALM, 2, 1, "s1 s2loc spree_lost", "s1", "nade_napalm", _("^BG%s^K1 was burned to death by their own Napalm Nade%s%s"), _("^BG%s^K1 decided to take a look at the results of their napalm explosion%s%s")) \ + MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_ICE, 2, 1, "s1 s2loc spree_lost", "s1", "nade_ice", _("^BG%s^K1 mastered the art of self-nading%s%s"), "") \ + MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_ICE_FREEZE, 2, 1, "s1 s2loc spree_lost", "s1", "nade_ice", _("^BG%s^K1 was frozen to death by their own Ice Nade%s%s"), _("^BG%s^K1 felt a little chilly%s%s")) \ + MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_HEAL, 2, 1, "s1 s2loc spree_lost", "s1", "nade_heal", _("^BG%s^K1's Healing Nade didn't quite heal them%s%s"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NOAMMO, 2, 1, "s1 s2loc spree_lost", "s1", "notify_outofammo", _("^BG%s^K1 died%s%s. What's the point of living without ammo?"), _("^BG%s^K1 ran out of ammo%s%s")) \ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_ROT, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 rotted away%s%s"), "") \ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SHOOTING_STAR, 2, 1, "s1 s2loc spree_lost", "s1", "notify_shootingstar", _("^BG%s^K1 became a shooting star%s%s"), "") \ @@ -596,20 +605,34 @@ void Send_Notification_WOCOVA( MSG_CENTER_NOTIF(1, CENTER_CAMPCHECK, 0, 0, "", CPID_CAMPCHECK, "0 0", _("^F2Don't camp!"), "") \ MSG_CENTER_NOTIF(1, CENTER_COINTOSS, 1, 0, "s1", NO_CPID, "0 0", _("^F2Throwing coin... Result: %s^F2!"), "") \ MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_FREE, 0, 0, "", CPID_CTF_CAPSHIELD, "0 0", _("^BGYou are now free.\n^BGFeel free to ^F2try to capture^BG the flag again\n^BGif you think you will succeed."), "") \ - MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_SHIELDED, 0, 0, "", CPID_CTF_CAPSHIELD, "0 0", _("^BGYou are now ^F1shielded^BG from the flag\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \ - MULTITEAM_CENTER(1, CENTER_CTF_CAPTURE_, 2, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou captured the ^TC^TT^BG flag!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_INACTIVE, 0, 0, "", CPID_CTF_CAPSHIELD, "0 0", _("^BGThis flag is currently inactive"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_SHIELDED, 0, 0, "", CPID_CTF_CAPSHIELD, "0 0", _("^BGYou are now ^F1shielded^BG from the flag(s)\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \ + MULTITEAM_CENTER(1, CENTER_CTF_CAPTURE_, 4, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou captured the ^TC^TT^BG flag!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURE_NEUTRAL, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou captured the flag!"), "") \ MSG_CENTER_NOTIF(1, CENTER_CTF_FLAG_THROW_PUNISH, 0, 1, "f1secs", CPID_CTF_LOWPRIO, "0 0", _("^BGToo many flag throws! Throwing disabled for %s."), "") \ - MULTITEAM_CENTER(1, CENTER_CTF_PASS_OTHER_, 2, 2, 0, "s1 s2", CPID_CTF_PASS, "0 0", _("^BG%s^BG passed the ^TC^TT^BG flag to %s"), "") \ - MULTITEAM_CENTER(1, CENTER_CTF_PASS_RECEIVED_, 2, 1, 0, "s1", CPID_CTF_PASS, "0 0", _("^BGYou received the ^TC^TT^BG flag from %s"), "") \ + MULTITEAM_CENTER(1, CENTER_CTF_PASS_OTHER_, 4, 2, 0, "s1 s2", CPID_CTF_PASS, "0 0", _("^BG%s^BG passed the ^TC^TT^BG flag to %s"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_OTHER_NEUTRAL, 2, 0, "s1 s2", CPID_CTF_PASS, "0 0", _("^BG%s^BG passed the flag to %s"), "") \ + MULTITEAM_CENTER(1, CENTER_CTF_PASS_RECEIVED_, 4, 1, 0, "s1", CPID_CTF_PASS, "0 0", _("^BGYou received the ^TC^TT^BG flag from %s"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_RECEIVED_NEUTRAL, 1, 0, "s1", CPID_CTF_PASS, "0 0", _("^BGYou received the flag from %s"), "") \ MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_REQUESTED, 1, 0, "s1 pass_key", CPID_CTF_PASS, "0 0", _("^BG%s^BG requests you to pass the flag%s"), "") \ MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_REQUESTING, 1, 0, "s1", CPID_CTF_PASS, "0 0", _("^BGRequesting %s^BG to pass you the flag"), "") \ - MULTITEAM_CENTER(1, CENTER_CTF_PASS_SENT_, 2, 1, 0, "s1", CPID_CTF_PASS, "0 0", _("^BGYou passed the ^TC^TT^BG flag to %s"), "") \ - MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_, 2, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou got the ^TC^TT^BG flag!"), "") \ + MULTITEAM_CENTER(1, CENTER_CTF_PASS_SENT_, 4, 1, 0, "s1", CPID_CTF_PASS, "0 0", _("^BGYou passed the ^TC^TT^BG flag to %s"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_SENT_NEUTRAL, 1, 0, "s1", CPID_CTF_PASS, "0 0", _("^BGYou passed the flag to %s"), "") \ + MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_, 4, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou got the ^TC^TT^BG flag!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_NEUTRAL, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou got the flag!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM, 1, 0, "s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYou got your %steam^BG's flag, return it!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_ENEMY, 1, 0, "s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYou got the %senemy^BG's flag, return it!"), "") \ MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY, 1, 0, "s1", CPID_CTF_LOWPRIO, "0 0", _("^BGThe %senemy^BG got your flag! Retrieve it!"), "") \ MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_VERBOSE, 2, 0, "s1 s2 s1", CPID_CTF_LOWPRIO, "0 0", _("^BGThe %senemy (^BG%s%s)^BG got your flag! Retrieve it!"), "") \ - MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM, 1, 0, "s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYour %steam mate^BG got the flag! Protect them!"), "") \ - MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_VERBOSE, 2, 0, "s1 s2 s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the flag! Protect them!"), "") \ - MULTITEAM_CENTER(1, CENTER_CTF_RETURN_, 2, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou returned the ^TC^TT^BG flag!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_NEUTRAL, 1, 0, "s1", CPID_CTF_LOWPRIO, "0 0", _("^BGThe %senemy^BG got the flag! Retrieve it!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_NEUTRAL_VERBOSE, 2, 0, "s1 s2 s1",CPID_CTF_LOWPRIO, "0 0", _("^BGThe %senemy (^BG%s%s)^BG got the flag! Retrieve it!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_TEAM, 1, 0, "s1", CPID_CTF_LOWPRIO, "0 0", _("^BGThe %senemy^BG got their flag! Retrieve it!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_TEAM_VERBOSE,2, 0, "s1 s2 s1", CPID_CTF_LOWPRIO, "0 0", _("^BGThe %senemy (^BG%s%s)^BG got their flag! Retrieve it!"), "") \ + MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_TEAM_, 4, 1, 0, "s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYour %steam mate^BG got the ^TC^TT^BG flag! Protect them!"), "") \ + MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_TEAM_VERBOSE_, 4, 2, 0, "s1 s2 s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the ^TC^TT^BG flag! Protect them!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_NEUTRAL, 1, 0, "s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYour %steam mate^BG got the flag! Protect them!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_VERBOSE_NEUTRAL, 2, 0, "s1 s2 s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the flag! Protect them!"), "") \ + MULTITEAM_CENTER(1, CENTER_CTF_RETURN_, 4, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou returned the ^TC^TT^BG flag!"), "") \ MSG_CENTER_NOTIF(1, CENTER_CTF_STALEMATE_CARRIER, 0, 0, "", CPID_STALEMATE, "0 0", _("^BGStalemate! Enemies can now see you on radar!"), "") \ MSG_CENTER_NOTIF(1, CENTER_CTF_STALEMATE_OTHER, 0, 0, "", CPID_STALEMATE, "0 0", _("^BGStalemate! Flag carriers can now be seen by enemies on radar!"), "") \ MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAG, 1, 1, "spree_cen s1", NO_CPID, "0 0", _("^K3%sYou fragged ^BG%s"), _("^K3%sYou scored against ^BG%s")) \ @@ -922,11 +945,14 @@ void Send_Notification_WOCOVA( MULTITEAM_CHOICE##teams(default,challow,prefix,chtype,optiona,optionb) #define MSG_CHOICE_NOTIFICATIONS \ - MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_BROKEN_, 2, MSG_INFO, INFO_CTF_CAPTURE_, INFO_CTF_CAPTURE_BROKEN_) \ - MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_TIME_, 2, MSG_INFO, INFO_CTF_CAPTURE_, INFO_CTF_CAPTURE_TIME_) \ - MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_UNBROKEN_, 2, MSG_INFO, INFO_CTF_CAPTURE_, INFO_CTF_CAPTURE_UNBROKEN_) \ - MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_TEAM, MSG_CENTER, CENTER_CTF_PICKUP_TEAM, CENTER_CTF_PICKUP_TEAM_VERBOSE) \ + MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_BROKEN_, 4, MSG_INFO, INFO_CTF_CAPTURE_, INFO_CTF_CAPTURE_BROKEN_) \ + MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_TIME_, 4, MSG_INFO, INFO_CTF_CAPTURE_, INFO_CTF_CAPTURE_TIME_) \ + MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_UNBROKEN_, 4, MSG_INFO, INFO_CTF_CAPTURE_, INFO_CTF_CAPTURE_UNBROKEN_) \ + MULTITEAM_CHOICE(1, 2, CHOICE_CTF_PICKUP_TEAM_, 4, MSG_CENTER, CENTER_CTF_PICKUP_TEAM_, CENTER_CTF_PICKUP_TEAM_VERBOSE_) \ + MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_TEAM_NEUTRAL, MSG_CENTER, CENTER_CTF_PICKUP_TEAM_NEUTRAL, CENTER_CTF_PICKUP_TEAM_VERBOSE_NEUTRAL) \ MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY, MSG_CENTER, CENTER_CTF_PICKUP_ENEMY, CENTER_CTF_PICKUP_ENEMY_VERBOSE) \ + MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY_NEUTRAL, MSG_CENTER, CENTER_CTF_PICKUP_ENEMY_NEUTRAL, CENTER_CTF_PICKUP_ENEMY_NEUTRAL_VERBOSE) \ + MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY_TEAM, MSG_CENTER, CENTER_CTF_PICKUP_ENEMY_TEAM, CENTER_CTF_PICKUP_ENEMY_TEAM_VERBOSE) \ MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAG, MSG_CENTER, CENTER_DEATH_MURDER_FRAG, CENTER_DEATH_MURDER_FRAG_VERBOSE) \ MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAGGED, MSG_CENTER, CENTER_DEATH_MURDER_FRAGGED, CENTER_DEATH_MURDER_FRAGGED_VERBOSE) \ MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAG, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAG, CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE) \ @@ -1322,9 +1348,9 @@ float NOTIF_CHOICE_COUNT; // notification limits -- INCREASE AS NECESSARY const float NOTIF_ANNCE_MAX = 100; const float NOTIF_INFO_MAX = 300; -const float NOTIF_CENTER_MAX = 200; +const float NOTIF_CENTER_MAX = 250; const float NOTIF_MULTI_MAX = 200; -const float NOTIF_CHOICE_MAX = 20; +const float NOTIF_CHOICE_MAX = 30; // notification entities entity msg_annce_notifs[NOTIF_ANNCE_MAX]; diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index e6e93a660..8778a77f0 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -109,12 +109,11 @@ const int STAT_OK_AMMO_CHARGE = 85; const int STAT_OK_AMMO_CHARGEPOOL = 86; const int STAT_FROZEN = 87; const int STAT_REVIVE_PROGRESS = 88; -const int STAT_BUFF_TIME = 89; -// 90 empty? -// 91 empty? -// 92 empty? -// 93 empty? -// 94 empty? +const int STAT_BUFF_TIME = 90; +const int STAT_WEAPONSINMAP = 91; +const int STAT_WEAPONSINMAP2 = 92; +const int STAT_WEAPONSINMAP3 = 93; +const int STAT_CTF_FLAGSTATUS = 94; // 95 empty? // 96 empty? // 97 empty? diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 36f08eff9..72c92471a 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -91,6 +91,16 @@ void WepSet_AddStat() #endif #endif } +void WepSet_AddStat_InMap() +{ + addstat(STAT_WEAPONSINMAP, AS_INT, weaponsinmap_x); +#if WEP_MAXCOUNT > 24 + addstat(STAT_WEAPONSINMAP2, AS_INT, weaponsinmap_y); +#if WEP_MAXCOUNT > 48 + addstat(STAT_WEAPONSINMAP3, AS_INT, weaponsinmap_z); +#endif +#endif +} void WriteWepSet(float dst, WepSet w) { #if WEP_MAXCOUNT > 48 @@ -115,6 +125,18 @@ WepSet WepSet_GetFromStat() #endif return w; } +WepSet WepSet_GetFromStat_InMap() +{ + WepSet w = '0 0 0'; + w_x = getstati(STAT_WEAPONSINMAP); +#if WEP_MAXCOUNT > 24 + w_y = getstati(STAT_WEAPONSINMAP2); +#if WEP_MAXCOUNT > 48 + w_z = getstati(STAT_WEAPONSINMAP3); +#endif +#endif + return w; +} WepSet ReadWepSet() { #if WEP_MAXCOUNT > 48 diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 154f8167e..eab3b0a5a 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -55,10 +55,12 @@ typedef vector WepSet; WepSet WepSet_FromWeapon(int a); #ifdef SVQC void WepSet_AddStat(); +void WepSet_AddStat_InMap(); void WriteWepSet(float dest, WepSet w); #endif #ifdef CSQC WepSet WepSet_GetFromStat(); +WepSet WepSet_GetFromStat_InMap(); WepSet ReadWepSet(); #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc index 7f58e6c4a..a78effc6e 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc @@ -6,7 +6,7 @@ CLASS(XonoticHUDWeaponsDialog, XonoticRootDialog) ATTRIB(XonoticHUDWeaponsDialog, title, string, _("Weapons Panel")) ATTRIB(XonoticHUDWeaponsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT) ATTRIB(XonoticHUDWeaponsDialog, intendedWidth, float, 0.4) - ATTRIB(XonoticHUDWeaponsDialog, rows, float, 19) + ATTRIB(XonoticHUDWeaponsDialog, rows, float, 21) ATTRIB(XonoticHUDWeaponsDialog, columns, float, 4) ATTRIB(XonoticHUDWeaponsDialog, name, string, "HUDweapons") ATTRIB(XonoticHUDWeaponsDialog, requiresConnection, float, true) @@ -46,6 +46,14 @@ void XonoticHUDWeaponsDialog_fill(entity me) me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_weapons_onlyowned", _("Show only owned weapons"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent alpha:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_weapons_noncurrent_alpha")); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent scale:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_weapons_noncurrent_scale")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Show weapon ID as:"))); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_view.qc b/qcsrc/menu/xonotic/dialog_settings_game_view.qc index 40a526d56..8fc56f94c 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_view.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_view.qc @@ -79,7 +79,7 @@ void XonoticGameViewSettingsTab_fill(entity me) me.TR(me); //me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom factor:")))); - me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor")); + me.TD(me, 1, 2, e = makeXonoticSlider(2, 30, 0.5, "cl_zoomfactor")); me.TR(me); //me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom speed:")))); diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index fdb014710..3b469b815 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -238,6 +238,7 @@ float autocvar_g_ctf_throw_velocity_forward; float autocvar_g_ctf_throw_velocity_up; float autocvar_g_ctf_drop_velocity_up; float autocvar_g_ctf_drop_velocity_side; +bool autocvar_g_ctf_oneflag_reverse; bool autocvar_g_ctf_portalteleport; bool autocvar_g_ctf_pass; float autocvar_g_ctf_pass_arc; @@ -251,19 +252,18 @@ float autocvar_g_ctf_pass_turnrate; float autocvar_g_ctf_pass_timelimit; float autocvar_g_ctf_pass_velocity; bool autocvar_g_ctf_dynamiclights; -string autocvar_g_ctf_flag_blue_model; -int autocvar_g_ctf_flag_blue_skin; float autocvar_g_ctf_flag_collect_delay; float autocvar_g_ctf_flag_damageforcescale; -int autocvar_g_ctf_flag_dropped_waypoint; -float autocvar_g_ctf_flag_dropped_floatinwater; +bool autocvar_g_ctf_flag_dropped_waypoint; +bool autocvar_g_ctf_flag_dropped_floatinwater; bool autocvar_g_ctf_flag_glowtrails; -float autocvar_g_ctf_flag_health; -string autocvar_g_ctf_flag_red_model; -int autocvar_g_ctf_flag_red_skin; +int autocvar_g_ctf_flag_health; +bool autocvar_g_ctf_flag_return; +float autocvar_g_ctf_flag_return_carried_radius; float autocvar_g_ctf_flag_return_time; bool autocvar_g_ctf_flag_return_when_unreachable; float autocvar_g_ctf_flag_return_damage; +float autocvar_g_ctf_flag_return_damage_delay; float autocvar_g_ctf_flag_return_dropped; float autocvar_g_ctf_flagcarrier_auto_helpme_damage; float autocvar_g_ctf_flagcarrier_auto_helpme_time; @@ -278,7 +278,6 @@ int autocvar_g_ctf_score_capture; int autocvar_g_ctf_score_capture_assist; int autocvar_g_ctf_score_kill; int autocvar_g_ctf_score_penalty_drop; -//int autocvar_g_ctf_score_penalty_suicidedrop; int autocvar_g_ctf_score_penalty_returned; int autocvar_g_ctf_score_pickup_base; int autocvar_g_ctf_score_pickup_dropped_early; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 33491ff0e..8ca2f6c35 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2226,6 +2226,8 @@ void PlayerPreThink (void) self.stat_allow_oldvortexbeam = autocvar_g_allow_oldvortexbeam; self.stat_leadlimit = autocvar_leadlimit; + self.weaponsinmap = weaponsInMap; + if(frametime) { // physics frames: update anticheat stuff diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 9637cc67c..1fbc8d09a 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -255,6 +255,8 @@ void FixClientCvars(entity e); // WEAPONTODO: remove this WepSet weaponsInMap; +.WepSet weaponsinmap; + .float respawn_countdown; // next number to count float bot_waypoints_for_items; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 9c2003cc1..c913e86e7 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -785,6 +785,7 @@ void spawnfunc_worldspawn (void) WeaponStats_Init(); WepSet_AddStat(); + WepSet_AddStat_InMap(); addstat(STAT_SWITCHWEAPON, AS_INT, switchweapon); addstat(STAT_SWITCHINGWEAPON, AS_INT, switchingweapon); addstat(STAT_GAMESTARTTIME, AS_FLOAT, stat_game_starttime); diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index c2189155c..d17dc86a1 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -24,7 +24,8 @@ void ctf_FakeTimeLimit(entity e, float t) void ctf_EventLog(string mode, int flagteam, entity actor) // use an alias for easy changing and quick editing later { if(autocvar_sv_eventlog) - GameLogEcho(strcat(":ctf:", mode, ":", ftos(flagteam), ((actor != world) ? (strcat(":", ftos(actor.playerid))) : ""))); + GameLogEcho(sprintf(":ctf:%s:%d:%d:%s", mode, flagteam, actor.team, ((actor != world) ? ftos(actor.playerid) : ""))); + //GameLogEcho(strcat(":ctf:", mode, ":", ftos(flagteam), ((actor != world) ? (strcat(":", ftos(actor.playerid))) : ""))); } void ctf_CaptureRecord(entity flag, entity player) @@ -34,11 +35,13 @@ void ctf_CaptureRecord(entity flag, entity player) string refername = db_get(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname")); // notify about shit - if(!ctf_captimerecord) { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_2(flag, CHOICE_CTF_CAPTURE_TIME_), player.netname, (cap_time * 100)); } - else if(cap_time < cap_record) { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_2(flag, CHOICE_CTF_CAPTURE_BROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); } - else { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_2(flag, CHOICE_CTF_CAPTURE_UNBROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); } + if(ctf_oneflag) { Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_CTF_CAPTURE_NEUTRAL, player.netname); } + else if(!ctf_captimerecord) { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_4(flag, CHOICE_CTF_CAPTURE_TIME_), player.netname, (cap_time * 100)); } + else if(cap_time < cap_record) { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_4(flag, CHOICE_CTF_CAPTURE_BROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); } + else { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_4(flag, CHOICE_CTF_CAPTURE_UNBROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); } // write that shit in the database + if(!ctf_oneflag) // but not in 1-flag mode if((!ctf_captimerecord) || (cap_time < cap_record)) { ctf_captimerecord = cap_time; @@ -123,15 +126,21 @@ bool ctf_CheckPassDirection(vector head_center, vector passer_center, vector pas bool ctf_CaptureShield_CheckStatus(entity p) { - float s, se; + int s, s2, s3, s4, se, se2, se3, se4, sr, ser; entity e; - float players_worseeq, players_total; + int players_worseeq, players_total; if(ctf_captureshield_max_ratio <= 0) return false; - s = PlayerScore_Add(p, SP_SCORE, 0); - if(s >= -ctf_captureshield_min_negscore) + s = PlayerScore_Add(p, SP_CTF_CAPS, 0); + s2 = PlayerScore_Add(p, SP_CTF_PICKUPS, 0); + s3 = PlayerScore_Add(p, SP_CTF_RETURNS, 0); + s4 = PlayerScore_Add(p, SP_CTF_FCKILLS, 0); + + sr = ((s - s2) + (s3 + s4)); + + if(sr >= -ctf_captureshield_min_negscore) return false; players_total = players_worseeq = 0; @@ -139,8 +148,14 @@ bool ctf_CaptureShield_CheckStatus(entity p) { if(DIFF_TEAM(e, p)) continue; - se = PlayerScore_Add(e, SP_SCORE, 0); - if(se <= s) + se = PlayerScore_Add(e, SP_CTF_CAPS, 0); + se2 = PlayerScore_Add(e, SP_CTF_PICKUPS, 0); + se3 = PlayerScore_Add(e, SP_CTF_RETURNS, 0); + se4 = PlayerScore_Add(e, SP_CTF_FCKILLS, 0); + + ser = ((se - se2) + (se3 + se4)); + + if(ser <= sr) ++players_worseeq; ++players_total; } @@ -154,9 +169,9 @@ bool ctf_CaptureShield_CheckStatus(entity p) return true; } -void ctf_CaptureShield_Update(entity player, float wanted_status) +void ctf_CaptureShield_Update(entity player, bool wanted_status) { - float updated_status = ctf_CaptureShield_CheckStatus(player); + bool updated_status = ctf_CaptureShield_CheckStatus(player); if((wanted_status == player.ctf_captureshielded) && (updated_status != wanted_status)) // 0: shield only, 1: unshield only { Send_Notification(NOTIF_ONE, player, MSG_CENTER, ((updated_status) ? CENTER_CTF_CAPTURESHIELD_SHIELDED : CENTER_CTF_CAPTURESHIELD_FREE)); @@ -164,10 +179,10 @@ void ctf_CaptureShield_Update(entity player, float wanted_status) } } -float ctf_CaptureShield_Customize() +bool ctf_CaptureShield_Customize() { if(!other.ctf_captureshielded) { return false; } - if(SAME_TEAM(self, other)) { return false; } + if(CTF_SAMETEAM(self, other)) { return false; } return true; } @@ -175,7 +190,7 @@ float ctf_CaptureShield_Customize() void ctf_CaptureShield_Touch() { if(!other.ctf_captureshielded) { return; } - if(SAME_TEAM(self, other)) { return; } + if(CTF_SAMETEAM(self, other)) { return; } vector mymid = (self.absmin + self.absmax) * 0.5; vector othermid = (other.absmin + other.absmax) * 0.5; @@ -209,7 +224,7 @@ void ctf_CaptureShield_Spawn(entity flag) // Drop/Pass/Throw Code // ==================== -void ctf_Handle_Drop(entity flag, entity player, float droptype) +void ctf_Handle_Drop(entity flag, entity player, int droptype) { // declarations player = (player ? player : flag.pass_sender); @@ -224,7 +239,7 @@ void ctf_Handle_Drop(entity flag, entity player, float droptype) flag.ctf_status = FLAG_DROPPED; // messages and sounds - Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_LOST_), player.netname); + Send_Notification(NOTIF_ALL, world, MSG_INFO, ((flag.team) ? APP_TEAM_ENT_4(flag, INFO_CTF_LOST_) : INFO_CTF_LOST_NEUTRAL), player.netname); sound(flag, CH_TRIGGER, flag.snd_flag_dropped, VOL_BASE, ATTEN_NONE); ctf_EventLog("dropped", player.team, player); @@ -286,11 +301,11 @@ void ctf_Handle_Retrieve(entity flag, entity player) FOR_EACH_REALPLAYER(tmp_player) { if(tmp_player == sender) - Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_SENT_), player.netname); + Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, ((flag.team) ? APP_TEAM_ENT_4(flag, CENTER_CTF_PASS_SENT_) : CENTER_CTF_PASS_SENT_NEUTRAL), player.netname); else if(tmp_player == player) - Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_RECEIVED_), sender.netname); + Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, ((flag.team) ? APP_TEAM_ENT_4(flag, CENTER_CTF_PASS_RECEIVED_) : CENTER_CTF_PASS_RECEIVED_NEUTRAL), sender.netname); else if(SAME_TEAM(tmp_player, sender)) - Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_OTHER_), sender.netname, player.netname); + Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, ((flag.team) ? APP_TEAM_ENT_4(flag, CENTER_CTF_PASS_OTHER_) : CENTER_CTF_PASS_OTHER_NEUTRAL), sender.netname, player.netname); } // create new waypoint @@ -304,7 +319,7 @@ void ctf_Handle_Retrieve(entity flag, entity player) flag.pass_target = world; } -void ctf_Handle_Throw(entity player, entity receiver, float droptype) +void ctf_Handle_Throw(entity player, entity receiver, int droptype) { entity flag = player.flagcarried; vector targ_origin, flag_velocity; @@ -394,20 +409,33 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype) // Event Handlers // ============== -void ctf_Handle_Capture(entity flag, entity toucher, float capturetype) +void ctf_Handle_Capture(entity flag, entity toucher, int capturetype) { entity enemy_flag = ((capturetype == CAPTURE_NORMAL) ? toucher.flagcarried : toucher); entity player = ((capturetype == CAPTURE_NORMAL) ? toucher : enemy_flag.ctf_dropper); + entity player_team_flag = world, tmp_entity; float old_time, new_time; - if (!player) { return; } // without someone to give the reward to, we can't possibly cap + if(!player) { return; } // without someone to give the reward to, we can't possibly cap + if(CTF_DIFFTEAM(player, flag)) { return; } + + if(ctf_oneflag) + for(tmp_entity = ctf_worldflaglist; tmp_entity; tmp_entity = tmp_entity.ctf_worldflagnext) + if(SAME_TEAM(tmp_entity, player)) + { + player_team_flag = tmp_entity; + break; + } nades_GiveBonus(player, autocvar_g_nades_bonus_score_high ); + player.throw_prevtime = time; + player.throw_count = 0; + // messages and sounds - Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(enemy_flag, CENTER_CTF_CAPTURE_)); + Send_Notification(NOTIF_ONE, player, MSG_CENTER, ((enemy_flag.team) ? APP_TEAM_ENT_4(enemy_flag, CENTER_CTF_CAPTURE_) : CENTER_CTF_CAPTURE_NEUTRAL)); ctf_CaptureRecord(enemy_flag, player); - sound(player, CH_TRIGGER, flag.snd_flag_capture, VOL_BASE, ATTEN_NONE); + sound(player, CH_TRIGGER, ((ctf_oneflag) ? player_team_flag.snd_flag_capture : ((DIFF_TEAM(player, flag)) ? enemy_flag.snd_flag_capture : flag.snd_flag_capture)), VOL_BASE, ATTEN_NONE); switch(capturetype) { @@ -449,12 +477,12 @@ void ctf_Handle_Return(entity flag, entity player) // messages and sounds if(player.flags & FL_MONSTER) { - Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_RETURN_MONSTER_), player.monster_name); + Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_4(flag, INFO_CTF_RETURN_MONSTER_), player.monster_name); } - else + else if(flag.team) { - Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_RETURN_)); - Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_RETURN_), player.netname); + Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_4(flag, CENTER_CTF_RETURN_)); + Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_4(flag, INFO_CTF_RETURN_), player.netname); } sound(player, CH_TRIGGER, flag.snd_flag_returned, VOL_BASE, ATTEN_NONE); ctf_EventLog("return", flag.team, player); @@ -477,14 +505,19 @@ void ctf_Handle_Return(entity flag, entity player) flag.ctf_dropper.next_take_time = time + autocvar_g_ctf_flag_collect_delay; // set next take time } + // other + if(player.flagcarried == flag) + WaypointSprite_Kill(player.wps_flagcarrier); + // reset the flag ctf_RespawnFlag(flag); } -void ctf_Handle_Pickup(entity flag, entity player, float pickuptype) +void ctf_Handle_Pickup(entity flag, entity player, int pickuptype) { // declarations float pickup_dropped_score; // used to calculate dropped pickup score + entity tmp_entity; // temporary entity // attach the flag to the player flag.owner = player; @@ -516,12 +549,28 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype) } // messages and sounds - Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_PICKUP_), player.netname); - Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_)); + Send_Notification(NOTIF_ALL, world, MSG_INFO, ((flag.team) ? APP_TEAM_ENT_4(flag, INFO_CTF_PICKUP_) : INFO_CTF_PICKUP_NEUTRAL), player.netname); if(ctf_stalemate) { Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER); } - - Send_Notification(NOTIF_TEAM_EXCEPT, player, MSG_CHOICE, CHOICE_CTF_PICKUP_TEAM, Team_ColorCode(player.team), player.netname); - Send_Notification(NOTIF_TEAM, flag, MSG_CHOICE, CHOICE_CTF_PICKUP_ENEMY, Team_ColorCode(player.team), player.netname); + if(!flag.team) { Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PICKUP_NEUTRAL); } + else if(CTF_DIFFTEAM(player, flag)) { Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_4(flag, CENTER_CTF_PICKUP_)); } + else { Send_Notification(NOTIF_ONE, player, MSG_CENTER, ((SAME_TEAM(player, flag)) ? CENTER_CTF_PICKUP_TEAM : CENTER_CTF_PICKUP_TEAM_ENEMY), Team_ColorCode(flag.team)); } + + Send_Notification(NOTIF_TEAM_EXCEPT, player, MSG_CHOICE, ((flag.team) ? APP_TEAM_ENT_4(flag, CHOICE_CTF_PICKUP_TEAM_) : CHOICE_CTF_PICKUP_TEAM_NEUTRAL), Team_ColorCode(player.team), player.netname); + + if(!flag.team) + FOR_EACH_PLAYER(tmp_entity) + if(tmp_entity != player) + if(DIFF_TEAM(player, tmp_entity)) + Send_Notification(NOTIF_ONE, tmp_entity, MSG_CHOICE, CHOICE_CTF_PICKUP_ENEMY_NEUTRAL, Team_ColorCode(player.team), player.netname); + + if(flag.team) + FOR_EACH_PLAYER(tmp_entity) + if(tmp_entity != player) + if(CTF_SAMETEAM(flag, tmp_entity)) + if(SAME_TEAM(player, tmp_entity)) + Send_Notification(NOTIF_ONE, tmp_entity, MSG_CHOICE, APP_TEAM_ENT_4(flag, CHOICE_CTF_PICKUP_TEAM_), Team_ColorCode(player.team), player.netname); + else + Send_Notification(NOTIF_ONE, tmp_entity, MSG_CHOICE, ((SAME_TEAM(flag, player)) ? CHOICE_CTF_PICKUP_ENEMY_TEAM : CHOICE_CTF_PICKUP_ENEMY), Team_ColorCode(player.team), player.netname); sound(player, CH_TRIGGER, flag.snd_flag_taken, VOL_BASE, ATTEN_NONE); @@ -572,7 +621,7 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype) // Main Flag Functions // =================== -void ctf_CheckFlagReturn(entity flag, float returntype) +void ctf_CheckFlagReturn(entity flag, int returntype) { if((flag.ctf_status == FLAG_DROPPED) || (flag.ctf_status == FLAG_PASSING)) { @@ -582,14 +631,14 @@ void ctf_CheckFlagReturn(entity flag, float returntype) { switch(returntype) { - case RETURN_DROPPED: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DROPPED_)); break; - case RETURN_DAMAGE: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DAMAGED_)); break; - case RETURN_SPEEDRUN: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_SPEEDRUN_), ctf_captimerecord); break; - case RETURN_NEEDKILL: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_NEEDKILL_)); break; + case RETURN_DROPPED: Send_Notification(NOTIF_ALL, world, MSG_INFO, ((flag.team) ? APP_TEAM_ENT_4(flag, INFO_CTF_FLAGRETURN_DROPPED_) : INFO_CTF_FLAGRETURN_DROPPED_NEUTRAL)); break; + case RETURN_DAMAGE: Send_Notification(NOTIF_ALL, world, MSG_INFO, ((flag.team) ? APP_TEAM_ENT_4(flag, INFO_CTF_FLAGRETURN_DAMAGED_) : INFO_CTF_FLAGRETURN_DAMAGED_NEUTRAL)); break; + case RETURN_SPEEDRUN: Send_Notification(NOTIF_ALL, world, MSG_INFO, ((flag.team) ? APP_TEAM_ENT_4(flag, INFO_CTF_FLAGRETURN_SPEEDRUN_) : INFO_CTF_FLAGRETURN_SPEEDRUN_NEUTRAL), ctf_captimerecord); break; + case RETURN_NEEDKILL: Send_Notification(NOTIF_ALL, world, MSG_INFO, ((flag.team) ? APP_TEAM_ENT_4(flag, INFO_CTF_FLAGRETURN_NEEDKILL_) : INFO_CTF_FLAGRETURN_NEEDKILL_NEUTRAL)); break; default: case RETURN_TIMEOUT: - { Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_TIMEOUT_)); break; } + { Send_Notification(NOTIF_ALL, world, MSG_INFO, ((flag.team) ? APP_TEAM_ENT_4(flag, INFO_CTF_FLAGRETURN_TIMEOUT_) : INFO_CTF_FLAGRETURN_TIMEOUT_NEUTRAL)); break; } } sound(flag, CH_TRIGGER, flag.snd_flag_respawn, VOL_BASE, ATTEN_NONE); ctf_EventLog("returned", flag.team, world); @@ -598,10 +647,25 @@ void ctf_CheckFlagReturn(entity flag, float returntype) } } +bool ctf_Stalemate_Customize() +{ + // make spectators see what the player would see + entity e, wp_owner; + e = WaypointSprite_getviewentity(other); + wp_owner = self.owner; + + // team waypoints + if(CTF_SAMETEAM(wp_owner.flagcarried, wp_owner)) { return false; } + if(SAME_TEAM(wp_owner, e)) { return false; } + if(!IS_PLAYER(e)) { return false; } + + return true; +} + void ctf_CheckStalemate(void) { // declarations - float stale_red_flags = 0, stale_blue_flags = 0; + int stale_flags = 0, stale_red_flags = 0, stale_blue_flags = 0, stale_yellow_flags = 0, stale_pink_flags = 0, stale_neutral_flags = 0; entity tmp_entity; entity ctf_staleflaglist = world; // reset the list, we need to build the list each time this function runs @@ -611,7 +675,7 @@ void ctf_CheckStalemate(void) { if(autocvar_g_ctf_stalemate) if(tmp_entity.ctf_status != FLAG_BASE) - if(time >= tmp_entity.ctf_pickuptime + autocvar_g_ctf_stalemate_time) + if(time >= tmp_entity.ctf_pickuptime + autocvar_g_ctf_stalemate_time || !tmp_entity.team) // instant stalemate in oneflag { tmp_entity.ctf_staleflagnext = ctf_staleflaglist; // link flag into staleflaglist ctf_staleflaglist = tmp_entity; @@ -620,15 +684,25 @@ void ctf_CheckStalemate(void) { case NUM_TEAM_1: ++stale_red_flags; break; case NUM_TEAM_2: ++stale_blue_flags; break; + case NUM_TEAM_3: ++stale_yellow_flags; break; + case NUM_TEAM_4: ++stale_pink_flags; break; + default: ++stale_neutral_flags; break; } } } - if(stale_red_flags && stale_blue_flags) + if(ctf_oneflag) + stale_flags = (stale_neutral_flags >= 1); + else + stale_flags = (stale_red_flags >= 1) + (stale_blue_flags >= 1) + (stale_yellow_flags >= 1) + (stale_pink_flags >= 1); + + if(ctf_oneflag && stale_flags == 1) ctf_stalemate = true; - else if((!stale_red_flags && !stale_blue_flags) && autocvar_g_ctf_stalemate_endcondition == 2) + else if(stale_flags >= 2) + ctf_stalemate = true; + else if(stale_flags == 0 && autocvar_g_ctf_stalemate_endcondition == 2) { ctf_stalemate = false; wpforenemy_announced = false; } - else if((!stale_red_flags || !stale_blue_flags) && autocvar_g_ctf_stalemate_endcondition == 1) + else if(stale_flags < 2 && autocvar_g_ctf_stalemate_endcondition == 1) { ctf_stalemate = false; wpforenemy_announced = false; } // if sufficient stalemate, then set up the waypointsprite and announce the stalemate if necessary @@ -637,7 +711,10 @@ void ctf_CheckStalemate(void) for(tmp_entity = ctf_staleflaglist; tmp_entity; tmp_entity = tmp_entity.ctf_staleflagnext) { if((tmp_entity.owner) && (!tmp_entity.owner.wps_enemyflagcarrier)) - WaypointSprite_Spawn("enemyflagcarrier", 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, world, tmp_entity.team, tmp_entity.owner, wps_enemyflagcarrier, true, RADARICON_FLAG, WPCOLOR_ENEMYFC(tmp_entity.owner.team)); + { + WaypointSprite_Spawn(((ctf_oneflag) ? "flagcarrier" : "enemyflagcarrier"), 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, world, 0, tmp_entity.owner, wps_enemyflagcarrier, true, RADARICON_FLAG, WPCOLOR_ENEMYFC(tmp_entity.owner.team)); + tmp_entity.owner.wps_enemyflagcarrier.customizeentityforclient = ctf_Stalemate_Customize; + } } if (!wpforenemy_announced) @@ -654,9 +731,15 @@ void ctf_FlagDamage(entity inflictor, entity attacker, float damage, int deathty { if(ITEM_DAMAGE_NEEDKILL(deathtype)) { - // automatically kill the flag and return it - self.health = 0; - ctf_CheckFlagReturn(self, RETURN_NEEDKILL); + if(autocvar_g_ctf_flag_return_damage_delay) + { + self.ctf_flagdamaged = true; + } + else + { + self.health = 0; + ctf_CheckFlagReturn(self, RETURN_NEEDKILL); + } return; } if(autocvar_g_ctf_flag_return_damage) @@ -739,7 +822,13 @@ void ctf_FlagThink() return; } } - if(autocvar_g_ctf_flag_return_time) + if(self.ctf_flagdamaged) + { + self.health -= ((self.max_flag_health / autocvar_g_ctf_flag_return_damage_delay) * FLAG_THINKRATE); + ctf_CheckFlagReturn(self, RETURN_NEEDKILL); + return; + } + else if(autocvar_g_ctf_flag_return_time) { self.health -= ((self.max_flag_health / autocvar_g_ctf_flag_return_time) * FLAG_THINKRATE); ctf_CheckFlagReturn(self, RETURN_TIMEOUT); @@ -769,6 +858,13 @@ void ctf_FlagThink() wpforenemy_nextthink = time + WPFE_THINKRATE; // waypoint for enemy think rate (to reduce unnecessary spam of this check) } } + if(CTF_SAMETEAM(self, self.owner) && self.team) + { + if(autocvar_g_ctf_flag_return) // drop the flag if reverse status has changed + ctf_Handle_Throw(self.owner, world, DROP_THROW); + else if(vlen(self.owner.origin - self.ctf_spawnorigin) <= autocvar_g_ctf_flag_return_carried_radius) + ctf_Handle_Return(self, self.owner); + } return; } @@ -809,17 +905,22 @@ void ctf_FlagTouch() if(gameover) { return; } if(trace_dphitcontents & (DPCONTENTS_PLAYERCLIP | DPCONTENTS_MONSTERCLIP)) { return; } - entity toucher = other; - float is_not_monster = (!(toucher.flags & FL_MONSTER)); + entity toucher = other, tmp_entity; + bool is_not_monster = (!(toucher.flags & FL_MONSTER)), num_perteam = 0; // automatically kill the flag and return it if it touched lava/slime/nodrop surfaces if(ITEM_TOUCH_NEEDKILL()) { - self.health = 0; - ctf_CheckFlagReturn(self, RETURN_NEEDKILL); - return; + if(!autocvar_g_ctf_flag_return_damage_delay) + { + self.health = 0; + ctf_CheckFlagReturn(self, RETURN_NEEDKILL); + } + if(!self.ctf_flagdamaged) { return; } } + FOR_EACH_PLAYER(tmp_entity) if(SAME_TEAM(toucher, tmp_entity)) { ++num_perteam; } + // special touch behaviors if(toucher.frozen) { return; } else if(toucher.vehicle_flags & VHF_ISVEHICLE) @@ -850,16 +951,23 @@ void ctf_FlagTouch() { case FLAG_BASE: { - if(SAME_TEAM(toucher, self) && (toucher.flagcarried) && DIFF_TEAM(toucher.flagcarried, self) && is_not_monster) + if(ctf_oneflag) + { + if(CTF_SAMETEAM(toucher, self) && (toucher.flagcarried) && !toucher.flagcarried.team && is_not_monster) + ctf_Handle_Capture(self, toucher, CAPTURE_NORMAL); // toucher just captured the neutral flag to enemy base + else if(!self.team && (!toucher.flagcarried) && (!toucher.ctf_captureshielded) && (time > toucher.next_take_time) && is_not_monster) + ctf_Handle_Pickup(self, toucher, PICKUP_BASE); // toucher just stole the neutral flag + } + else if(CTF_SAMETEAM(toucher, self) && (toucher.flagcarried) && DIFF_TEAM(toucher.flagcarried, self) && is_not_monster) ctf_Handle_Capture(self, toucher, CAPTURE_NORMAL); // toucher just captured the enemies flag to his base - else if(DIFF_TEAM(toucher, self) && (!toucher.flagcarried) && (!toucher.ctf_captureshielded) && (time > toucher.next_take_time) && is_not_monster) + else if(CTF_DIFFTEAM(toucher, self) && (!toucher.flagcarried) && (!toucher.ctf_captureshielded) && (time > toucher.next_take_time) && is_not_monster) ctf_Handle_Pickup(self, toucher, PICKUP_BASE); // toucher just stole the enemies flag break; } case FLAG_DROPPED: { - if(SAME_TEAM(toucher, self)) + if(CTF_SAMETEAM(toucher, self) && (autocvar_g_ctf_flag_return || num_perteam <= 1) && self.team) // automatically return if there's only 1 player on the team ctf_Handle_Return(self, toucher); // toucher just returned his own flag else if(is_not_monster && (!toucher.flagcarried) && ((toucher != self.ctf_dropper) || (time > self.ctf_droptime + autocvar_g_ctf_flag_collect_delay))) ctf_Handle_Pickup(self, toucher, PICKUP_DROPPED); // toucher just picked up a dropped enemy flag @@ -898,9 +1006,7 @@ void ctf_RespawnFlag(entity flag) // reset the player (if there is one) if((flag.owner) && (flag.owner.flagcarried == flag)) { - if(flag.owner.wps_enemyflagcarrier) - WaypointSprite_Kill(flag.owner.wps_enemyflagcarrier); - + WaypointSprite_Kill(flag.owner.wps_enemyflagcarrier); WaypointSprite_Kill(flag.wps_flagcarrier); flag.owner.flagcarried = world; @@ -912,7 +1018,7 @@ void ctf_RespawnFlag(entity flag) if((flag.owner) && (flag.owner.vehicle)) flag.scale = FLAG_SCALE; - if((flag.ctf_status == FLAG_DROPPED) && (flag.wps_flagdropped)) + if(flag.ctf_status == FLAG_DROPPED) { WaypointSprite_Kill(flag.wps_flagdropped); } // reset the flag @@ -935,6 +1041,7 @@ void ctf_RespawnFlag(entity flag) flag.ctf_dropper = world; flag.ctf_pickuptime = 0; flag.ctf_droptime = 0; + flag.ctf_flagdamaged = 0; ctf_CheckStalemate(); } @@ -956,18 +1063,34 @@ void ctf_DelayedFlagSetup(void) // called after a flag is placed on a map by ctf self.bot_basewaypoint = self.nearestwaypoint; // waypointsprites - // move_origin isnt accessible just yet - WaypointSprite_SpawnFixed(((self.team == NUM_TEAM_1) ? "redbase" : "bluebase"), self.origin + FLAG_WAYPOINT_OFFSET, self, wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, false)); - WaypointSprite_UpdateTeamRadar(self.wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, false)); + string basename = "base"; + + switch(self.team) + { + case NUM_TEAM_1: basename = "redbase"; break; + case NUM_TEAM_2: basename = "bluebase"; break; + case NUM_TEAM_3: basename = "yellowbase"; break; + case NUM_TEAM_4: basename = "pinkbase"; break; + default: basename = "neutralbase"; break; + } + + WaypointSprite_SpawnFixed(basename, self.origin + FLAG_WAYPOINT_OFFSET, self, wps_flagbase, RADARICON_FLAG, ((self.team) ? Team_ColorRGB(self.team) : '1 1 1')); + WaypointSprite_UpdateTeamRadar(self.wps_flagbase, RADARICON_FLAG, ((self.team) ? colormapPaletteColor(self.team - 1, false) : '1 1 1')); // captureshield setup ctf_CaptureShield_Spawn(self); } -void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag entity on the map as a spawnfunc +void set_flag_string(entity flag, .string field, string value, string teamname) +{ + if(flag.field == "") + flag.field = strzone(sprintf(value,teamname)); +} + +void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag entity on the map as a spawnfunc { // declarations - teamnumber = fabs(teamnumber - bound(0, autocvar_g_ctf_reverse, 1)); // if we were originally 1, this will become 0. If we were originally 0, this will become 1. + string teamname = Static_Team_ColorName_Lower(teamnumber); self = flag; // for later usage with droptofloor() // main setup @@ -976,9 +1099,8 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag setattachment(flag, world, ""); - flag.netname = ((teamnumber) ? "^1RED^7 flag" : "^4BLUE^7 flag"); // Primarily only used for debugging or when showing nearby item name - flag.team = ((teamnumber) ? NUM_TEAM_1 : NUM_TEAM_2); // NUM_TEAM_1: color 4 team (red) - NUM_TEAM_2: color 13 team (blue) - flag.items = ((teamnumber) ? IT_KEY2 : IT_KEY1); // IT_KEY2: gold key (redish enough) - IT_KEY1: silver key (bluish enough) + flag.netname = strzone(sprintf("%s%s^7 flag", Team_ColorCode(teamnumber), Team_ColorName_Upper(teamnumber))); + flag.team = teamnumber; flag.classname = "item_flag_team"; flag.target = "###item###"; // wut? flag.flags = FL_ITEM | FL_NOTARGET; @@ -990,6 +1112,7 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag flag.event_damage = ctf_FlagDamage; flag.pushable = true; flag.teleportable = TELEPORT_NORMAL; + flag.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP; flag.damagedbytriggers = autocvar_g_ctf_flag_return_when_unreachable; flag.damagedbycontents = autocvar_g_ctf_flag_return_when_unreachable; flag.velocity = '0 0 0'; @@ -1001,21 +1124,21 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag flag.ctf_status = FLAG_BASE; // appearence - if(flag.model == "") { flag.model = ((teamnumber) ? autocvar_g_ctf_flag_red_model : autocvar_g_ctf_flag_blue_model); } - if(!flag.scale) { flag.scale = FLAG_SCALE; } - if(!flag.skin) { flag.skin = ((teamnumber) ? autocvar_g_ctf_flag_red_skin : autocvar_g_ctf_flag_blue_skin); } - if(flag.toucheffect == "") { flag.toucheffect = ((teamnumber) ? "redflag_touch" : "blueflag_touch"); } - if(flag.passeffect == "") { flag.passeffect = ((teamnumber) ? "red_pass" : "blue_pass"); } - if(flag.capeffect == "") { flag.capeffect = ((teamnumber) ? "red_cap" : "blue_cap"); } - - // sound - if(flag.snd_flag_taken == "") { flag.snd_flag_taken = ((teamnumber) ? "ctf/red_taken.wav" : "ctf/blue_taken.wav"); } - if(flag.snd_flag_returned == "") { flag.snd_flag_returned = ((teamnumber) ? "ctf/red_returned.wav" : "ctf/blue_returned.wav"); } - if(flag.snd_flag_capture == "") { flag.snd_flag_capture = ((teamnumber) ? "ctf/red_capture.wav" : "ctf/blue_capture.wav"); } // blue team scores by capturing the red flag - if(flag.snd_flag_respawn == "") { flag.snd_flag_respawn = "ctf/flag_respawn.wav"; } // if there is ever a team-based sound for this, update the code to match. - if(flag.snd_flag_dropped == "") { flag.snd_flag_dropped = ((teamnumber) ? "ctf/red_dropped.wav" : "ctf/blue_dropped.wav"); } - if(flag.snd_flag_touch == "") { flag.snd_flag_touch = "ctf/touch.wav"; } // again has no team-based sound - if(flag.snd_flag_pass == "") { flag.snd_flag_pass = "ctf/pass.wav"; } // same story here + if(!flag.scale) { flag.scale = FLAG_SCALE; } + if(flag.skin == 0) { flag.skin = cvar(sprintf("g_ctf_flag_%s_skin", teamname)); } + if(flag.model == "") { flag.model = cvar_string(sprintf("g_ctf_flag_%s_model", teamname)); } + set_flag_string(flag, toucheffect, "%sflag_touch", teamname); + set_flag_string(flag, passeffect, "%s_pass", teamname); + set_flag_string(flag, capeffect, "%s_cap", teamname); + + // sounds + set_flag_string(flag, snd_flag_taken, "ctf/%s_taken.wav", teamname); + set_flag_string(flag, snd_flag_returned, "ctf/%s_returned.wav", teamname); + set_flag_string(flag, snd_flag_capture, "ctf/%s_capture.wav", teamname); + set_flag_string(flag, snd_flag_dropped, "ctf/%s_dropped.wav", teamname); + if(flag.snd_flag_respawn == "") { flag.snd_flag_respawn = "ctf/flag_respawn.wav"; } // if there is ever a team-based sound for this, update the code to match. + if(flag.snd_flag_touch == "") { flag.snd_flag_touch = "ctf/touch.wav"; } // again has no team-based sound + if(flag.snd_flag_pass == "") { flag.snd_flag_pass = "ctf/pass.wav"; } // same story here // precache precache_sound(flag.snd_flag_taken); @@ -1036,15 +1159,32 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag if(autocvar_g_ctf_flag_glowtrails) { - flag.glow_color = ((teamnumber) ? 251 : 210); // 251: red - 210: blue + switch(teamnumber) + { + case NUM_TEAM_1: flag.glow_color = 251; break; + case NUM_TEAM_2: flag.glow_color = 210; break; + case NUM_TEAM_3: flag.glow_color = 110; break; + case NUM_TEAM_4: flag.glow_color = 145; break; + default: flag.glow_color = 254; break; + } flag.glow_size = 25; flag.glow_trail = 1; } flag.effects |= EF_LOWPRECISION; if(autocvar_g_ctf_fullbrightflags) { flag.effects |= EF_FULLBRIGHT; } - if(autocvar_g_ctf_dynamiclights) { flag.effects |= ((teamnumber) ? EF_RED : EF_BLUE); } - + if(autocvar_g_ctf_dynamiclights) + { + switch(teamnumber) + { + case NUM_TEAM_1: flag.effects |= EF_RED; break; + case NUM_TEAM_2: flag.effects |= EF_BLUE; break; + case NUM_TEAM_3: flag.effects |= EF_DIMLIGHT; break; + case NUM_TEAM_4: flag.effects |= EF_RED; break; + default: flag.effects |= EF_DIMLIGHT; break; + } + } + // flag placement if((flag.spawnflags & 1) || flag.noalign) // don't drop to floor, just stay at fixed location { @@ -1097,7 +1237,7 @@ entity havocbot_ctf_find_flag(entity bot) f = ctf_worldflaglist; while (f) { - if (bot.team == f.team) + if (CTF_SAMETEAM(bot, f)) return f; f = f.ctf_worldflagnext; } @@ -1110,24 +1250,37 @@ entity havocbot_ctf_find_enemy_flag(entity bot) f = ctf_worldflaglist; while (f) { - if (bot.team != f.team) + if(ctf_oneflag) + { + if(CTF_DIFFTEAM(bot, f)) + { + if(f.team) + { + if(bot.flagcarried) + return f; + } + else if(!bot.flagcarried) + return f; + } + } + else if (CTF_DIFFTEAM(bot, f)) return f; f = f.ctf_worldflagnext; } return world; } -float havocbot_ctf_teamcount(entity bot, vector org, float tc_radius) +int havocbot_ctf_teamcount(entity bot, vector org, float tc_radius) { if (!teamplay) return 0; - float c = 0; + int c = 0; entity head; FOR_EACH_PLAYER(head) { - if(head.team!=bot.team || head.deadflag != DEAD_NO || head == bot) + if(DIFF_TEAM(head, bot) || head.deadflag != DEAD_NO || head == bot) continue; if(vlen(head.origin - org) < tc_radius) @@ -1143,7 +1296,7 @@ void havocbot_goalrating_ctf_ourflag(float ratingscale) head = ctf_worldflaglist; while (head) { - if (self.team == head.team) + if (CTF_SAMETEAM(self, head)) break; head = head.ctf_worldflagnext; } @@ -1157,7 +1310,7 @@ void havocbot_goalrating_ctf_ourbase(float ratingscale) head = ctf_worldflaglist; while (head) { - if (self.team == head.team) + if (CTF_SAMETEAM(self, head)) break; head = head.ctf_worldflagnext; } @@ -1173,7 +1326,20 @@ void havocbot_goalrating_ctf_enemyflag(float ratingscale) head = ctf_worldflaglist; while (head) { - if (self.team != head.team) + if(ctf_oneflag) + { + if(CTF_DIFFTEAM(self, head)) + { + if(head.team) + { + if(self.flagcarried) + break; + } + else if(!self.flagcarried) + break; + } + } + else if(CTF_DIFFTEAM(self, head)) break; head = head.ctf_worldflagnext; } @@ -1341,7 +1507,10 @@ void havocbot_role_ctf_carrier() self.bot_strategytime = time + autocvar_bot_ai_strategyinterval; navigation_goalrating_start(); - havocbot_goalrating_ctf_ourbase(50000); + if(ctf_oneflag) + havocbot_goalrating_ctf_enemybase(50000); + else + havocbot_goalrating_ctf_ourbase(50000); if(self.health<100) havocbot_goalrating_ctf_carrieritems(1000, self.origin, 1000); @@ -1675,7 +1844,7 @@ void havocbot_role_ctf_defense() } } -void havocbot_role_ctf_setrole(entity bot, float role) +void havocbot_role_ctf_setrole(entity bot, int role) { dprint(strcat(bot.netname," switched to ")); switch(role) @@ -1728,28 +1897,39 @@ void havocbot_role_ctf_setrole(entity bot, float role) MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink) { entity flag; + int t = 0, t2 = 0, t3 = 0; // initially clear items so they can be set as necessary later. - self.items &= ~(IT_RED_FLAG_CARRYING | IT_RED_FLAG_TAKEN | IT_RED_FLAG_LOST - | IT_BLUE_FLAG_CARRYING | IT_BLUE_FLAG_TAKEN | IT_BLUE_FLAG_LOST | IT_CTF_SHIELDED); + self.ctf_flagstatus &= ~(CTF_RED_FLAG_CARRYING | CTF_RED_FLAG_TAKEN | CTF_RED_FLAG_LOST + | CTF_BLUE_FLAG_CARRYING | CTF_BLUE_FLAG_TAKEN | CTF_BLUE_FLAG_LOST + | CTF_YELLOW_FLAG_CARRYING | CTF_YELLOW_FLAG_TAKEN | CTF_YELLOW_FLAG_LOST + | CTF_PINK_FLAG_CARRYING | CTF_PINK_FLAG_TAKEN | CTF_PINK_FLAG_LOST + | CTF_NEUTRAL_FLAG_CARRYING | CTF_NEUTRAL_FLAG_TAKEN | CTF_NEUTRAL_FLAG_LOST + | CTF_FLAG_NEUTRAL | CTF_SHIELDED); // scan through all the flags and notify the client about them for(flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext) { + if(flag.team == NUM_TEAM_1) { t = CTF_RED_FLAG_CARRYING; t2 = CTF_RED_FLAG_TAKEN; t3 = CTF_RED_FLAG_LOST; } + if(flag.team == NUM_TEAM_2) { t = CTF_BLUE_FLAG_CARRYING; t2 = CTF_BLUE_FLAG_TAKEN; t3 = CTF_BLUE_FLAG_LOST; } + if(flag.team == NUM_TEAM_3) { t = CTF_YELLOW_FLAG_CARRYING; t2 = CTF_YELLOW_FLAG_TAKEN; t3 = CTF_YELLOW_FLAG_LOST; } + if(flag.team == NUM_TEAM_4) { t = CTF_PINK_FLAG_CARRYING; t2 = CTF_PINK_FLAG_TAKEN; t3 = CTF_PINK_FLAG_LOST; } + if(flag.team == 0) { t = CTF_NEUTRAL_FLAG_CARRYING; t2 = CTF_NEUTRAL_FLAG_TAKEN; t3 = CTF_NEUTRAL_FLAG_LOST; self.ctf_flagstatus |= CTF_FLAG_NEUTRAL; } + switch(flag.ctf_status) { case FLAG_PASSING: case FLAG_CARRY: { if((flag.owner == self) || (flag.pass_sender == self)) - self.items |= ((flag.items & IT_KEY2) ? IT_RED_FLAG_CARRYING : IT_BLUE_FLAG_CARRYING); // carrying: self is currently carrying the flag - else - self.items |= ((flag.items & IT_KEY2) ? IT_RED_FLAG_TAKEN : IT_BLUE_FLAG_TAKEN); // taken: someone on self's team is carrying the flag + self.ctf_flagstatus |= t; // carrying: self is currently carrying the flag + else + self.ctf_flagstatus |= t2; // taken: someone else is carrying the flag break; } case FLAG_DROPPED: { - self.items |= ((flag.items & IT_KEY2) ? IT_RED_FLAG_LOST : IT_BLUE_FLAG_LOST); // lost: the flag is dropped somewhere on the map + self.ctf_flagstatus |= t3; // lost: the flag is dropped somewhere on the map break; } } @@ -1757,7 +1937,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink) // item for stopping players from capturing the flag too often if(self.ctf_captureshielded) - self.items |= IT_CTF_SHIELDED; + self.ctf_flagstatus |= CTF_SHIELDED; // update the health of the flag carrier waypointsprite if(self.wps_flagcarrier) @@ -1781,7 +1961,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDamage) // for changing damage and force values t frag_force *= autocvar_g_ctf_flagcarrier_forcefactor; } } - else if(frag_target.flagcarried && (frag_target.deadflag == DEAD_NO) && DIFF_TEAM(frag_target, frag_attacker)) // if the target is a flagcarrier + else if(frag_target.flagcarried && (frag_target.deadflag == DEAD_NO) && CTF_DIFFTEAM(frag_target, frag_attacker)) // if the target is a flagcarrier { if(autocvar_g_ctf_flagcarrier_auto_helpme_damage > ('1 0 0' * healtharmor_maxdamage(frag_target.health, frag_target.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON))) if(time > frag_target.wps_helpme_time + autocvar_g_ctf_flagcarrier_auto_helpme_time) @@ -1803,7 +1983,11 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDies) } if(frag_target.flagcarried) - { ctf_Handle_Throw(frag_target, world, DROP_NORMAL); } + { + entity tmp_entity = frag_target.flagcarried; + ctf_Handle_Throw(frag_target, world, DROP_NORMAL); + tmp_entity.ctf_dropper = world; + } return false; } @@ -1953,6 +2137,8 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleEnter) { if(vh_player.flagcarried) { + vh_player.flagcarried.nodrawtoclient = vh_player; // hide the flag from the driver + if(!autocvar_g_ctf_allow_vehicle_carry && !autocvar_g_ctf_allow_vehicle_touch) { ctf_Handle_Throw(vh_player, world, DROP_NORMAL); @@ -1978,6 +2164,7 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleExit) setorigin(vh_player.flagcarried, FLAG_CARRY_OFFSET); vh_player.flagcarried.scale = FLAG_SCALE; vh_player.flagcarried.angles = '0 0 0'; + vh_player.flagcarried.nodrawtoclient = world; return true; } @@ -1988,7 +2175,7 @@ MUTATOR_HOOKFUNCTION(ctf_AbortSpeedrun) { if(self.flagcarried) { - Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(self.flagcarried, INFO_CTF_FLAGRETURN_ABORTRUN_)); + Send_Notification(NOTIF_ALL, world, MSG_INFO, ((self.flagcarried.team) ? APP_TEAM_ENT_4(self.flagcarried, INFO_CTF_FLAGRETURN_ABORTRUN_) : INFO_CTF_FLAGRETURN_ABORTRUN_NEUTRAL)); ctf_RespawnFlag(self.flagcarried); return true; } @@ -2036,6 +2223,19 @@ MUTATOR_HOOKFUNCTION(ctf_BotRoles) return true; } +MUTATOR_HOOKFUNCTION(ctf_GetTeamCount) +{ + //ret_float = ctf_teams; + ret_string = "ctf_team"; + return true; +} + +MUTATOR_HOOKFUNCTION(ctf_SpectateCopy) +{ + self.ctf_flagstatus = other.ctf_flagstatus; + return false; +} + // ========== // Spawnfuncs @@ -2102,7 +2302,7 @@ void spawnfunc_item_flag_team1() { if(!g_ctf) { remove(self); return; } - ctf_FlagSetup(1, self); // 1 = red + ctf_FlagSetup(NUM_TEAM_1, self); } /*QUAKED spawnfunc_item_flag_team2 (0 0.5 0.8) (-48 -48 -37) (48 48 37) @@ -2120,7 +2320,62 @@ void spawnfunc_item_flag_team2() { if(!g_ctf) { remove(self); return; } - ctf_FlagSetup(0, self); // the 0 is misleading, but -- 0 = blue. + ctf_FlagSetup(NUM_TEAM_2, self); +} + +/*QUAKED spawnfunc_item_flag_team3 (0 0.5 0.8) (-48 -48 -37) (48 48 37) +CTF flag for team three (Yellow). +Keys: +"angle" Angle the flag will point (minus 90 degrees)... +"model" model to use, note this needs red, blue yellow and pink as skins 0, 1, 2 and 3... +"noise" sound played when flag is picked up... +"noise1" sound played when flag is returned by a teammate... +"noise2" sound played when flag is captured... +"noise3" sound played when flag is lost in the field and respawns itself... +"noise4" sound played when flag is dropped by a player... +"noise5" sound played when flag touches the ground... */ +void spawnfunc_item_flag_team3() +{ + if(!g_ctf) { remove(self); return; } + + ctf_FlagSetup(NUM_TEAM_3, self); +} + +/*QUAKED spawnfunc_item_flag_team4 (0 0.5 0.8) (-48 -48 -37) (48 48 37) +CTF flag for team four (Pink). +Keys: +"angle" Angle the flag will point (minus 90 degrees)... +"model" model to use, note this needs red, blue yellow and pink as skins 0, 1, 2 and 3... +"noise" sound played when flag is picked up... +"noise1" sound played when flag is returned by a teammate... +"noise2" sound played when flag is captured... +"noise3" sound played when flag is lost in the field and respawns itself... +"noise4" sound played when flag is dropped by a player... +"noise5" sound played when flag touches the ground... */ +void spawnfunc_item_flag_team4() +{ + if(!g_ctf) { remove(self); return; } + + ctf_FlagSetup(NUM_TEAM_4, self); +} + +/*QUAKED spawnfunc_item_flag_neutral (0 0.5 0.8) (-48 -48 -37) (48 48 37) +CTF flag (Neutral). +Keys: +"angle" Angle the flag will point (minus 90 degrees)... +"model" model to use, note this needs red, blue yellow and pink as skins 0, 1, 2 and 3... +"noise" sound played when flag is picked up... +"noise1" sound played when flag is returned by a teammate... +"noise2" sound played when flag is captured... +"noise3" sound played when flag is lost in the field and respawns itself... +"noise4" sound played when flag is dropped by a player... +"noise5" sound played when flag touches the ground... */ +void spawnfunc_item_flag_neutral() +{ + if(!g_ctf) { remove(self); return; } + if(!cvar("g_ctf_oneflag")) { remove(self); return; } + + ctf_FlagSetup(0, self); } /*QUAKED spawnfunc_ctf_team (0 .5 .8) (-16 -16 -24) (16 16 32) @@ -2145,15 +2400,19 @@ void spawnfunc_team_CTF_blueplayer() { spawnfunc_info_player_team2(); } void spawnfunc_team_CTF_redspawn() { spawnfunc_info_player_team1(); } void spawnfunc_team_CTF_bluespawn() { spawnfunc_info_player_team2(); } +void team_CTF_neutralflag() { spawnfunc_item_flag_neutral(); } +void team_neutralobelisk() { spawnfunc_item_flag_neutral(); } + // ============== // Initialization // ============== // scoreboard setup -void ctf_ScoreRules() +void ctf_ScoreRules(int teams) { - ScoreRules_basics(2, SFL_SORT_PRIO_PRIMARY, 0, true); + CheckAllowedTeams(world); + ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, 0, true); ScoreInfo_SetLabel_TeamScore (ST_CTF_CAPS, "caps", SFL_SORT_PRIO_PRIMARY); ScoreInfo_SetLabel_PlayerScore(SP_CTF_CAPS, "caps", SFL_SORT_PRIO_SECONDARY); ScoreInfo_SetLabel_PlayerScore(SP_CTF_CAPTIME, "captime", SFL_LOWER_IS_BETTER | SFL_TIME); @@ -2165,7 +2424,7 @@ void ctf_ScoreRules() } // code from here on is just to support maps that don't have flag and team entities -void ctf_SpawnTeam (string teamname, float teamcolor) +void ctf_SpawnTeam (string teamname, int teamcolor) { entity oldself; oldself = self; @@ -2181,15 +2440,31 @@ void ctf_SpawnTeam (string teamname, float teamcolor) void ctf_DelayedInit() // Do this check with a delay so we can wait for teams to be set up. { + ctf_teams = 2; + + entity tmp_entity; + for(tmp_entity = ctf_worldflaglist; tmp_entity; tmp_entity = tmp_entity.ctf_worldflagnext) + { + if(tmp_entity.team == NUM_TEAM_3) { ctf_teams = max(3, ctf_teams); } + if(tmp_entity.team == NUM_TEAM_4) { ctf_teams = max(4, ctf_teams); } + if(tmp_entity.team == 0) { ctf_oneflag = true; } + } + + ctf_teams = bound(2, ctf_teams, 4); + // if no teams are found, spawn defaults if(find(world, classname, "ctf_team") == world) { print("No ""ctf_team"" entities found on this map, creating them anyway.\n"); ctf_SpawnTeam("Red", NUM_TEAM_1 - 1); ctf_SpawnTeam("Blue", NUM_TEAM_2 - 1); + if(ctf_teams >= 3) + ctf_SpawnTeam("Yellow", NUM_TEAM_3 - 1); + if(ctf_teams >= 4) + ctf_SpawnTeam("Pink", NUM_TEAM_4 - 1); } - ctf_ScoreRules(); + ctf_ScoreRules(ctf_teams); } void ctf_Initialize() @@ -2200,6 +2475,8 @@ void ctf_Initialize() ctf_captureshield_max_ratio = autocvar_g_ctf_shield_max_ratio; ctf_captureshield_force = autocvar_g_ctf_shield_force; + addstat(STAT_CTF_FLAGSTATUS, AS_INT, ctf_flagstatus); + InitializeEntity(world, ctf_DelayedInit, INITPRIO_GAMETYPE); } @@ -2220,6 +2497,8 @@ MUTATOR_DEFINITION(gamemode_ctf) MUTATOR_HOOK(VehicleExit, ctf_VehicleExit, CBC_ORDER_ANY); MUTATOR_HOOK(AbortSpeedrun, ctf_AbortSpeedrun, CBC_ORDER_ANY); MUTATOR_HOOK(HavocBot_ChooseRole, ctf_BotRoles, CBC_ORDER_ANY); + MUTATOR_HOOK(GetTeamCount, ctf_GetTeamCount, CBC_ORDER_ANY); + MUTATOR_HOOK(SpectateCopy, ctf_SpectateCopy, CBC_ORDER_ANY); MUTATOR_ONADD { diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh index b183a2ae5..a9e83a2a5 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qh +++ b/qcsrc/server/mutators/gamemode_ctf.qh @@ -36,9 +36,9 @@ const vector VEHICLE_FLAG_OFFSET = ('0 0 96'); const float VEHICLE_FLAG_SCALE = 1.0; // waypoint colors -#define WPCOLOR_ENEMYFC(t) (colormapPaletteColor(t - 1, false) * 0.75) +#define WPCOLOR_ENEMYFC(t) ((t) ? colormapPaletteColor(t - 1, false) * 0.75 : '1 1 1') #define WPCOLOR_FLAGCARRIER(t) ('0.8 0.8 0') -#define WPCOLOR_DROPPEDFLAG(t) (('0.25 0.25 0.25' + colormapPaletteColor(t - 1, false)) * 0.5) +#define WPCOLOR_DROPPEDFLAG(t) ((t) ? ('0.25 0.25 0.25' + colormapPaletteColor(t - 1, false)) * 0.5 : '1 1 1') // sounds #define snd_flag_taken noise @@ -67,7 +67,7 @@ entity ctf_worldflaglist; .entity wps_flagdropped; .entity wps_enemyflagcarrier; .float wps_helpme_time; -float wpforenemy_announced; +bool wpforenemy_announced; float wpforenemy_nextthink; // statuses @@ -97,15 +97,16 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype); // flag properties #define ctf_spawnorigin dropped_origin -float ctf_stalemate; // indicates that a stalemate is active +bool ctf_stalemate; // indicates that a stalemate is active float ctf_captimerecord; // record time for capturing the flag .float ctf_pickuptime; .float ctf_droptime; -.float ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally) +.int ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally) .entity ctf_dropper; // don't allow spam of dropping the flag -.float max_flag_health; +.int max_flag_health; .float next_take_time; -.float ctf_thinkrate; +.bool ctf_flagdamaged; +int ctf_teams; // passing/throwing properties .float pass_distance; @@ -113,14 +114,17 @@ float ctf_captimerecord; // record time for capturing the flag .entity pass_target; .float throw_antispam; .float throw_prevtime; -.float throw_count; +.int throw_count; // CaptureShield: If the player is too bad to be allowed to capture, shield them from taking the flag. -.float ctf_captureshielded; // set to 1 if the player is too bad to be allowed to capture +.bool ctf_captureshielded; // set to 1 if the player is too bad to be allowed to capture float ctf_captureshield_min_negscore; // punish at -20 points float ctf_captureshield_max_ratio; // punish at most 30% of each team float ctf_captureshield_force; // push force of the shield +// 1 flag ctf +bool ctf_oneflag; // indicates whether or not a neutral flag has been found + // bot player logic const int HAVOCBOT_CTF_ROLE_NONE = 0; const int HAVOCBOT_CTF_ROLE_DEFENSE = 2; @@ -135,6 +139,32 @@ const int HAVOCBOT_CTF_ROLE_ESCORT = 64; vector havocbot_ctf_middlepoint; float havocbot_ctf_middlepoint_radius; -void havocbot_role_ctf_setrole(entity bot, float role); +void havocbot_role_ctf_setrole(entity bot, int role); + +// team checking +#define CTF_SAMETEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? DIFF_TEAM(a,b) : SAME_TEAM(a,b)) +#define CTF_DIFFTEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? SAME_TEAM(a,b) : DIFF_TEAM(a,b)) + +// networked flag statuses +.int ctf_flagstatus; #endif + +const int CTF_RED_FLAG_TAKEN = 1; +const int CTF_RED_FLAG_LOST = 2; +const int CTF_RED_FLAG_CARRYING = 3; +const int CTF_BLUE_FLAG_TAKEN = 4; +const int CTF_BLUE_FLAG_LOST = 8; +const int CTF_BLUE_FLAG_CARRYING = 12; +const int CTF_YELLOW_FLAG_TAKEN = 16; +const int CTF_YELLOW_FLAG_LOST = 32; +const int CTF_YELLOW_FLAG_CARRYING = 48; +const int CTF_PINK_FLAG_TAKEN = 64; +const int CTF_PINK_FLAG_LOST = 128; +const int CTF_PINK_FLAG_CARRYING = 192; +const int CTF_NEUTRAL_FLAG_TAKEN = 256; +const int CTF_NEUTRAL_FLAG_LOST = 512; +const int CTF_NEUTRAL_FLAG_CARRYING = 768; +const int CTF_FLAG_NEUTRAL = 2048; +const int CTF_SHIELDED = 4096; + #endif diff --git a/qcsrc/server/vehicles/racer.qc b/qcsrc/server/vehicles/racer.qc index 8cecdfa84..a6d425393 100644 --- a/qcsrc/server/vehicles/racer.qc +++ b/qcsrc/server/vehicles/racer.qc @@ -412,19 +412,26 @@ float racer_frame() racer.delay = time + 0.3; if(racer.misc_bulletcounter == 1) + { racer_fire_rocket("tag_rocket_r", (racer.lock_strength == 1 && racer.lock_target) ? racer.lock_target : world); + player.vehicle_ammo2 = 50; + } else if(racer.misc_bulletcounter == 2) { racer_fire_rocket("tag_rocket_l", (racer.lock_strength == 1 && racer.lock_target) ? racer.lock_target : world); racer.lock_strength = 0; racer.lock_target = world; racer.misc_bulletcounter = 0; - racer.delay = time + autocvar_g_vehicle_racer_rocket_refire; racer.lip = time; + player.vehicle_ammo2 = 0; } } - player.vehicle_reload1 = bound(0, 100 * ((time - racer.lip) / (racer.delay - racer.lip)), 100); + else + if(racer.misc_bulletcounter == 0) + player.vehicle_ammo2 = 100; + + player.vehicle_reload2 = bound(0, 100 * ((time - racer.lip) / (racer.delay - racer.lip)), 100); if(racer.vehicle_flags & VHF_SHIELDREGEN) vehicles_regen(racer.dmg_time, vehicle_shield, autocvar_g_vehicle_racer_shield, autocvar_g_vehicle_racer_shield_regen_pause, autocvar_g_vehicle_racer_shield_regen, frametime, true); diff --git a/qcsrc/server/vehicles/raptor.qc b/qcsrc/server/vehicles/raptor.qc index 5c14fb793..46ffea1f8 100644 --- a/qcsrc/server/vehicles/raptor.qc +++ b/qcsrc/server/vehicles/raptor.qc @@ -653,6 +653,7 @@ float raptor_frame() raptor.bomb1.alpha = raptor.bomb2.alpha = (time - raptor.lip) / (raptor.delay - raptor.lip); player.vehicle_reload2 = bound(0, raptor.bomb1.alpha * 100, 100); + player.vehicle_ammo2 = (player.vehicle_reload2 == 100) ? 100 : 0; if(self.bomb1.cnt < time) { diff --git a/qcsrc/server/vehicles/spiderbot.qc b/qcsrc/server/vehicles/spiderbot.qc index c2a59fd18..aa4c927be 100644 --- a/qcsrc/server/vehicles/spiderbot.qc +++ b/qcsrc/server/vehicles/spiderbot.qc @@ -538,7 +538,7 @@ float spiderbot_frame() vehicles_regen(spider.dmg_time, vehicle_health, autocvar_g_vehicle_spiderbot_health, autocvar_g_vehicle_spiderbot_health_regen_pause, autocvar_g_vehicle_spiderbot_health_regen, frametime, false); player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0; - player.vehicle_ammo2 = spider.tur_head.frame; + player.vehicle_ammo2 = (9 - spider.tur_head.frame) / 8 * 100; // Percentage, like ammo1 if(spider.gun2.cnt <= time) player.vehicle_reload2 = 100; diff --git a/qcsrc/server/vehicles/vehicle.qc b/qcsrc/server/vehicles/vehicle.qc index 2622b523f..e6a0f9c0e 100644 --- a/qcsrc/server/vehicles/vehicle.qc +++ b/qcsrc/server/vehicles/vehicle.qc @@ -645,6 +645,7 @@ void vehicles_enter() self.owner.vehicle_ammo2 = self.vehicle_ammo2; self.owner.vehicle_reload1 = self.vehicle_reload1; self.owner.vehicle_reload2 = self.vehicle_reload2; + self.owner.vehicle_energy = self.vehicle_energy; // Cant do this, hides attached objects too. //self.exteriormodeltoclient = self.owner; diff --git a/qcsrc/server/vehicles/vehicle.qh b/qcsrc/server/vehicles/vehicle.qh index 59d9ef76d..630e196b6 100644 --- a/qcsrc/server/vehicles/vehicle.qh +++ b/qcsrc/server/vehicles/vehicle.qh @@ -152,14 +152,14 @@ const int VHF_PLAYERSLOT = 16384; /// This ent is a player slot on a multi .entity gunner1; .entity gunner2; -.float vehicle_health; /// If self is player this is 0..100 indicating precentage of health left on vehicle. If self is vehile, this is the real health value. -.float vehicle_energy; /// If self is player this is 0..100 indicating precentage of energy left on vehicle. If self is vehile, this is the real energy value. -.float vehicle_shield; /// If self is player this is 0..100 indicating precentage of shield left on vehicle. If self is vehile, this is the real shield value. - -.float vehicle_ammo1; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real ammo1 value. -.float vehicle_reload1; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real reload1 value. -.float vehicle_ammo2; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real ammo2 value. -.float vehicle_reload2; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real reload2 value. +.float vehicle_health; /// If self is player this is 0..100 indicating precentage of health left on vehicle. If self is vehile, this is the real health value. +.float vehicle_energy; /// If self is player this is 0..100 indicating precentage of energy left on vehicle. If self is vehile, this is the real energy value. +.float vehicle_shield; /// If self is player this is 0..100 indicating precentage of shield left on vehicle. If self is vehile, this is the real shield value. + +.float vehicle_ammo1; /// If self is player this is 0..100 indicating percentage of primary ammo left UNLESS value is already stored in vehicle_energy. If self is vehile, this is the real ammo1 value. +.float vehicle_reload1; /// If self is player this is 0..100 indicating percentage of primary reload status. If self is vehile, this is the real reload1 value. +.float vehicle_ammo2; /// If self is player this is 0..100 indicating percentage of secondary ammo left. If self is vehile, this is the real ammo2 value. +.float vehicle_reload2; /// If self is player this is 0..100 indicating percentage of secondary reload status. If self is vehile, this is the real reload2 value. .float sound_nexttime; const float VOL_VEHICLEENGINE = 1; diff --git a/scripts/ctf.shader b/scripts/ctf.shader index 2eceff38d..db6939f15 100644 --- a/scripts/ctf.shader +++ b/scripts/ctf.shader @@ -15,4 +15,31 @@ models/ctf/glow_blue tcMod scroll 0.1 -0.04 tcMod rotate 0.1 } +} +models/ctf/glow_yellow +{ + { + map models/ctf/glow_yellow.tga + tcMod scale 0.03 0.03 + tcMod scroll 0.1 -0.04 + tcMod rotate 0.1 + } +} +models/ctf/glow_pink +{ + { + map models/ctf/glow_pink.tga + tcMod scale 0.03 0.03 + tcMod scroll 0.1 -0.04 + tcMod rotate 0.1 + } +} +models/ctf/glow_neutral +{ + { + map models/ctf/glow_neutral.tga + tcMod scale 0.03 0.03 + tcMod scroll 0.1 -0.04 + tcMod rotate 0.1 + } } \ No newline at end of file diff --git a/sound/ctf/neutral_dropped.wav b/sound/ctf/neutral_dropped.wav new file mode 100644 index 000000000..b3232e243 Binary files /dev/null and b/sound/ctf/neutral_dropped.wav differ diff --git a/sound/ctf/neutral_taken.wav b/sound/ctf/neutral_taken.wav new file mode 100644 index 000000000..fde3fe2eb Binary files /dev/null and b/sound/ctf/neutral_taken.wav differ diff --git a/sound/ctf/pink_capture.ogg b/sound/ctf/pink_capture.ogg new file mode 100644 index 000000000..63206142a Binary files /dev/null and b/sound/ctf/pink_capture.ogg differ diff --git a/sound/ctf/pink_dropped.wav b/sound/ctf/pink_dropped.wav new file mode 100644 index 000000000..b3232e243 Binary files /dev/null and b/sound/ctf/pink_dropped.wav differ diff --git a/sound/ctf/pink_returned.wav b/sound/ctf/pink_returned.wav new file mode 100644 index 000000000..b0779a1f5 Binary files /dev/null and b/sound/ctf/pink_returned.wav differ diff --git a/sound/ctf/pink_taken.wav b/sound/ctf/pink_taken.wav new file mode 100644 index 000000000..fde3fe2eb Binary files /dev/null and b/sound/ctf/pink_taken.wav differ diff --git a/sound/ctf/yellow_capture.ogg b/sound/ctf/yellow_capture.ogg new file mode 100644 index 000000000..63206142a Binary files /dev/null and b/sound/ctf/yellow_capture.ogg differ diff --git a/sound/ctf/yellow_dropped.wav b/sound/ctf/yellow_dropped.wav new file mode 100644 index 000000000..b3232e243 Binary files /dev/null and b/sound/ctf/yellow_dropped.wav differ diff --git a/sound/ctf/yellow_returned.wav b/sound/ctf/yellow_returned.wav new file mode 100644 index 000000000..b0779a1f5 Binary files /dev/null and b/sound/ctf/yellow_returned.wav differ diff --git a/sound/ctf/yellow_taken.wav b/sound/ctf/yellow_taken.wav new file mode 100644 index 000000000..fde3fe2eb Binary files /dev/null and b/sound/ctf/yellow_taken.wav differ diff --git a/vehicle_spiderbot.cfg b/vehicle_spiderbot.cfg index 4258095f7..0172053c0 100644 --- a/vehicle_spiderbot.cfg +++ b/vehicle_spiderbot.cfg @@ -62,6 +62,3 @@ set g_vehicle_spiderbot_blowup_forceintensity 250 set g_vehicle_spiderbot_bouncefactor 0 // Factor of old velocity to keep after colission set g_vehicle_spiderbot_bouncestop 0 // if != 0, New veloctiy after bounce = 0 if new velocity < this set g_vehicle_spiderbot_bouncepain "0 0 0" // "minspeed_for_pain speedchange_to_pain_factor max_damage" - -set cl_vehicle_spiderbot_cross_alpha 0.4 -set cl_vehicle_spiderbot_cross_size 1 diff --git a/vehicles.cfg b/vehicles.cfg index ea296146d..290b12d8c 100644 --- a/vehicles.cfg +++ b/vehicles.cfg @@ -13,7 +13,9 @@ set g_vehicle_bumblebee 1 set g_vehicles_crush_dmg 70 set g_vehicles_crush_force 50 +set cl_vehicles_hud_tactical 1 set cl_vehicles_hudscale 0.5 +set cl_vehicles_crosshair_size 0.5 set g_vehicles_delayspawn 1 set g_vehicles_delayspawn_jitter 10