Merge remote-tracking branch 'origin/mrbougo/killspree_bugfix'
authorJakob MG <jakob_mg@hotmail.com>
Thu, 23 Aug 2012 18:17:15 +0000 (20:17 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Thu, 23 Aug 2012 18:17:15 +0000 (20:17 +0200)
256 files changed:
_hud_descriptions.cfg
balance25.cfg
balanceFruitieX.cfg
balanceXPM.cfg
balanceXonotic.cfg
commands.cfg
defaultXonotic.cfg
effectinfo.txt
effects-ultra.cfg
gfx/hud/default/key_atck.tga [new file with mode: 0644]
gfx/hud/default/key_atck2.tga [new file with mode: 0644]
gfx/hud/default/key_atck2_inv.tga [new file with mode: 0644]
gfx/hud/default/key_atck_inv.tga [new file with mode: 0644]
gfx/vehicles/axh-rings.tga [new file with mode: 0644]
gfx/vehicles/bumb.tga [new file with mode: 0644]
gfx/vehicles/bumb_lgun.tga [new file with mode: 0644]
gfx/vehicles/bumb_rgun.tga [new file with mode: 0644]
gfx/vehicles/bumb_side.tga [new file with mode: 0644]
gfx/vehicles/bumb_side_gun.tga [new file with mode: 0644]
gfx/vehicles/energy.tga [new file with mode: 0644]
gfx/vehicles/vth-mover.tga [new file with mode: 0644]
gfx/vehicles/vth-stationary.tga [new file with mode: 0644]
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
models/items/a_bullets_simple.iqm [new file with mode: 0644]
models/items/a_bullets_simple.iqm_0.skin [new file with mode: 0644]
models/items/a_bullets_simple.tga [new file with mode: 0644]
models/items/a_cells_simple.iqm [new file with mode: 0644]
models/items/a_cells_simple.iqm_0.skin [new file with mode: 0644]
models/items/a_cells_simple.tga [new file with mode: 0644]
models/items/a_rockets_simple.iqm [new file with mode: 0644]
models/items/a_rockets_simple.iqm_0.skin [new file with mode: 0644]
models/items/a_rockets_simple.tga [new file with mode: 0644]
models/items/a_shells_simple.iqm [new file with mode: 0644]
models/items/a_shells_simple.iqm_0.skin [new file with mode: 0644]
models/items/a_shells_simple.tga [new file with mode: 0644]
models/items/g_h100_simple.iqm [new file with mode: 0644]
models/items/g_h100_simple.iqm_0.skin [new file with mode: 0644]
models/items/g_h100_simple.tga [new file with mode: 0644]
models/items/g_h1_simple.iqm [new file with mode: 0644]
models/items/g_h1_simple.iqm_0.skin [new file with mode: 0644]
models/items/g_h1_simple.tga [new file with mode: 0644]
models/items/g_h25_simple.iqm [new file with mode: 0644]
models/items/g_h25_simple.iqm_0.skin [new file with mode: 0644]
models/items/g_h25_simple.tga [new file with mode: 0644]
models/items/g_h50_simple.iqm [new file with mode: 0644]
models/items/g_h50_simple.iqm_0.skin [new file with mode: 0644]
models/items/g_h50_simple.tga [new file with mode: 0644]
models/items/g_invincible_simple.iqm [new file with mode: 0644]
models/items/g_invincible_simple.iqm_0.skin [new file with mode: 0644]
models/items/g_invincible_simple.tga [new file with mode: 0644]
models/items/g_strength_simple.iqm [new file with mode: 0644]
models/items/g_strength_simple.iqm_0.skin [new file with mode: 0644]
models/items/g_strength_simple.tga [new file with mode: 0644]
models/items/item_armor_big_simple.iqm [new file with mode: 0644]
models/items/item_armor_big_simple.iqm_0.skin [new file with mode: 0644]
models/items/item_armor_big_simple.tga [new file with mode: 0644]
models/items/item_armor_large_simple.iqm [new file with mode: 0644]
models/items/item_armor_large_simple.iqm_0.skin [new file with mode: 0644]
models/items/item_armor_large_simple.tga [new file with mode: 0644]
models/items/item_armor_medium_simple.iqm [new file with mode: 0644]
models/items/item_armor_medium_simple.iqm_0.skin [new file with mode: 0644]
models/items/item_armor_medium_simple.tga [new file with mode: 0644]
models/items/item_armor_small_simple.iqm [new file with mode: 0644]
models/items/item_armor_small_simple.iqm_0.skin [new file with mode: 0644]
models/items/item_armor_small_simple.tga [new file with mode: 0644]
models/vehicles/bumblebee_body.dpm
models/vehicles/bumblebee_plasma_left.dpm
models/vehicles/bumblebee_plasma_right.dpm
models/vehicles/bumblebee_ray.dpm
models/weapons/crylink_simple.tga [new file with mode: 0644]
models/weapons/g_crylink_simple.iqm [new file with mode: 0644]
models/weapons/g_crylink_simple.iqm_0.skin [new file with mode: 0644]
models/weapons/g_crylink_simple.obj [new file with mode: 0644]
models/weapons/g_crylink_simple.tga [new file with mode: 0644]
models/weapons/g_electro_simple.iqm [new file with mode: 0644]
models/weapons/g_electro_simple.iqm_0.skin [new file with mode: 0644]
models/weapons/g_electro_simple.tga [new file with mode: 0644]
models/weapons/g_gl_simple.iqm [new file with mode: 0644]
models/weapons/g_gl_simple.iqm_0.skin [new file with mode: 0644]
models/weapons/g_gl_simple.tga [new file with mode: 0644]
models/weapons/g_hagar_simple.iqm [new file with mode: 0644]
models/weapons/g_hagar_simple.iqm_0.skin [new file with mode: 0644]
models/weapons/g_hagar_simple.tga [new file with mode: 0644]
models/weapons/g_nex_simple.iqm [new file with mode: 0644]
models/weapons/g_nex_simple.iqm_0.skin [new file with mode: 0644]
models/weapons/g_nex_simple.tga [new file with mode: 0644]
models/weapons/g_rl_simple.iqm [new file with mode: 0644]
models/weapons/g_rl_simple.iqm_0.skin [new file with mode: 0644]
models/weapons/g_rl_simple.tga [new file with mode: 0644]
models/weapons/g_shotgun_simple.iqm [new file with mode: 0644]
models/weapons/g_shotgun_simple.iqm_0.skin [new file with mode: 0644]
models/weapons/g_shotgun_simple.tga [new file with mode: 0644]
models/weapons/g_uzi_simple.iqm [new file with mode: 0644]
models/weapons/g_uzi_simple.iqm_0.skin [new file with mode: 0644]
models/weapons/g_uzi_simple.tga [new file with mode: 0644]
qcsrc/Makefile
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/damage.qc
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/progs.src
qcsrc/client/projectile.qc
qcsrc/client/scoreboard.qc
qcsrc/client/tturrets.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/campaign_file.qc
qcsrc/common/command/generic.qc
qcsrc/common/command/markup.qc
qcsrc/common/command/rpn.qc
qcsrc/common/constants.qh
qcsrc/common/items.qc
qcsrc/common/items.qh
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/csqcmodellib/sv_model.qc
qcsrc/dpdefs/dpextensions.qc
qcsrc/fteqcc-bugs.qc [new file with mode: 0644]
qcsrc/menu/anim/animhost.c
qcsrc/menu/anim/keyframe.c
qcsrc/menu/draw.qc
qcsrc/menu/draw.qh
qcsrc/menu/item/borderimage.c
qcsrc/menu/item/container.c
qcsrc/menu/item/dialog.c
qcsrc/menu/item/inputbox.c
qcsrc/menu/item/inputcontainer.c
qcsrc/menu/item/label.c
qcsrc/menu/item/listbox.c
qcsrc/menu/item/modalcontroller.c
qcsrc/menu/item/nexposee.c
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/colorbutton.c
qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
qcsrc/menu/xonotic/dialog_settings_audio.c
qcsrc/menu/xonotic/languagelist.c
qcsrc/menu/xonotic/playermodel.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/menu/xonotic/util.qc
qcsrc/server/antilag.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/bot.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/havocbot/role_ctf.qc
qcsrc/server/bot/havocbot/role_onslaught.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/campaign.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/command/banning.qh
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/getreplies.qc
qcsrc/server/command/radarmap.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/csqcprojectile.qc
qcsrc/server/defs.qh
qcsrc/server/domination.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_triggers.qc
qcsrc/server/g_world.qc
qcsrc/server/ipban.qc
qcsrc/server/item_key.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mode_onslaught.qc [deleted file]
qcsrc/server/movelib.qc
qcsrc/server/mutators/base.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/mutators/gamemode_onslaught.qc [new file with mode: 0644]
qcsrc/server/mutators/mutator_dodging.qc
qcsrc/server/mutators/mutator_superspec.qc [new file with mode: 0644]
qcsrc/server/mutators/mutators.qh
qcsrc/server/mutators/sandbox.qc
qcsrc/server/pathlib.qc
qcsrc/server/pathlib/expandnode.qc
qcsrc/server/pathlib/utility.qc
qcsrc/server/playerstats.qc
qcsrc/server/progs.src
qcsrc/server/race.qc
qcsrc/server/runematch.qc
qcsrc/server/scores.qc
qcsrc/server/steerlib.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/t_jumppads.qc
qcsrc/server/t_teleporters.qc
qcsrc/server/teamplay.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/system/system_misc.qc
qcsrc/server/tturrets/units/unit_ewheel.qc
qcsrc/server/tturrets/units/unit_flac.qc
qcsrc/server/tturrets/units/unit_hellion.qc
qcsrc/server/tturrets/units/unit_hk.qc
qcsrc/server/tturrets/units/unit_mlrs.qc
qcsrc/server/tturrets/units/unit_plasma.qc
qcsrc/server/tturrets/units/unit_tessla.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/bumblebee.qc [new file with mode: 0644]
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/vehicles/vehicles.qh
qcsrc/server/vehicles/vehicles_def.qh
qcsrc/server/w_common.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_porto.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_tuba.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/server.qc
scripts/simpleitems.shader [new file with mode: 0644]
scripts/weapons.shader
sound/vehicles/missile_alarm.wav [new file with mode: 0644]
textures/raptor.tga
textures/raptor_pants.jpg [deleted file]
textures/raptor_shirt.jpg [deleted file]
textures/raptor_shirt.tga [new file with mode: 0644]
vehicle_bumblebee.cfg
vehicle_racer.cfg
vehicle_raptor.cfg
vehicle_spiderbot.cfg
vehicles.cfg
xonotic-credits.txt

index 372a6af3e146f635154231a39a71b730efd96fc0..cb95f968132ba7145549310b491ec98885459a7a 100644 (file)
@@ -206,6 +206,7 @@ seta hud_panel_pressedkeys_bg_alpha "" "if set to something else than \"\" = ove
 seta hud_panel_pressedkeys_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_pressedkeys_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 seta hud_panel_pressedkeys_aspect "" "forced aspect on panel"
+seta hud_panel_pressedkeys_attack "" "show attack buttons too"
 
 seta hud_panel_chat "" "enable/disable this panel"
 seta hud_panel_chat_pos "" "position of this base of the panel"
index 9783f5e8b348e55260ea256c9b589e9d4ac75ea3..aafb163b441941ea73ad9a0ba736837fcc0bc25f 100644 (file)
@@ -162,13 +162,12 @@ set g_projectiles_damage 2
 // 0: only damage from contents (lava/slime) or exceptions 
 // 1: only self damage or damage from contents or exceptions
 // 2: allow all damage to projectiles normally
+set g_projectiles_keep_owner 0
 set g_projectiles_newton_style 2
 // possible values:
 // 0: absolute velocity projectiles (like Quake)
 // 1: relative velocity projectiles, "Newtonian" (like Tribes 2)
 // 2: relative velocity projectiles, but aim is precorrected so projectiles hit the crosshair (note: strafe rockets then are SLOWER than ones shot while standing, happens in 1 too when aiming correctly which is hard)
-// 3: absolute velocity + player velocity component in shot direction (note: does NOT yield the right relative velocity, but may be good enough, but it is somewhat prone to sniper rockets)
-// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
 set g_projectiles_newton_style_2_minfactor 0.7
 set g_projectiles_newton_style_2_maxfactor 5
 set g_projectiles_spread_style 0
index 54e232dc4dc44277909ef7831592d7aa9d83446b..1bb8989120df04a0f5f3b7864c66c23ab0df2f57 100644 (file)
@@ -162,13 +162,12 @@ set g_projectiles_damage 2
 // 0: only damage from contents (lava/slime) or exceptions 
 // 1: only self damage or damage from contents or exceptions
 // 2: allow all damage to projectiles normally
+set g_projectiles_keep_owner 0
 set g_projectiles_newton_style 2
 // possible values:
 // 0: absolute velocity projectiles (like Quake)
 // 1: relative velocity projectiles, "Newtonian" (like Tribes 2)
 // 2: relative velocity projectiles, but aim is precorrected so projectiles hit the crosshair (note: strafe rockets then are SLOWER than ones shot while standing, happens in 1 too when aiming correctly which is hard)
-// 3: absolute velocity + player velocity component in shot direction (note: does NOT yield the right relative velocity, but may be good enough, but it is somewhat prone to sniper rockets)
-// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
 set g_projectiles_newton_style_2_minfactor 0.7
 set g_projectiles_newton_style_2_maxfactor 5
 set g_projectiles_spread_style 7
index ea933d2725c56b78ac7459e2f1705c09719d822e..759551d8d2357a4a2e53f7f1125d229659802fe7 100644 (file)
@@ -162,13 +162,12 @@ set g_projectiles_damage 1
 // 0: only damage from contents (lava/slime) or exceptions 
 // 1: only self damage or damage from contents or exceptions
 // 2: allow all damage to projectiles normally
+set g_projectiles_keep_owner 0
 set g_projectiles_newton_style 0
 // possible values:
 // 0: absolute velocity projectiles (like Quake)
 // 1: relative velocity projectiles, "Newtonian" (like Tribes 2)
 // 2: relative velocity projectiles, but aim is precorrected so projectiles hit the crosshair (note: strafe rockets then are SLOWER than ones shot while standing, happens in 1 too when aiming correctly which is hard)
-// 3: absolute velocity + player velocity component in shot direction (note: does NOT yield the right relative velocity, but may be good enough, but it is somewhat prone to sniper rockets)
-// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
 set g_projectiles_newton_style_2_minfactor 0.8
 set g_projectiles_newton_style_2_maxfactor 1.5
 set g_projectiles_spread_style 7
index 2f1d16d82e3a9a11b62fc8cb19ffbc36921c0756..52c8a74d84cecfe381db5adbb156bc778f7da233 100644 (file)
@@ -162,13 +162,12 @@ set g_projectiles_damage 2
 // 0: only damage from contents (lava/slime) or exceptions 
 // 1: only self damage or damage from contents or exceptions
 // 2: allow all damage to projectiles normally
+set g_projectiles_keep_owner 0
 set g_projectiles_newton_style 2
 // possible values:
 // 0: absolute velocity projectiles (like Quake)
 // 1: relative velocity projectiles, "Newtonian" (like Tribes 2)
 // 2: relative velocity projectiles, but aim is precorrected so projectiles hit the crosshair (note: strafe rockets then are SLOWER than ones shot while standing, happens in 1 too when aiming correctly which is hard)
-// 3: absolute velocity + player velocity component in shot direction (note: does NOT yield the right relative velocity, but may be good enough, but it is somewhat prone to sniper rockets)
-// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
 set g_projectiles_newton_style_2_minfactor 0.8
 set g_projectiles_newton_style_2_maxfactor 1.5
 set g_projectiles_spread_style 7
index 174a458347b8b76e827f4ca670412c5e29f51059..35d9e39b91947d5d17210434c6c047a6f8512131 100644 (file)
@@ -239,6 +239,47 @@ alias unban                "qc_cmd_sv     unban                ${* ?}" // Remove
 // other aliases for ban commands
 alias bans "banlist"
 
+// character classes (intersected with 32..126 minus ", $, ;, ^, \ - if you
+// want these, include them explicitly)
+// note that QC code always forbids $ and ; in VoteCommand_checknasty
+set _iscntrl ""
+set _isblank " "
+set _ispunct "!#%&'()*+,-./:<=>?@[]_`{|}~"
+set _isdigit "0123456789"
+set _isupper "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+set _islower "abcdefghijklmnopqrstuvwxyz"
+set _isxdigit "0123456789abcdefABCDEF"
+
+// derived character classes
+set _isalpha "$_isupper$_islower"
+set _isalnum "$_isalpha$_isdigit"
+set _isgraph "$_ispunct$_isalnum"
+set _isascii "$_isgraph$_isblank"
+set _isprint "$_isgraph$_isblank"
+set _isspace "$_isblank"
+
+// restriction is specified as <minargs> followed by <maxargs> instances of ';'
+// and the optional character class to verify the argument by (no checking if
+// empty)
+// set cvar to empty string to not check the command at all
+// if cvar is not set there will be a warning
+set sv_vote_command_restriction_restart "0"
+set sv_vote_command_restriction_fraglimit "1;$_isdigit"
+set sv_vote_command_restriction_chmap "1;$_isgraph"
+set sv_vote_command_restriction_gotomap "1;$_isgraph"
+set sv_vote_command_restriction_nextmap "1;$_isgraph"
+set sv_vote_command_restriction_endmatch "0"
+set sv_vote_command_restriction_reducematchtime "0"
+set sv_vote_command_restriction_extendmatchtime "0"
+set sv_vote_command_restriction_allready "0"
+set sv_vote_command_restriction_kick "1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" // enough space for ban reason
+set sv_vote_command_restriction_kickban "1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" // enough space for ban reason
+set sv_vote_command_restriction_cointoss "0"
+set sv_vote_command_restriction_movetoauto "1;"
+set sv_vote_command_restriction_movetored "1;"
+set sv_vote_command_restriction_movetoblue "1;"
+set sv_vote_command_restriction_movetoyellow "1;"
+set sv_vote_command_restriction_movetopink "1;"
 
 // =================================
 //  voting - server/command/vote.qc
index 0c399bb183cde7a50c4ff80e690bd59764527ffc..96908168944b2472402f5b3776b357a1246f04cd 100644 (file)
@@ -57,7 +57,7 @@ bind f6 team_auto
 mod_q3bsp_lightmapmergepower 4
 
 // player defaults
-_cl_color 112
+_cl_color "112.211" // same effect as 112, but menuqc can detect this as the default and not intentionally set
 _cl_name Player
 _cl_playermodel models/player/erebus.iqm
 _cl_playerskin 0
@@ -574,9 +574,9 @@ seta g_friendlyfire_virtual_force 1 "for teamplay 4: apply force even though dam
 seta g_teamdamage_threshold 40 "for teamplay 4: threshold over which to apply mirror damage"
 seta g_teamdamage_resetspeed 20        "for teamplay 4: how fast player's teamdamage count decreases"
 
-seta g_balance_teams 0 "automatically balance out players entering instead of asking them for their preferred team"
-seta g_balance_teams_force 0   "automatically balance out teams when players move or disconnect"
-seta g_balance_teams_prevent_imbalance 0       "prevent players from changing to larger teams"
+seta g_balance_teams 1 "automatically balance out players entering instead of asking them for their preferred team"
+seta g_balance_teams_prevent_imbalance 1       "prevent players from changing to larger teams"
+set g_balance_teams_scorefactor 0.34 "at the end of the game, take score into account instead of team size by this amount (beware: values over 0.5 mean that a x:0 score imbalance will cause ALL new players to prefer the losing team at the end, despite numbers)"
 set g_tdm_teams 2 "how many teams are in team deathmatch (set by mapinfo)"
 seta g_tdm_teams_override 0    "how many teams are in team deathmatch"
 set g_tdm_team_spawns 0 "when 1, a map can define team spawnpoints for TDM"
@@ -812,6 +812,7 @@ set g_throughfloor_max_steps_other 10 "Maximum number of steps for splash damage
 
 // effects
 r_glsl_vertextextureblend_usebothalphas 1 // allows to abuse texture blending as detail texture
+mod_q3shader_force_terrain_alphaflag 1 // supposedly now required for r_glsl_vertextextureblend_usebothalphas to work
 r_glsl_postprocess 0 // but note, hud_postprocessing enables this
 r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team mate, typing, waypoints)
 r_picmipworld 1
@@ -1645,6 +1646,9 @@ seta cl_casings_maxcount 100 "maximum amount of shell casings (must be at least
 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"
@@ -1667,9 +1671,6 @@ set g_triggerimpulse_directional_multiplier 1 "trigger_impulse directional field
 set g_triggerimpulse_radial_multiplier 1 "trigger_impulse radial field multiplier"
 set the_goggles "they do nothing" "but the googles, they do"
 
-set g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
-set g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
-
 set sv_weaponstats_file "" "when set to a file name, per-weapon stats get written to that file"
 
 seta cl_noantilag 0 "turn this on if you believe antilag is bad"
@@ -1702,7 +1703,7 @@ set g_debug_defaultsounds 0 "always use default sounds"
 set sv_use_csqc_players 1 "set to 0 to disable CSQC players for better Xonotic 0.5 compat"
 set cl_precacheplayermodels 0 "TODO please check if this needs to be 1 or if precaching a model the server already requested is fast enough to do it at runtime"
 seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_use_csqc_players 1 and sv_defaultcharacter 0)"
-seta cl_forceplayercolors 0 "make everyone look like your own color (requires server to have sv_use_csqc_players 1 and sv_defaultcharacter 0, and is ignored in teamplay)"
+seta cl_forceplayercolors 0 "make everyone look like your own color (requires server to have sv_use_csqc_players 1 and sv_defaultcharacter 0, and is ignored in teamplay with more than two teams)"
 seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (requires server to have sv_use_csqc_players 1; does not affect how enemies look with cl_forceplayermodels)"
 seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (requires server to have sv_use_csqc_players 1; does not affect how enemies look with cl_forceplayermodels)"
 seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (requires server to have sv_use_csqc_players 1, and is ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
@@ -1956,3 +1957,13 @@ alias menu_sync "menu_cmd sync"
 
 set sv_join_notices ""
 set sv_join_notices_time 15
+
+set cl_ghost_items 0.45 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
+set cl_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
+set sv_simple_items 1 "allow or forbid client use of simple items"
+set cl_simple_items 0 "enable simple items (if server allows)"
+set cl_fullbright_items 0 "enable fullbright items (if server allows, controled by g_fullbrightitems)"
+set cl_weapon_stay_color "2 0.5 0.5" "Color of picked up weapons when g_weapon_stay > 0"
+set cl_weapon_stay_alpha 0.75 "Alpha of picked up weapons when g_weapon_stay > 0"
+
+seta g_superspectate 0 "server side, allows extended spectator functions through the cmd interface. followpowerup, followstrength, followstshield or followfc [red|blue] will transfer spectation to the relevent player, if any"
\ No newline at end of file
index 05c249b976d02cb746dbaa95451bd6c6f16fe9ba..38413d3c622aa32af70926abdb2e1b8649458327 100644 (file)
@@ -7409,4 +7409,231 @@ velocityjitter 64 64 64
 //lightradius 50
 //lightradiusfade 50
 //lightcolor 1 0.9 0.7
-//lightshadow 1
\ No newline at end of file
+//lightshadow 1
+
+// heal ray muzzleflash
+
+effect healray_muzzleflash
+countabsolute 1
+type smoke
+color 0x283880 0x283880 // 0x202020 0x404040
+tex 65 65
+size 20 20
+alpha 256 256 512
+originjitter 1.5 1.5 1.5
+velocityjitter 6 6 6
+sizeincrease -10
+velocitymultiplier 0.01
+lightradius 200
+lightradiusfade 2000
+lightcolor 1.5 3 6
+
+effect healray_muzzleflash
+count 22
+type spark
+tex 71 73
+color 0xD9FDFF 0x00f0ff
+size 1 15
+sizeincrease 3
+alpha 50 150 1924
+originjitter 1 1 1
+velocityjitter 150 150 150
+velocitymultiplier 0.4
+airfriction 5
+stretchfactor 3.9
+
+effect healray_muzzleflash
+count 4
+type spark
+tex 70 70
+color 0xD9FDFF 0x00f0ff
+size 1 1
+alpha 110 228 4024
+originjitter 1 1 1
+velocityjitter 650 650 650
+velocitymultiplier 1.1
+stretchfactor 0.2
+
+
+
+//healray impact
+
+effect healray_impact
+countabsolute 1
+type decal
+tex 59 59
+size 32 32
+alpha 256 256 0
+color 0xd800ff 0xd800ff
+originjitter 17 17 17
+lightradius 125
+lightradiusfade 450
+lightcolor 0 4.375 0
+// shockwave
+effect healray_impact
+type smoke
+countabsolute 1
+tex 33 33
+size 32 32
+sizeincrease 1400
+color 0x00ff00 0x84c52f
+alpha 40 40 350
+velocitymultiplier 44
+// cloud of bouncing sparks
+effect healray_impact
+count 30
+type spark
+tex 70 70
+color 0x00ff00 0x84c52f
+size 1 2
+alpha 156 300 1024
+gravity 2
+airfriction 6
+originjitter 1 1 1
+velocityjitter 1112 1112 1112
+// inner cloud of smoke
+effect healray_impact
+count 15
+type smoke
+color 0x00ff00 0x84c52f
+tex 40 40
+size 2 3 
+alpha 200 456 512
+airfriction 3
+gravity -2
+velocityjitter 120 120 420
+rotate -180 180 -90 90
+
+
+
+
+// big plasma muzzle flash
+
+effect bigplasma_muzzleflash
+countabsolute 1
+type smoke
+color 0x283880 0x283880 // 0x202020 0x404040
+tex 65 65
+size 50 50
+alpha 256 256 812
+originjitter 1.5 1.5 1.5
+velocityjitter 6 6 6
+sizeincrease -10
+velocitymultiplier 0.01
+lightradius 200
+lightradiusfade 2000
+lightcolor 1.5 3 6
+
+effect bigplasma_muzzleflash
+countabsolute 1
+type smoke
+color 0x00f0ff 0x00f0ff
+tex 74 74
+size 20 20
+alpha 56 56 1112
+sizeincrease 300
+
+effect bigplasma_muzzleflash
+count 14
+type spark
+tex 51 55
+color 0xD9FDFF 0x00f0ff
+size 5 10
+sizeincrease 135
+alpha 50 150 1924
+originjitter 1 1 1
+velocityjitter 350 350 350
+velocitymultiplier 0.4
+airfriction 5
+stretchfactor 1.9
+
+effect bigplasma_muzzleflash
+count 4
+type spark
+tex 70 70
+color 0xD9FDFF 0x00f0ff
+size 20 20
+alpha 110 228 4024
+originjitter 1 1 1
+velocityjitter 650 650 650
+velocitymultiplier 1.1
+stretchfactor 0.2
+
+
+// big plasma impact
+
+effect bigplasma_impact
+countabsolute 1
+type decal
+tex 59 59
+size 32 32
+alpha 256 256 0
+originjitter 17 17 17
+lightradius 125
+lightradiusfade 450
+lightcolor 3.125 4.375 10
+// shockwave
+effect bigplasma_impact
+type smoke
+countabsolute 1
+tex 33 33
+size 32 32
+sizeincrease 1400
+color 0x80C0FF 0x80C0FF
+alpha 40 40 350
+velocitymultiplier 44
+// cloud of bouncing sparks
+effect bigplasma_impact
+count 30
+type spark
+tex 70 70
+color 0x629dff 0x0018ff
+size 1 2
+alpha 156 300 1024
+gravity 2
+airfriction 6
+originjitter 1 1 1
+velocityjitter 1512 1512 1512
+// inner cloud of smoke
+effect bigplasma_impact
+count 15
+type smoke
+color 0x629dff 0x0018ff
+tex 48 55
+size 20 24
+sizeincrease 555
+alpha 200 456 1512
+airfriction 30
+originjitter 20 20 20
+velocityjitter 320 320 320
+rotate -180 180 -9 9
+// smoke
+effect bigplasma_impact
+type smoke
+count 16
+blend alpha
+tex 0 7
+size 60 30
+color 0x222222 0x000000
+alpha 128 328 390
+rotate -180 180 2 -2
+velocityjitter 100 100 200
+velocityoffset 0 0 180
+originjitter 80 80 10
+sizeincrease 30
+airfriction 0.04
+gravity 0.4
+// smoke in the middle
+effect bigplasma_impact
+type alphastatic
+count 10
+tex 0 7
+size 60 70
+color 0x222222 0x000000
+alpha 128 328 310
+rotate -180 180 20 -20
+velocityjitter 10 10 10
+originjitter 80 80 80
+sizeincrease -10
+airfriction 0.04
+gravity -0.2
\ No newline at end of file
index 4c4c09baff0321867c5d99be8f2d7eb933121c51..f92230f16f04f10ecf7df6656e7aedad21a08536 100644 (file)
@@ -1,5 +1,5 @@
 cl_decals 1
-cl_decals_models 1
+cl_decals_models 0
 cl_decals_time 10
 cl_particles_quality 1
 cl_damageeffect 1
diff --git a/gfx/hud/default/key_atck.tga b/gfx/hud/default/key_atck.tga
new file mode 100644 (file)
index 0000000..40a12dc
Binary files /dev/null and b/gfx/hud/default/key_atck.tga differ
diff --git a/gfx/hud/default/key_atck2.tga b/gfx/hud/default/key_atck2.tga
new file mode 100644 (file)
index 0000000..40a12dc
Binary files /dev/null and b/gfx/hud/default/key_atck2.tga differ
diff --git a/gfx/hud/default/key_atck2_inv.tga b/gfx/hud/default/key_atck2_inv.tga
new file mode 100644 (file)
index 0000000..c1f6e42
Binary files /dev/null and b/gfx/hud/default/key_atck2_inv.tga differ
diff --git a/gfx/hud/default/key_atck_inv.tga b/gfx/hud/default/key_atck_inv.tga
new file mode 100644 (file)
index 0000000..c1f6e42
Binary files /dev/null and b/gfx/hud/default/key_atck_inv.tga differ
diff --git a/gfx/vehicles/axh-rings.tga b/gfx/vehicles/axh-rings.tga
new file mode 100644 (file)
index 0000000..da68ff8
Binary files /dev/null and b/gfx/vehicles/axh-rings.tga differ
diff --git a/gfx/vehicles/bumb.tga b/gfx/vehicles/bumb.tga
new file mode 100644 (file)
index 0000000..22883f4
Binary files /dev/null and b/gfx/vehicles/bumb.tga differ
diff --git a/gfx/vehicles/bumb_lgun.tga b/gfx/vehicles/bumb_lgun.tga
new file mode 100644 (file)
index 0000000..23db1da
Binary files /dev/null and b/gfx/vehicles/bumb_lgun.tga differ
diff --git a/gfx/vehicles/bumb_rgun.tga b/gfx/vehicles/bumb_rgun.tga
new file mode 100644 (file)
index 0000000..f755681
Binary files /dev/null and b/gfx/vehicles/bumb_rgun.tga differ
diff --git a/gfx/vehicles/bumb_side.tga b/gfx/vehicles/bumb_side.tga
new file mode 100644 (file)
index 0000000..69fa4d8
Binary files /dev/null and b/gfx/vehicles/bumb_side.tga differ
diff --git a/gfx/vehicles/bumb_side_gun.tga b/gfx/vehicles/bumb_side_gun.tga
new file mode 100644 (file)
index 0000000..c8fc817
Binary files /dev/null and b/gfx/vehicles/bumb_side_gun.tga differ
diff --git a/gfx/vehicles/energy.tga b/gfx/vehicles/energy.tga
new file mode 100644 (file)
index 0000000..de06ecc
Binary files /dev/null and b/gfx/vehicles/energy.tga differ
diff --git a/gfx/vehicles/vth-mover.tga b/gfx/vehicles/vth-mover.tga
new file mode 100644 (file)
index 0000000..d831896
Binary files /dev/null and b/gfx/vehicles/vth-mover.tga differ
diff --git a/gfx/vehicles/vth-stationary.tga b/gfx/vehicles/vth-stationary.tga
new file mode 100644 (file)
index 0000000..31703bc
Binary files /dev/null and b/gfx/vehicles/vth-stationary.tga differ
index df836368301076d984407568c470f5bdc6efef96..6472a257963fad8c9526546031d3d6e7c716779f 100644 (file)
@@ -204,6 +204,7 @@ seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
 seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat 1
 seta hud_panel_chat_pos "0.010000 0.700000"
index eef7aed2955353d6205e49a9598b218d4cc6f8d6..bb7e0662e32e3bcbce1060385a3f0d42a6961549 100644 (file)
@@ -204,6 +204,7 @@ seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
 seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat 1
 seta hud_panel_chat_pos "0 0.775000"
index 0a77fba082b0c8e590bd4ff58c1bb0c5b8e0f756..e0921ad35337d272f8e0c91a0032864349981cac 100644 (file)
@@ -204,6 +204,7 @@ seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
 seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat 1
 seta hud_panel_chat_pos "0 0.775000"
index cd4b1ba711a264fb5c2068a1cf0cc2ed09fcd2d7..119f7b18f6f8cd3f163e7e6ac172db53ed4516ad 100644 (file)
@@ -204,6 +204,7 @@ seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
 seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat 1
 seta hud_panel_chat_pos "0.020000 0.780000"
index 67bbde531da8e03e03a4c2e7fb3c8e8ef9f119f8..3cf0feb753e5e08b748ce408a03f42affc78393d 100644 (file)
@@ -204,6 +204,7 @@ seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
 seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat 1
 seta hud_panel_chat_pos "0 0.760000"
diff --git a/models/items/a_bullets_simple.iqm b/models/items/a_bullets_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/a_bullets_simple.iqm differ
diff --git a/models/items/a_bullets_simple.iqm_0.skin b/models/items/a_bullets_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..4757695
--- /dev/null
@@ -0,0 +1 @@
+Plane,a_bullets_simple
\ No newline at end of file
diff --git a/models/items/a_bullets_simple.tga b/models/items/a_bullets_simple.tga
new file mode 100644 (file)
index 0000000..111a32a
Binary files /dev/null and b/models/items/a_bullets_simple.tga differ
diff --git a/models/items/a_cells_simple.iqm b/models/items/a_cells_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/a_cells_simple.iqm differ
diff --git a/models/items/a_cells_simple.iqm_0.skin b/models/items/a_cells_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..1651991
--- /dev/null
@@ -0,0 +1 @@
+Plane,a_cells_simple
\ No newline at end of file
diff --git a/models/items/a_cells_simple.tga b/models/items/a_cells_simple.tga
new file mode 100644 (file)
index 0000000..0f7f1df
Binary files /dev/null and b/models/items/a_cells_simple.tga differ
diff --git a/models/items/a_rockets_simple.iqm b/models/items/a_rockets_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/a_rockets_simple.iqm differ
diff --git a/models/items/a_rockets_simple.iqm_0.skin b/models/items/a_rockets_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..5b2333c
--- /dev/null
@@ -0,0 +1 @@
+Plane,a_rockets_simple
\ No newline at end of file
diff --git a/models/items/a_rockets_simple.tga b/models/items/a_rockets_simple.tga
new file mode 100644 (file)
index 0000000..3d8646b
Binary files /dev/null and b/models/items/a_rockets_simple.tga differ
diff --git a/models/items/a_shells_simple.iqm b/models/items/a_shells_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/a_shells_simple.iqm differ
diff --git a/models/items/a_shells_simple.iqm_0.skin b/models/items/a_shells_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..e3dc44f
--- /dev/null
@@ -0,0 +1 @@
+Plane,a_shells_simple
\ No newline at end of file
diff --git a/models/items/a_shells_simple.tga b/models/items/a_shells_simple.tga
new file mode 100644 (file)
index 0000000..a357f50
Binary files /dev/null and b/models/items/a_shells_simple.tga differ
diff --git a/models/items/g_h100_simple.iqm b/models/items/g_h100_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_h100_simple.iqm differ
diff --git a/models/items/g_h100_simple.iqm_0.skin b/models/items/g_h100_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..f8acadd
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_h100_simple
\ No newline at end of file
diff --git a/models/items/g_h100_simple.tga b/models/items/g_h100_simple.tga
new file mode 100644 (file)
index 0000000..08b780a
Binary files /dev/null and b/models/items/g_h100_simple.tga differ
diff --git a/models/items/g_h1_simple.iqm b/models/items/g_h1_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_h1_simple.iqm differ
diff --git a/models/items/g_h1_simple.iqm_0.skin b/models/items/g_h1_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..9532805
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_h1_simple
\ No newline at end of file
diff --git a/models/items/g_h1_simple.tga b/models/items/g_h1_simple.tga
new file mode 100644 (file)
index 0000000..d8bbbc7
Binary files /dev/null and b/models/items/g_h1_simple.tga differ
diff --git a/models/items/g_h25_simple.iqm b/models/items/g_h25_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_h25_simple.iqm differ
diff --git a/models/items/g_h25_simple.iqm_0.skin b/models/items/g_h25_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..0f33bc7
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_h25_simple
\ No newline at end of file
diff --git a/models/items/g_h25_simple.tga b/models/items/g_h25_simple.tga
new file mode 100644 (file)
index 0000000..63593cc
Binary files /dev/null and b/models/items/g_h25_simple.tga differ
diff --git a/models/items/g_h50_simple.iqm b/models/items/g_h50_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_h50_simple.iqm differ
diff --git a/models/items/g_h50_simple.iqm_0.skin b/models/items/g_h50_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..b830541
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_h50_simple
\ No newline at end of file
diff --git a/models/items/g_h50_simple.tga b/models/items/g_h50_simple.tga
new file mode 100644 (file)
index 0000000..a8cbad9
Binary files /dev/null and b/models/items/g_h50_simple.tga differ
diff --git a/models/items/g_invincible_simple.iqm b/models/items/g_invincible_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_invincible_simple.iqm differ
diff --git a/models/items/g_invincible_simple.iqm_0.skin b/models/items/g_invincible_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..6522c88
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_invincible_simple
\ No newline at end of file
diff --git a/models/items/g_invincible_simple.tga b/models/items/g_invincible_simple.tga
new file mode 100644 (file)
index 0000000..76cb414
Binary files /dev/null and b/models/items/g_invincible_simple.tga differ
diff --git a/models/items/g_strength_simple.iqm b/models/items/g_strength_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_strength_simple.iqm differ
diff --git a/models/items/g_strength_simple.iqm_0.skin b/models/items/g_strength_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..bcdad79
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_strength_simple
\ No newline at end of file
diff --git a/models/items/g_strength_simple.tga b/models/items/g_strength_simple.tga
new file mode 100644 (file)
index 0000000..09aa45c
Binary files /dev/null and b/models/items/g_strength_simple.tga differ
diff --git a/models/items/item_armor_big_simple.iqm b/models/items/item_armor_big_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/item_armor_big_simple.iqm differ
diff --git a/models/items/item_armor_big_simple.iqm_0.skin b/models/items/item_armor_big_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..ab88a06
--- /dev/null
@@ -0,0 +1 @@
+Plane,item_armor_big_simple
\ No newline at end of file
diff --git a/models/items/item_armor_big_simple.tga b/models/items/item_armor_big_simple.tga
new file mode 100644 (file)
index 0000000..7bbd5b4
Binary files /dev/null and b/models/items/item_armor_big_simple.tga differ
diff --git a/models/items/item_armor_large_simple.iqm b/models/items/item_armor_large_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/item_armor_large_simple.iqm differ
diff --git a/models/items/item_armor_large_simple.iqm_0.skin b/models/items/item_armor_large_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..4ae65f3
--- /dev/null
@@ -0,0 +1 @@
+Plane,item_armor_large_simple
\ No newline at end of file
diff --git a/models/items/item_armor_large_simple.tga b/models/items/item_armor_large_simple.tga
new file mode 100644 (file)
index 0000000..80db5ab
Binary files /dev/null and b/models/items/item_armor_large_simple.tga differ
diff --git a/models/items/item_armor_medium_simple.iqm b/models/items/item_armor_medium_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/item_armor_medium_simple.iqm differ
diff --git a/models/items/item_armor_medium_simple.iqm_0.skin b/models/items/item_armor_medium_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..8f258c1
--- /dev/null
@@ -0,0 +1 @@
+Plane,item_armor_medium_simple
\ No newline at end of file
diff --git a/models/items/item_armor_medium_simple.tga b/models/items/item_armor_medium_simple.tga
new file mode 100644 (file)
index 0000000..ed3ce1f
Binary files /dev/null and b/models/items/item_armor_medium_simple.tga differ
diff --git a/models/items/item_armor_small_simple.iqm b/models/items/item_armor_small_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/item_armor_small_simple.iqm differ
diff --git a/models/items/item_armor_small_simple.iqm_0.skin b/models/items/item_armor_small_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..50bbb53
--- /dev/null
@@ -0,0 +1 @@
+Plane,item_armor_small_simple
\ No newline at end of file
diff --git a/models/items/item_armor_small_simple.tga b/models/items/item_armor_small_simple.tga
new file mode 100644 (file)
index 0000000..d8a0f91
Binary files /dev/null and b/models/items/item_armor_small_simple.tga differ
index 9962dd764ab3c886953c3c7c90809073dd0ac310..016b6343d8e2672f5bfc30d254f8940f883b2ca4 100644 (file)
Binary files a/models/vehicles/bumblebee_body.dpm and b/models/vehicles/bumblebee_body.dpm differ
index 57df41a2580020bf34d40c37775e40a81e1aa9a0..785699909cce5bbf4a5d1c7acba72b767a119c1e 100644 (file)
Binary files a/models/vehicles/bumblebee_plasma_left.dpm and b/models/vehicles/bumblebee_plasma_left.dpm differ
index 1689979fcf6ff85b4f4e4f5dd9e70048b8f1d1fb..86cf3ddfc9b88d5987c591e6fe5c2aa028e218dc 100644 (file)
Binary files a/models/vehicles/bumblebee_plasma_right.dpm and b/models/vehicles/bumblebee_plasma_right.dpm differ
index 2e36eb5345eb55a75521408d2f75b65ab1748464..d6014b9c8f1be1d1b2f476217462ab7dab3d3833 100644 (file)
Binary files a/models/vehicles/bumblebee_ray.dpm and b/models/vehicles/bumblebee_ray.dpm differ
diff --git a/models/weapons/crylink_simple.tga b/models/weapons/crylink_simple.tga
new file mode 100644 (file)
index 0000000..4dfe24e
Binary files /dev/null and b/models/weapons/crylink_simple.tga differ
diff --git a/models/weapons/g_crylink_simple.iqm b/models/weapons/g_crylink_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_crylink_simple.iqm differ
diff --git a/models/weapons/g_crylink_simple.iqm_0.skin b/models/weapons/g_crylink_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..e86b8b2
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_crylink_simple
\ No newline at end of file
diff --git a/models/weapons/g_crylink_simple.obj b/models/weapons/g_crylink_simple.obj
new file mode 100644 (file)
index 0000000..3bd17fc
--- /dev/null
@@ -0,0 +1,14 @@
+# Blender3D v249 OBJ File: crylink_simple.blend\r
+# www.blender3d.org\r
+mtllib g_crylink_simple.mtl\r
+v 0.000000 40.000000 14.999998\r
+v 0.000000 10.000001 15.000000\r
+v 0.000000 9.999999 -15.000000\r
+v 0.000000 40.000000 -15.000002\r
+vt 1.000000 1.000000\r
+vt 0.000000 1.000000\r
+vt 0.000000 0.000000\r
+vt 1.000000 0.000000\r
+usemtl crylink_simple\r
+s off\r
+f 1/1 4/2 3/3 2/4\r
diff --git a/models/weapons/g_crylink_simple.tga b/models/weapons/g_crylink_simple.tga
new file mode 100644 (file)
index 0000000..f4054b7
Binary files /dev/null and b/models/weapons/g_crylink_simple.tga differ
diff --git a/models/weapons/g_electro_simple.iqm b/models/weapons/g_electro_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_electro_simple.iqm differ
diff --git a/models/weapons/g_electro_simple.iqm_0.skin b/models/weapons/g_electro_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..0ae8f4a
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_electro_simple
\ No newline at end of file
diff --git a/models/weapons/g_electro_simple.tga b/models/weapons/g_electro_simple.tga
new file mode 100644 (file)
index 0000000..b523c72
Binary files /dev/null and b/models/weapons/g_electro_simple.tga differ
diff --git a/models/weapons/g_gl_simple.iqm b/models/weapons/g_gl_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_gl_simple.iqm differ
diff --git a/models/weapons/g_gl_simple.iqm_0.skin b/models/weapons/g_gl_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..cbb574d
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_gl_simple
\ No newline at end of file
diff --git a/models/weapons/g_gl_simple.tga b/models/weapons/g_gl_simple.tga
new file mode 100644 (file)
index 0000000..e138aa4
Binary files /dev/null and b/models/weapons/g_gl_simple.tga differ
diff --git a/models/weapons/g_hagar_simple.iqm b/models/weapons/g_hagar_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_hagar_simple.iqm differ
diff --git a/models/weapons/g_hagar_simple.iqm_0.skin b/models/weapons/g_hagar_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..2eb9f30
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_hagar_simple
\ No newline at end of file
diff --git a/models/weapons/g_hagar_simple.tga b/models/weapons/g_hagar_simple.tga
new file mode 100644 (file)
index 0000000..4c82e4b
Binary files /dev/null and b/models/weapons/g_hagar_simple.tga differ
diff --git a/models/weapons/g_nex_simple.iqm b/models/weapons/g_nex_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_nex_simple.iqm differ
diff --git a/models/weapons/g_nex_simple.iqm_0.skin b/models/weapons/g_nex_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..55a8cc4
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_nex_simple
\ No newline at end of file
diff --git a/models/weapons/g_nex_simple.tga b/models/weapons/g_nex_simple.tga
new file mode 100644 (file)
index 0000000..27c984f
Binary files /dev/null and b/models/weapons/g_nex_simple.tga differ
diff --git a/models/weapons/g_rl_simple.iqm b/models/weapons/g_rl_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_rl_simple.iqm differ
diff --git a/models/weapons/g_rl_simple.iqm_0.skin b/models/weapons/g_rl_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..bcb054e
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_rl_simple
\ No newline at end of file
diff --git a/models/weapons/g_rl_simple.tga b/models/weapons/g_rl_simple.tga
new file mode 100644 (file)
index 0000000..d65fa87
Binary files /dev/null and b/models/weapons/g_rl_simple.tga differ
diff --git a/models/weapons/g_shotgun_simple.iqm b/models/weapons/g_shotgun_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_shotgun_simple.iqm differ
diff --git a/models/weapons/g_shotgun_simple.iqm_0.skin b/models/weapons/g_shotgun_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..3721ffc
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_shotgun_simple
\ No newline at end of file
diff --git a/models/weapons/g_shotgun_simple.tga b/models/weapons/g_shotgun_simple.tga
new file mode 100644 (file)
index 0000000..37da2f8
Binary files /dev/null and b/models/weapons/g_shotgun_simple.tga differ
diff --git a/models/weapons/g_uzi_simple.iqm b/models/weapons/g_uzi_simple.iqm
new file mode 100644 (file)
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_uzi_simple.iqm differ
diff --git a/models/weapons/g_uzi_simple.iqm_0.skin b/models/weapons/g_uzi_simple.iqm_0.skin
new file mode 100644 (file)
index 0000000..043974b
--- /dev/null
@@ -0,0 +1 @@
+Plane,g_uzi_simple
\ No newline at end of file
diff --git a/models/weapons/g_uzi_simple.tga b/models/weapons/g_uzi_simple.tga
new file mode 100644 (file)
index 0000000..d9b5df4
Binary files /dev/null and b/models/weapons/g_uzi_simple.tga differ
index 618e3ad4e234fc465e927bd80493429d9d5bcc16..27f6fc993aa0c12c1e372a7b36c25922fcce7995 100644 (file)
@@ -3,7 +3,7 @@ FTEQCC ?= fteqcc
 PERL ?= perl
 
 FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"' -DCVAR_POPCON
-FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -fno-fastarrays $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
+FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-return_only -fno-fastarrays $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
 FTEQCCFLAGS_PROGS ?=
 FTEQCCFLAGS_MENU ?=
 
index 6072652cd92b845b9d91ddaec16aed26cca39251..1ecc14516228995e4e5111ca10911ad3feb92477 100644 (file)
@@ -87,7 +87,7 @@ void ConsoleCommand_macro_init();
 void CSQC_Init(void)
 {
        prvm_language = cvar_string("prvm_language");
-
+    cl_simple_items = autocvar_cl_simple_items;
 #ifdef USE_FTE
 #pragma target ID
        __engine_check = checkextension("DP_SV_WRITEPICTURE");
@@ -118,7 +118,7 @@ void CSQC_Init(void)
        ClientProgsDB = db_load("client.db");
        compressShortVector_init();
 
-       drawfont = FONT_USER+1;
+       draw_endBoldFont();
        menu_visible = FALSE;
        menu_show = menu_show_error;
        menu_action = menu_sub_null;
@@ -178,7 +178,7 @@ void CSQC_Init(void)
        DamageInfo_Precache();
        Vehicles_Precache();
        turrets_precache();
-  Announcer_Precache();
+    Announcer_Precache();
        Tuba_Precache();
        
        if(autocvar_cl_reticle)
@@ -766,7 +766,9 @@ void CSQC_Ent_Update(float bIsNewEntity)
                case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
                case ENT_CLIENT_AUXILIARYXHAIR: Net_AuXair2(bIsNewEntity); break;
                case ENT_CLIENT_TURRET: ent_turret(); break; 
-               case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break; 
+               case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break;
+               case ENT_CLIENT_ITEM: ItemRead(bIsNewEntity); break;  
+               case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break;  
                default:
                        //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
                        error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname));
index 66d7dd31c4b1ae258043002bc381a81109d9ddfc..0dd898aad6039407543f36e1e20c11d00024a2dd 100644 (file)
@@ -1468,6 +1468,8 @@ void CSQC_UpdateView(float w, float h)
             CSQC_RAPTOR_HUD();
         else if(hud == HUD_BUMBLEBEE)
             CSQC_BUMBLE_HUD();
+        else if(hud == HUD_BUMBLEBEE_GUN)
+            CSQC_BUMBLE_GUN_HUD();
     }
        
        cl_notice_run();
index 43dd0dd1834bd76fea1b760fefca9489d4c75f8a..dd482a8f252a73de57d9a51ee3976df07e4a5662 100644 (file)
@@ -67,6 +67,7 @@ float autocvar_cl_reticle_stretch;
 float autocvar_cl_stripcolorcodes;
 var float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6;
 var float autocvar_cl_vehicle_spiderbot_cross_size = 1;
+var float autocvar_cl_vehicles_hud_tactical = 1;
 float autocvar_cl_velocityzoom;
 var float autocvar_cl_velocityzoom_type = 3;
 float autocvar_cl_velocityzoom_speed;
@@ -279,6 +280,7 @@ string autocvar_hud_panel_powerups_progressbar_superweapons;
 float autocvar_hud_panel_powerups_text;
 float autocvar_hud_panel_pressedkeys;
 float autocvar_hud_panel_pressedkeys_aspect;
+float autocvar_hud_panel_pressedkeys_attack;
 float autocvar_hud_panel_racetimer;
 float autocvar_hud_panel_radar;
 float autocvar_hud_panel_radar_foreground_alpha;
@@ -394,6 +396,7 @@ float autocvar_cl_forceplayercolors;
 string autocvar_cl_forcemyplayermodel;
 float autocvar_cl_forcemyplayerskin;
 float autocvar_cl_forcemyplayercolors;
+float autocvar__cl_color;
 float autocvar__cl_playerskin;
 string autocvar__cl_playermodel;
 float autocvar_cl_precacheplayermodels;
index 152ecbe82e998e398d35fcd0a8a1f0cbc37a811b..9c87d13addf9949c671a4319da1e5c91f2f69b45 100644 (file)
@@ -133,12 +133,15 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer)
        {
                if(islocalplayer)
                {
-                       // trust server's idea of "own player model"
-                       forceplayermodels_modelisgoodmodel = self.forceplayermodels_isgoodmodel;
-                       forceplayermodels_model = self.forceplayermodels_savemodel;
-                       forceplayermodels_modelindex = self.forceplayermodels_savemodelindex;
-                       forceplayermodels_skin = self.forceplayermodels_saveskin;
-                       forceplayermodels_attempted = 1;
+                       if(!isdemo()) // this is mainly cheat protection; not needed for demos
+                       {
+                               // trust server's idea of "own player model"
+                               forceplayermodels_modelisgoodmodel = self.forceplayermodels_isgoodmodel;
+                               forceplayermodels_model = self.forceplayermodels_savemodel;
+                               forceplayermodels_modelindex = self.forceplayermodels_savemodelindex;
+                               forceplayermodels_skin = self.forceplayermodels_saveskin;
+                               forceplayermodels_attempted = 1;
+                       }
                }
        }
 
@@ -170,7 +173,17 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer)
        }
 
        // apply it
-       if(autocvar_cl_forcemyplayermodel != "" && forceplayermodels_myisgoodmodel && islocalplayer)
+       float isfriend;
+       float cm;
+       cm = self.forceplayermodels_savecolormap;
+       cm = (cm >= 1024) ? cm : (stof(getplayerkeyvalue(self.colormap - 1, "colors")) + 1024);
+
+       if(teamplay)
+               isfriend = (cm == 1024 + 17 * myteam);
+       else
+               isfriend = islocalplayer;
+
+       if(autocvar_cl_forcemyplayermodel != "" && forceplayermodels_myisgoodmodel && isfriend)
        {
                self.model = forceplayermodels_mymodel;
                self.modelindex = forceplayermodels_mymodelindex;
@@ -196,7 +209,56 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer)
        }
 
        // forceplayercolors too
-       if(!teamplay)
+       if(teamplay)
+       {
+               // own team's color is never forced
+               float forcecolor_friend = 0;
+               float forcecolor_enemy = 0;
+               float teams_count = 0;
+               entity tm;
+
+               for(tm = teams.sort_next; tm; tm = tm.sort_next)
+                       if(tm.team != COLOR_SPECTATOR)
+                               ++teams_count;
+
+               if(autocvar_cl_forcemyplayercolors)
+                       forcecolor_friend = 1024 + autocvar_cl_forcemyplayercolors;
+               if(autocvar_cl_forceplayercolors && teams_count == 2)
+                       forcecolor_enemy = 1024 + autocvar__cl_color;
+
+               if(forcecolor_enemy && !forcecolor_friend)
+               {
+                       // only enemy color is forced?
+                       // verify it is not equal to the friend color
+                       if(forcecolor_enemy == 1024 + 17 * myteam)
+                               forcecolor_enemy = 0;
+               }
+
+               if(forcecolor_friend && !forcecolor_enemy)
+               {
+                       // only friend color is forced?
+                       // verify it is not equal to the enemy color
+                       for(tm = teams.sort_next; tm; tm = tm.sort_next)
+                               // note: we even compare against our own team.
+                               // if we rejected because we matched our OWN team color,
+                               // this is not bad; we then simply keep our color as is
+                               // anyway.
+                               if(forcecolor_friend == 1024 + 17 * tm.team)
+                                       forcecolor_friend = 0;
+               }
+
+               if(cm == 1024 + 17 * myteam)
+               {
+                       if(forcecolor_friend)
+                               self.colormap = forcecolor_friend;
+               }
+               else
+               {
+                       if(forcecolor_enemy)
+                               self.colormap = forcecolor_enemy;
+               }
+       }
+       else
        {
                if(autocvar_cl_forcemyplayercolors && islocalplayer)
                        self.colormap = 1024 + autocvar_cl_forcemyplayercolors;
index fc8b83b5b6c8666a11efe0961ebe8af011cfcbfb..ae83d45eea011d890b8b3fd0430866d2b17312ca 100644 (file)
@@ -229,7 +229,7 @@ void Ent_DamageInfo(float isNew)
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
                                pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                                break;
-                               
+            
                        case DEATH_WAKIGUN:
                                sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("wakizashi_gun_impact"), self.origin, w_backoff * 1000, 1);
@@ -267,6 +267,10 @@ void Ent_DamageInfo(float isNew)
                                sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_MIN);
                                pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                                break;
+                       case DEATH_BUMB_GUN:
+                               sound(self, CH_SHOTS, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM);
+                               pointparticles(particleeffectnum("bigplasma_impact"), self.origin, w_backoff * 1000, 1);
+                               break;
                }
        }
        
index ffd95f4feff69a5896f1fab4ef85e62ce9cd6082..2e3607ff4ffd37baab05b269befe4af27de28418 100644 (file)
@@ -476,6 +476,8 @@ void HUD_Weapons(void)
        HUD_Panel_UpdateCvars(weapons);
        HUD_Panel_ApplyFadeAlpha();
 
+       draw_beginBoldFont();
+
        // calculate fading effect to weapon images for when the panel is idle
        if(autocvar_hud_panel_weapons_fade)
        {
@@ -808,6 +810,8 @@ void HUD_Weapons(void)
                        ++column;
                }
        }
+
+       draw_endBoldFont();
 }
 
 // Ammo (#1)
@@ -908,6 +912,9 @@ void HUD_Ammo(void)
 
        HUD_Panel_UpdateCvars(ammo);
        HUD_Panel_ApplyFadeAlpha();
+
+       draw_beginBoldFont();
+
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
@@ -958,35 +965,40 @@ void HUD_Ammo(void)
                if(autocvar__hud_configure)
                {
                        DrawAmmoItem(pos, ammo_size, 2, true, FALSE); //show rockets
-                       return;
                }
+               else
+               {
+                       stat_items = getstati(STAT_ITEMS, 0, 24);
+                       if (stat_items & IT_UNLIMITED_WEAPON_AMMO)
+                               infinite_ammo = TRUE;
+                       for (i = 0; i < AMMO_COUNT; ++i) {
+                               currently_selected = stat_items & GetAmmoItemCode(i);
+                               if (currently_selected)
+                               {
+                                       DrawAmmoItem(pos, ammo_size, i, true, infinite_ammo);
+                                       break;
+                               }
+                       }
+               }
+       }
+       else
+       {
                stat_items = getstati(STAT_ITEMS, 0, 24);
                if (stat_items & IT_UNLIMITED_WEAPON_AMMO)
                        infinite_ammo = TRUE;
                for (i = 0; i < AMMO_COUNT; ++i) {
                        currently_selected = stat_items & GetAmmoItemCode(i);
-                       if (currently_selected)
+                       DrawAmmoItem(pos + eX * column * (ammo_size_x + offset_x) + eY * row * (ammo_size_y + offset_y), ammo_size, i, currently_selected, infinite_ammo);
+                       ++row;
+                       if(row >= rows)
                        {
-                               DrawAmmoItem(pos, ammo_size, i, true, infinite_ammo);
-                               return;
+                               row = 0;
+                               column = column + 1;
                        }
                }
-               return; // nothing to display
        }
 
-       stat_items = getstati(STAT_ITEMS, 0, 24);
-       if (stat_items & IT_UNLIMITED_WEAPON_AMMO)
-               infinite_ammo = TRUE;
-       for (i = 0; i < AMMO_COUNT; ++i) {
-               currently_selected = stat_items & GetAmmoItemCode(i);
-               DrawAmmoItem(pos + eX * column * (ammo_size_x + offset_x) + eY * row * (ammo_size_y + offset_y), ammo_size, i, currently_selected, infinite_ammo);
-               ++row;
-               if(row >= rows)
-               {
-                       row = 0;
-                       column = column + 1;
-               }
-       }
+       draw_endBoldFont();
 }
 
 void DrawNumIcon_expanding(vector myPos, vector mySize, float x, string icon, float vertical, float icon_right_align, vector color, float theAlpha, float fadelerp)
@@ -1107,6 +1119,9 @@ void HUD_Powerups(void)
 
        HUD_Panel_UpdateCvars(powerups);
        HUD_Panel_ApplyFadeAlpha();
+
+       draw_beginBoldFont();
+
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
@@ -1273,6 +1288,8 @@ void HUD_Powerups(void)
                                DrawNumIcon_expanding(pos + superweapons_offset, mySize, superweapons, "superweapons", is_vertical, superweapons_iconalign, '1 1 1', 1, bound(0, (superweapons - superweapons_time) / 0.5, 1));
                }
        }
+
+       draw_endBoldFont();
 }
 
 // Health/armor (#3)
@@ -1745,11 +1762,15 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
                } else if(type == DEATH_SBBLOWUP) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
-                               print (sprintf(_("^1%s^1 got caught in the destruction of %s^1's vehicle\n"), s2, s1));
+                               print (sprintf(_("^1%s^1 got caught in the blast when %s^1's destroys a vehicle\n"), s2, s1));
                } else if(type == DEATH_WAKIGUN) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
                                print (sprintf(_("^1%s^1 was bolted down by %s\n"), s2, s1));
+               } else if(type == DEATH_BUMB_GUN) {
+                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
+                       if(alsoprint)
+                               print (sprintf(_("^1%s^1 saw %s's preddy lights.\n"), s2, s1));
                } else if(type == DEATH_WAKIROCKET) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
@@ -1757,7 +1778,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
                } else if(type == DEATH_WAKIBLOWUP) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
-                               print (sprintf(_("^1%s^1 dies when %s^1's wakizashi dies.\n"), s2, s1));
+                               print (sprintf(_("^1%s^1 got caught in the blast when %s^1's destroys a vehicle\n"), s2, s1));
                } else if(type == DEATH_RAPTOR_CANNON) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
@@ -1769,7 +1790,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
                } else if(type == DEATH_RAPTOR_DEATH) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
-                               print (sprintf(_("^1%s^1 dies when %s^1's raptor dies.\n"), s2, s1));
+                               print (sprintf(_("^1%s^1 got caught in the blast when %s^1's destroys a vehicle\n"), s2, s1));
                } else if(type == DEATH_TURRET) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
@@ -2436,6 +2457,9 @@ void HUD_Timer(void)
 
        HUD_Panel_UpdateCvars(timer);
        HUD_Panel_ApplyFadeAlpha();
+
+       draw_beginBoldFont();
+
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
@@ -2478,6 +2502,8 @@ void HUD_Timer(void)
        }
 
        drawstring_aspect(pos, timer, mySize, timer_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+
+       draw_endBoldFont();
 }
 
 // Radar (#6)
@@ -2802,6 +2828,7 @@ void HUD_Score(void)
                score = me.(scores[ps_primary]);
                timer = TIME_ENCODED_TOSTRING(score);
 
+               draw_beginBoldFont();
                if (pl && ((!(scores_flags[ps_primary] & SFL_ZERO_IS_WORST)) || score)) {
                        // distribution display
                        distribution = me.(scores[ps_primary]) - pl.(scores[ps_primary]);
@@ -2822,6 +2849,7 @@ void HUD_Score(void)
                if (distribution <= 0)
                        HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                drawstring_aspect(pos, timer, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               draw_endBoldFont();
        } else if (!teamplay) { // non-teamgames
                if ((spectatee_status == -1 && !autocvar__hud_configure) || autocvar_hud_panel_score_rankings)
                {
@@ -2855,6 +2883,7 @@ void HUD_Score(void)
 
                string distribution_str;
                distribution_str = ftos(distribution);
+               draw_beginBoldFont();
                if (distribution >= 0)
                {
                        if (distribution > 0)
@@ -2863,6 +2892,7 @@ void HUD_Score(void)
                }
                drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                drawstring_aspect(pos + eX * 0.75 * mySize_x, distribution_str, eX * 0.25 * mySize_x + eY * (1/3) * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+               draw_endBoldFont();
        } else { // teamgames
                float scores_count, row, column, rows, columns;
                local noref vector offset; // fteqcc sucks
@@ -2905,6 +2935,7 @@ void HUD_Score(void)
 
                float max_fragcount;
                max_fragcount = -99;
+               draw_beginBoldFont();
                for(tm = teams.sort_next; tm; tm = tm.sort_next) {
                        if(tm.team == COLOR_SPECTATOR)
                                continue;
@@ -2939,6 +2970,7 @@ void HUD_Score(void)
                                ++rows;
                        }
                }
+               draw_endBoldFont();
        }
 }
 
@@ -2957,6 +2989,9 @@ void HUD_RaceTimer (void)
 
        HUD_Panel_UpdateCvars(racetimer);
        HUD_Panel_ApplyFadeAlpha();
+
+       draw_beginBoldFont();
+
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
@@ -3085,6 +3120,8 @@ void HUD_RaceTimer (void)
                        }
                }
        }
+
+       draw_endBoldFont();
 }
 
 // Vote window (#9)
@@ -3907,6 +3944,9 @@ void HUD_ModIcons(void)
 
        HUD_Panel_UpdateCvars(modicons);
        HUD_Panel_ApplyFadeAlpha();
+
+       draw_beginBoldFont();
+
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
@@ -3945,6 +3985,8 @@ void HUD_ModIcons(void)
                HUD_Mod_Dom(pos, mySize);
        else if(gametype == MAPINFO_TYPE_KEEPAWAY)
                HUD_Mod_Keepaway(pos, mySize);
+
+       draw_endBoldFont();
 }
 
 // Draw pressed keys (#11)
@@ -3996,10 +4038,17 @@ void HUD_DrawPressedKeys(void)
        }
 
        vector keysize;
-       keysize = eX * mySize_x * (1/3) + eY * mySize_y * 0.5;
+       keysize = eX * mySize_x * (1/3.0) + eY * mySize_y * (1/(3.0 - !autocvar_hud_panel_pressedkeys_attack));
        float pressedkeys;
        pressedkeys = getstatf(STAT_PRESSED_KEYS);
 
+       if(autocvar_hud_panel_pressedkeys_attack)
+       {
+               drawpic_aspect_skin(pos + eX * keysize_x * 0.5, ((pressedkeys & KEY_ATCK) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos + eX * keysize_x * 1.5, ((pressedkeys & KEY_ATCK2) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               pos_y += keysize_y;
+       }
+
        drawpic_aspect_skin(pos, ((pressedkeys & KEY_CROUCH) ? "key_crouch_inv.tga" : "key_crouch.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        drawpic_aspect_skin(pos + eX * keysize_x, ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        drawpic_aspect_skin(pos + eX * keysize_x * 2, ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -4360,6 +4409,8 @@ void HUD_Physics(void)
        HUD_Panel_UpdateCvars(physics);
        HUD_Panel_ApplyFadeAlpha();
 
+       draw_beginBoldFont();
+
        HUD_Panel_DrawBg(1);
        if(panel_bg_padding)
        {
@@ -4612,6 +4663,8 @@ void HUD_Physics(void)
        tmp_offset_y = (panel_size_y - tmp_size_y) / 2;
        if (autocvar_hud_panel_physics_text == 1 || autocvar_hud_panel_physics_text == 3)
                drawstring_aspect(panel_pos + acceleration_offset + tmp_offset, strcat(ftos_decimals(acceleration, 2), "g"), tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+
+       draw_endBoldFont();
 }
 
 // CenterPrint (#16)
index a53112bbd4b0495fe21483484b7818ebfd93c31c..0f990c69410d2646ccb0f8dca6a2281d6f46e3be 100644 (file)
@@ -138,6 +138,7 @@ void HUD_Panel_ExportCfg(string cfgname)
                                        HUD_Write_PanelCvar_q("_dom_layout");
                                        break;
                                case HUD_PANEL_PRESSEDKEYS:
+                                       HUD_Write_PanelCvar_q("_attack");
                                        HUD_Write_PanelCvar_q("_aspect");
                                        break;
                                case HUD_PANEL_ENGINEINFO:
index 4cb8dad05fff509e7a905ffc6627a850df8459fb..750bd2a75309d8774aea219b774ed1a9875c9f5d 100644 (file)
@@ -194,6 +194,7 @@ void MapVote_Draw()
        pos_y = ymin;
        pos_z = 0;
 
+       draw_beginBoldFont();
        map = _("Vote for a map");
        pos_x = center - stringwidth(map, false, '12 0 0');
        drawstring(pos, map, '24 24 0', '1 1 1', 1, DRAWFLAG_NORMAL);
@@ -205,6 +206,7 @@ void MapVote_Draw()
        drawstring(pos, map, '16 16 0', '0 1 0', 1, DRAWFLAG_NORMAL);
        pos_y += 22;
        pos_x = xmin;
+       draw_endBoldFont();
 
        // base for multi-column stuff...
        ymin = pos_y;
index 070096fbf4d6db912bb50d7f9c88f0eaa4e8de9c..72bb9c5c40a66ec0932bc1dbed0d3b2d00e8a292 100644 (file)
@@ -627,3 +627,13 @@ void URI_Get_Callback(float id, float status, string data)
                print(sprintf(_("Received HTTP request data for an invalid id %d.\n"), id));
        }
 }
+
+void draw_beginBoldFont()
+{
+       drawfont = FONT_USER+2;
+}
+
+void draw_endBoldFont()
+{
+       drawfont = FONT_USER+1;
+}
index d3a3a07d811e95d7ad75847cdbf056ecdb9a51d3..0922433eebdecd2d6c3c229636162e1475c6e56b 100644 (file)
@@ -53,6 +53,7 @@ projectile.qh
 sortlist.qc
 miscfunctions.qc
 teamplay.qc
+../server/t_items.qc
 
 teamradar.qc
 hud_config.qc
@@ -79,6 +80,7 @@ tuba.qc
 target_music.qc
 
 vehicles/vehicles.qc
+../server/vehicles/bumblebee.qc
 shownames.qh
 shownames.qc
 
index 85d5aedcb5f0bd7f638ff4517342c4bfa6bf30a6..4081bd8d1800c147a4867d2a6b6321bb11ed5e39 100644 (file)
@@ -303,6 +303,10 @@ void Ent_Projectile()
                        case PROJECTILE_SPIDERROCKET: setmodel(self, "models/vehicles/rocket02.md3"); self.traileffect = particleeffectnum("spiderbot_rocket_thrust"); break;
                        case PROJECTILE_WAKIROCKET:   setmodel(self, "models/vehicles/rocket01.md3");  self.traileffect = particleeffectnum("wakizashi_rocket_thrust"); break;
                        case PROJECTILE_WAKICANNON:   setmodel(self, "models/laser.mdl");  self.traileffect = particleeffectnum(""); break;
+
+                       case PROJECTILE_BUMBLE_GUN: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
+                       case PROJECTILE_BUMBLE_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
+
                        default:
                                error("Received invalid CSQC projectile, can't work with this!");
                                break;
@@ -406,9 +410,21 @@ void Ent_Projectile()
                                break;
             case PROJECTILE_WAKIROCKET:
                 loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTN_NORM);
-                               break;
+                               break;            
+            /*
             case PROJECTILE_WAKICANNON:
                                break;
+                       case PROJECTILE_BUMBLE_GUN:
+                               // only new engines support sound moving with object
+                               loopsound(self, CH_SHOTS_SINGLE, "weapons/electro_fly.wav", VOL_BASE, ATTN_NORM);
+                               self.mins = '0 0 -4';
+                               self.maxs = '0 0 -4';
+                               self.move_movetype = MOVETYPE_BOUNCE;
+                               self.move_touch = SUB_Null;
+                               self.move_bounce_factor = g_balance_electro_secondary_bouncefactor;
+                               self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
+                               break;
+                       */
                        default:
                                break;
                }
index 935a0277a85abdf98ce2f4d24bbbeb002eedf76e..69a296796108022624ef2b5a7bb65c4fb9a9634d 100644 (file)
@@ -341,6 +341,7 @@ void Cmd_HUD_SetFields(float argc)
 
        hud_fontsize = HUD_GetFontsize("hud_fontsize"); 
 
+       draw_beginBoldFont();
        for(i = 0; i < argc - 1; ++i)
        {
                float nocomplain;
@@ -477,6 +478,7 @@ void Cmd_HUD_SetFields(float argc)
        }
 
        hud_field[hud_num_fields] = SP_END;
+       draw_endBoldFont();
 }
 
 // MOVEUP::
@@ -840,6 +842,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        }
 
        // print the strings of the columns headers and draw the columns
+       draw_beginBoldFont();
        for(i = 0; i < hud_num_fields; ++i)
        {
                if(hud_field[i] == SP_SEPARATOR)
@@ -882,6 +885,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
                        pos_x -= hud_fontsize_x;
                }
        }
+       draw_endBoldFont();
 
        pos_x = xmin;
        pos_y += 1.25 * hud_fontsize_y; // skip the header
@@ -1220,7 +1224,9 @@ void HUD_DrawScoreboard()
        // Heading
        vector sb_heading_fontsize;
        sb_heading_fontsize = hud_fontsize * 2;
+       draw_beginBoldFont();
        drawstring(pos, _("Scoreboard"), sb_heading_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+       draw_endBoldFont();
 
        pos_y += sb_heading_fontsize_y + hud_fontsize_y * 0.25;
 
@@ -1236,6 +1242,7 @@ void HUD_DrawScoreboard()
                        if(tm.team == COLOR_SPECTATOR)
                                continue;
 
+                       draw_beginBoldFont();
                        rgb = GetTeamRGB(tm.team);
                        str = ftos(tm.(teamscores[ts_primary]));
                        drawstring(pos + team_score_baseoffset - eX * stringwidth(str, FALSE, hud_fontsize * 1.5), str, hud_fontsize * 1.5, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
@@ -1245,6 +1252,8 @@ void HUD_DrawScoreboard()
                                str = ftos(tm.(teamscores[ts_secondary]));
                                drawstring(pos + team_score_baseoffset - eX * stringwidth(str, FALSE, hud_fontsize) + eY * hud_fontsize_y * 1.5, str, hud_fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
                        }
+                       draw_endBoldFont();
+
                        pos = HUD_Scoreboard_MakeTable(pos, tm, rgb, bg_size);
                }
        }
@@ -1302,7 +1311,9 @@ void HUD_DrawScoreboard()
 
        if(specs)
        {
+               draw_beginBoldFont();
                drawstring(tmp, _("Spectators"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+               draw_endBoldFont();
                pos_y += 1.25 * hud_fontsize_y;
        }
 
index 2b9ec0297b2ef63411d210cc8a8597bc8438691f..3aa3c3b2bbe6074ccfffc0588921abf688e8b56b 100644 (file)
@@ -235,36 +235,46 @@ void turret_draw2d()
         return; 
 
        float dist = vlen(self.origin - view_origin);
+    float t = (GetPlayerColor(player_localnum) + 1);   
+
        vector o;
-       /*
-       // TODO: Vehicle tactical hud
-       o = project_3d_to_2d(self.origin + '0 0 32');
-       if(o_z < 0 
-       || o_x < (vid_conwidth * waypointsprite_edgeoffset_left) 
-       || o_y < (vid_conheight * waypointsprite_edgeoffset_top) 
-       || o_x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))  
-       || o_y > (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)))
-           return; // Dont draw wp's for turrets out of view
-    o_z = 0;
-    if(hud != HUD_NORMAL)
-    {        
-        switch(hud)
-        {
-            case HUD_SPIDERBOT:
-            case HUD_WAKIZASHI:
-            case HUD_RAPTOR:
-                vector pz = drawgetimagesize("gfx/vehicles/axh-bracket.tga") * 0.25;
-                drawpic(o - pz * 0.5 , "gfx/vehicles/axh-bracket.tga", pz , '1 1 1', 0.75, DRAWFLAG_NORMAL);
-                break;
+       string txt;
+       
+       if(autocvar_cl_vehicles_hud_tactical)
+       if(dist < 10240 && t != self.team)
+       {
+        // TODO: Vehicle tactical hud
+        o = project_3d_to_2d(self.origin + '0 0 32');
+        if(o_z < 0 
+        || o_x < (vid_conwidth * waypointsprite_edgeoffset_left) 
+        || o_y < (vid_conheight * waypointsprite_edgeoffset_top) 
+        || o_x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))  
+        || o_y > (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)))
+            return; // Dont draw wp's for turrets out of view
+        o_z = 0;
+        if(hud != HUD_NORMAL)
+        {        
+            switch(hud)
+            {
+                case HUD_SPIDERBOT:
+                case HUD_WAKIZASHI:
+                case HUD_RAPTOR:
+                    if(self.turret_type == TID_EWHEEL || self.turret_type == TID_WALKER)
+                        txt = "gfx/vehicles/vth-mover.tga";
+                    else
+                        txt = "gfx/vehicles/vth-stationary.tga";
+                        
+                    vector pz = drawgetimagesize(txt) * 0.25;
+                    drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.75, DRAWFLAG_NORMAL);
+                    break;
+            }
         }
-    }
-    */
+       }
     
        if(dist > self.maxdistance)
         return;
 
        string spriteimage = self.netname;
-       float t = (GetPlayerColor(player_localnum) + 1);        
        float a = self.alpha * autocvar_hud_panel_fg_alpha;
        vector rgb = spritelookupcolor(spriteimage, self.teamradar_color);
 
@@ -280,7 +290,7 @@ void turret_draw2d()
                print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage)); 
        }
 
-       string txt = self.netname;
+       txt = self.netname;
        if(autocvar_g_waypointsprite_spam && waypointsprite_count >= autocvar_g_waypointsprite_spam)
                txt = _("Spam");
        else
@@ -378,7 +388,7 @@ void turret_walker_draw()
         return;
     
     fixedmakevectors(self.angles);
-    movelib_groundalign4point(300, 100, 0.25);
+    movelib_groundalign4point(300, 100, 0.25, 45);
     setorigin(self, self.origin + self.velocity * dt);
     self.tur_head.angles += dt * self.tur_head.move_avelocity;
     self.angles_y = self.move_angles_y;
@@ -540,37 +550,38 @@ entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, flo
 
 void turret_die()
 {    
-    entity headgib;
     
     sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
     pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
     turret_tid2info(self.turret_type);
-    
-    // Base
-    if(self.turret_type == TID_EWHEEL)
-        turret_gibtoss(tid2info_base, self.origin + '0 0 18', self.velocity + '0 0 400' + '0.1 0.1 1' * (random() * 400), '-1 -1 -1', TRUE);
-    else if (self.turret_type == TID_WALKER)
-        turret_gibtoss(tid2info_base, self.origin + '0 0 18', self.velocity + '0 0 300' + '0.1 0.1 1' * (random() * 200), '-1 -1 -1', TRUE);
-    else if (self.turret_type == TID_TESLA)
-        turret_gibtoss(tid2info_base, self.origin + '0 0 18', '0 0 200', '-1 -1 -1', FALSE);
-    else
-    {        
-        if (random() > 0.5)
-        {            
-            turret_gibtoss("models/turrets/base-gib2.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE);
-            turret_gibtoss("models/turrets/base-gib3.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE);
-            turret_gibtoss("models/turrets/base-gib4.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE);
-        }
+    if (!autocvar_cl_nogibs)
+    {
+        // Base
+        if(self.turret_type == TID_EWHEEL)
+            turret_gibtoss(tid2info_base, self.origin + '0 0 18', self.velocity + '0 0 400' + '0.1 0.1 1' * (random() * 400), '-1 -1 -1', TRUE);
+        else if (self.turret_type == TID_WALKER)
+            turret_gibtoss(tid2info_base, self.origin + '0 0 18', self.velocity + '0 0 300' + '0.1 0.1 1' * (random() * 200), '-1 -1 -1', TRUE);
+        else if (self.turret_type == TID_TESLA)
+            turret_gibtoss(tid2info_base, self.origin + '0 0 18', '0 0 200', '-1 -1 -1', FALSE);
         else
-            turret_gibtoss("models/turrets/base-gib1.md3", self.origin + '0 0 8', '0 0 0', '0 0 0', TRUE);
-
-        headgib = turret_gibtoss(tid2info_head, self.origin + '0 0 32', '0 0 200' + randomvec() * 200, '-1 -1 -1', TRUE);
-        if(headgib)
-        {
-            headgib.angles = headgib.move_angles = self.tur_head.angles;
-            headgib.avelocity = headgib.move_avelocity = self.tur_head.move_avelocity + randomvec() * 45;
-            headgib.avelocity_y = headgib.move_avelocity_y = headgib.move_avelocity_y * 5;
-            headgib.gravity = 0.5;        
+        {        
+            if (random() > 0.5)
+            {            
+                turret_gibtoss("models/turrets/base-gib2.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE);
+                turret_gibtoss("models/turrets/base-gib3.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE);
+                turret_gibtoss("models/turrets/base-gib4.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE);
+            }
+            else
+                turret_gibtoss("models/turrets/base-gib1.md3", self.origin + '0 0 8', '0 0 0', '0 0 0', TRUE);
+
+            entity headgib = turret_gibtoss(tid2info_head, self.origin + '0 0 32', '0 0 200' + randomvec() * 200, '-1 -1 -1', TRUE);
+            if(headgib)
+            {
+                headgib.angles = headgib.move_angles = self.tur_head.angles;
+                headgib.avelocity = headgib.move_avelocity = self.tur_head.move_avelocity + randomvec() * 45;
+                headgib.avelocity_y = headgib.move_avelocity_y = headgib.move_avelocity_y * 5;
+                headgib.gravity = 0.5;        
+            }
         }
     }
     
index ccb9cff58363374f82761aa58899984b800b86f8..3a4597ab2e4be241d5b16d7dc8ec35a8f788dd38 100644 (file)
 #define hud_ammo1_ico "gfx/vehicles/bullets.tga"
 #define hud_ammo2_bar "gfx/vehicles/bar_dwn_right.tga"
 #define hud_ammo2_ico "gfx/vehicles/rocket.tga"
+#define hud_energy "gfx/vehicles/energy.tga"
+
+#define SBRM_FIRST 1
+#define SBRM_VOLLY 1
+#define SBRM_GUIDE 2
+#define SBRM_ARTILLERY 3
+#define SBRM_LAST 3
+
+#define RSM_FIRST 1
+#define RSM_BOMB 1
+#define RSM_FLARE 2
+#define RSM_LAST 2
 
 entity dropmark;
-float autocvar_cl_vehicles_hudscale;
-float autocvar_cl_vehicles_hudalpha;
+var float autocvar_cl_vehicles_hudscale = 0.5;
+var float autocvar_cl_vehicles_hudalpha = 0.75;
 
+#define raptor_ico  "gfx/vehicles/raptor.tga"
+#define raptor_gun  "gfx/vehicles/raptor_guns.tga"
+#define raptor_bomb "gfx/vehicles/raptor_bombs.tga"
+#define raptor_drop "gfx/vehicles/axh-dropcross.tga"
+string raptor_xhair;
 
 void CSQC_WAKIZASHI_HUD();
 void CSQC_SPIDER_HUD();
 void CSQC_RAPTOR_HUD();
 void CSQC_BUMBLE_HUD();
+void CSQC_BUMBLE_GUN_HUD();
 
 #define MAX_AXH 4
 entity AuxiliaryXhair[MAX_AXH];
@@ -30,12 +48,34 @@ const var void Draw_Not();
 .float  axh_drawflag;
 .float  axh_scale;
 
+#define bumb_ico  "gfx/vehicles/bumb.tga"
+#define bumb_lgun  "gfx/vehicles/bumb_lgun.tga"
+#define bumb_rgun  "gfx/vehicles/bumb_rgun.tga"
+
+#define bumb_gun_ico  "gfx/vehicles/bumb_side.tga"
+#define bumb_gun_gun  "gfx/vehicles/bumb_side_gun.tga"
+
+#define spider_ico  "gfx/vehicles/sbot.tga"
+#define spider_rkt  "gfx/vehicles/sbot_rpods.tga"
+#define spider_mgun "gfx/vehicles/sbot_mguns.tga"
+string spider_xhair; // = "gfx/vehicles/axh-special1.tga";
+
+#define waki_ico "gfx/vehicles/waki.tga"
+#define waki_eng "gfx/vehicles/waki_e.tga"
+#define waki_gun "gfx/vehicles/waki_guns.tga"
+#define waki_rkt "gfx/vehicles/waki_rockets.tga"
+#define waki_xhair "gfx/vehicles/axh-special1.tga"
+
+float alarm1time;
+float alarm2time;
+float weapon2mode;
+
 void AuxiliaryXhair_Draw2D()
 {
     vector loc, psize;
 
     psize = self.axh_scale * draw_getimagesize(self.axh_image);
-    loc = project_3d_to_2d(self.origin) - 0.5 * psize;
+    loc = project_3d_to_2d(self.move_origin) - 0.5 * psize;
     if not (loc_z < 0 || loc_x < 0 || loc_y < 0 || loc_x > vid_conwidth || loc_y > vid_conheight)
     {
         loc_z = 0;
@@ -49,54 +89,55 @@ void AuxiliaryXhair_Draw2D()
 
 void Net_AuXair2(float bIsNew)
 {
-    float axh_id;
-    entity axh;
-
-    axh_id = bound(0, ReadByte(), MAX_AXH);
-    axh = AuxiliaryXhair[axh_id];
+    float axh_id       = bound(0, ReadByte(), MAX_AXH);
+    entity axh                 = AuxiliaryXhair[axh_id];
 
     if(axh == world || wasfreed(axh))  // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
     {
-        axh               = spawn();
-               axh.draw2d        = Draw_Not;
-               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;
+        axh                                    = spawn();
+               axh.draw2d                      = Draw_Not;
+               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;
                AuxiliaryXhair[axh_id] = axh;
     }
-
-    axh.draw2d   = AuxiliaryXhair_Draw2D;
-
-       axh.origin_x = ReadCoord();
-       axh.origin_y = ReadCoord();
-       axh.origin_z = ReadCoord();
-
-       axh.colormod_x = ReadByte() / 255;
-       axh.colormod_y = ReadByte() / 255;
-       axh.colormod_z = ReadByte() / 255;
-    axh.cnt = time;
+    
+       axh.move_origin_x       = ReadCoord();
+       axh.move_origin_y       = ReadCoord();
+       axh.move_origin_z       = ReadCoord();
+       axh.colormod_x          = ReadByte() / 255;
+       axh.colormod_y          = ReadByte() / 255;
+       axh.colormod_z          = ReadByte() / 255;
+    axh.cnt                    = time;
+    axh.draw2d                 = AuxiliaryXhair_Draw2D;        
 }
 
 void Net_VehicleSetup()
 {
 
-    float hud_id, i;
+    float i;
     
-    hud_id = ReadByte();
+    float 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, ATTN_NONE);
         sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);    
-            
         return;
     }
     
-    hud_id  = bound(HUD_SPIDERBOT, hud_id, HUD_RAPTOR);
+    hud_id  = bound(HUD_VEHICLE_FIRST, hud_id, HUD_VEHICLE_LAST);
 
     // Init auxiliary crosshairs
     entity axh;
@@ -106,15 +147,15 @@ void Net_VehicleSetup()
         if(axh != world && !wasfreed(axh))  // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
             remove(axh);
 
-        axh               = spawn();
-               axh.draw2d        = Draw_Not;
-               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;
-               AuxiliaryXhair[i] = axh;
+        axh                                    = spawn();
+               axh.draw2d                      = Draw_Not;
+               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;
+               AuxiliaryXhair[i]       = axh;
     }
 
     switch(hud_id)
@@ -148,11 +189,24 @@ void Net_VehicleSetup()
             break;
 
         case HUD_BUMBLEBEE:
+            // Raygun-locked
+            AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
+            AuxiliaryXhair[0].axh_scale   = 0.5;
+            
+            // Gunner1
+            AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-target.tga";
+            AuxiliaryXhair[1].axh_scale   = 0.75;
+            
+            // Gunner2
+            AuxiliaryXhair[2].axh_image   = "gfx/vehicles/axh-target.tga";
+            AuxiliaryXhair[2].axh_scale   = 0.75;
+            break;        
+        case HUD_BUMBLEBEE_GUN:
             // Plasma cannons
-            AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-ring.tga";
+            AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
             AuxiliaryXhair[0].axh_scale   = 0.25;
             // Raygun
-            AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-special1.tga";
+            AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-bracket.tga";
             AuxiliaryXhair[1].axh_scale   = 0.25;
             break;
     }
@@ -168,15 +222,281 @@ void Net_VehicleSetup()
 
 void CSQC_BUMBLE_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, 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, ATTN_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, ATTN_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, ATTN_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, ATTN_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(AuxiliaryXhair[1].draw2d == Draw_Not)
+       {
+               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);
+       }
+       
+// ..  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(AuxiliaryXhair[2].draw2d == Draw_Not)
+       {
+               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);
+       }
+
+// ..  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);
+
+       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);
+    }
+    
+}
+
+void CSQC_BUMBLE_GUN_HUD()
+{
+
+       if(autocvar_r_letterbox)
+        return;
+
+    vector picsize, hudloc, 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, ATTN_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, ATTN_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, ATTN_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, ATTN_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);
+
+       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);
+    }
+    */
 }
 
 
-#define spider_ico  "gfx/vehicles/sbot.tga"
-#define spider_rkt  "gfx/vehicles/sbot_rpods.tga"
-#define spider_mgun "gfx/vehicles/sbot_mguns.tga"
-#define spider_xhair "gfx/vehicles/axh-special1.tga"
-float alarm1time;
-float alarm2time;
 
 void CSQC_SPIDER_HUD()
 {
@@ -195,11 +515,6 @@ void CSQC_SPIDER_HUD()
 
     drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL);
 
-    //drawstring(hudloc + '145 19  0', strcat(ftos(vh_health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
-    //drawstring(hudloc + '175 34  0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
-    //drawstring(hudloc + '136 102  0', strcat(ftos(ammo1), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
-    //drawstring(hudloc + '179 69  0', strcat(ftos(9 - ammo2), " / 8"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
-
     ammo1   *= 0.01;
     shield  *= 0.01;
     vh_health  *= 0.01;
@@ -269,7 +584,6 @@ void CSQC_SPIDER_HUD()
             alarm2time = 0;
         }
     }
-    
 
 // Minigun bar
     picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
@@ -324,6 +638,21 @@ void CSQC_SPIDER_HUD()
                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;
@@ -332,11 +661,6 @@ void CSQC_SPIDER_HUD()
     }
 }
 
-#define raptor_ico  "gfx/vehicles/raptor.tga"
-#define raptor_gun  "gfx/vehicles/raptor_guns.tga"
-#define raptor_bomb "gfx/vehicles/raptor_bombs.tga"
-#define raptor_drop "gfx/vehicles/axh-dropcross.tga"
-#define raptor_xhair "gfx/vehicles/axh-ring.tga"
 void CSQC_RAPTOR_HUD()
 {
        if(autocvar_r_letterbox)
@@ -455,55 +779,64 @@ void CSQC_RAPTOR_HUD()
         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);
-
-// Bombing crosshair
-    if(!dropmark)
+    
+    if(weapon2mode == RSM_FLARE)
     {
-        dropmark = spawn();
-        dropmark.owner = self;
-        dropmark.gravity = 1;
+        raptor_xhair =  "gfx/vehicles/axh-bracket.tga";
     }
-
-    if(reload2 == 100)
+    else
     {
-        vector where;
+        raptor_xhair =  "gfx/vehicles/axh-ring.tga";
+        
+        // Bombing crosshair
+        if(!dropmark)
+        {
+            dropmark = spawn();
+            dropmark.owner = self;
+            dropmark.gravity = 1;
+        }
 
-        setorigin(dropmark, pmove_org);
-        dropmark.velocity = pmove_vel;
-        tracetoss(dropmark, self);
+        if(reload2 == 100)
+        {
+            vector where;
 
-        where = project_3d_to_2d(trace_endpos);
+            setorigin(dropmark, pmove_org);
+            dropmark.velocity = pmove_vel;
+            tracetoss(dropmark, self);
 
-        setorigin(dropmark, trace_endpos);
-        picsize = draw_getimagesize(raptor_drop) * 0.2;
+            where = project_3d_to_2d(trace_endpos);
 
-        if not (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;
+            setorigin(dropmark, trace_endpos);
+            picsize = draw_getimagesize(raptor_drop) * 0.2;
 
             if not (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);
+                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 not (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);
+                }
             }
         }
     }
-
+    
        if (scoreboard_showscores)
                HUD_DrawScoreboard();
     else
@@ -516,11 +849,6 @@ void CSQC_RAPTOR_HUD()
     }
 }
 
-#define waki_ico "gfx/vehicles/waki.tga"
-#define waki_eng "gfx/vehicles/waki_e.tga"
-#define waki_gun "gfx/vehicles/waki_guns.tga"
-#define waki_rkt "gfx/vehicles/waki_rockets.tga"
-#define waki_xhair "gfx/vehicles/axh-special1.tga"
 void CSQC_WAKIZASHI_HUD()
 {
 /*
@@ -660,13 +988,6 @@ void CSQC_WAKIZASHI_HUD()
 
 void Vehicles_Precache()
 {
-// fixme: HAAAAKKKZZZ!!!!!!!!!!!! (this belongs as a setting in default.cfg)
-    autocvar_cl_vehicles_hudscale = 0.5;
-    autocvar_cl_vehicles_hudalpha = 0.75;
-
-
-       precache_model("models/vehicles/wakizashi.dpm");
-
        precache_model("models/vehicles/bomblet.md3");
        precache_model("models/vehicles/clusterbomb.md3");
        precache_model("models/vehicles/clusterbomb_fragment.md3");
@@ -679,15 +1000,15 @@ void Vehicles_Precache()
 
 void RaptorCBShellfragDraw()
 {
-       
-       Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
        if(wasfreed(self))
-               return;     
-
+               return;   
+               
+       Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
        self.move_avelocity += randomvec() * 15;
        self.renderflags = 0;
+       
        if(self.cnt < time)
-       self.alpha = bound(0, self.nextthink - time, 1);
+               self.alpha = bound(0, self.nextthink - time, 1);
 
        if(self.alpha < ALPHA_MIN_VISIBLE)
         remove(self);
index 78ddc8b793c22f4b080100ace1df2a94538979be..513c66eb8b9ca96623a1eb7c55ccab0de2e38103 100644 (file)
@@ -595,6 +595,7 @@ void Draw_WaypointSprite()
        if(autocvar_g_waypointsprite_uppercase)
                txt = strtoupper(txt);
 
+       draw_beginBoldFont();
        if(self.health >= 0)
        {
                o = drawspritetext(o, ang, (SPRITE_HEALTHBAR_WIDTH + 2 * SPRITE_HEALTHBAR_BORDER) * t, rgb, a, waypointsprite_fontsize * '1 1 0', txt);
@@ -630,6 +631,7 @@ void Draw_WaypointSprite()
        {
                o = drawspritetext(o, ang, 0, rgb, a, waypointsprite_fontsize * '1 1 0', txt);
        }
+       draw_endBoldFont();
 }
 
 void Ent_RemoveWaypointSprite()
index 067cd8054de6f311d562bf427190fd806ef1de79..5ab3da67cff47e58a34f3731b1d330d256bb3526 100644 (file)
@@ -38,13 +38,12 @@ float CampaignFile_Load(float offset, float n)
                        {
                                entlen = tokenize(l); // using insane tokenizer for CSV
 
-#define CAMPAIGN_GETARG0                  if(i >= entlen)
-#define CAMPAIGN_GETARG1 CAMPAIGN_GETARG0     error("syntax error in campaign file: line has not enough fields");
-#define CAMPAIGN_GETARG2 CAMPAIGN_GETARG1 a = argv(++i);
-#define CAMPAIGN_GETARG3 CAMPAIGN_GETARG2 if(a == ",")
-#define CAMPAIGN_GETARG4 CAMPAIGN_GETARG3     a = "";
-#define CAMPAIGN_GETARG5 CAMPAIGN_GETARG4 else
-#define CAMPAIGN_GETARG  CAMPAIGN_GETARG5     ++i
+#define CAMPAIGN_GETARG \
+       a = argv(++i); \
+       if(a == ",") \
+               a = ""; \
+       else \
+               ++i
 // What you're seeing here is what people will do when your compiler supports
 // C-style macros but no line continuations.
 
@@ -58,6 +57,10 @@ float CampaignFile_Load(float offset, float n)
                                CAMPAIGN_GETARG; campaign_mutators[campaign_entries] = strzone(a);
                                CAMPAIGN_GETARG; campaign_shortdesc[campaign_entries] = strzone(a);
                                CAMPAIGN_GETARG; campaign_longdesc[campaign_entries] = strzone(strreplace("\\n", "\n", a));
+
+                               if(i > entlen)
+                                       error("syntax error in campaign file: line has not enough fields");
+
                                campaign_entries = campaign_entries + 1;
 
                                if(campaign_entries >= n)                               
index 73fe45c406ab789e195718107e801a4ac5f91a6f..b7b8da0e9f407f64da0bab06bc3dae90c7d4c528 100644 (file)
@@ -263,6 +263,7 @@ void GenericCommand_maplist(float request, float argc)
                                        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
                                        argc = tokenizebyseparator(cvar_string("g_maplist"), " ");
                                        
+                                       tmp_string = "";
                                        for(i = 0; i < argc; ++i)
                                                if(MapInfo_CheckMap(argv(i)))
                                                        tmp_string = strcat(tmp_string, " ", argv(i));
@@ -279,6 +280,7 @@ void GenericCommand_maplist(float request, float argc)
                                        {
                                                argc = tokenizebyseparator(cvar_string("g_maplist"), " ");
                                                
+                                               tmp_string = "";
                                                for(i = 0; i < argc; ++i)
                                                        if(argv(i) != argv(2))
                                                                tmp_string = strcat(tmp_string, " ", argv(i));
@@ -349,6 +351,7 @@ void GenericCommand_removefromlist(float request, float argc)
                                
                                argc = tokenizebyseparator(cvar_string(original_cvar), " ");
                                
+                               tmp_string = "";
                                for(i = 0; i < argc; ++i)
                                        if(argv(i) != removal)
                                                tmp_string = strcat(tmp_string, " ", argv(i));
index cb1a8cc37144eb23c069b6b1294ccb5510073520..d1562aaac4222c1ebf8eedbbfdf60f7d22ffc001 100644 (file)
@@ -51,6 +51,7 @@ void GenericCommand_markup_init()
        markup_from[i] = "&.."; markup_to[i] = "\x9e"; ++i;
        markup_from[i] = "&.)"; markup_to[i] = "\x9f"; ++i;
        markup_from[i] = "&<|"; markup_to[i] = "\xff"; ++i;
+       unused_float = i;
 }
 
 string GenericCommand_markup(string s2)
index c15a8d26ef79f0094de66fb91b95d2e8dc11798d..5cca2db1ce666145fb7f339925daacaf3ce8f756 100644 (file)
@@ -236,9 +236,9 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                        i = stof(db_get(rpn_db, "stack.pointer"));
                                                        db_put(rpn_db, "stack.pointer", ftos(i+1));
                                                        db_put(rpn_db, strcat("stack.", ftos(i)), s);
+                                                       if(!i)
+                                                               db_put(rpn_db, "stack.pos", "0");
                                                }
-                                               if(!i)
-                                                       db_put(rpn_db, "stack.pos", "0");
                                        } else if(rpncmd == "dbpop") {
                                                i = stof(db_get(rpn_db, "stack.pointer"));
                                                if(i)
@@ -556,4 +556,4 @@ void GenericCommand_rpn(float request, float argc, string command)
                        return;
                }
        }
-}
\ No newline at end of file
+}
index e70a83c391d7b992ce0091e91efc89504fa31c4d..9717905b6e0f61c5d8a863a0467b9ae4826446eb 100644 (file)
@@ -97,6 +97,8 @@ const float ENT_CLIENT_ACCURACY = 30;
 const float ENT_CLIENT_SHOWNAMES = 31;
 const float ENT_CLIENT_WARPZONE_TELEPORTED = 32;
 const float ENT_CLIENT_MODEL = 33;
+const float ENT_CLIENT_ITEM = 34;
+const float ENT_CLIENT_BUMBLE_RAYGUN = 35;
 
 const float ENT_CLIENT_TURRET = 40;
 const float ENT_CLIENT_AUXILIARYXHAIR = 50;
@@ -127,6 +129,8 @@ const float KEY_LEFT                =       4;
 const float KEY_RIGHT          =       8;
 const float KEY_JUMP           =       16;
 const float KEY_CROUCH         =       32;
+const float KEY_ATCK           =       64;
+const float KEY_ATCK2          =       128;
 
 ///////////////////////////
 // cvar constants
@@ -180,7 +184,8 @@ const float HUD_SPIDERBOT       = 10;
 const float HUD_WAKIZASHI       = 11;
 const float HUD_RAPTOR          = 12;
 const float HUD_BUMBLEBEE       = 13;
-const float HUD_VEHICLE_LAST    = 13;
+const float HUD_BUMBLEBEE_GUN   = 14;
+const float HUD_VEHICLE_LAST    = 14;
 
 const vector eX = '1 0 0';
 const vector eY = '0 1 0';
@@ -346,6 +351,9 @@ float PROJECTILE_SPIDERROCKET   = 27;
 float PROJECTILE_WAKIROCKET     = 28;
 float PROJECTILE_WAKICANNON     = 29;
 
+float PROJECTILE_BUMBLE_GUN     = 30;
+float PROJECTILE_BUMBLE_BEAM    = 31;
+
 float SPECIES_HUMAN        =  0;
 float SPECIES_ROBOT_SOLID  =  1;
 float SPECIES_ALIEN        =  2;
@@ -388,8 +396,12 @@ float  DEATH_WAKIBLOWUP    = 10036;
 float  DEATH_RAPTOR_CANNON = 10037;
 float  DEATH_RAPTOR_BOMB   = 10038;
 float  DEATH_RAPTOR_BOMB_SPLIT = 10039;
-float  DEATH_RAPTOR_DEATH  = 10040;
-float  DEATH_VHLAST        = 10040;
+float  DEATH_RAPTOR_DEATH   = 10040;
+float  DEATH_BUMB_GUN       = 10041;
+float  DEATH_BUMB_RAY       = 10042;
+float  DEATH_BUMB_RAY_HEAL  = 10043;
+float  DEATH_BUMB_DEATH     = 10044;
+float  DEATH_VHLAST         = 10044;
 #define DEATH_ISVEHICLE(t)  ((t) >= DEATH_VHFIRST && (t) <= DEATH_VHLAST)
 
 float DEATH_GENERIC = 10050;
index 1282d428af96e139049298a6bd2630cf9437d5e8..0aebde0af256b3a4a63d8a260030a9df429202c4 100644 (file)
@@ -43,7 +43,7 @@ void register_weapons_done()
        dummy_weapon_info.weapon = 0; // you can recognize dummies by this
        WEPSET_CLEAR_E(dummy_weapon_info);
        dummy_weapon_info.netname = "";
-       dummy_weapon_info.message = "@!#%'n Tuba";
+       dummy_weapon_info.message = "AOL CD Thrower";
        dummy_weapon_info.items = 0;
        dummy_weapon_info.weapon_func = w_null;
        dummy_weapon_info.mdl = "";
index 5a39d2148c045b1d155250cf8ae71432adbab85a..33fa21f7eeef5fb96bb0986971ce5223f27d0979 100644 (file)
@@ -101,11 +101,16 @@ float WEP_LAST;
 # define WEPSET_BIT(a)                  power2of((a) - WEP_FIRST)
 # define WEPSET_DECLARE_A(a)            float _WS_##a
 # define WEPSET_CLEAR_E(e)              ((e)._WS_weapons = 0)
-# define WEPSET_CLEAR_A(a)              ((_WS_##a) = 0)
+# define WEPSET_CLEAR_A(a)              (_WS_##a = 0)
 # define WEPSET_EMPTY_E(e)              ((e)._WS_weapons == 0)
-# define WEPSET_EMPTY_A(a)              ((_WS_##a) == 0)
-# define WEPSET_COPY_AS(a)              ((_WS_##a) = getstati(STAT_WEAPONS))
+# define WEPSET_EMPTY_A(a)              (_WS_##a == 0)
+# define WEPSET_COPY_AS(a)              (_WS_##a = getstati(STAT_WEAPONS))
 # define WEPSET_ADDSTAT()               addstat(STAT_WEAPONS, AS_INT, _WS_weapons)
+# define WEPSET_WRITE_E(dest,a)         WriteInt24_t(dest, (a)._WS_weapons)
+# define WEPSET_WRITE_A(dest,a)         WriteInt24_t(dest, _WS_##a)
+# define WEPSET_WRITE_W(dest,a)         WriteInt24_t(dest, WEPSET_BIT(a))
+# define WEPSET_READ_E(a)               (a)._WS_weapons = ReadInt24_t()
+# define WEPSET_READ_A(a)               (_WS_##a) = ReadInt24_t()
 # define WEPSET_OP1_EE(a,b,mergeop,x)   ((a)._WS_weapons x (b)._WS_weapons)
 # define WEPSET_OP2_EE(a,b,mergeop,x,y) ((a)._WS_weapons x (b)._WS_weapons y (a)._WS_weapons)
 # define WEPSET_OP1_EA(a,b,mergeop,x)   ((a)._WS_weapons x _WS_##b)
@@ -132,6 +137,11 @@ float WEP_LAST;
 # define WEPSET_EMPTY_A(a)              ((_WS1_##a) == 0 && (_WS2_##a) == 0)
 # define WEPSET_COPY_AS(a)              ((_WS1_##a) = getstati(STAT_WEAPONS), (_WS2_##a) = getstati(STAT_WEAPONS2))
 # define WEPSET_ADDSTAT()               addstat(STAT_WEAPONS, AS_INT, _WS1_weapons); addstat(STAT_WEAPONS2, AS_INT, _WS2_weapons)
+# define WEPSET_WRITE_E(dest,a)         WriteInt24_t(dest, (a)._WS1_weapons); WriteInt24_t(dest, (a)._WS2_weapons)
+# define WEPSET_WRITE_A(dest,a)         WriteInt24_t(dest, _WS1_##a); WriteInt24_t(dest, _WS2_##a)
+# define WEPSET_WRITE_W(dest,a)         WriteInt24_t(dest, WEPSET_BIT1(a)); WriteInt24_t(dest, WEPSET_BIT2(a))
+# define WEPSET_READ_E(a)               (a)._WS1_weapons = ReadInt24_t(); (a)._WS2_weapons = ReadInt24_t()
+# define WEPSET_READ_A(a)               (_WS1_##a) = ReadInt24_t(); (_WS2_##a) = ReadInt24_t()
 # define WEPSET_OP1_EE(a,b,mergeop,x)   (((a)._WS1_weapons x (b)._WS1_weapons) mergeop ((a)._WS2_weapons x (b)._WS2_weapons))
 # define WEPSET_OP2_EE(a,b,mergeop,x,y) (((a)._WS1_weapons x (b)._WS1_weapons y (a)._WS1_weapons) mergeop ((a)._WS2_weapons x (b)._WS2_weapons y (a)._WS2_weapons))
 # define WEPSET_OP1_EA(a,b,mergeop,x)   (((a)._WS1_weapons x _WS1_##b) mergeop ((a)._WS2_weapons x _WS2_##b))
index 166acac675b08c52bf38988e23ea46bc534a7f19..05c93865dbcceed7c2606d9cb567b727e3fe8ad7 100644 (file)
@@ -242,6 +242,8 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        spawnpoints = 0;
        spawnplaces = 0;
        _MapInfo_Map_worldspawn_music = "";
+       mapMins = '0 0 0';
+       mapMaxs = '0 0 0';
 
        for(;;)
        {
@@ -943,7 +945,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
                        MapInfo_Map_author = s;
                else if(t == "has")
                {
-                       t = car(s); s = cdr(s);
+                       t = car(s); // s = cdr(s);
                        if     (t == "weapons") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_WEAPONS;
                        else if(t == "turrets") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_TURRETS;
                        else if(t == "vehicles") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_VEHICLES;
index 698bd7e40ace811727cf2588b1c62e92ee4213e9..bd67f67a825104abcd3108d8096d501fa8a27762 100644 (file)
@@ -1,4 +1,4 @@
-var float MAPINFO_TYPE_ALL = 0;
+float MAPINFO_TYPE_ALL;
 entity MapInfo_Type_first;
 entity MapInfo_Type_last;
 .entity enemy; // internal next pointer
index 582777647c9fcd2e2798baa4c695ecea269d3969..6e534ffc19464a92777b956353b926f48ddd578e 100644 (file)
@@ -859,6 +859,8 @@ float cvar_settemp(string tmp_cvar, string tmp_value)
 {
        float created_saved_value;
        entity e;
+
+       created_saved_value = FALSE;
        
        if not(tmp_cvar || tmp_value)
        {
@@ -1578,6 +1580,109 @@ vector solve_quadratic(float a, float b, float c) // ax^2 + bx + c = 0
        return v;
 }
 
+vector solve_shotdirection(vector myorg, vector myvel, vector eorg, vector evel, float spd, float newton_style)
+{
+       vector ret;
+
+       // make origin and speed relative
+       eorg -= myorg;
+       if(newton_style)
+               evel -= myvel;
+
+       // now solve for ret, ret normalized:
+       //   eorg + t * evel == t * ret * spd
+       // or, rather, solve for t:
+       //   |eorg + t * evel| == t * spd
+       //   eorg^2 + t^2 * evel^2 + 2 * t * (eorg * evel) == t^2 * spd^2
+       //   t^2 * (evel^2 - spd^2) + t * (2 * (eorg * evel)) + eorg^2 == 0
+       vector solution = solve_quadratic(evel * evel - spd * spd, 2 * (eorg * evel), eorg * eorg);
+       // p = 2 * (eorg * evel) / (evel * evel - spd * spd)
+       // q = (eorg * eorg) / (evel * evel - spd * spd)
+       if(!solution_z) // no real solution
+       {
+               // happens if D < 0
+               // (eorg * evel)^2 < (evel^2 - spd^2) * eorg^2
+               // (eorg * evel)^2 / eorg^2 < evel^2 - spd^2
+               // spd^2 < ((evel^2 * eorg^2) - (eorg * evel)^2) / eorg^2
+               // spd^2 < evel^2 * (1 - cos^2 angle(evel, eorg))
+               // spd^2 < evel^2 * sin^2 angle(evel, eorg)
+               // spd < |evel| * sin angle(evel, eorg)
+               return '0 0 0';
+       }
+       else if(solution_x > 0)
+       {
+               // both solutions > 0: take the smaller one
+               // happens if p < 0 and q > 0
+               ret = normalize(eorg + solution_x * evel);
+       }
+       else if(solution_y > 0)
+       {
+               // one solution > 0: take the larger one
+               // happens if q < 0 or q == 0 and p < 0
+               ret = normalize(eorg + solution_y * evel);
+       }
+       else
+       {
+               // no solution > 0: reject
+               // happens if p > 0 and q >= 0
+               // 2 * (eorg * evel) / (evel * evel - spd * spd) > 0
+               // (eorg * eorg) / (evel * evel - spd * spd) >= 0
+               //
+               // |evel| >= spd
+               // eorg * evel > 0
+               //
+               // "Enemy is moving away from me at more than spd"
+               return '0 0 0';
+       }
+
+       // NOTE: we always got a solution if spd > |evel|
+
+       if(newton_style == 2)
+               ret = normalize(ret * spd + myvel);
+
+       return ret;
+}
+
+vector get_shotvelocity(vector myvel, vector mydir, float spd, float newton_style, float mi, float ma)
+{
+       if(!newton_style)
+               return spd * mydir;
+
+       if(newton_style == 2)
+       {
+               // true Newtonian projectiles with automatic aim adjustment
+               //
+               // solve: |outspeed * mydir - myvel| = spd
+               // outspeed^2 - 2 * outspeed * (mydir * myvel) + myvel^2 - spd^2 = 0
+               // outspeed = (mydir * myvel) +- sqrt((mydir * myvel)^2 - myvel^2 + spd^2)
+               // PLUS SIGN!
+               // not defined?
+               // then...
+               // myvel^2 - (mydir * myvel)^2 > spd^2
+               // velocity without mydir component > spd
+               // fire at smallest possible spd that works?
+               // |(mydir * myvel) * myvel - myvel| = spd
+
+               vector solution = solve_quadratic(1, -2 * (mydir * myvel), myvel * myvel - spd * spd);
+
+               float outspeed;
+               if(solution_z)
+                       outspeed = solution_y; // the larger one
+               else
+               {
+                       //outspeed = 0; // slowest possible shot
+                       outspeed = solution_x; // the real part (that is, the average!)
+                       //dprint("impossible shot, adjusting\n");
+               }
+
+               outspeed = bound(spd * mi, outspeed, spd * ma);
+               return mydir * outspeed;
+       }
+
+       // real Newtonian
+       return myvel + spd * mydir;
+}
+
 void check_unacceptable_compiler_bugs()
 {
        if(cvar("_allow_unacceptable_compiler_bugs"))
@@ -1825,6 +1930,7 @@ float matchacl(string acl, string str)
        while(acl)
        {
                t = car(acl); acl = cdr(acl);
+
                d = 1;
                if(substring(t, 0, 1) == "-")
                {
@@ -1833,10 +1939,11 @@ float matchacl(string acl, string str)
                }
                else if(substring(t, 0, 1) == "+")
                        t = substring(t, 1, strlen(t) - 1);
+
                if(substring(t, -1, 1) == "*")
                {
                        t = substring(t, 0, strlen(t) - 1);
-                       s = substring(s, 0, strlen(t));
+                       s = substring(str, 0, strlen(t));
                }
                else
                        s = str;
@@ -2257,3 +2364,55 @@ void queue_to_execute_next_frame(string s)
        }
        to_execute_next_frame = strzone(s);
 }
+
+float cubic_speedfunc(float startspeedfactor, float endspeedfactor, float x)
+{
+       return
+               (((     startspeedfactor + endspeedfactor - 2
+               ) * x - 2 * startspeedfactor - endspeedfactor + 3
+               ) * x + startspeedfactor
+               ) * x;
+}
+
+float cubic_speedfunc_is_sane(float startspeedfactor, float endspeedfactor)
+{
+       if(startspeedfactor < 0 || endspeedfactor < 0)
+               return FALSE;
+
+       /*
+       // if this is the case, the possible zeros of the first derivative are outside
+       // 0..1
+       We can calculate this condition as condition 
+       if(se <= 3)
+               return TRUE;
+       */
+
+       // better, see below:
+       if(startspeedfactor <= 3 && endspeedfactor <= 3)
+               return TRUE;
+
+       // if this is the case, the first derivative has no zeros at all
+       float se = startspeedfactor + endspeedfactor;
+       float s_e = startspeedfactor - endspeedfactor;
+       if(3 * (se - 4) * (se - 4) + s_e * s_e <= 12) // an ellipse
+               return TRUE;
+
+       // Now let s <= 3, s <= 3, s+e >= 3 (triangle) then we get se <= 6 (top right corner).
+       // we also get s_e <= 6 - se
+       // 3 * (se - 4)^2 + (6 - se)^2
+       // is quadratic, has value 12 at 3 and 6, and value < 12 in between.
+       // Therefore, above "better" check works!
+
+       return FALSE;
+
+       // known good cases:
+       // (0, [0..3])
+       // (0.5, [0..3.8])
+       // (1, [0..4])
+       // (1.5, [0..3.9])
+       // (2, [0..3.7])
+       // (2.5, [0..3.4])
+       // (3, [0..3])
+       // (3.5, [0.2..2.3])
+       // (4, 1)
+}
index 64830ca1d73330931919e01e2b5d537f8c5141ab..3ce173bf638e95d705a70042fc6bfae62f4838aa 100644 (file)
@@ -168,6 +168,9 @@ vector solve_quadratic(float a, float b, float c);
 // z = 1 if a real solution exists, 0 if not
 // if no real solution exists, x contains the real part and y the imaginary part of the complex solutions x+iy and x-iy
 
+vector solve_shotdirection(vector myorg, vector myvel, vector eorg, vector evel, float spd, float newton_style);
+vector get_shotvelocity(vector myvel, vector mydir, float spd, float newton_style, float mi, float ma);
+
 void check_unacceptable_compiler_bugs();
 
 float compressShotOrigin(vector v);
@@ -314,3 +317,20 @@ float ReadApproxPastTime();
 // execute-stuff-next-frame subsystem
 void execute_next_frame();
 void queue_to_execute_next_frame(string s);
+
+// for marking written-to values as unused where it's a good idea to do this
+noref float unused_float;
+
+
+
+// a function f with:
+// f(0) = 0
+// f(1) = 1
+// f'(0) = startspeedfactor
+// f'(1) = endspeedfactor
+float cubic_speedfunc(float startspeedfactor, float endspeedfactor, float x);
+
+// checks whether f'(x) = 0 anywhere from 0 to 1
+// because if this is the case, the function is not usable for platforms
+// as it may exceed 0..1 bounds, or go in reverse
+float cubic_speedfunc_is_sane(float startspeedfactor, float endspeedfactor);
index bf6eefa6971b0b0c3f9687c61e60608e9e13ff3d..e6e4cfe43a091e3f2fd1a5efa615a8e2d6132e66 100644 (file)
@@ -29,6 +29,10 @@ float CSQCModel_Send(entity to, float sf)
        float islocalplayer = (self == to);
        float isnolocalplayer = (isplayer && (self != to));
 
+       unused_float = isplayer;
+       unused_float = islocalplayer;
+       unused_float = isnolocalplayer;
+
        WriteByte(MSG_ENTITY, ENT_CLIENT_MODEL);
        WriteShort(MSG_ENTITY, sf);
 
@@ -59,6 +63,10 @@ void CSQCModel_CheckUpdate()
        float islocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
        float isnolocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
 
+       unused_float = isplayer;
+       unused_float = islocalplayer;
+       unused_float = isnolocalplayer;
+
 #ifdef CSQCPLAYER_FORCE_UPDATES
        if(isplayer && time > self.csqcmodel_nextforcedupdate)
        {
index 0acf262b113f212500a08f2e511bb1b81510e569..0a5504392736ebd13e4ee1456a5bb39e80a71950 100644 (file)
@@ -593,9 +593,11 @@ float(float a) tan = #475; // returns tangent value (which is simply sin(a)/cos(
 // string autocvar__cl_name;
 //NOTE: copying a string-typed autocvar to another variable/field, and then
 //changing the cvar or returning from progs is UNDEFINED. Writing to autocvar
-//globals is UNDEFINED.  Accessing autocvar globals after cvar_set()ing that
-//cvar in the same frame is IMPLEMENTATION DEFINED (an implementation may
-//either yield the previous, or the current, value). Whether autocvar globals,
+//globals is UNDEFINED. Accessing autocvar globals after changing that cvar in
+//the same frame by any means other than cvar_set() from the same QC VM is
+//IMPLEMENTATION DEFINED (an implementation may either yield the previous, or
+//the current, value). Changing them via cvar_set() in the same QC VM
+//immediately must reflect on the autocvar globals. Whether autocvar globals,
 //after restoring a savegame, have the cvar's current value, or the original
 //value at time of saving, is UNDEFINED. Restoring a savegame however must not
 //restore the cvar values themselves.
@@ -2485,6 +2487,28 @@ void(float bufhandle, float string_index) bufstr_free = #469;
 //cvars that start with pattern but not with antipattern will be stored into the buffer
 void(float bufhandle, string pattern, string antipattern) buf_cvarlist = #517;
 
+//DP_QC_STRINGBUFFERS_EXT_WIP
+//idea: VorteX
+//darkplaces implementation: VorteX
+//constant definitions:
+const float MATCH_AUTO = 0;
+const float MATCH_WHOLE = 1;
+const float MATCH_LEFT = 2;
+const float MATCH_RIGHT = 3;
+const float MATCH_MIDDLE = 4;
+const float MATCH_PATTERN = 5;
+//builtin definitions:
+float(string filename, float bufhandle) buf_loadfile = #535; // append each line of file as new buffer string, return 1 if succesful
+float(float filehandle, float bufhandle, float startpos, float numstrings) buf_writefile = #536; // writes buffer strings as lines, returns 1 if succesful
+float(float bufhandle, string match, float matchrule, float startpos, float step) bufstr_find = #537; // returns string index
+float(string s, string pattern, float matchrule) matchpattern = #538; // returns 0/1
+float(string s, string pattern, float matchrule, float pos) matchpatternofs = #538;
+//description:
+//provides a set of functions to manipulate with string buffers
+//pattern wildcards: * - any character (or no characters), ? - any 1 character
+//Warning: This extension is work-in-progress, it may be changed/revamped/removed at any time, dont use it if you dont want any trouble
+//wip note: UTF8 is not supported yet
+
 //DP_QC_STRREPLACE
 //idea: Sajt
 //darkplaces implementation: Sajt
diff --git a/qcsrc/fteqcc-bugs.qc b/qcsrc/fteqcc-bugs.qc
new file mode 100644 (file)
index 0000000..dd4fd45
--- /dev/null
@@ -0,0 +1,30 @@
+void error(...) = #1;
+float id(float x) { return x; }
+
+void Oassignments(float foo) // pass 1
+{
+       float bar;
+       bar = 2;
+       bar = (foo ? 0 : (foo & 1));
+       if(bar == 2)
+               error("FTEQCC SUCKS");
+}
+
+void Oreturn_only(float foo) // pass 0
+{
+       if(foo)
+       {
+               return;
+       }
+}
+
+void Oreturn_only_trap(void)
+{
+       error("FTEQCC SUCKS");
+}
+
+.float fld;
+void Ono_assignments(entity e, float wep) // pass an e with e.fld == 1, and wep == 3. e.fld will be 2 instead of 3. Observe the INDIRECT and the SUB use the same field for storage, wreaking havoc.
+{
+               ((e).fld |= id(wep - 1));
+}
index 48a45bda8465795e8883373ab088918783c4c0d3..ae84e0957da7be5efaff03271861b81b5810d6c4 100644 (file)
@@ -29,8 +29,7 @@ void AnimHost_addAnim(entity me, entity other)
 
        other.parent = me;
 
-       entity f, l;
-       f = me.firstChild;
+       entity l;
        l = me.lastChild;
 
        if(l)
@@ -50,9 +49,7 @@ void AnimHost_removeAnim(entity me, entity other)
 
        other.parent = NULL;
 
-       entity n, p, f, l;
-       f = me.firstChild;
-       l = me.lastChild;
+       entity n, p;
        n = other.nextSibling;
        p = other.prevSibling;
 
index de5d54ae1002ad79486867e1a8f4d83da5a152f0..3bcda94e692939b733c668cf09e46b27e59364c6 100644 (file)
@@ -75,8 +75,7 @@ void Keyframe_addAnim(entity me, entity other)
 
        other.parent = me;
 
-       entity f, l;
-       f = me.firstChild;
+       entity l;
        l = me.lastChild;
 
        if(l)
index 1f223f281affc2bc9ba5a42e90c1b3b3160f8981..9c0d032432f384a60299fddc697c5b2df918ee06 100644 (file)
@@ -16,11 +16,21 @@ void draw_drawMousePointer(vector where)
 
 void draw_reset(float cw, float ch, float ox, float oy)
 {
-       drawfont = FONT_USER+0;
        draw_shift = '1 0 0' * ox + '0 1 0' * oy;
        draw_scale = '1 0 0' * cw + '0 1 0' * ch;
        draw_alpha = 1;
        draw_fontscale = '1 1 0';
+       draw_endBoldFont();
+}
+
+void draw_beginBoldFont()
+{
+       drawfont = FONT_USER+3;
+}
+
+void draw_endBoldFont()
+{
+       drawfont = FONT_USER+0;
 }
 
 vector globalToBox(vector v, vector theOrigin, vector theScale)
index 301a5f440f80fbf768c77182b3f24e2207c64f5a..7178628d8b2f6e093ecc1116e976e6343244266f 100644 (file)
@@ -11,6 +11,8 @@ float draw_alpha;
 vector draw_fontscale;
 
 void draw_reset(float cw, float ch, float ox, float oy);
+void draw_beginBoldFont();
+void draw_endBoldFont();
 void draw_setMousePointer(string pic, vector theSize, vector theOffset);
 void draw_drawMousePointer(vector where);
 
index 1032e805a5017cabe92eba152d8a8f40ac4661fb..3a345a43dfa1b6f4849cc017d26469f5b0aa5d03 100644 (file)
@@ -3,6 +3,7 @@ CLASS(BorderImage) EXTENDS(Label)
        METHOD(BorderImage, configureBorderImage, void(entity, string, float, vector, string, float))
        METHOD(BorderImage, resizeNotify, void(entity, vector, vector, vector, vector))
        METHOD(BorderImage, recalcPositionWithText, void(entity, string))
+       ATTRIB(BorderImage, isBold, float, 1)
        METHOD(BorderImage, draw, void(entity))
        ATTRIB(BorderImage, src, string, string_null)
        ATTRIB(BorderImage, borderHeight, float, 0)
@@ -71,15 +72,16 @@ void BorderImage_draw(entity me)
 {
        if(me.src)
                draw_BorderPicture('0 0 0', me.src, '1 1 0', me.color, 1, me.borderVec);
+
        if(me.fontSize > 0)
        {
-               vector ro, rf, df;
-
                if(me.recalcPos)
                        me.recalcPositionWithText(me, me.text);
 
                if(me.isNexposeeTitleBar)
                {
+                       vector ro, rf, df;
+
                        // me.parent.Nexposee_animationFactor 0 (small) or 1 (full)
                        // default values are for 1
                        ro = me.realOrigin;
@@ -88,18 +90,17 @@ void BorderImage_draw(entity me)
                        me.realOrigin = ro * me.parent.Nexposee_animationFactor + me.realOrigin_Nexposeed * (1 - me.parent.Nexposee_animationFactor);
                        me.realFontSize = rf * me.parent.Nexposee_animationFactor + me.realFontSize_Nexposeed * (1 - me.parent.Nexposee_animationFactor);
                        draw_fontscale = globalToBoxSize(boxToGlobalSize(df, me.realFontSize), rf);
-               }
 
-               SUPER(BorderImage).draw(me);
+                       SUPER(BorderImage).draw(me);
 
-               if(me.isNexposeeTitleBar)
-               {
                        // me.Nexposee_animationState 0 (small) or 1 (full)
                        // default values are for 1
                        me.realOrigin = ro;
                        me.realFontSize = rf;
                        draw_fontscale = df;
                }
+               else
+                       SUPER(BorderImage).draw(me);
        }
        else
        {
index 0e8fa9ea0a6d1d627e780759e33edb3dac1fa557..6241cee03968c077249d62bfbdcb8b81a91ec3a9 100644 (file)
@@ -304,8 +304,7 @@ void Container_addItem(entity me, entity other, vector theOrigin, vector theSize
        other.Container_size = theSize;
        me.setAlphaOf(me, other, theAlpha);
 
-       entity f, l;
-       f = me.firstChild;
+       entity l;
        l = me.lastChild;
 
        if(l)
@@ -330,9 +329,7 @@ void Container_removeItem(entity me, entity other)
 
        other.parent = NULL;
 
-       entity n, p, f, l;
-       f = me.firstChild;
-       l = me.lastChild;
+       entity n, p;
        n = other.nextSibling;
        p = other.prevSibling;
 
@@ -371,13 +368,11 @@ void Container_setFocus(entity me, entity other)
 void Container_moveItemAfter(entity me, entity other, entity dest)
 {
        // first: remove other from the chain
-       entity n, p, f, l;
+       entity n, p;
 
        if(other.parent != me)
                error("Can't move in wrong container!");
 
-       f = me.firstChild;
-       l = me.lastChild;
        n = other.nextSibling;
        p = other.prevSibling;
 
index da6a4013cecd772051b12c76aac0f0a74a681a1c..ed73be09501a6a81db14751e73d824b5cd1a618e 100644 (file)
@@ -124,7 +124,6 @@ void Dialog_TDempty(entity me, float colspan)
 
 void Dialog_configureDialog(entity me)
 {
-       entity closebutton;
        float absWidth, absHeight;
 
        me.frame = spawnBorderImage();
@@ -154,14 +153,13 @@ void Dialog_configureDialog(entity me)
 
        if(me.closable && me.borderLines > 0)
        {
-               closebutton = me.closeButton = spawnButton();
+               entity closebutton;
+               closebutton = me.closeButton = me.frame.closeButton = spawnButton();
                closebutton.configureButton(closebutton, "", 0, me.closeButtonImage);
                closebutton.onClick = Dialog_Close; closebutton.onClickEntity = me;
                closebutton.srcMulti = 0;
                me.addItem(me, closebutton, '0 0 0', '1 1 0', 1); // put it as LAST
        }
-
-       me.frame.closeButton = closebutton;
 }
 
 void Dialog_close(entity me)
index af6587b5a67ebca90ecdb614524bd94923b5fdd0..572d3a0710dd866bef056667cb2862165d80cf0b 100644 (file)
@@ -226,7 +226,6 @@ void InputBox_draw(entity me)
                                else if(ch2 == "x") // ^x found
                                {
                                        theColor = '1 1 1';
-                                       theTempColor = '0 0 0';
                                        
                                        component = HEXDIGIT_TO_DEC(substring(me.text, i+2, 1));
                                        if (component >= 0) // ^xr found
index e1b14d3b1602d468d08ccdf6b26ef0aaf48b43df..65129b294dd6c0229436da186734c244d30b6b6f 100644 (file)
@@ -153,8 +153,7 @@ float InputContainer_mousePress(entity me, vector pos)
 }
 float InputContainer_mouseRelease(entity me, vector pos)
 {
-       float r;
-       r = SUPER(InputContainer).mouseRelease(me, pos);
+       SUPER(InputContainer).mouseRelease(me, pos); // return value?
        if(me.focused) // am I still eligible for this? (UGLY HACK, but a mouse event could have changed focus away)
                if(me._changeFocusXY(me, pos))
                        return 1;
index e1543ce2756f60579cf1eeb1b5c79be924bc5a7b..378e74adbcb1268ddaa34d7c33af0bb9031bce2e 100644 (file)
@@ -6,6 +6,7 @@ CLASS(Label) EXTENDS(Item)
        METHOD(Label, setText, void(entity, string))
        METHOD(Label, toString, string(entity))
        METHOD(Label, recalcPositionWithText, void(entity, string))
+       ATTRIB(Label, isBold, float, 0)
        ATTRIB(Label, text, string, string_null)
        ATTRIB(Label, fontSize, float, 8)
        ATTRIB(Label, align, float, 0.5)
@@ -45,6 +46,9 @@ void Label_recalcPositionWithText(entity me, string t)
        float spaceAvail;
        spaceAvail = 1 - me.keepspaceLeft - me.keepspaceRight;
 
+       if(me.isBold)
+               draw_beginBoldFont();
+
        float spaceUsed;
        spaceUsed = draw_TextWidth(t, me.allowColors, me.realFontSize);
 
@@ -107,6 +111,9 @@ void Label_recalcPositionWithText(entity me, string t)
                me.realOrigin_y = 0.5 * (1 - lines * me.realFontSize_y);
        }
 
+       if(me.isBold)
+               draw_endBoldFont();
+
        me.recalcPos = 0;
 }
 void Label_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
@@ -153,6 +160,9 @@ void Label_draw(entity me)
                        vector dfs;
                        vector fs;
 
+                       if(me.isBold)
+                               draw_beginBoldFont();
+
                        // set up variables to draw in condensed size, but use hinting for original size
                        fs = me.realFontSize;
                        fs_x *= me.condenseFactor;
@@ -180,6 +190,9 @@ void Label_draw(entity me)
                                draw_Text(me.realOrigin, t, fs, me.colorL, me.alpha, me.allowColors);
 
                        draw_fontscale = dfs;
+
+                       if(me.isBold)
+                               draw_endBoldFont();
                }
 
        SUPER(Label).draw(me);
index 4f8dca622c239e0294ba023b68f8101f737c6f15..60da88a09ca957307f3616e57526f2e3b19a0e19 100644 (file)
@@ -167,7 +167,6 @@ float ListBox_mousePress(entity me, vector pos)
 }
 float ListBox_mouseRelease(entity me, vector pos)
 {
-       vector absSize;
        if(me.pressed == 1)
        {
                // slider dragging mode
@@ -182,7 +181,6 @@ float ListBox_mouseRelease(entity me, vector pos)
                // and give it a nice click event
                if(me.nItems > 0)
                {
-                       absSize = boxToGlobalSize(me.size, eX * (1 - me.controlWidth) + eY * me.itemHeight);
                        me.clickListBoxItem(me, me.selectedItem, globalToBox(pos, eY * (me.selectedItem * me.itemHeight - me.scrollPos), eX * (1 - me.controlWidth) + eY * me.itemHeight));
                }
        }
index 4f1ff4e9edd2cb580dff3f8f304dc39748aa1b6b..5a5541dc7b0da4706800380998b531d67e5de329 100644 (file)
@@ -144,6 +144,7 @@ void ModalController_draw(entity me)
        vector fs;
        animating = 0;
 
+       front = world;
        for(e = me.firstChild; e; e = e.nextSibling)
                if(e.ModalController_state)
                {
index 02f12242525835f1735029b0eda0365f03907faf..8f8f45119f8744bd74d900776d4b97015bc25406 100644 (file)
@@ -305,6 +305,7 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
        }
        switch(me.animationState)
        {
+               default:
                case 0:
                case 3:
                        nexposeeKey = ((scan == K_SPACE) || (scan == K_ENTER) || (scan == K_KP_ENTER));
@@ -318,6 +319,7 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
        {
                switch(me.animationState)
                {
+                       default:
                        case 0:
                        case 3:
                                me.animationState = 1;
index b541a7f0639f973e1063ba0c90f3af994973c21d..b4c7ce746a8cd749a1eeed4cfd8d2d9b08b23da3 100644 (file)
@@ -344,6 +344,7 @@ void drawBackground(string img, float a, string algn, float force1)
 
        scalemode = SCALEMODE_CROP;
 
+       l = 0;
        for(i = 0; i < strlen(algn); ++i)
        {
                c = substring(algn, i, 1);
index 4e81a4acc24d2aa7d5ecce525e54d15090e307ce..e0f4c5b2e4c616e02ea7eca35595969d5953618a 100644 (file)
@@ -70,6 +70,9 @@ void XonoticColorButton_loadCvars(entity me)
        if not(me.cvarName)
                return;
 
+       if(cvar_string(me.cvarName) == cvar_defstring(me.cvarName))
+               cvar_set(me.cvarName, ftos(16 * floor(random() * 15) + floor(random() * 15)));
+
        if(me.cvarPart == 1)
                me.checked = (cvar(me.cvarName) & 240) == me.cvarValueFloat * 16;
        else
index 226f346b643ae55e715a7b5e5cf87eea887412cf..3fcabaaab6f8aa2e25030b7e420c45b52f308baf 100644 (file)
@@ -25,36 +25,36 @@ void XonoticAdvancedDialog_fill(entity me)
                me.TD(me, 1, 3, makeXonoticTextLabel(0, _("Game settings:")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "sv_spectate", _("Allow spectating")));
+               me.TD(me, 1, 2.8, makeXonoticCheckBox(0, "sv_spectate", _("Allow spectating")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Spawn shield:")));
-               me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 15, 0.5, "g_spawnshieldtime"));
+               me.TD(me, 1, 1.2, makeXonoticTextLabel(0, _("Spawn shield:")));
+               me.TD(me, 1, 1.6, makeXonoticSlider(0, 15, 0.5, "g_spawnshieldtime"));
        me.TR(me);
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Game speed:")));
-               me.TD(me, 1, 1.6, e = makeXonoticSlider(0.5, 2.0, 0.1, "slowmo"));
+               me.TD(me, 1, 1.2, makeXonoticTextLabel(0, _("Game speed:")));
+               me.TD(me, 1, 1.6, makeXonoticSlider(0.5, 2.0, 0.1, "slowmo"));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, makeXonoticTextLabel(0, _("Teamplay settings:")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Friendly fire scale:")));
-               me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_friendlyfire"));
+               me.TD(me, 1, 1.2, makeXonoticTextLabel(0, _("Friendly fire scale:")));
+               me.TD(me, 1, 1.6, makeXonoticSlider(0, 1.0, 0.05, "g_friendlyfire"));
        me.TR(me);
                me.TDempty(me, 0.4);
-               me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_friendlyfire_virtual", _("Virtual friendly fire (effect only)")));
+               me.TD(me, 1, 2.6, makeXonoticCheckBox(0, "g_friendlyfire_virtual", _("Virtual friendly fire (effect only)")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Friendly fire penalty:")));
-               me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_mirrordamage"));
+               me.TD(me, 1, 1.2, makeXonoticTextLabel(0, _("Friendly fire penalty:")));
+               me.TD(me, 1, 1.6, makeXonoticSlider(0, 1.0, 0.05, "g_mirrordamage"));
        me.TR(me);
                me.TDempty(me, 0.4);
-               me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_mirrordamage_virtual", _("Virtual penalty (effect only)")));
+               me.TD(me, 1, 2.6, makeXonoticCheckBox(0, "g_mirrordamage_virtual", _("Virtual penalty (effect only)")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Teams:")));
+               me.TD(me, 1, 1.2, makeXonoticTextLabel(0, _("Teams:")));
                me.TD(me, 1, 1.6, e = makeXonoticTextSlider("g_tdm_teams_override g_domination_teams_override g_keyhunt_teams_override"));
                        e.addValue(e, "Default", "0");
                        e.addValue(e, "2 teams", "2");
@@ -63,7 +63,7 @@ void XonoticAdvancedDialog_fill(entity me)
                        e.configureXonoticTextSliderValues(e);
        me.TR(me);
        me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Map voting:")));
+               me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Map voting:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider("g_maplist_votable"));
                        e.addValue(e, _("No voting"), "0");
                        e.addValue(e, _("2 choices"), "2");
@@ -76,7 +76,7 @@ void XonoticAdvancedDialog_fill(entity me)
                        e.addValue(e, _("9 choices"), "9");
                        e.configureXonoticTextSliderValues(e);
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", _("Simple majority wins vcall")));
+               me.TD(me, 1, 3, makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", _("Simple majority wins vcall")));
 
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
index d33a1eab12d5439e5435280fd40cd3439f3503f9..ef930b4e1490fe879c28ca7a83a191f191610777 100644 (file)
@@ -31,7 +31,7 @@ void XonoticPlayerSettingsTab_draw(entity me)
 void XonoticPlayerSettingsTab_fill(entity me)
 {
        entity e, pms, label, box;
-       float i, r, m, n;
+       float i;
 
        me.TR(me);
                me.TD(me, 1, 0.5, me.playerNameLabel = makeXonoticTextLabel(0, _("Name:")));
@@ -54,34 +54,38 @@ void XonoticPlayerSettingsTab_fill(entity me)
        me.TR(me);
        me.TR(me);
        me.TR(me);
+
+       me.TR(me);
+               me.TDempty(me, 1);
+               me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Model:")));
        me.TR(me);
-       me.gotoRC(me, 8, 0.0);
+               me.TDempty(me, 1);
                pms = makeXonoticPlayerModelSelector();
-               me.TD(me, 1, 0.6, e = makeXonoticTextLabel(1, _("Model:")));
                me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '0 0 0'));
                        e.onClick = PlayerModelSelector_Prev_Click;
                        e.onClickEntity = pms;
-               me.TD(me, me.rows - (me.currentRow + 2), 1.8, pms);
+               me.TD(me, me.rows - (me.currentRow + 2), 1.4, pms);
                me.TD(me, 1, 0.3, e = makeXonoticButton(">>", '0 0 0'));
                        e.onClick = PlayerModelSelector_Next_Click;
                        e.onClickEntity = pms;
        me.TR(me);
-               r = me.currentRow;
-               m = me.rows - (r + 3);
-               n = 16 - !cvar("developer");
-               m = m / (n - 1);
-               for(i = 0; i < n; ++i)
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Glowing color:")));
+               for(i = 0; i < 15; ++i)
                {
-                       me.gotoRC(me, r + i * m, 0.1);
-                       me.TDNoMargin(me, m, 0.2, e = makeXonoticColorButton(1, 0, i), '0 1 0');
+                       if(mod(i, 5) == 0)
+                               me.TR(me);
+                       me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(1, 0, i), '0 1 0');
                }
-               for(i = 0; i < n; ++i)
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Detail color:")));
+               for(i = 0; i < 15; ++i)
                {
-                       me.gotoRC(me, r + i * m, 0.4);
-                       me.TDNoMargin(me, m, 0.2, e = makeXonoticColorButton(2, 1, i), '0 1 0');
+                       if(mod(i, 5) == 0)
+                               me.TR(me);
+                       me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(2, 1, i), '0 1 0');
                }
 
-
        // crosshair_enabled: 0 = no crosshair options, 1 = no crosshair selection, but everything else enabled, 2 = all crosshair options enabled
        // FIXME: In the future, perhaps make one global crosshair_type cvar which has 0 for disabled, 1 for custom, 2 for per weapon, etc?
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
index 1f1ee385b219b762945dee382ff2916e355a4286..174873fe7fc79f211a41d0321a1bae083b977e65 100644 (file)
@@ -114,12 +114,12 @@ void XonoticAudioSettingsTab_fill(entity me)
                setDependentStringNotEqual(s, "mastervolume", "0");
        me.TR(me);
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "menu_snd_attenuation_method", _("New style sound attenuation")));
+               me.TD(me, 1, 3, makeXonoticCheckBox(0, "menu_snd_attenuation_method", _("New style sound attenuation")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "snd_mutewhenidle", _("Mute sounds when not active")));
+               me.TD(me, 1, 3, makeXonoticCheckBox(0, "snd_mutewhenidle", _("Mute sounds when not active")));
        
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Frequency:")));
+               me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Frequency:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
                        e.addValue(e, _("8 kHz"), "8000");
                        e.addValue(e, _("11.025 kHz"), "11025");
@@ -131,7 +131,7 @@ void XonoticAudioSettingsTab_fill(entity me)
                        e.addValue(e, _("48 kHz"), "48000");
                        e.configureXonoticTextSliderValues(e);
        me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Channels:")));
+               me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Channels:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_channels"));
                        e.addValue(e, _("Mono"), "1");
                        e.addValue(e, _("Stereo"), "2");
@@ -148,33 +148,15 @@ void XonoticAudioSettingsTab_fill(entity me)
                me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "snd_spatialization_control", _("Headphone friendly mode")));
                setDependent(e, "snd_channels", 1.5, 0.5);
        me.TR(me);
-       /*me.TR(me); // Samual: I REALLY don't think these are relevant to anyone, and just clutter up the menu pointlessly. The defaults are fine.
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Spatial voices:")));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", ZCTX(_("VOCS^None"))));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "2", ZCTX(_("VOCS^Taunts"))));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "1", ZCTX(_("VOCS^All"))));
        me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Taunt range:")));
-               setDependent(e, "cl_voice_directional", 0.5, -0.5);
-               me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_voice_directional_taunt_attenuation"));
-                       e.addValue(e, ZCTX(_("RNG^Very short")), "3");
-                       e.addValue(e, ZCTX(_("RNG^Short")), "2");
-                       e.addValue(e, ZCTX(_("RNG^Normal")), "0.5");
-                       e.addValue(e, ZCTX(_("RNG^Long")), "0.25");
-                       e.addValue(e, ZCTX(_("RNG^Full")), "0.015625");
-                       e.configureXonoticTextSliderValues(e);
-               setDependent(e, "cl_voice_directional", 0.5, -0.5);
-       me.TR(me);*/
+               me.TD(me, 1, 3, makeXonoticCheckBox(0, "cl_hitsound", _("Hit indication sound")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_hitsound", _("Hit indication sound")));
+               me.TD(me, 1, 3, makeXonoticCheckBox(0, "con_chatsound", _("Chat message sound")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_chatsound", _("Chat message sound")));
+               me.TD(me, 1, 3, makeXonoticCheckBoxEx(2, 0, "menu_sounds", _("Menu sounds")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "menu_sounds", _("Menu sounds")));
        me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Time announcer:")));
+               me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Time announcer:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_announcer_maptime"));
                        e.addValue(e, ZCTX(_("WRN^Disabled")), "0");
                        e.addValue(e, _("1 minute"), "1");
@@ -191,13 +173,12 @@ void XonoticAudioSettingsTab_fill(entity me)
                        e.savedValue = 0.65; // default
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Frequency:")));
+               me.TD(me, 1, 0.8, makeXonoticTextLabel(0, _("Frequency:")));
                me.TD(me, 1, 2, sl);
        me.TR(me);
        me.TR(me);
                if(cvar("developer"))
-                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showsound", _("Debug info about sounds")));
-       
+                       me.TD(me, 1, 3, makeXonoticCheckBox(0, "showsound", _("Debug info about sounds")));
 
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "snd_restart; snd_attenuation_method_$menu_snd_attenuation_method; sendcvar cl_hitsound; sendcvar cl_autotaunt; sendcvar cl_voice_directional; sendcvar cl_voice_directional_taunt_attenuation", COMMANDBUTTON_APPLY));
index 5f6226f493fbee1ec5c5d1214cdf6aae16f62b1e..5be639a07559ec27058539e8c838b3526f8e8d43 100644 (file)
@@ -153,6 +153,7 @@ void XonoticLanguageList_getLanguages(entity me)
        buf = buf_create();
 
        fh = fopen("languages.txt", FILE_READ);
+       i = 0;
        while((s = fgets(fh)))
        {
                n = tokenize_console(s);
index 61eb4a681651f6cd0d82ec7cac6274c26df3e499..f37aaeb0750d8568dea1d8cf79b9a6f738bb71ff 100644 (file)
@@ -180,8 +180,13 @@ void XonoticPlayerModelSelector_draw(entity me)
 
        SUPER(XonoticPlayerModelSelector).draw(me);
        // draw text on the image, handle \n in the description
+
+       draw_beginBoldFont();
+
        draw_CenterText('0.5 0 0', me.currentModelTitle, me.realFontSize * (me.titleFontSize / me.fontSize), SKINCOLOR_MODELTITLE, SKINALPHA_MODELTITLE, FALSE);
 
+       draw_endBoldFont();
+
        o = '0.5 1 0' - eY * me.realFontSize_y * ((n = tokenizebyseparator(me.currentModelDescription, "\n")) + 0.5);
        for(i = 0; i < n; ++i)
        {
index f1d45ab5b08f88c0b0a23c5fd7fb52407ce8ac9a..44ca1b227943cf7da354dbe5219f72b387f3fa48 100644 (file)
@@ -608,6 +608,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
 
        s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
        m = tokenizebyseparator(s, ":");
+       typestr = "";
        if(m >= 2)
        {
                typestr = argv(0);
@@ -616,6 +617,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        freeslots = -1;
        sflags = -1;
        modname = "";
+       pure = 0;
        for(j = 2; j < m; ++j)
        {
                if(argv(j) == "")
index 78ac9de46c1bc96aeda3db938b27d8bc29b49cfd..4c03eaa5f9caa9edb5255ee3f4a217a904799463 100644 (file)
@@ -622,6 +622,8 @@ float GameType_GetID(float cnt)
        #define GAMETYPE(id) if(i++ == cnt) return id;
        GAMETYPES
        #undef GAMETYPE
+
+       unused_float = i;
        
        return 0;
 }
index 68ec68324d78f785ff84fde5167d7a44a0b1493a..73025f1f61004ed50996fc1dfa692aafac943895 100644 (file)
@@ -15,6 +15,9 @@ void antilag_dummy()
 
 void antilag_record(entity e, float t)
 {
+    if (e.vehicle && e.vehicle.vehicle_flags == VHF_PLAYERSLOT)
+        return;
+        
     if(e.vehicle)
         antilag_record(e.vehicle, t);
 
@@ -92,6 +95,10 @@ vector antilag_takebackavgvelocity(entity e, float t0, float t1)
 
 void antilag_takeback(entity e, float t)
 {
+
+    if (e.vehicle && e.vehicle.vehicle_flags == VHF_PLAYERSLOT)
+        return;
+
        if(e.vehicle)
                antilag_takeback(e.vehicle, t);
 
@@ -104,6 +111,9 @@ void antilag_takeback(entity e, float t)
 
 void antilag_restore(entity e)
 {
+    if (e.vehicle && e.vehicle.vehicle_flags == VHF_PLAYERSLOT)
+        return;
+
        if(e.vehicle)
                antilag_restore(e.vehicle);
 
@@ -122,7 +132,7 @@ void antilag_clear(entity e)
        for(i = 0; i < ANTILAG_MAX_ORIGINS; ++i)
        {
                e.(antilag_times[i]) = -2342;
-               e.(antilag_origins[i]) = self.origin;
+               e.(antilag_origins[i]) = e.origin;
        }
        e.antilag_index = ANTILAG_MAX_ORIGINS - 1; // next one is 0
 }
index 5e1c65f796e159525962b01e0cd69074475710f8..12a343eb726b6fac85a0ff52693bc9bec340b8d2 100644 (file)
@@ -686,8 +686,8 @@ float autocvar_g_balance_shotgun_secondary_refire;
 float autocvar_g_balance_shotgun_reload_ammo;
 float autocvar_g_balance_shotgun_reload_time;
 float autocvar_g_balance_teams;
-float autocvar_g_balance_teams_force;
 float autocvar_g_balance_teams_prevent_imbalance;
+float autocvar_g_balance_teams_scorefactor;
 float autocvar_g_balance_tuba_animtime;
 float autocvar_g_balance_tuba_attenuation;
 float autocvar_g_balance_tuba_damage;
@@ -809,7 +809,6 @@ float autocvar_g_freezetag_warmup;
 float autocvar_g_full_getstatus_responses;
 float autocvar_g_fullbrightitems;
 float autocvar_g_fullbrightplayers;
-string autocvar_g_ghost_items_color;
 #define autocvar_g_grappling_hook cvar("g_grappling_hook")
 float autocvar_g_grappling_hook_tarzan;
 float autocvar_g_hitplots;
@@ -928,6 +927,7 @@ float autocvar_g_playerclip_collisions;
 string autocvar_g_playerstats_uri;
 float autocvar_g_powerups;
 float autocvar_g_projectiles_damage;
+float autocvar_g_projectiles_keep_owner;
 float autocvar_g_projectiles_newton_style;
 float autocvar_g_projectiles_newton_style_2_maxfactor;
 float autocvar_g_projectiles_newton_style_2_minfactor;
index 039e21daed025bf588322272997456ed3f2fb240..b06d578d1813b096ea7a49e2475e3ce59dfea55c 100644 (file)
@@ -128,7 +128,10 @@ void bot_setnameandstuff()
        file = fopen(autocvar_bot_config_file, FILE_READ);
 
        if(file < 0)
+       {
                print(strcat("Error: Can not open the bot configuration file '",autocvar_bot_config_file,"'\n"));
+               readfile = "";
+       }
        else
        {
                RandomSelection_Init();
index 18e4341718e67e698e12c76045a8d035418e8af8..e03cbac66a5937baa08cea8a4cd3575a6675c057 100644 (file)
@@ -493,8 +493,8 @@ void havocbot_movetogoal()
                {
                        if(fabs(self.velocity_z)<50)
                        {
-                               entity head, newgoal;
-                               float distance, bestdistance;
+                               entity head, newgoal = world;
+                               float distance, bestdistance = 0;
 
                                for (head = findchain(classname, "waypoint"); head; head = head.chain)
                                {
@@ -908,7 +908,7 @@ void havocbot_chooseenemy()
 
        self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
 
-       for(;;)
+       for(i = 0; ; ++i)
        {
                while (head)
                {
@@ -939,7 +939,6 @@ void havocbot_chooseenemy()
                self.dphitcontentsmask |= DPCONTENTS_OPAQUE;
 
                head = head2;
-               ++i;
        }
 
        // Restore hit flags
@@ -960,7 +959,7 @@ float havocbot_chooseweapon_checkreload(float new_weapon)
        // if this weapon is scheduled for reloading, don't switch to it during combat
        if (self.weapon_load[new_weapon] < 0)
        {
-               float i, other_weapon_available;
+               float i, other_weapon_available = FALSE;
                for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                {
                        // if we are out of ammo for all other weapons, it's an emergency to switch to anything else
index 74c611ea18ddf6bdfe8f54dc94c3de1c29c59c57..178ee0da6e8cfe236be697a433ba96a6c4a4cb55 100644 (file)
@@ -60,7 +60,7 @@ float havocbot_ctf_teamcount(entity bot, vector org, float radius)
        if not(teamplay)
                return 0;
 
-       float c;
+       float c = 0;
        entity head;
 
        FOR_EACH_PLAYER(head)
@@ -562,9 +562,8 @@ void havocbot_role_ctf_defense()
                navigation_goalrating_start();
 
                // if enemies are closer to our base, go there
-               entity head, closestplayer;
-               float distance, bestdistance;
-               distance = 10000;
+               entity head, closestplayer = world;
+               float distance, bestdistance = 10000;
                FOR_EACH_PLAYER(head)
                {
                        if(head.deadflag!=DEAD_NO)
@@ -596,20 +595,21 @@ void havocbot_role_ctf_defense()
 void havocbot_calculate_middlepoint()
 {
        entity f;
-       vector p1, p2;
+       vector s = '0 0 0';
+       vector fo = '0 0 0';
+       float n = 0;
 
        f = ctf_worldflaglist;
        while (f)
        {
-               if(p1)
-                       p2 = f.origin;
-               else
-                       p1 = f.origin;
-
+               fo = f.origin;
+               s = s + fo;
                f = f.ctf_worldflagnext;
        }
-       havocbot_ctf_middlepoint = p1 + ((p2-p1) * 0.5);
-       havocbot_ctf_middlepoint_radius  = vlen(p2-p1) * 0.5;
+       if(!n)
+               return;
+       havocbot_ctf_middlepoint = s * (1.0 / n);
+       havocbot_ctf_middlepoint_radius  = vlen(fo - havocbot_ctf_middlepoint);
 }
 
 void havocbot_ctf_reset_role(entity bot)
index 90150e2ab3c4d027b6219c905497ea821563c858..b17697d2f8524d6ae21bc3c9dee8205161a07cf3 100644 (file)
@@ -28,13 +28,14 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplay
 void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float sradius)
 {
        entity head;
-       float t, i, c, needarmor, needweapons;
+       float t, i, c, needarmor = FALSE, needweapons = FALSE;
 
        // Needs armor/health?
        if(self.health<100)
                needarmor = TRUE;
 
        // Needs weapons?
+       c = 0;
        for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
        {
                // Find weapon
@@ -98,7 +99,7 @@ void havocbot_role_ons_setrole(entity bot, float role)
 
 float havocbot_ons_teamcount(entity bot, float role)
 {
-       float c;
+       float c = 0;
        entity head;
 
        FOR_EACH_PLAYER(head)
@@ -152,6 +153,7 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale)
 
        // We'll consider only the best case
        bestvalue = 99999999999;
+       cp = world;
        for (; cp1; cp1 = cp1.chain)
        {
                if not(cp1.wpconsidered)
index bf963bc7cd703be9d53cacf49c422d0f84c726bd..a5c60e3935bca171b1e16e30971d2b34997141cd 100644 (file)
@@ -27,6 +27,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float
        dir = normalize(move);
        stepdist = 32;
        ignorehazards = FALSE;
+       swimming = FALSE;
 
        // Analyze starting point
        traceline(start, start, MOVE_NORMAL, e);
@@ -1218,6 +1219,7 @@ void debuggoalstack()
        else if(self.goalcounter==29)goal=self.goalstack29;
        else if(self.goalcounter==30)goal=self.goalstack30;
        else if(self.goalcounter==31)goal=self.goalstack31;
+       else goal=world;
 
        if(goal==world)
        {
index 63a6cb336d4054c90d3aa0283be057005139bed0..5752e2f499c506e42686b8770e22a925dfe18473 100644 (file)
@@ -38,9 +38,9 @@ void bot_queuecommand(entity bot, string cmdstring)
                {
                        parm = substring(cmdstr, sp + 1, -1);
                        cmdstr = substring(cmdstr, 0, sp);
+                       if(cmdstr == "sound")
+                               precache_sound(cmdstr);
                }
-               if(cmdstr == "sound")
-                       precache_sound(cmdstr);
        }
 
        bot.bot_cmdqueuebuf_end += 1;
@@ -292,7 +292,7 @@ entity find_bot_by_name(string name)
 entity find_bot_by_number(float number)
 {
        entity bot;
-       float c;
+       float c = 0;
 
        if(!number)
                return world;
index 7c2509d21a514c550e2d453e106573cc49ae3333..b69e0fbe097479687200957a1f8bef54fda96c89 100644 (file)
@@ -183,7 +183,7 @@ void CampaignPreIntermission()
        float lost;
        string savevar;
 
-       won = 0;
+       won = lost = 0;
 
        head = findchain(classname, "player");
        while(head)
index 19ee93868a59f04b69c5dd061a80a79e7e668ca9..2f6a660cb203f4debee868d307f05fd4c018e4d4 100644 (file)
@@ -749,6 +749,7 @@ float CheatFrame()
 
                                float drag;
                                crosshair_trace_plusvisibletriggers(self);
+                               drag = FALSE;
                                if(vlen(self.origin - trace_ent.origin) <= autocvar_g_grab_range)
                                {
                                        switch(trace_ent.grab)
index b68bce6949eb272048cd6594a6e9a7b81b9d2d18..7c3308041e670a8270eca36b9a660a640746a6e0 100644 (file)
@@ -415,7 +415,7 @@ void PutObserverInServer (void)
        }
 
        if(self.vehicle)
-           vehicles_exit(VHEF_RELESE);
+               vehicles_exit(VHEF_RELESE);         
 
        if(self.flagcarried)
                DropFlag(self.flagcarried, world, world);
@@ -472,6 +472,7 @@ void PutObserverInServer (void)
        self.invincible_finished = 0;
        self.superweapons_finished = 0;
        self.pushltime = 0;
+       self.istypefrag = 0;
        self.think = SUB_Null;
        self.nextthink = 0;
        self.hook_time = 0;
@@ -547,11 +548,11 @@ void FixPlayermodel()
        vector m1, m2;
 
        defaultmodel = "";
+       defaultskin = 0;
+       chmdl = FALSE;
 
        if(autocvar_sv_defaultcharacter == 1)
        {
-               defaultskin = 0;
-
                if(teamplay)
                {
                        string s;
@@ -1069,8 +1070,7 @@ void ClientKill_Now_TeamChange()
 {
        if(self.killindicator_teamchange == -1)
        {
-               self.team = -1;
-               JoinBestTeam( self, FALSE, FALSE );
+               JoinBestTeam( self, FALSE, TRUE );
        }
        else if(self.killindicator_teamchange == -2)
        {
@@ -1118,7 +1118,7 @@ void KillIndicator_Think()
                return;
        }
 
-       if (self.owner.alpha < 0)
+       if (self.owner.alpha < 0 && !self.owner.vehicle)
        {
                self.owner.killindicator = world;
                remove(self);
@@ -1439,7 +1439,7 @@ void ClientConnect (void)
        } else {
                if(teamplay)
                {
-                       if(autocvar_g_balance_teams || autocvar_g_balance_teams_force)
+                       if(autocvar_g_balance_teams)
                        {
                                self.classname = "player";
                                campaign_bots_may_start = 1;
@@ -1564,7 +1564,6 @@ void ClientConnect (void)
                        rr = CTS_RECORD;
                else
                        rr = RACE_RECORD;
-               t = stof(db_get(ServerProgsDB, strcat(GetMapname(), rr, "time")));
 
                msg_entity = self;
                race_send_recordtime(MSG_ONE);
@@ -2123,6 +2122,15 @@ void GetPressedKeys(void) {
                self.pressedkeys |= KEY_CROUCH;
        else
                self.pressedkeys &~= KEY_CROUCH;
+
+       if (self.BUTTON_ATCK)
+               self.pressedkeys |= KEY_ATCK;
+       else
+               self.pressedkeys &~= KEY_ATCK;
+       if (self.BUTTON_ATCK2)
+               self.pressedkeys |= KEY_ATCK2;
+       else
+               self.pressedkeys &~= KEY_ATCK2;
 }
 
 /*
@@ -2163,29 +2171,24 @@ void SpectateCopy(entity spectatee) {
        self.minelayer_mines = spectatee.minelayer_mines;
        self.punchangle = spectatee.punchangle;
        self.view_ofs = spectatee.view_ofs;
-       self.v_angle = spectatee.v_angle;
        self.velocity = spectatee.velocity;
        self.dmg_take = spectatee.dmg_take;
        self.dmg_save = spectatee.dmg_save;
        self.dmg_inflictor = spectatee.dmg_inflictor;
+       self.v_angle = spectatee.v_angle;
        self.angles = spectatee.v_angle;
        if(!self.BUTTON_USE)
                self.fixangle = TRUE;
        setorigin(self, spectatee.origin);
        setsize(self, spectatee.mins, spectatee.maxs);
        SetZoomState(spectatee.zoomstate);
-
-       anticheat_spectatecopy(spectatee);
-
-       //self.vehicle = spectatee.vehicle;
-
+    
+    anticheat_spectatecopy(spectatee);
        self.hud = spectatee.hud;
        if(spectatee.vehicle)
     {
-        setorigin(self, spectatee.origin);
-        self.velocity = spectatee.vehicle.velocity;
-        self.v_angle += spectatee.vehicle.angles;
-        //self.v_angle_x *= -1;
+        self.fixangle = FALSE;
+        //self.velocity = spectatee.vehicle.velocity;
         self.vehicle_health = spectatee.vehicle_health;
         self.vehicle_shield = spectatee.vehicle_shield;
         self.vehicle_energy = spectatee.vehicle_energy;
@@ -2193,11 +2196,18 @@ void SpectateCopy(entity spectatee) {
         self.vehicle_ammo2 = spectatee.vehicle_ammo2;
         self.vehicle_reload1 = spectatee.vehicle_reload1;
         self.vehicle_reload2 = spectatee.vehicle_reload2;
-        
+
         msg_entity = self;
-        WriteByte (MSG_ONE, SVC_SETVIEWPORT);
-        WriteEntity(MSG_ONE, spectatee);
-        //self.tur_head = spectatee.vehicle.vehicle_viewport;
+        
+        WriteByte (MSG_ONE, SVC_SETVIEWANGLES);
+            WriteAngle(MSG_ONE,  spectatee.v_angle_x);
+            WriteAngle(MSG_ONE,  spectatee.v_angle_y);
+            WriteAngle(MSG_ONE,  spectatee.v_angle_z);
+
+        //WriteByte (MSG_ONE, SVC_SETVIEW);
+        //    WriteEntity(MSG_ONE, self);            
+        //makevectors(spectatee.v_angle);
+        //setorigin(self, spectatee.origin - v_forward * 400 + v_up * 300);*/    
     }
 }
 
@@ -2240,8 +2250,13 @@ entity CA_SpectateNext(entity start) {
        return other;
 }
 
-float SpectateNext() {
-       other = find(self.enemy, classname, "player");
+float SpectateNext(entity _prefer) {
+       
+       if(_prefer)
+               other = _prefer;        
+       else
+               other = find(self.enemy, classname, "player");
+       
        if (g_ca && !autocvar_g_ca_spectate_enemies && self.caplayer) {
                // CA and ca players when spectating enemies is forbidden
                other = CA_SpectateNext(other);
@@ -2255,17 +2270,19 @@ float SpectateNext() {
                self.enemy = other;
 
        if(self.enemy.classname == "player") {
-           if(self.enemy.vehicle)
+           /*if(self.enemy.vehicle)
            {      
+            
             msg_entity = self;
-            WriteByte(MSG_ONE, SVC_SETVIEWPORT);
+            WriteByte(MSG_ONE, SVC_SETVIEW);
             WriteEntity(MSG_ONE, self.enemy);
             //stuffcmd(self, "set viewsize $tmpviewsize \n");
+            
             self.movetype = MOVETYPE_NONE;
             accuracy_resend(self);
            }
            else 
-           {           
+           {*/         
             msg_entity = self;
             WriteByte(MSG_ONE, SVC_SETVIEW);
             WriteEntity(MSG_ONE, self.enemy);
@@ -2275,7 +2292,7 @@ float SpectateNext() {
 
             if(!SpectateUpdate())
                 PutObserverInServer();
-        }
+        //}
         return 1;
        } else {
                return 0;
@@ -2315,7 +2332,7 @@ void LeaveSpectatorMode()
                if(!teamplay || autocvar_g_campaign || autocvar_g_balance_teams || (self.wasplayer && autocvar_g_changeteam_banned) || self.team_forced > 0) {
                        self.classname = "player";
 
-                       if(autocvar_g_campaign || autocvar_g_balance_teams || autocvar_g_balance_teams_force)
+                       if(autocvar_g_campaign || autocvar_g_balance_teams)
                                JoinBestTeam(self, FALSE, TRUE);
 
                        if(autocvar_g_campaign)
@@ -2377,7 +2394,7 @@ float nJoinAllowed(entity ignore) {
 
        // TODO simplify this
        entity e;
-       float totalClients;
+       float totalClients = 0;
        FOR_EACH_CLIENT(e)
                if(e != ignore)
                        totalClients += 1;
@@ -2385,7 +2402,7 @@ float nJoinAllowed(entity ignore) {
        if (!autocvar_g_maxplayers)
                return maxclients - totalClients;
 
-       float currentlyPlaying;
+       float currentlyPlaying = 0;
        FOR_EACH_REALPLAYER(e)
                currentlyPlaying += 1;
 
@@ -2453,7 +2470,7 @@ void ObserverThink()
                        self.flags |= FL_SPAWNING;
                } else if(self.BUTTON_ATCK && !self.version_mismatch) {
                        self.flags &~= FL_JUMPRELEASED;
-                       if(SpectateNext() == 1) {
+                       if(SpectateNext(world) == 1) {
                                self.classname = "spectator";
                        }
                } else {
@@ -2484,7 +2501,7 @@ void SpectatorThink()
                        self.flags |= FL_SPAWNING;
                } else if(self.BUTTON_ATCK) {
                        self.flags &~= FL_JUMPRELEASED;
-                       if(SpectateNext() == 1) {
+                       if(SpectateNext(world) == 1) {
                                self.classname = "spectator";
                        } else {
                                self.classname = "observer";
@@ -2782,6 +2799,7 @@ void PlayerPreThink (void)
 
                self.prevorigin = self.origin;
 
+               if (!self.vehicle)
                if (((self.BUTTON_CROUCH && !self.hook.state) || self.health <= g_bloodloss) && self.animstate_startframe != self.anim_melee_x) // prevent crouching if using melee attack
                {
                        if (!self.crouch)
index 524e796af2e32859054ee3a82522eae1ddb85147..987e07c46f228b892e9741c3c4b75e00a5571968 100644 (file)
@@ -48,7 +48,13 @@ void ImpulseCommands (void)
 
        if (timeout_status == TIMEOUT_ACTIVE) //don't allow any impulses while the game is paused
                return;
-
+    
+    if(self.vehicle)
+        if(self.vehicle.deadflag == DEAD_NO)
+            if(self.vehicle.vehicles_impusle)
+                if(self.vehicle.vehicles_impusle(imp))
+                    return;
+    
        if(CheatImpulse(imp))
        {
        }
index db2707fb9e828ae10ce2d437c6dc07fe92f8feea..b57c18a17872ccb4552e73398b03b1c00b2aadc1 100644 (file)
@@ -123,6 +123,7 @@ void WeaponStats_LogKill(float awep, float abot, float vwep, float vbot)
 
 .entity pusher;
 .float pushltime;
+.float istypefrag;
 
 .float CopyBody_nextthink;
 .void(void) CopyBody_think;
@@ -580,11 +581,13 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                // don't reset pushltime for self damage as it may be an attempt to
                // escape a lava pit or similar
                //self.pushltime = 0;
+               self.istypefrag = 0;
        }
        else if(attacker.classname == "player")
        {
                self.pusher = attacker;
                self.pushltime = time + autocvar_g_maxpushtime;
+               self.istypefrag = self.BUTTON_CHAT;
        }
        else if(time < self.pushltime)
        {
@@ -592,13 +595,18 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                self.pushltime = max(self.pushltime, time + 0.6);
        }
        else
+       {
                self.pushltime = 0;
+               self.istypefrag = 0;
+       }
 
        float abot, vbot, awep;
        abot = (clienttype(attacker) == CLIENTTYPE_BOT);
        vbot = (clienttype(self) == CLIENTTYPE_BOT);
 
        valid_damage_for_weaponstats = 0;
+       awep = 0;
+
        if(vbot || clienttype(self) == CLIENTTYPE_REAL)
        if(abot || clienttype(attacker) == CLIENTTYPE_REAL)
        if(attacker && self != attacker)
@@ -805,11 +813,12 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
 //   0 = reject
 //  -1 = fake accept
 {
-       string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, privatemsgprefix;
-       float flood, privatemsgprefixlen;
+       string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr;
+       float flood;
        var .float flood_field;
        entity head;
        float ret;
+       string privatemsgprefix = string_null; float privatemsgprefixlen = 0;
 
        if(!teamsay && !privatesay)
                if(substring(msgin, 0, 1) == " ")
@@ -822,7 +831,10 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
        else if(teamplay)
                colorstr = Team_ColorCode(source.team);
        else
+       {
+               colorstr = "";
                teamsay = FALSE;
+       }
 
        if(intermission_running)
                teamsay = FALSE;
@@ -881,6 +893,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
 
        // FLOOD CONTROL
        flood = 0;
+       flood_field = floodcontrol_chat;
        if(floodcontrol)
        {
                float flood_spl;
index 59efb74d5458508fab560ddb0f5338fa12013372..236c0923fdc330834469234bc9eb2285a1f6bb26 100644 (file)
@@ -318,7 +318,9 @@ float W_IsWeaponThrowable(float w)
                return 0;
        if (g_nexball && w == WEP_GRENADE_LAUNCHER)
                return 0;
-
+    if(w == 0)
+        return 0;
+       
        wa = W_AmmoItemCode(w);
        if(WEPSET_CONTAINS_AW(start_weapons, w))
        {
index d2c2546d2f3e091660282b3626e6b5521996011c..402b692af1230fba959a89c1fce3aef5a999ab13 100644 (file)
@@ -69,6 +69,7 @@ vector W_HitPlotNormalizedUntransform(vector org, entity targ, vector screenforw
 
        // x = 0..1 relative to hitbox; y = 0..1 relative to hitbox; z = distance
 
+       mi = ma = targ.origin + 0.5 * (targ.mins + targ.maxs);
        for(i = 0; i < 2; ++i) for(j = 0; j < 2; ++j) for(k = 0; k < 2; ++k)
        {
                thisv = targ.origin;
@@ -557,7 +558,6 @@ void CL_Weaponentity_Think()
 
        self.angles = '0 0 0';
        float f;
-       f = 0;
        if (self.state == WS_RAISE && !intermission_running)
        {
                f = (self.owner.weapon_nextthink - time) * g_weaponratefactor / autocvar_g_balance_weaponswitchdelay;
@@ -1077,8 +1077,6 @@ vector W_CalculateProjectileVelocity(vector pvelocity, vector mvelocity, float f
 {
        vector mdirection;
        float mspeed;
-       float outspeed;
-       float nstyle;
        vector outvelocity;
 
        mvelocity = mvelocity * g_weaponspeedfactor;
@@ -1086,61 +1084,7 @@ vector W_CalculateProjectileVelocity(vector pvelocity, vector mvelocity, float f
        mdirection = normalize(mvelocity);
        mspeed = vlen(mvelocity);
 
-       nstyle = autocvar_g_projectiles_newton_style;
-       if(nstyle == 0 || forceAbsolute)
-       {
-               // absolute velocity
-               outvelocity = mvelocity;
-       }
-       else if(nstyle == 1)
-       {
-               // true Newtonian projectiles
-               outvelocity = pvelocity + mvelocity;
-       }
-       else if(nstyle == 2)
-       {
-               // true Newtonian projectiles with automatic aim adjustment
-               //
-               // solve: |outspeed * mdirection - pvelocity| = mspeed
-               // outspeed^2 - 2 * outspeed * (mdirection * pvelocity) + pvelocity^2 - mspeed^2 = 0
-               // outspeed = (mdirection * pvelocity) +- sqrt((mdirection * pvelocity)^2 - pvelocity^2 + mspeed^2)
-               // PLUS SIGN!
-               // not defined?
-               // then...
-               // pvelocity^2 - (mdirection * pvelocity)^2 > mspeed^2
-               // velocity without mdirection component > mspeed
-               // fire at smallest possible mspeed that works?
-               // |(mdirection * pvelocity) * pvelocity - pvelocity| = mspeed
-
-               vector solution;
-               solution = solve_quadratic(1, -2 * (mdirection * pvelocity), pvelocity * pvelocity - mspeed * mspeed);
-               if(solution_z)
-                       outspeed = solution_y; // the larger one
-               else
-               {
-                       //outspeed = 0; // slowest possible shot
-                       outspeed = solution_x; // the real part (that is, the average!)
-                       //dprint("impossible shot, adjusting\n");
-               }
-
-               outspeed = bound(mspeed * autocvar_g_projectiles_newton_style_2_minfactor, outspeed, mspeed * autocvar_g_projectiles_newton_style_2_maxfactor);
-               outvelocity = mdirection * outspeed;
-       }
-       else if(nstyle == 3)
-       {
-               // pseudo-Newtonian:
-               outspeed = mspeed + mdirection * pvelocity;
-               outspeed = bound(mspeed * 0.7, outspeed, mspeed * 5.0);
-               outvelocity = mdirection * outspeed;
-       }
-       else if(nstyle == 4)
-       {
-               // tZorkian:
-               outspeed = mspeed + vlen(pvelocity);
-               outvelocity = mdirection * outspeed;
-       }
-       else
-               error("g_projectiles_newton_style must be 0 (absolute), 1 (Newtonian), 2 (Newtonian + aimfix), 3 (pseudo Newtonian) or 4 (tZorkian)!");
+       outvelocity = get_shotvelocity(pvelocity, mdirection, mspeed, (forceAbsolute ? 0 : autocvar_g_projectiles_newton_style), autocvar_g_projectiles_newton_style_2_minfactor, autocvar_g_projectiles_newton_style_2_maxfactor);
 
        return outvelocity;
 }
index 7a6138283f5c8ed466dfd91b238078b4b68779cb..8e3ecb7ba0369ab674ac56ccc2198c9bf01c11a6 100644 (file)
@@ -3,7 +3,7 @@
 //  Last updated: December 29th, 2011
 // =====================================
 
-#define GET_BAN_ARG(v,d) if((argc > reason_arg) && ((v = stof(argv(reason_arg))) != 0)) ++reason_arg; else v = d
+#define GET_BAN_ARG(v,d) if(argc > reason_arg) { if((v = stof(argv(reason_arg))) != 0) ++reason_arg; else v = d; } else v = d
 #define GET_BAN_REASON(v,d) if(argc > reason_arg) v = substring(command, argv_start_index(reason_arg), strlen(command) - argv_start_index(reason_arg)); else v = d
 
 void Ban_KickBanClient(entity client, float bantime, float masksize, string reason);
@@ -12,4 +12,4 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync);
 float Ban_Delete(float i);
 
 // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
-void BanCommand_macro_write_aliases(float fh)
\ No newline at end of file
+void BanCommand_macro_write_aliases(float fh)
index 32bd688d3bdbd26c2460157eca266974873ae203..530646afd2ec8fbb105dc8a080b41dadaaa25d0f 100644 (file)
@@ -90,7 +90,7 @@ void ClientCommand_clientversion(float request, float argc) // internal command,
                                                self.version_mismatch = 1;
                                                ClientKill_TeamChange(-2); // observe
                                        } 
-                                       else if(autocvar_g_campaign || autocvar_g_balance_teams || autocvar_g_balance_teams_force
+                                       else if(autocvar_g_campaign || autocvar_g_balance_teams) 
                                        {
                                                //JoinBestTeam(self, FALSE, TRUE);
                                        } 
@@ -226,40 +226,6 @@ void ClientCommand_ready(float request) // todo: anti-spam for toggling readynes
        }
 }
 
-void ClientCommand_reportcvar(float request, float argc, string command)
-{      
-       switch(request)
-       {
-               case CMD_REQUEST_COMMAND:
-               {
-                       if(argv(1) != "")
-                       {
-                               float tokens;
-                               string s;
-                               
-                               if(substring(argv(2), 0, 1) == "$") // undefined cvar: use the default value on the server then
-                               {
-                                       s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
-                                       tokens = tokenize_console(s);
-                               }
-                               
-                               GetCvars(1);
-                               
-                               return;
-                       }
-               }
-                       
-               default:
-                       sprint(self, "Incorrect parameters for ^2reportcvar^7\n");
-               case CMD_REQUEST_USAGE:
-               {
-                       sprint(self, "\nUsage:^3 cmd reportcvar <cvar>\n");
-                       sprint(self, "  Where 'cvar' is the cvar plus arguments to send to the server.\n");
-                       return;
-               }
-       }
-}
-
 void ClientCommand_say(float request, float argc, string command)
 {
        switch(request)
@@ -324,7 +290,7 @@ void ClientCommand_selectteam(float request, float argc)
                                                                        case "pink": selection = COLOR_TEAM4; break;
                                                                        case "auto": selection = (-1); break;
                                                                        
-                                                                       default: break;
+                                                                       default: selection = 0; break;
                                                                }
                                                                
                                                                if(selection)
@@ -392,13 +358,13 @@ void ClientCommand_sentcvar(float request, float argc, string command)
                {
                        if(argv(1) != "")
                        {
-                               float tokens;
+                               //float tokens;
                                string s;
                                
                                if(argc == 2) // undefined cvar: use the default value on the server then
                                {
                                        s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
-                                       tokens = tokenize_console(s);
+                                       tokenize_console(s);
                                }
                                
                                GetCvars(1);
@@ -595,7 +561,6 @@ void ClientCommand_(float request)
        CLIENT_COMMAND("mv_getpicture", ClientCommand_mv_getpicture(request, arguments), "Retrieve mapshot picture from the server") \
        CLIENT_COMMAND("join", ClientCommand_join(request), "Become a player in the game") \
        CLIENT_COMMAND("ready", ClientCommand_ready(request), "Qualify as ready to end warmup stage (or restart server if allowed)") \
-       CLIENT_COMMAND("reportcvar", ClientCommand_reportcvar(request, arguments, command), "Old system for sending a client cvar to the server") \
        CLIENT_COMMAND("say", ClientCommand_say(request, arguments, command), "Print a message to chat to all players") \
        CLIENT_COMMAND("say_team", ClientCommand_say_team(request, arguments, command), "Print a message to chat to all team mates") \
        CLIENT_COMMAND("selectteam", ClientCommand_selectteam(request, arguments), "Attempt to choose a team to join into") \
@@ -683,7 +648,6 @@ void SV_ParseClientCommand(string command)
                case "mv_getpicture": break; // handled by server in this file
                case "pause": break; // handled by engine in host_cmd.c
                case "prespawn": break; // handled by engine in host_cmd.c
-               case "reportcvar": break; // handled by server in this file
                case "sentcvar": break; // handled by server in this file
                case "spawn": break; // handled by engine in host_cmd.c
                
index 99313b38bf4f9e3b2331fcc5a6d75fb09622b6b4..13e667ad87123b72c7a282f3633d6940ec1abbd1 100644 (file)
@@ -63,6 +63,7 @@ entity GetIndexedEntity(float argc, float start_index)
        
        next_token = -1;
        index = start_index;
+       selection = world;
        
        if(argc > start_index)
        {
@@ -80,6 +81,8 @@ entity GetIndexedEntity(float argc, float start_index)
                                tmp_number = stof(argv(index));
                                ++index;
                        }
+                       else
+                               tmp_number = 0;
                }
                else // maybe it's ONLY a number?
                {
@@ -123,6 +126,7 @@ entity GetFilteredEntity(string input)
        }
        else
        {
+               selection = world;
                FOR_EACH_CLIENT(tmp_player)
                        if (strdecolorize(tmp_player.netname) == strdecolorize(input))
                                selection = tmp_player;
@@ -137,7 +141,7 @@ float GetFilteredNumber(string input)
        entity selection = GetFilteredEntity(input);
        float output;
        
-       if(selection) { output = num_for_edict(selection); }
+       output = num_for_edict(selection);
 
        return output;
 }
@@ -614,6 +618,7 @@ void CommonCommand_who(float request, entity caller, float argc)
                        print_to(caller, sprintf(strreplace(" ", separator, " %-4s %-20s %-5s %-3s %-9s %-16s %s "), 
                                "ent", "nickname", "ping", "pl", "time", "ip", "crypto_id"));
                        
+                       total_listed_players = 0;
                        FOR_EACH_CLIENT(tmp_player)
                        {
                                is_bot = (clienttype(tmp_player) == CLIENTTYPE_BOT);
@@ -759,4 +764,4 @@ void CommonCommand_macro_write_aliases(float fh)
        #undef COMMON_COMMAND
        
        return;
-}
\ No newline at end of file
+}
index be4928e8a76296568f1aa21ab2d7270f9ec42d0b..0bedd6d5e21f3ce44f0b2d479eed092a59029b65 100644 (file)
@@ -14,6 +14,8 @@ string getrecords(float page) // 50 records per page
 {      
        float rec = 0, r, i;
        string h, s;
+       
+       s = "";
 
        if (g_ctf)
        {
@@ -85,6 +87,7 @@ string getrankings()
 
        map = GetMapname();
 
+       s = "";
        for (i = 1; i <= RANKINGS_CNT; ++i)
        {
                t = race_readTime(map, i);
@@ -107,7 +110,7 @@ string getrankings()
 
 string getladder()
 {
-       float i, j, k, uidcnt, thiscnt;
+       float i, j, k, uidcnt = 0, thiscnt;
        string s, temp_s, rr, myuid, thisuid;
        
        if(g_cts)
@@ -281,4 +284,4 @@ string getladder()
                return "No ladder on this server!\n";
        else
                return strcat("Top ", ftos(LADDER_SIZE), " ladder rankings:\n", s);
-}
\ No newline at end of file
+}
index 16f3212eda0cc1852569ac0de61a11d67b1ff470..d8651762965d9d6859dbc05ed205b5ee0407d8dc 100644 (file)
@@ -28,7 +28,7 @@ float FullTraceFraction(vector a, vector mi, vector ma, vector b)
                        c = trace_endpos;
                }
 
-               n += tracebox_inverted(c, mi, ma, b, MOVE_WORLDONLY, world);
+               n += tracebox_inverted(c, mi, ma, b, MOVE_WORLDONLY, world, FALSE);
 
                white += vlen(trace_endpos - c);
                c = trace_endpos;
@@ -424,4 +424,4 @@ float RadarMap_Make(float argc)
        }
        
        return FALSE;
-}
\ No newline at end of file
+}
index e70ce44ddbd06b3a7059d6fcc750d51ba0365895..4699049d2deece5103cd4fd67b94be28d1085083 100644 (file)
@@ -81,6 +81,7 @@ void GameCommand_adminmsg(float request, float argc)
                        float infobartime = stof(argv(3));
                        
                        string successful, t;
+                       successful = string_null;
                        
                        if((targets) && (admin_message))
                        {
@@ -166,7 +167,7 @@ void GameCommand_allspec(float request, float argc)
                {
                        entity client;
                        string reason = argv(1);
-                       float i;
+                       float i = 0;
                        
                        FOR_EACH_REALPLAYER(client)
                        {
@@ -528,7 +529,7 @@ void GameCommand_defer_clear_all(float request)
                case CMD_REQUEST_COMMAND:
                {
                        entity client;
-                       float i;
+                       float i = 0;
                        float argc;
                        
                        FOR_EACH_CLIENT(client)
@@ -904,6 +905,7 @@ void GameCommand_moveplayer(float request, float argc)
                        string notify = argv(3);
                        
                        string successful, t;
+                       successful = string_null;
                        
                        // lets see if the target(s) even actually exist.
                        if((targets) && (destination))
@@ -1242,6 +1244,8 @@ void GameCommand_shuffleteams(float request)
                                float i, x, z, t_teams, t_players, team_color;
 
                                // count the total amount of players and total amount of teams
+                               t_players = 0;
+                               t_teams = 0;
                                FOR_EACH_PLAYER(tmp_player)
                                {
                                        CheckAllowedTeams(tmp_player);
@@ -1347,7 +1351,7 @@ void GameCommand_stuffto(float request, float argc)
                {
                        if(argv(2))
                        {
-                               entity client = GetIndexedEntity(argc, 1));
+                               entity client = GetIndexedEntity(argc, 1);
                                float accepted = VerifyClientEntity(client, TRUE, FALSE);
                                
                                if(accepted > 0)
@@ -1421,7 +1425,6 @@ void GameCommand_trace(float request, float argc)
                                                        {
                                                                rint(42); // do an engine breakpoint on VM_rint so you can get the trace that errnoeously returns startsolid
                                                                tracebox(start, PL_MIN, PL_MAX, end, MOVE_NOMONSTERS, world);
-                                                               tracebox(p, PL_MIN, PL_MAX, q, MOVE_NOMONSTERS, world);
 
                                                                if(trace_startsolid)
                                                                {
@@ -1803,4 +1806,4 @@ void GameCommand(string command)
        print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n");
        
        return;
-}
\ No newline at end of file
+}
index 1e43564001d58957a7fafb6c278a8672e7af067d..e4564753008b889303ab4992bb4afbfd2f71edbd 100644 (file)
@@ -194,9 +194,9 @@ void VoteCount(float first_count)
                                || ((autocvar_sv_vote_nospectators == 1) && (inWarmupStage || gameover))
                                || (autocvar_sv_vote_nospectators == 0));
                                
-       float vote_player_count, is_player, notvoters;
-       float vote_real_player_count, vote_real_accept_count;
-       float vote_real_reject_count, vote_real_abstain_count;
+       float vote_player_count = 0, is_player, notvoters = 0;
+       float vote_real_player_count = 0, vote_real_accept_count = 0;
+       float vote_real_reject_count = 0, vote_real_abstain_count = 0;
        float vote_needed_of_voted, final_needed_votes;
        float vote_factor_overall, vote_factor_of_voted;
        
@@ -404,7 +404,7 @@ void ReadyCount()
 {
        entity tmp_player;
        float ready_needed_factor, ready_needed_count;
-       float t_ready, t_players;
+       float t_ready = 0, t_players = 0;
 
        FOR_EACH_REALPLAYER(tmp_player)
        {
@@ -476,15 +476,6 @@ float VoteCommand_checkinlist(string vote_command, string list)
        if(strstrofs(l, strcat(" ", vote_command, " "), 0) >= 0)
                return TRUE;
        
-       // if gotomap is allowed, chmap is too, and vice versa
-       if(vote_command == "gotomap")
-               if(strstrofs(l, " chmap ", 0) >= 0)
-                       return TRUE;
-                       
-       if(vote_command == "chmap")
-               if(strstrofs(l, " gotomap ", 0) >= 0)
-                       return TRUE;
-       
        return FALSE;
 }
 
@@ -516,30 +507,92 @@ string ValidateMap(string validated_map, entity caller)
        return validated_map;
 }
 
-float VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, float argc)
+float VoteCommand_checkargs(float startpos, float argc)
 {
-       string first_command;
-       
-       first_command = argv(startpos);
+       float p, q, check, minargs;
+       string cvarname = strcat("sv_vote_command_restriction_", argv(startpos));
+       string cmdrestriction = cvar_string(cvarname); // note: this warns on undefined cvar. We want that.
+       string charlist, arg;
+       float checkmate;
 
-       if not(VoteCommand_checkinlist(first_command, vote_list))
+       if(cmdrestriction == "")
+               return TRUE;
+
+       ++startpos; // skip command name
+
+       // check minimum arg count
+
+       // 0 args: argc == startpos
+       // 1 args: argc == startpos + 1
+       // ...
+
+       minargs = stof(cmdrestriction);
+       if(argc - startpos < minargs)
                return FALSE;
 
-       if(argc < startpos) // These commands won't work without arguments
+       p = strstrofs(cmdrestriction, ";", 0); // find first semicolon
+
+       for(;;)
        {
-               switch(first_command)
+               // we know that at any time, startpos <= argc - minargs
+               // so this means: argc-minargs >= startpos >= argc, thus
+               // argc-minargs >= argc, thus minargs <= 0, thus all minargs
+               // have been seen already
+
+               if(startpos >= argc) // all args checked? GOOD
+                       break;
+
+               if(p < 0) // no more args? FAIL
                {
-                       case "map":
-                       case "chmap":
-                       case "gotomap":
-                       case "kick":
-                       case "kickban":
-                               return FALSE;
-                               
-                       default: { break; }
+                       // exception: exactly minargs left, this one included
+                       if(argc - startpos == minargs)
+                               break;
+
+                       // otherwise fail
+                       return FALSE;
+               }
+
+               // cut to next semicolon
+               q = strstrofs(cmdrestriction, ";", p+1); // find next semicolon
+               if(q < 0)
+                       charlist = substring(cmdrestriction, p+1, -1);
+               else
+                       charlist = substring(cmdrestriction, p+1, q - (p+1));
+
+               // in case we ever want to allow semicolons in VoteCommand_checknasty
+               // charlist = strreplace("^^", ";", charlist);
+
+               if(charlist != "")
+               {
+                       // verify the arg only contains allowed chars
+                       arg = argv(startpos);
+                       checkmate = strlen(arg);
+                       for(check = 0; check < checkmate; ++check)
+                               if(strstrofs(charlist, substring(arg, check, 1), 0) < 0)
+                                       return FALSE; // not allowed character
+                       // all characters are allowed. FINE.
                }
+
+               ++startpos;
+               --minargs;
+               p = q;
        }
+
+       return TRUE;
+}
+
+float VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, float argc)
+{
+       string first_command;
        
+       first_command = argv(startpos);
+
+       if not(VoteCommand_checkinlist(first_command, vote_list))
+               return FALSE;
+
+       if not(VoteCommand_checkargs(startpos, argc))
+               return FALSE;
+
        switch(first_command) // now go through and parse the proper commands to adjust as needed.
        {
                case "kick":
@@ -635,7 +688,7 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm
                                || ((autocvar_sv_vote_nospectators == 1) && inWarmupStage) 
                                || (autocvar_sv_vote_nospectators == 0));
                                
-                       float tmp_playercount;
+                       float tmp_playercount = 0;
                        entity tmp_player;
                        
                        vote_command = VoteCommand_extractcommand(vote_command, 2, argc);
index d5b6697f25932c34ca6936951f6283fd235f9acd..3554f1ff67235142f837507183b772c41c841c09 100644 (file)
@@ -13,6 +13,7 @@ float CSQCProjectile_SendEntity(entity to, float sf)
        if(self.flags & FL_ONGROUND)
                sf |= 0x40;
 
+       ft = fr = 0;