]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/translate_colors_2 290/head
authorterencehill <piuntn@gmail.com>
Sun, 1 May 2016 10:48:52 +0000 (12:48 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 1 May 2016 10:48:52 +0000 (12:48 +0200)
426 files changed:
.gitlab-ci.yml
CMakeLists.txt [new file with mode: 0644]
_hud_common.cfg
_hud_descriptions.cfg
cmake/CMakeASMCompiler.cmake.in [new file with mode: 0644]
cmake/CMakeASMInformation.cmake [new file with mode: 0644]
cmake/CMakeDetermineASMCompiler.cmake [new file with mode: 0644]
cmake/CMakeTestASMCompiler.cmake [new file with mode: 0644]
cmake/qcc.sh [new file with mode: 0755]
defaultXonotic.cfg
gamemodes.cfg
gfx/crosshair55.tga
gfx/crosshair56.tga
gfx/crosshair57.tga
gfx/crosshair58.tga
gfx/crosshair59.tga
gfx/crosshair60.tga
gfx/crosshair61.tga
gfx/crosshair62.tga
gfx/crosshair63.tga
gfx/crosshair64.tga
gfx/crosshair65.tga
gfx/crosshair66.tga
gfx/hud/default/buff_ammo.tga
gfx/hud/default/buff_bash.tga
gfx/hud/default/buff_blessed.tga
gfx/hud/default/buff_disability.tga
gfx/hud/default/buff_flight.tga
gfx/hud/default/buff_inferno.tga
gfx/hud/default/buff_invisible.tga
gfx/hud/default/buff_jump.tga
gfx/hud/default/buff_luck.tga
gfx/hud/default/buff_magnet.tga
gfx/hud/default/buff_medic.tga
gfx/hud/default/buff_resistance.tga
gfx/hud/default/buff_speed.tga
gfx/hud/default/buff_swapper.tga
gfx/hud/default/buff_vampire.tga
gfx/hud/default/buff_vengeance.tga
gfx/hud/luma/buff_ammo.tga
gfx/hud/luma/buff_bash.tga
gfx/hud/luma/buff_blessed.tga
gfx/hud/luma/buff_disability.tga
gfx/hud/luma/buff_flight.tga
gfx/hud/luma/buff_inferno.tga
gfx/hud/luma/buff_invisible.tga
gfx/hud/luma/buff_jump.tga
gfx/hud/luma/buff_luck.tga
gfx/hud/luma/buff_magnet.tga
gfx/hud/luma/buff_medic.tga
gfx/hud/luma/buff_resistance.tga
gfx/hud/luma/buff_speed.tga
gfx/hud/luma/buff_swapper.tga
gfx/hud/luma/buff_vampire.tga
gfx/hud/luma/buff_vengeance.tga
gfx/menu/luma/background.tga
gfx/menu/luma/background.txt [new file with mode: 0644]
gfx/menu/luma/gametype_as.tga
gfx/menu/luma/gametype_ca.tga
gfx/menu/luma/gametype_ctf.tga
gfx/menu/luma/gametype_cts.tga
gfx/menu/luma/gametype_dm.tga
gfx/menu/luma/gametype_dom.tga
gfx/menu/luma/gametype_duel.tga
gfx/menu/luma/gametype_ft.tga
gfx/menu/luma/gametype_inf.tga
gfx/menu/luma/gametype_inv.tga
gfx/menu/luma/gametype_jb.tga
gfx/menu/luma/gametype_ka.tga
gfx/menu/luma/gametype_kh.tga
gfx/menu/luma/gametype_lms.tga
gfx/menu/luma/gametype_nb.tga
gfx/menu/luma/gametype_ons.tga
gfx/menu/luma/gametype_rc.tga
gfx/menu/luma/gametype_tdm.tga
gfx/menu/luma/gametype_vip.tga
hud_luma.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
models/relics/sign_luck.tga
models/relics/sign_luck_glow.tga
mutators.cfg
qcsrc/client/_mod.inc
qcsrc/client/_mod.qh [new file with mode: 0644]
qcsrc/client/autocvars.qh
qcsrc/client/commands/_mod.inc
qcsrc/client/commands/_mod.qh [new file with mode: 0644]
qcsrc/client/commands/cl_cmd.qc
qcsrc/client/hud/_mod.inc
qcsrc/client/hud/_mod.qh [new file with mode: 0644]
qcsrc/client/hud/hud_config.qc
qcsrc/client/hud/panel/_mod.inc
qcsrc/client/hud/panel/_mod.qh [new file with mode: 0644]
qcsrc/client/hud/panel/healtharmor.qc
qcsrc/client/hud/panel/weapons.qc
qcsrc/client/main.qc
qcsrc/client/mutators/_mod.qh [new file with mode: 0644]
qcsrc/client/progs.inc
qcsrc/client/scoreboard.qc
qcsrc/client/view.qc
qcsrc/client/weapons/_mod.inc
qcsrc/client/weapons/_mod.qh [new file with mode: 0644]
qcsrc/common/_mod.inc
qcsrc/common/_mod.qh [new file with mode: 0644]
qcsrc/common/command/_mod.inc
qcsrc/common/command/_mod.qh [new file with mode: 0644]
qcsrc/common/deathtypes/_mod.inc
qcsrc/common/deathtypes/_mod.qh [new file with mode: 0644]
qcsrc/common/effects/_mod.inc
qcsrc/common/effects/_mod.qh [new file with mode: 0644]
qcsrc/common/effects/qc/_mod.inc
qcsrc/common/effects/qc/_mod.qh [new file with mode: 0644]
qcsrc/common/gamemodes/_mod.inc
qcsrc/common/gamemodes/_mod.qh [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/_mod.qh [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/nexball/_mod.inc
qcsrc/common/gamemodes/gamemode/nexball/_mod.qh [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/gamemodes/gamemode/onslaught/_mod.inc
qcsrc/common/gamemodes/gamemode/onslaught/_mod.qh [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/impulses/_mod.inc
qcsrc/common/impulses/_mod.qh [new file with mode: 0644]
qcsrc/common/items/_mod.inc
qcsrc/common/items/_mod.qh [new file with mode: 0644]
qcsrc/common/items/item/_mod.inc
qcsrc/common/items/item/_mod.qh [new file with mode: 0644]
qcsrc/common/minigames/_mod.inc
qcsrc/common/minigames/_mod.qh [new file with mode: 0644]
qcsrc/common/minigames/cl_minigames.qc
qcsrc/common/minigames/cl_minigames.qh
qcsrc/common/minigames/cl_minigames_hud.qc
qcsrc/common/minigames/minigame/_mod.inc
qcsrc/common/minigames/minigame/_mod.qh [new file with mode: 0644]
qcsrc/common/models/_mod.qh [new file with mode: 0644]
qcsrc/common/monsters/_mod.inc
qcsrc/common/monsters/_mod.qh [new file with mode: 0644]
qcsrc/common/monsters/monster/_mod.inc
qcsrc/common/monsters/monster/_mod.qh [new file with mode: 0644]
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/_mod.inc
qcsrc/common/mutators/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/_mod.inc
qcsrc/common/mutators/mutator/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/bloodloss/_mod.inc
qcsrc/common/mutators/mutator/bloodloss/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/breakablehook/_mod.inc
qcsrc/common/mutators/mutator/breakablehook/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/buffs/_mod.inc
qcsrc/common/mutators/mutator/buffs/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/bugrigs/_mod.inc
qcsrc/common/mutators/mutator/bugrigs/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/campcheck/_mod.inc
qcsrc/common/mutators/mutator/campcheck/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/campcheck/campcheck.qc
qcsrc/common/mutators/mutator/cloaked/_mod.inc
qcsrc/common/mutators/mutator/cloaked/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/damagetext/_mod.inc
qcsrc/common/mutators/mutator/damagetext/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/damagetext/damagetext.qc
qcsrc/common/mutators/mutator/dodging/_mod.inc
qcsrc/common/mutators/mutator/dodging/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/doublejump/_mod.inc
qcsrc/common/mutators/mutator/doublejump/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/hook/_mod.inc
qcsrc/common/mutators/mutator/hook/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/instagib/_mod.inc
qcsrc/common/mutators/mutator/instagib/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/instagib/instagib.qc
qcsrc/common/mutators/mutator/invincibleproj/_mod.inc
qcsrc/common/mutators/mutator/invincibleproj/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/melee_only/_mod.inc
qcsrc/common/mutators/mutator/melee_only/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/midair/_mod.inc
qcsrc/common/mutators/mutator/midair/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/multijump/_mod.inc
qcsrc/common/mutators/mutator/multijump/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/nades/_mod.inc
qcsrc/common/mutators/mutator/nades/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/new_toys/_mod.inc
qcsrc/common/mutators/mutator/new_toys/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/nix/_mod.inc
qcsrc/common/mutators/mutator/nix/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/overkill/_mod.inc
qcsrc/common/mutators/mutator/overkill/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/mutators/mutator/physical_items/_mod.inc
qcsrc/common/mutators/mutator/physical_items/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/pinata/_mod.inc
qcsrc/common/mutators/mutator/pinata/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/random_gravity/_mod.inc
qcsrc/common/mutators/mutator/random_gravity/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/rocketflying/_mod.inc
qcsrc/common/mutators/mutator/rocketflying/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/rocketminsta/_mod.inc
qcsrc/common/mutators/mutator/rocketminsta/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/running_guns/_mod.inc
qcsrc/common/mutators/mutator/running_guns/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/sandbox/_mod.inc
qcsrc/common/mutators/mutator/sandbox/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/spawn_near_teammate/_mod.inc
qcsrc/common/mutators/mutator/spawn_near_teammate/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/superspec/_mod.inc
qcsrc/common/mutators/mutator/superspec/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/touchexplode/_mod.inc
qcsrc/common/mutators/mutator/touchexplode/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/vampire/_mod.inc
qcsrc/common/mutators/mutator/vampire/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/vampirehook/_mod.inc
qcsrc/common/mutators/mutator/vampirehook/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/waypoints/_mod.inc
qcsrc/common/mutators/mutator/waypoints/_mod.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/mutators/mutator/weaponarena_random/_mod.inc
qcsrc/common/mutators/mutator/weaponarena_random/_mod.qh [new file with mode: 0644]
qcsrc/common/notifications/_mod.inc
qcsrc/common/notifications/_mod.qh [new file with mode: 0644]
qcsrc/common/physics/_mod.inc
qcsrc/common/physics/_mod.qh [new file with mode: 0644]
qcsrc/common/physics/movetypes/_mod.inc
qcsrc/common/physics/movetypes/_mod.qh [new file with mode: 0644]
qcsrc/common/physics/player.qc
qcsrc/common/playerstats.qc
qcsrc/common/sounds/_mod.inc
qcsrc/common/sounds/_mod.qh [new file with mode: 0644]
qcsrc/common/state.qc
qcsrc/common/t_items.qc
qcsrc/common/t_items.qh
qcsrc/common/triggers/_mod.inc
qcsrc/common/triggers/_mod.qh [new file with mode: 0644]
qcsrc/common/triggers/func/_mod.inc
qcsrc/common/triggers/func/_mod.qh [new file with mode: 0644]
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/func/button.qc
qcsrc/common/triggers/func/conveyor.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/door_secret.qc
qcsrc/common/triggers/func/pointparticles.qc
qcsrc/common/triggers/func/rotating.qc
qcsrc/common/triggers/func/train.qc
qcsrc/common/triggers/misc/_mod.inc
qcsrc/common/triggers/misc/_mod.qh [new file with mode: 0644]
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/platforms.qc
qcsrc/common/triggers/platforms.qh
qcsrc/common/triggers/subs.qc
qcsrc/common/triggers/subs.qh
qcsrc/common/triggers/target/_mod.inc
qcsrc/common/triggers/target/_mod.qh [new file with mode: 0644]
qcsrc/common/triggers/target/changelevel.qc
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/target/spawn.qc
qcsrc/common/triggers/target/speaker.qc
qcsrc/common/triggers/target/voicescript.qc
qcsrc/common/triggers/teleporters.qh
qcsrc/common/triggers/trigger/_mod.inc
qcsrc/common/triggers/trigger/_mod.qh [new file with mode: 0644]
qcsrc/common/triggers/trigger/counter.qc
qcsrc/common/triggers/trigger/delay.qc
qcsrc/common/triggers/trigger/disablerelay.qc
qcsrc/common/triggers/trigger/flipflop.qc
qcsrc/common/triggers/trigger/gamestart.qc
qcsrc/common/triggers/trigger/gravity.qc
qcsrc/common/triggers/trigger/hurt.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/jumppads.qh
qcsrc/common/triggers/trigger/keylock.qc
qcsrc/common/triggers/trigger/magicear.qc
qcsrc/common/triggers/trigger/monoflop.qc
qcsrc/common/triggers/trigger/multi.qc
qcsrc/common/triggers/trigger/multivibrator.qc
qcsrc/common/triggers/trigger/relay_activators.qc
qcsrc/common/triggers/trigger/relay_if.qc
qcsrc/common/triggers/trigger/relay_teamcheck.qc
qcsrc/common/triggers/trigger/teleport.qc
qcsrc/common/triggers/triggers.qc
qcsrc/common/turrets/_mod.inc
qcsrc/common/turrets/_mod.qh [new file with mode: 0644]
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/turret/_mod.inc
qcsrc/common/turrets/turret/_mod.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/turret/walker.qc
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/common/vehicles/_mod.inc
qcsrc/common/vehicles/_mod.qh [new file with mode: 0644]
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/sv_vehicles.qh
qcsrc/common/vehicles/vehicle/_mod.inc
qcsrc/common/vehicles/vehicle/_mod.qh [new file with mode: 0644]
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc
qcsrc/common/weapons/_mod.inc
qcsrc/common/weapons/_mod.qh [new file with mode: 0644]
qcsrc/common/weapons/calculations.qc
qcsrc/common/weapons/weapon/_mod.inc
qcsrc/common/weapons/weapon/_mod.qh [new file with mode: 0644]
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/progsdefs.qh
qcsrc/lib/_all.inc
qcsrc/lib/_mod.inc
qcsrc/lib/_mod.qh [new file with mode: 0644]
qcsrc/lib/csqcmodel/_mod.inc
qcsrc/lib/csqcmodel/_mod.qh [new file with mode: 0644]
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/lib/defer.qh
qcsrc/lib/iter.qh
qcsrc/lib/json.qc [new file with mode: 0644]
qcsrc/lib/log.qh
qcsrc/lib/matrix/_mod.inc [new file with mode: 0644]
qcsrc/lib/matrix/_mod.qh [new file with mode: 0644]
qcsrc/lib/matrix/command.qc [new file with mode: 0644]
qcsrc/lib/matrix/command.qh [new file with mode: 0644]
qcsrc/lib/matrix/matrix.qc [new file with mode: 0644]
qcsrc/lib/matrix/matrix.qh [new file with mode: 0644]
qcsrc/lib/oo.qh
qcsrc/lib/self.qh
qcsrc/lib/string.qh
qcsrc/lib/test.qh
qcsrc/lib/urllib.qc
qcsrc/lib/warpzone/_mod.inc
qcsrc/lib/warpzone/_mod.qh [new file with mode: 0644]
qcsrc/lib/warpzone/server.qc
qcsrc/menu/_mod.inc
qcsrc/menu/_mod.qh [new file with mode: 0644]
qcsrc/menu/anim/_mod.inc
qcsrc/menu/anim/_mod.qh [new file with mode: 0644]
qcsrc/menu/command/_mod.inc
qcsrc/menu/command/_mod.qh [new file with mode: 0644]
qcsrc/menu/item/_mod.inc
qcsrc/menu/item/_mod.qh [new file with mode: 0644]
qcsrc/menu/matrix.qc [new file with mode: 0644]
qcsrc/menu/mutators/_mod.qh [new file with mode: 0644]
qcsrc/menu/progs.inc
qcsrc/menu/xonotic/_mod.inc
qcsrc/menu/xonotic/_mod.qh [new file with mode: 0644]
qcsrc/menu/xonotic/checkbox.qc
qcsrc/menu/xonotic/cvarlist.qc
qcsrc/menu/xonotic/cvarlist.qh
qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc
qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qh
qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc
qcsrc/menu/xonotic/dialog_settings_effects.qc
qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc
qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc
qcsrc/menu/xonotic/dialog_settings_video.qc
qcsrc/menu/xonotic/keybinder.qc
qcsrc/menu/xonotic/slider.qc
qcsrc/server/_mod.inc
qcsrc/server/_mod.qh [new file with mode: 0644]
qcsrc/server/autocvars.qh
qcsrc/server/bot/_mod.inc
qcsrc/server/bot/_mod.qh [new file with mode: 0644]
qcsrc/server/bot/aim.qc
qcsrc/server/bot/aim.qh
qcsrc/server/bot/havocbot/_mod.inc
qcsrc/server/bot/havocbot/_mod.qh [new file with mode: 0644]
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/_mod.inc
qcsrc/server/command/_mod.qh [new file with mode: 0644]
qcsrc/server/command/vote.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_lights.qc
qcsrc/server/g_models.qc
qcsrc/server/g_subs.qh
qcsrc/server/g_world.qc
qcsrc/server/g_world.qh
qcsrc/server/item_key.qc
qcsrc/server/matrix.qc [new file with mode: 0644]
qcsrc/server/matrix.qh [new file with mode: 0644]
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/mutators/_mod.inc
qcsrc/server/mutators/_mod.qh [new file with mode: 0644]
qcsrc/server/mutators/mutator/_mod.inc
qcsrc/server/mutators/mutator/_mod.qh [new file with mode: 0644]
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/mutators/mutator/gamemode_ca.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/mutators/mutator/gamemode_domination.qc
qcsrc/server/mutators/mutator/gamemode_freezetag.qc
qcsrc/server/mutators/mutator/gamemode_invasion.qc
qcsrc/server/mutators/mutator/gamemode_keepaway.qc
qcsrc/server/mutators/mutator/gamemode_keyhunt.qc
qcsrc/server/mutators/mutator/gamemode_lms.qc
qcsrc/server/mutators/mutator/gamemode_race.qc
qcsrc/server/mutators/mutator/gamemode_tdm.qc
qcsrc/server/pathlib/_mod.inc
qcsrc/server/pathlib/_mod.qh [new file with mode: 0644]
qcsrc/server/progs.inc
qcsrc/server/race.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/spawnpoints.qh
qcsrc/server/teamplay.qc
qcsrc/server/teamplay.qh
qcsrc/server/weapons/_mod.inc
qcsrc/server/weapons/_mod.qh [new file with mode: 0644]
qcsrc/server/weapons/common.qc
qcsrc/server/weapons/common.qh
qcsrc/tools/genmod.sh
serverbench.cfg

index 77d421436fd236b2ec9944b2b6aee7fc1a8e7bb9..3cdd43f30510917818e9a8ab0b4365574d83d84d 100644 (file)
@@ -17,9 +17,14 @@ test_sv_game:
     - cd darkplaces && make sv-debug -j $(nproc) && export ENGINE="$PWD/darkplaces-dedicated -xonotic"
     - cd ..
 
+    - mkdir -p data/maps
     - wget -O data/g-23.pk3 http://beta.xonotic.org/autobuild-bsp/latest/g-23.pk3
+    - wget -O data/maps/g-23.mapinfo https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.mapinfo
+    - wget -O data/maps/g-23.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints
+    - wget -O data/maps/g-23.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.cache
+    - wget -O data/maps/g-23.waypoints.hardwired https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.hardwired
     - make
-    - EXPECT=07fdfd9a19025920a599995730eb2a78
+    - EXPECT=4bd5b0276cdd100c831c73f0400eca71
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..c2b8564
--- /dev/null
@@ -0,0 +1,78 @@
+cmake_minimum_required(VERSION 2.8.11)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+project(xonotic-data LANGUAGES ASM)
+
+include_directories(qcsrc)
+
+add_definitions(-DNDEBUG=1)
+
+find_package(Git REQUIRED)
+execute_process(
+        COMMAND ${GIT_EXECUTABLE} describe --tags --dirty=~
+        WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+        OUTPUT_VARIABLE GIT_DESC
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+add_definitions(-DWATERMARK=\"${GIT_DESC}\")
+
+set_source_files_properties(
+        qcsrc/client/progs.inc
+        qcsrc/server/progs.inc
+        qcsrc/menu/progs.inc
+        PROPERTIES
+        LANGUAGE ASM
+        HEADER_FILE_ONLY FALSE
+)
+
+add_executable(csprogs qcsrc/client/progs.inc)
+target_compile_definitions(csprogs PRIVATE -DCSQC)
+add_dependencies(csprogs gmqcc)
+
+add_executable(progs qcsrc/server/progs.inc)
+target_compile_definitions(progs PRIVATE -DSVQC)
+add_dependencies(progs gmqcc)
+
+add_executable(menu qcsrc/menu/progs.inc)
+target_compile_definitions(menu PRIVATE -DMENUQC)
+add_dependencies(menu gmqcc)
+
+function(set_prelude target prelude)
+    get_target_property(MY_PROJECT_SOURCES target SOURCES)
+    foreach (source IN LISTS MY_PROJECT_SOURCES)
+        set_property(
+                SOURCE ${source}
+                APPEND PROPERTY COMPILE_FLAGS
+                "-include ${PROJECT_SOURCE_DIR}/${prelude}"
+        )
+    endforeach ()
+endfunction()
+# set_prelude(csprogs qcsrc/lib/_all.inc)
+
+function(copy prog)
+    add_custom_command(TARGET ${prog} POST_BUILD
+            COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:${prog}>/${prog}.dat" "${prog}.dat"
+            COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:${prog}>/${prog}.lno" "${prog}.lno"
+            WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+            VERBATIM)
+endfunction()
+copy(csprogs)
+copy(progs)
+copy(menu)
+
+function(pack prog)
+    add_custom_target(${prog}.pk3
+            DEPENDS ${prog}-${GIT_DESC}.pk3
+            )
+    add_custom_command(OUTPUT ${prog}-${GIT_DESC}.pk3
+            DEPENDS ${prog}
+            COMMAND ${CMAKE_COMMAND} -E echo "http://xonotic.org" > "${prog}-${GIT_DESC}.txt"
+            COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:${prog}>/${prog}.dat" "${prog}-${GIT_DESC}.dat"
+            COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:${prog}>/${prog}.lno" "${prog}-${GIT_DESC}.lno"
+            COMMAND ${CMAKE_COMMAND} -E tar "cfv" "${prog}-${GIT_DESC}.pk3" --format=zip
+            "${prog}-${GIT_DESC}.txt"
+            "${prog}-${GIT_DESC}.dat"
+            "${prog}-${GIT_DESC}.lno"
+            VERBATIM
+            )
+endfunction()
+pack(csprogs)
index 70900762f7a3cb1b5da162db9fcc2e34cf986461..0fbf103d5542771a10077518df1bf40f4c55d08f 100644 (file)
@@ -20,6 +20,31 @@ seta hud_colorset_kill_3 "4" "'good' or 'beneficial' text (you fragging someone,
 seta hud_colorset_background "7" "neutral/unimportant text"
 
 // general hud panel cvars (i.e. shouldn't be adjusted by a skin config)
+seta hud_panel_weapons          1 "enable this panel"
+seta hud_panel_ammo             1 "enable this panel"
+seta hud_panel_powerups         1 "enable this panel"
+seta hud_panel_healtharmor      1 "enable this panel"
+seta hud_panel_notify           1 "enable this panel"
+seta hud_panel_timer            1 "enable this panel"
+seta hud_panel_radar            1 "enable this panel, 2 = also enable in non-teambased gamemodes"
+seta hud_panel_score            1 "enable this panel"
+seta hud_panel_racetimer        1 "enable this panel"
+seta hud_panel_vote             1 "enable this panel"
+seta hud_panel_modicons         1 "enable this panel"
+seta hud_panel_pressedkeys      1 "enable this panel, 1 = show only when spectating other players, 2 = show always"
+seta hud_panel_chat             1 "enable this panel"
+seta hud_panel_engineinfo       0 "enable this panel"
+seta hud_panel_infomessages     1 "enable this panel"
+seta hud_panel_physics          3 "enable this panel, 1 = show if not observing, 2 = show always, 3 = show only in race/cts if not observing"
+seta hud_panel_centerprint      1 "enable this panel"
+seta hud_panel_minigameboard    1 "enable this panel"
+seta hud_panel_minigamestatus   1 "enable this panel"
+seta hud_panel_minigamehelp     1 "enable this panel"
+seta hud_panel_minigamemenu     0 "enable this panel"
+seta hud_panel_mapvote          1 "enable this panel"
+seta hud_panel_itemstime        2 "enable this panel, 1 = show when spectating, 2 = even playing in warmup stage"
+seta hud_panel_quickmenu        1 "enable this panel"
+
 seta hud_panel_weapons_ammo_full_shells 60 "show 100% of the status bar at this ammo count"
 seta hud_panel_weapons_ammo_full_nails 320 "show 100% of the status bar at this ammo count"
 seta hud_panel_weapons_ammo_full_cells 180 "show 100% of the status bar at this ammo count"
index 970d6ff7f3ed1c24407957f2b5ee8dac491b6e94..de46317116aec1944872f71ccf56d7626aeeed61 100644 (file)
@@ -34,7 +34,6 @@ seta hud_configure_grid "" "snap to grid when moving/resizing panels"
 seta hud_configure_grid_xsize "" "snap to X * vid_conwidth"
 seta hud_configure_grid_ysize "" "snap to Y * vid_conheight"
 
-seta hud_panel_weapons "" "enable/disable this panel"
 seta hud_panel_weapons_pos "" "position of this panel"
 seta hud_panel_weapons_size "" "size of this panel"
 seta hud_panel_weapons_bg "" "if set to something else than \"\" = override default background"
@@ -67,7 +66,6 @@ seta hud_panel_weapons_onlyowned "" "show only owned weapons"
 seta hud_panel_weapons_noncurrent_alpha "" "alpha of noncurrent weapons"
 seta hud_panel_weapons_noncurrent_scale "" "scale of noncurrent weapons, relative to the current weapon"
 
-seta hud_panel_ammo "" "enable/disable this panel"
 seta hud_panel_ammo_pos "" "position of this panel"
 seta hud_panel_ammo_size "" "size of this panel"
 seta hud_panel_ammo_onlycurrent "" "1 = show only current ammo type"
@@ -85,7 +83,6 @@ seta hud_panel_ammo_progressbar_xoffset "" "percentage of mySize_x to offset pro
 seta hud_panel_ammo_progressbar_name "" "name of progressbar to use behind ammo icons"
 seta hud_panel_ammo_text "" "show text/icons in the ammo panel"
 
-seta hud_panel_powerups "" "enable/disable this panel"
 seta hud_panel_powerups_pos "" "position of this panel"
 seta hud_panel_powerups_size "" "size of this panel"
 seta hud_panel_powerups_baralign "" "0 = align bars to the left, 1 = align bars to the right, 2 = align only left bar to the right, 3 = align only right bar to the right"
@@ -99,9 +96,9 @@ seta hud_panel_powerups_bg_padding "" "if set to something else than \"\" = over
 seta hud_panel_powerups_progressbar "" "enable progressbar in panel"
 seta hud_panel_powerups_text "" "show text and icons in the powerups panel"
 
-seta hud_panel_healtharmor "" "enable/disable this panel, 2 = combined health/armor display"
 seta hud_panel_healtharmor_pos "" "position of this panel"
 seta hud_panel_healtharmor_size "" "size of this panel"
+seta hud_panel_healtharmor_combined "" "combined health/armor display"
 seta hud_panel_healtharmor_flip "" "flip health/armor positions"
 seta hud_panel_healtharmor_baralign "" "0 = align bars to the left, 1 = align bars to the right, 2 = align only left bar to the right, 3 = align only right bar to the right"
 seta hud_panel_healtharmor_iconalign "" "0 = align icons to the left, 1 = align icons to the right, 2 = align only left icon to the right, 3 = align only right icon to the right"
@@ -118,7 +115,6 @@ seta hud_panel_healtharmor_progressbar_armor "" "progressbar image for armor"
 seta hud_panel_healtharmor_progressbar_gfx "" "enable graphic effects on the progressbars"
 seta hud_panel_healtharmor_progressbar_gfx_smooth "" "smooth changes of the progressbar when health/armor change at least by this amount; 0 disables the effect"
 
-seta hud_panel_notify "" "enable/disable this panel"
 seta hud_panel_notify_pos "" "position of this base of the panel"
 seta hud_panel_notify_size "" "size of this panel with all notifications on"
 seta hud_panel_notify_bg "" "if set to something else than \"\" = override default background"
@@ -133,7 +129,6 @@ seta hud_panel_notify_fadetime "" "fade out time"
 seta hud_panel_notify_time "" "time that a new entry stays until it fades out"
 seta hud_panel_notify_icon_aspect "" "aspect ratio of total drawing area per icon"
 
-seta hud_panel_timer "" "enable/disable this panel"
 seta hud_panel_timer_pos "" "position of this base of the panel"
 seta hud_panel_timer_size "" "size of this panel"
 seta hud_panel_timer_bg "" "if set to something else than \"\" = override default background"
@@ -143,7 +138,6 @@ seta hud_panel_timer_bg_alpha "" "if set to something else than \"\" = override
 seta hud_panel_timer_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_timer_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 
-seta hud_panel_radar "" "enable/disable this panel, 2 = also enable in non-teambased gamemodes"
 seta hud_panel_radar_pos "" "position of this base of the panel"
 seta hud_panel_radar_size "" "size of this panel"
 seta hud_panel_radar_bg "" "if set to something else than \"\" = override default background"
@@ -161,7 +155,6 @@ seta hud_panel_radar_maximized_size "" "size of the radar when maximized"
 seta hud_panel_radar_maximized_rotation "" "rotation mode: you set what points up. 0 = player, 1 = west, 2 = south, 3 = east, 4 = north"
 seta hud_panel_radar_maximized_zoommode "" "zoom mode: 0 = zoomed by default, 1 = zoomed when +zoom, 2 = always zoomed, 3 = always zoomed out"
 
-seta hud_panel_score "" "enable/disable this panel"
 seta hud_panel_score_pos "" "position of this base of the panel"
 seta hud_panel_score_size "" "size of this panel"
 seta hud_panel_score_bg "" "if set to something else than \"\" = override default background"
@@ -172,7 +165,6 @@ seta hud_panel_score_bg_border "" "if set to something else than \"\" = override
 seta hud_panel_score_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 seta hud_panel_score_rankings "" "show rankings: 1 always show my own score; 2 pure rankings"
 
-seta hud_panel_racetimer "" "enable/disable this panel"
 seta hud_panel_racetimer_pos "" "position of this base of the panel"
 seta hud_panel_racetimer_size "" "size of this panel"
 seta hud_panel_racetimer_bg "" "if set to something else than \"\" = override default background"
@@ -182,7 +174,6 @@ seta hud_panel_racetimer_bg_alpha "" "if set to something else than \"\" = overr
 seta hud_panel_racetimer_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_racetimer_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 
-seta hud_panel_vote "" "enable/disable this panel"
 seta hud_panel_vote_pos "" "position of this base of the panel"
 seta hud_panel_vote_size "" "size of this panel"
 seta hud_panel_vote_alreadyvoted_alpha "" "alpha of the vote dialog after you have voted"
@@ -193,7 +184,6 @@ seta hud_panel_vote_bg_alpha "" "if set to something else than \"\" = override d
 seta hud_panel_vote_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_vote_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 
-seta hud_panel_modicons "" "enable/disable this panel"
 seta hud_panel_modicons_pos "" "position of this base of the panel"
 seta hud_panel_modicons_size "" "size of this panel"
 seta hud_panel_modicons_bg "" "if set to something else than \"\" = override default background"
@@ -206,7 +196,6 @@ seta hud_panel_modicons_ca_layout "" "2 possible layouts: 0) number of alive pla
 seta hud_panel_modicons_dom_layout "" "3 possible layouts: 0) only icons; 1) icons and percentage of average pps (points per second); 2) icons and average pps"
 seta hud_panel_modicons_freezetag_layout "" "2 possible layouts: 0) number of alive players; 1) icons and number of alive players"
 
-seta hud_panel_pressedkeys "" "enable/disable this panel, 1 = show only when spectating other players, 2 = show always"
 seta hud_panel_pressedkeys_pos "" "position of this base of the panel"
 seta hud_panel_pressedkeys_size "" "size of this panel"
 seta hud_panel_pressedkeys_bg "" "if set to something else than \"\" = override default background"
@@ -218,7 +207,6 @@ seta hud_panel_pressedkeys_bg_padding "" "if set to something else than \"\" = o
 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"
 seta hud_panel_chat_size "" "size of this panel"
 seta hud_panel_chat_bg "" "if set to something else than \"\" = override default background"
@@ -228,7 +216,6 @@ seta hud_panel_chat_bg_alpha "" "if set to something else than \"\" = override d
 seta hud_panel_chat_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_chat_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 
-seta hud_panel_engineinfo "" "enable/disable this panel"
 seta hud_panel_engineinfo_pos "" "position of this base of the panel"
 seta hud_panel_engineinfo_size "" "size of this panel"
 seta hud_panel_engineinfo_bg "" "if set to something else than \"\" = override default background"
@@ -240,7 +227,6 @@ seta hud_panel_engineinfo_bg_padding "" "if set to something else than \"\" = ov
 seta hud_panel_engineinfo_framecounter_decimals "" "amount of decimals to show"
 seta hud_panel_engineinfo_framecounter_time "" "time between framerate display updates"
 
-seta hud_panel_infomessages "" "enable/disable this panel"
 seta hud_panel_infomessages_pos "" "position of this base of the panel"
 seta hud_panel_infomessages_size "" "size of this panel"
 seta hud_panel_infomessages_bg "" "if set to something else than \"\" = override default background"
@@ -251,7 +237,6 @@ seta hud_panel_infomessages_bg_border "" "if set to something else than \"\" = o
 seta hud_panel_infomessages_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 seta hud_panel_infomessages_flip "" "1 = align the items to the right"
 
-seta hud_panel_physics "" "enable/disable this panel, 1 = show if not observing, 2 = show always, 3 = show only in race/cts if not observing"
 seta hud_panel_physics_pos "" "position of this base of the panel"
 seta hud_panel_physics_size "" "size of this panel"
 seta hud_panel_physics_bg "" "if set to something else than \"\" = override default background"
@@ -276,7 +261,6 @@ seta hud_panel_physics_speed_vertical "" "include the speed on the Z-axis"
 seta hud_panel_physics_topspeed "" "also show top speed"
 seta hud_panel_physics_topspeed_time "" "how many seconds the top speed takes to fade out"
 
-seta hud_panel_centerprint "" "enable/disable this panel"
 seta hud_panel_centerprint_pos "" "position of this base of the panel"
 seta hud_panel_centerprint_size "" "size of this panel"
 seta hud_panel_centerprint_bg "" "if set to something else than \"\" = override default background"
@@ -299,7 +283,6 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "" "minimum factor t
 seta hud_panel_centerprint_fade_subsequent_minfontsize "" "minimum factor for the font size from the subsequent fading effects"
 seta hud_panel_centerprint_fade_minfontsize "" "minimum factor for the font size from the fading in/out effects"
 
-seta hud_panel_minigameboard "" "enable/disable this panel"
 seta hud_panel_minigameboard_pos "" "position of this panel"
 seta hud_panel_minigameboard_size "" "size of this panel"
 seta hud_panel_minigameboard_bg "" "if set to something else than \"\" = override default background"
@@ -309,7 +292,6 @@ seta hud_panel_minigameboard_bg_alpha "" "if set to something else than \"\" = o
 seta hud_panel_minigameboard_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_minigameboard_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 
-seta hud_panel_minigamestatus "" "enable/disable this panel"
 seta hud_panel_minigamestatus_pos "" "position of this panel"
 seta hud_panel_minigamestatus_size "" "size of this panel"
 seta hud_panel_minigamestatus_bg "" "if set to something else than \"\" = override default background"
@@ -319,7 +301,6 @@ seta hud_panel_minigamestatus_bg_alpha "" "if set to something else than \"\" =
 seta hud_panel_minigamestatus_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_minigamestatus_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 
-seta hud_panel_minigamehelp "" "enable/disable this panel"
 seta hud_panel_minigamehelp_pos "" "position of this panel"
 seta hud_panel_minigamehelp_size "" "size of this panel"
 seta hud_panel_minigamehelp_bg "" "if set to something else than \"\" = override default background"
@@ -329,7 +310,6 @@ seta hud_panel_minigamehelp_bg_alpha "" "if set to something else than \"\" = ov
 seta hud_panel_minigamehelp_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_minigamehelp_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 
-seta hud_panel_minigamemenu "" "enable/disable this panel"
 seta hud_panel_minigamemenu_pos "" "position of this panel"
 seta hud_panel_minigamemenu_size "" "size of this panel"
 seta hud_panel_minigamemenu_bg "" "if set to something else than \"\" = override default background"
@@ -339,7 +319,6 @@ seta hud_panel_minigamemenu_bg_alpha "" "if set to something else than \"\" = ov
 seta hud_panel_minigamemenu_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_minigamemenu_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 
-seta hud_panel_mapvote "" "enable/disable this panel"
 seta hud_panel_mapvote_pos "" "position of this panel"
 seta hud_panel_mapvote_size "" "size of this panel"
 seta hud_panel_mapvote_bg "" "if set to something else than \"\" = override default background"
@@ -349,7 +328,6 @@ seta hud_panel_mapvote_bg_alpha "" "if set to something else than \"\" = overrid
 seta hud_panel_mapvote_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_panel_mapvote_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
 
-seta hud_panel_itemstime "" "enable/disable this panel, it shows left time until important items (mega health, large armor, powerups, superweapons, etc...) respawn in the map: 1 when spectating, 2 even playing in warmup stage"
 seta hud_panel_itemstime_pos "" "position of this base of the panel"
 seta hud_panel_itemstime_size "" "size of this panel"
 seta hud_panel_itemstime_bg "" "if set to something else than \"\" = override default background"
@@ -366,7 +344,6 @@ seta hud_panel_itemstime_text "" "show text"
 seta hud_panel_itemstime_ratio "" "ratio between space reserved for text and icon width of each item entry (min value is 2)"
 seta hud_panel_itemstime_dynamicsize "" "allow panel size reduction by removing spacing among items"
 
-seta hud_panel_quickmenu "" "enable/disable this panel"
 seta hud_panel_quickmenu_pos "" "position of this base of the panel"
 seta hud_panel_quickmenu_size "" "size of this panel"
 seta hud_panel_quickmenu_bg "" "if set to something else than \"\" = override default background"
diff --git a/cmake/CMakeASMCompiler.cmake.in b/cmake/CMakeASMCompiler.cmake.in
new file mode 100644 (file)
index 0000000..e18e9ed
--- /dev/null
@@ -0,0 +1,8 @@
+set(CMAKE_ASM_COMPILER "@CMAKE_ASM_COMPILER@")
+set(CMAKE_ASM_COMPILER_LOADED 1)
+
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS qc;qh;inc)
+set(CMAKE_ASM_OUTPUT_EXTENSION .o)
+set(CMAKE_ASM_OUTPUT_EXTENSION_REPLACE 1)
+set(CMAKE_ASM_LINKER_PREFERENCE 42)
+set(CMAKE_ASM_COMPILER_ENV_VAR "QCC")
diff --git a/cmake/CMakeASMInformation.cmake b/cmake/CMakeASMInformation.cmake
new file mode 100644 (file)
index 0000000..e4e7bd9
--- /dev/null
@@ -0,0 +1,14 @@
+if (${CMAKE_VERSION} VERSION_LESS "3.4")
+    set(_CMAKE_ASM_INCLUDES "")
+else()
+    set(_CMAKE_ASM_INCLUDES "<INCLUDES>")
+endif()
+mark_as_advanced(_CMAKE_ASM_INCLUDES)
+
+set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> compile <OBJECT> <DEFINES> -DGMQCC ${_CMAKE_ASM_INCLUDES} <FLAGS> <SOURCE>")
+set(CMAKE_ASM_LINK_EXECUTABLE "env CMAKE_EXECUTABLE_SUFFIX=${CMAKE_EXECUTABLE_SUFFIX} <CMAKE_ASM_COMPILER> link <OBJECTS> -o <TARGET>")
+
+set(CMAKE_INCLUDE_FLAG_ASM "-I")
+set(CMAKE_INCLUDE_FLAG_ASM_SEP "")
+set(CMAKE_EXECUTABLE_PREFIX_ASM "")
+set(CMAKE_EXECUTABLE_SUFFIX_ASM ".dat")
diff --git a/cmake/CMakeDetermineASMCompiler.cmake b/cmake/CMakeDetermineASMCompiler.cmake
new file mode 100644 (file)
index 0000000..e8e6976
--- /dev/null
@@ -0,0 +1,5 @@
+set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/cmake/qcc.sh)
+
+configure_file(cmake/CMakeASMCompiler.cmake.in
+        ${CMAKE_PLATFORM_INFO_DIR}/CMakeASMCompiler.cmake @ONLY)
+set(CMAKE_ASM_COMPILER_ENV_VAR "QCC")
diff --git a/cmake/CMakeTestASMCompiler.cmake b/cmake/CMakeTestASMCompiler.cmake
new file mode 100644 (file)
index 0000000..9d293a8
--- /dev/null
@@ -0,0 +1 @@
+set(CMAKE_ASM_COMPILER_WORKS 1 CACHE INTERNAL "")
diff --git a/cmake/qcc.sh b/cmake/qcc.sh
new file mode 100755 (executable)
index 0000000..2e8ea70
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+CPP=${CPP:-cpp}
+QCC=${QCC:-$PWD/../../gmqcc/gmqcc${CMAKE_EXECUTABLE_SUFFIX}}
+case $1 in
+    compile)
+        ${CPP} ${@:3} | sed 's/^#\(line\)\? \([[:digit:]]\+\) "\(.*\)".*/\n#pragma file(\3)\n#pragma line(\2)/g' > $2
+    ;;
+    link)
+        ${QCC} \
+        -std=gmqcc \
+        -Ooverlap-locals \
+        -O3 \
+        -Werror -Wall \
+        -Wno-field-redeclared \
+        -flno -futf8 -fno-bail-on-werror \
+        -frelaxed-switch -freturn-assignments \
+        ${@:2}
+    ;;
+esac
index 7ed41440f88ebbc56a349ee841a6194804cda7fe..2056f15115d79f83f170c5128fc9a38ea0b4d040 100644 (file)
@@ -306,6 +306,7 @@ seta sv_precacheitems 0
 set sv_spectator_speed_multiplier 1.5
 seta sv_spectate 1 "if set to 1, new clients are allowed to spectate or observe the game, if set to 0 joining clients spawn as players immediately (no spectating)"
 seta sv_defaultcharacter 0 "master switch, if set to 1 the further configuration for replacing all player models, skins and colors is taken from the sv_defaultplayermodel, sv_defaultplayerskin and sv_defaultplayercolors variables"
+seta sv_defaultcharacterskin 0 "if set to 1 the further configuration for replacing all skins is taken from the sv_defaultplayerskin variables"
 seta sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1; you may append a :<skinnumber> suffix to model names; you can specify multiple, separated by space, and a random one will be chosen"
 seta sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1; can be overriden by :<skinnumber> suffix in sv_defaultplayermodel"
 seta sv_defaultplayermodel_red ""      "\"\" means see sv_defaultplayermodel"
@@ -489,6 +490,7 @@ set g_tdm_on_dm_maps 0 "when this is set, all DM maps automatically support TDM"
 seta teamplay_mode 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the cvars g_mirrordamage*, g_friendlyfire* and g_teamdamage_threshold*"
 seta g_mirrordamage 0.700000   "for teamplay 4: mirror damage factor"
 seta g_mirrordamage_virtual 1  "for teamplay 4: do not actually apply mirror damage, just show graphics effect for it"
+seta g_mirrordamage_onlyweapons 0 "for teamplay 4: only apply mirror damage if the attack was from a weapon"
 seta g_friendlyfire 0.500000   "for teamplay 4: fiendly fire factor"
 seta g_friendlyfire_virtual 1  "for teamplay 4: do not actually apply friendly fire, just show graphics effect for it"
 seta g_friendlyfire_virtual_force 1    "for teamplay 4: apply force even though damage was made virtual only"
@@ -772,6 +774,17 @@ seta g_waypointsprite_turrets 1 "disable turret waypoints"
 seta g_waypointsprite_turrets_maxdist 5000 "max distace for turret sprites"
 seta g_waypointsprite_tactical 1 "tactical overlay on turrets when in a vehicle"
 
+seta cl_damagetext "0" "Draw damage dealt where you hit the enemy"
+seta cl_damagetext_format "-{total}" "How to format the damage text. {health}, {armor}, {total}"
+seta cl_damagetext_color "1 1 0" "Damage text color"
+seta cl_damagetext_color_per_weapon "0" "Damage text uses weapon color"
+seta cl_damagetext_size "8" "Damage text font size"
+seta cl_damagetext_alpha_start "1" "Damage text initial alpha"
+seta cl_damagetext_alpha_lifetime "3" "Damage text lifetime in seconds"
+seta cl_damagetext_velocity "0 0 20" "Damage text move direction"
+seta cl_damagetext_offset "0 -40 0" "Damage text offset"
+seta cl_damagetext_accumulate_range "30" "Damage text spawned within this range is accumulated"
+
 set sv_itemstime 1 "enable networking of left time until respawn for items such as mega health and large armor"
 
 // so it can be stuffcmd-ed still
@@ -795,6 +808,7 @@ seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also e
 seta menu_tooltips 1 "menu tooltips: 0 disabled, 1 enabled, 2 also shows cvar or console command (when available) changed or executed by the item"
 set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources, not recommended and may cause crashes!"
 set menu_showboxes 0 "show item bounding boxes (debug)"
+set menu_cvarlist_onlymodified 0 "show only modified cvars in the cvar list"
 
 r_textbrightness 0.2
 r_textcontrast 0.8
index a4b33b7e21fbbfbb647c9d343cac067a324cc5dd..4cf77d52e39bd0373c320cf4231372f5864f633f 100644 (file)
@@ -464,8 +464,10 @@ set g_balance_nexball_secondary_force      500    "stealing projectile force"
 set g_balance_nexball_secondary_refire       0.6  "stealing projectile refire"
 set g_balance_nexball_secondary_animtime     0.3  "stealing projectile animtime"
 set g_nexball_football_physics  2  "0: Revenant's original movement, 1: 0 but half independant of aiming height, 2: 1 fully independant, -1: first recode try"
+set g_nexball_basketball_jumppad 1    "whether basketballs should be pushable by jumppads"
 set g_nexball_basketball_bouncefactor 0.6    "velocity loss when the ball bounces"
 set g_nexball_basketball_bouncestop   0.075  "speed at which the ball stops when it hits the ground (multiplied by sv_gravity)"
+set g_nexball_football_jumppad 1    "whether footballs should be pushable by jumppads"
 set g_nexball_football_bouncefactor   0.6    "velocity loss when the ball bounces"
 set g_nexball_football_bouncestop     0.075  "speed at which the ball stops when it hits the ground (multiplied by sv_gravity)"
 set g_nexball_football_boost_forward      100   "forward velocity boost when the ball is touched"
@@ -530,7 +532,7 @@ set g_onslaught_spawn_at_generator_random 0
 // ======
 set g_race 0 "Race: be faster than your opponents"
 set g_race_qualifying_timelimit 0
-set g_race_qualifying_timelimit_override -1
+set g_race_qualifying_timelimit_override -1 "qualifying session time limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 set g_race_teams 0     "when 2, 3, or 4, the race is played as a team game (the team members can add up their laps)"
 
 // ==========
index 8709b58ccac52e006f6989f6b0248ad0c5ae3585..ecbcf1fa58688c78a93ea2bdabf6b7196411ac97 100644 (file)
Binary files a/gfx/crosshair55.tga and b/gfx/crosshair55.tga differ
index 61adf9a6ee1324786efdd47978b4db03696ebbe2..9cceb82f54cf69d768008855153eef64b6dc0077 100644 (file)
Binary files a/gfx/crosshair56.tga and b/gfx/crosshair56.tga differ
index d0d922084fcc7cbd59aad641b5dc677126cdd009..80f54e31228fdc888412fcdebc6b34188b56d83a 100644 (file)
Binary files a/gfx/crosshair57.tga and b/gfx/crosshair57.tga differ
index 0bdb7f9963c00bc2cdf2ca7aba56bcfd25e9c4d2..e3e784b85e5c3ee77d0e7910e70a85ba23cfb6b8 100644 (file)
Binary files a/gfx/crosshair58.tga and b/gfx/crosshair58.tga differ
index 8e48aa2b1b33c0963385ecaab9b718784b8782ae..70fbf5e7d5391c51dcf2e99ba40768f61e0e4ff5 100644 (file)
Binary files a/gfx/crosshair59.tga and b/gfx/crosshair59.tga differ
index c03e19d2a45b86fed340c5c6401e6ef0b8e535a1..44839755e4af4b773275146527973c2065c2e0fd 100644 (file)
Binary files a/gfx/crosshair60.tga and b/gfx/crosshair60.tga differ
index 507853f77a3f4ae702f97d275cd50d2047a1b832..3ec893d8144980490b75241bf7f0a487f6218984 100644 (file)
Binary files a/gfx/crosshair61.tga and b/gfx/crosshair61.tga differ
index 54031b1dc12c809ab7e585be1a89a76f4b2f14e0..ea84ee5f177810020a77ddd164174143c8491572 100644 (file)
Binary files a/gfx/crosshair62.tga and b/gfx/crosshair62.tga differ
index 1aa5d55d2ffc0588203f31569ec2b555853eb69f..5818a22cb51a5a6601442452c50a4405a7532c71 100644 (file)
Binary files a/gfx/crosshair63.tga and b/gfx/crosshair63.tga differ
index 06893f80794aa479672f070ac902fd8556915c8b..1911f2d0d514c63f49264a366455a2f2e0f44745 100644 (file)
Binary files a/gfx/crosshair64.tga and b/gfx/crosshair64.tga differ
index ebf77c35b3888e750f2c227d864d7f4b2f8e6baa..7205c3af64ebaafab09d6f064bb32a10ab103541 100644 (file)
Binary files a/gfx/crosshair65.tga and b/gfx/crosshair65.tga differ
index ccba58dba0d39ad703d8c86e4578b0efbfa45438..4039e8435917d0301ba17b2b2e8bc48dc7a64619 100644 (file)
Binary files a/gfx/crosshair66.tga and b/gfx/crosshair66.tga differ
index 379aa24a221a667f98b5993b3bb9b9a376681b2f..de3a5fefe1410bb69fb0006fed530ed2f1b18a6f 100644 (file)
Binary files a/gfx/hud/default/buff_ammo.tga and b/gfx/hud/default/buff_ammo.tga differ
index 556a445bf12f31519cfaad3ef814c572d3aefa89..eaf416cf77bb6f633de1bdbd1d296eaffea2a1f9 100644 (file)
Binary files a/gfx/hud/default/buff_bash.tga and b/gfx/hud/default/buff_bash.tga differ
index e1fbace3723204bac11552aff8938973f6accfcc..a6e050de107ed6b32833a09042d9e4266d2fc81f 100644 (file)
Binary files a/gfx/hud/default/buff_blessed.tga and b/gfx/hud/default/buff_blessed.tga differ
index f2c49ba2285d969e68c62e1ebf038ba3c9a330a0..8abb6f65b6b8878883dbc6a80a23aa2554804e57 100644 (file)
Binary files a/gfx/hud/default/buff_disability.tga and b/gfx/hud/default/buff_disability.tga differ
index 7ed8aa07a6800ec9c09e0b4fad097f727e2abe27..b0a85cd49e253ed35641855129a3ec9671539bba 100644 (file)
Binary files a/gfx/hud/default/buff_flight.tga and b/gfx/hud/default/buff_flight.tga differ
index 08875a217af9399c8110c0d1a0af0d1d781c0cc1..11d432a6fd404081b3f570fdf01c49b836b502fe 100644 (file)
Binary files a/gfx/hud/default/buff_inferno.tga and b/gfx/hud/default/buff_inferno.tga differ
index e0e4fed0c9ec03d8bef0458861ee560f9ad77395..6bbe648a4e28c0a9b6e2973f39a1737ef6b02074 100644 (file)
Binary files a/gfx/hud/default/buff_invisible.tga and b/gfx/hud/default/buff_invisible.tga differ
index 126a07cdae80c1a038e187edc54f5ab50b101336..05b519fa0a531968278a9e13b35007d08b8af9cf 100644 (file)
Binary files a/gfx/hud/default/buff_jump.tga and b/gfx/hud/default/buff_jump.tga differ
index 74655cfb91780cc9bc554b38e69aa28f9a96a4db..288ae074f33c9d230f3f6486905ab47c1b56f452 100644 (file)
Binary files a/gfx/hud/default/buff_luck.tga and b/gfx/hud/default/buff_luck.tga differ
index 85b011d68e9894fbac37146d32ead5496cad369a..242fd8ea366c5c6f32bb9d9318d66b76c81a4477 100644 (file)
Binary files a/gfx/hud/default/buff_magnet.tga and b/gfx/hud/default/buff_magnet.tga differ
index 0792407ad20dbb0752d190bda849f54de83bc1c5..4d926d36f557de5fc5c3d4fbf77f6648055f4f92 100644 (file)
Binary files a/gfx/hud/default/buff_medic.tga and b/gfx/hud/default/buff_medic.tga differ
index f88ea2a9ba94f97247f42307e933a077342a79c4..d7e2524b1bb11ed0d111deb62f3ec22d17472958 100644 (file)
Binary files a/gfx/hud/default/buff_resistance.tga and b/gfx/hud/default/buff_resistance.tga differ
index 54a65af38c07a975d1b64e3a0e0b0d600350b5cb..b9651ce304dfe4f4998955de8ff8316ab0912b8a 100644 (file)
Binary files a/gfx/hud/default/buff_speed.tga and b/gfx/hud/default/buff_speed.tga differ
index c5b97ceb0ee9748d8eeb3db8a228ab1cb0cd25e8..ab9659c0b6f5d2166b3cb4a035d1b6ceb11aebeb 100644 (file)
Binary files a/gfx/hud/default/buff_swapper.tga and b/gfx/hud/default/buff_swapper.tga differ
index 1d60e6b8628fc5e0b59f8655a394a6a23e7bd545..2bae31b01b784001b8986515dc623cef52d1d106 100644 (file)
Binary files a/gfx/hud/default/buff_vampire.tga and b/gfx/hud/default/buff_vampire.tga differ
index 1da8e7fc32fb371b940a58d15f5253b18fe26039..5cf9127d4b115f5a88d72865f1974004034a2464 100644 (file)
Binary files a/gfx/hud/default/buff_vengeance.tga and b/gfx/hud/default/buff_vengeance.tga differ
index 4f085801eedaeaf5770b4aec58871b27bfbfc42e..6c789ef42bb732ecc42405155935950fc594ec80 100644 (file)
Binary files a/gfx/hud/luma/buff_ammo.tga and b/gfx/hud/luma/buff_ammo.tga differ
index 05ec43c62b7bd39be402fa8cfe590b8295e344db..c193a1565b7f0805202d2b7da4a402ab8c1fe652 100644 (file)
Binary files a/gfx/hud/luma/buff_bash.tga and b/gfx/hud/luma/buff_bash.tga differ
index 9ff048e4bf1f66f3813b45fa4ca7d83826623d0f..5e5d2b6960e681ba093a26724204847f3c4794be 100644 (file)
Binary files a/gfx/hud/luma/buff_blessed.tga and b/gfx/hud/luma/buff_blessed.tga differ
index 8d04da05cc2ae55b00fd8bb453285504835e160c..b03ea298167291eec849be2e482867eef98a7883 100644 (file)
Binary files a/gfx/hud/luma/buff_disability.tga and b/gfx/hud/luma/buff_disability.tga differ
index 1f1e59d24745bdd0e8ddee63a2666e6a46d0ab63..863c39ebdb02e864ab9bc6bfe84c7b3aec2836ed 100644 (file)
Binary files a/gfx/hud/luma/buff_flight.tga and b/gfx/hud/luma/buff_flight.tga differ
index 1661e3bbf9611e4055da82660108b50761631b71..e5977f985afad1edd45dbf1d1c91659845604eea 100644 (file)
Binary files a/gfx/hud/luma/buff_inferno.tga and b/gfx/hud/luma/buff_inferno.tga differ
index 34adf173c873ad90d4784961c47ea8ca98fbe086..8e65dc48101d0080af13acc4b506036bc27fcaf0 100644 (file)
Binary files a/gfx/hud/luma/buff_invisible.tga and b/gfx/hud/luma/buff_invisible.tga differ
index a6cd9e0271ff7b05fd3126d2fbea2369cf57bbb9..c8475ac0706764ddb2613c8fd7ad465828e2d0f6 100644 (file)
Binary files a/gfx/hud/luma/buff_jump.tga and b/gfx/hud/luma/buff_jump.tga differ
index e258e9f5141b5dcb2a1fea97b379e3031eb0112f..746e9e5bb10ebf624dd5f92a76cfa6e72a8a5a8b 100644 (file)
Binary files a/gfx/hud/luma/buff_luck.tga and b/gfx/hud/luma/buff_luck.tga differ
index e1b1587d753e69f367df47018276756ba8f61aa4..0788ee47f45cf5a192048f9a2b4294aa2bbada19 100644 (file)
Binary files a/gfx/hud/luma/buff_magnet.tga and b/gfx/hud/luma/buff_magnet.tga differ
index d2b039c02f9cd4dee4d50f7963724f1c857c5649..29513b80165b3f69dea2384fc36aa6bc1699649a 100644 (file)
Binary files a/gfx/hud/luma/buff_medic.tga and b/gfx/hud/luma/buff_medic.tga differ
index 066747287587aeb7a017aaa31f05d3a3ff9c21bf..046c22a9165a527277bed28139ef02312191ea93 100644 (file)
Binary files a/gfx/hud/luma/buff_resistance.tga and b/gfx/hud/luma/buff_resistance.tga differ
index 14ae3c37669f8fa58e11326aaf4f9632276e19f5..ab2506974c74696df535e48713c7fbdcc43a152a 100644 (file)
Binary files a/gfx/hud/luma/buff_speed.tga and b/gfx/hud/luma/buff_speed.tga differ
index 5cb620c8607df6281b8ea63df2b66d537bcbb6aa..02ca7b02f368f6fc1fb27676e8cadd99b2d5f561 100644 (file)
Binary files a/gfx/hud/luma/buff_swapper.tga and b/gfx/hud/luma/buff_swapper.tga differ
index 229c5adcc2bbcc6d71d24a6828ade2374b165f33..f214d733575da9409a8925df7176c336fce0649f 100644 (file)
Binary files a/gfx/hud/luma/buff_vampire.tga and b/gfx/hud/luma/buff_vampire.tga differ
index 64d7468a61b583b1a1d42522ec1b74b81c626be3..53842ea589ddeb10d895efe161546e4743f64080 100644 (file)
Binary files a/gfx/hud/luma/buff_vengeance.tga and b/gfx/hud/luma/buff_vengeance.tga differ
index 7497ddc52b928aa2da40ed85118a8953ed86257c..b5b7623b1c405017c7d1616a4a10679f852bfb11 100644 (file)
Binary files a/gfx/menu/luma/background.tga and b/gfx/menu/luma/background.tga differ
diff --git a/gfx/menu/luma/background.txt b/gfx/menu/luma/background.txt
new file mode 100644 (file)
index 0000000..09a6c8a
--- /dev/null
@@ -0,0 +1,5 @@
+Original photograph of the earth courtesy of the
+Earth Science and Remote Sensing Unit, NASA Johnson Space Center
+
+NASA Photo ID: ISS007-E-10807
+URL: http://eol.jsc.nasa.gov/SearchPhotos/photo.pl?mission=ISS007&roll=E&frame=10807
index 85eda570f90efc1ef44b0e3e3a9cf66dc5d48d80..9724f4049782003d45d38640f2db83d01447c717 100644 (file)
Binary files a/gfx/menu/luma/gametype_as.tga and b/gfx/menu/luma/gametype_as.tga differ
index 668b57e047cb480521ba6c97746b50f2bc96796c..196196e5ecd984d8c09e5f87a6036f0a157fc01b 100644 (file)
Binary files a/gfx/menu/luma/gametype_ca.tga and b/gfx/menu/luma/gametype_ca.tga differ
index 7eb0c8e171a76c6b913780672e81f2727a550a78..eefb2fe0b547d40627a159400a52ec55fbb69b86 100644 (file)
Binary files a/gfx/menu/luma/gametype_ctf.tga and b/gfx/menu/luma/gametype_ctf.tga differ
index 235da2f1665f25a8f50602d7f737671099de5372..da86fa4faf0e27bd33a85a84fc80098bfc534d0f 100644 (file)
Binary files a/gfx/menu/luma/gametype_cts.tga and b/gfx/menu/luma/gametype_cts.tga differ
index 0ce1d16fa52e9b57888acacd40b5f5f615ac3b84..3d0874ead11edefab9c321165bfa0c802d4a2c12 100644 (file)
Binary files a/gfx/menu/luma/gametype_dm.tga and b/gfx/menu/luma/gametype_dm.tga differ
index fcaa2f3ab239ec57f9607104c0bf3613630763f5..eb6605b5b3db89f84af354e07c7d88538a3986e4 100644 (file)
Binary files a/gfx/menu/luma/gametype_dom.tga and b/gfx/menu/luma/gametype_dom.tga differ
index 88163164c564a0658723cfcec0c262176865b839..3558725a542264919c9bf01d0b82b2bcab56b942 100644 (file)
Binary files a/gfx/menu/luma/gametype_duel.tga and b/gfx/menu/luma/gametype_duel.tga differ
index 515a3f870050417bf67baeb5dc9c0543b61ece69..f6228a5106a1fdfa9fe4013e63e63e7c2e629b0f 100644 (file)
Binary files a/gfx/menu/luma/gametype_ft.tga and b/gfx/menu/luma/gametype_ft.tga differ
index bcbbd6c3cf797a3779e9bfbc26719251011c1f37..90938379725a60b477a751d3ea770965673d2879 100644 (file)
Binary files a/gfx/menu/luma/gametype_inf.tga and b/gfx/menu/luma/gametype_inf.tga differ
index bc114f9b55078c41bae9380e57f5e600619b24a7..d954af1ebc99a0e6c6b94a665f79362f6ac08d02 100644 (file)
Binary files a/gfx/menu/luma/gametype_inv.tga and b/gfx/menu/luma/gametype_inv.tga differ
index 7971be376f9928cfd6d225ae7291c912d2e601d5..e6b35a4e1c40f2ef36b49876ac088901086388db 100644 (file)
Binary files a/gfx/menu/luma/gametype_jb.tga and b/gfx/menu/luma/gametype_jb.tga differ
index 3370b5e59b806c3c9d713daf2948e94a46e7c992..38acfc705e989236e7bbe6e259b985cd0017b289 100644 (file)
Binary files a/gfx/menu/luma/gametype_ka.tga and b/gfx/menu/luma/gametype_ka.tga differ
index bdca280501a6f26d0e3371fd1bd7be6edecdc2ca..df30ff0ea18f5630c3e1f1a3247bc11dcbc39555 100644 (file)
Binary files a/gfx/menu/luma/gametype_kh.tga and b/gfx/menu/luma/gametype_kh.tga differ
index 33e2be70d4fffaf88f80fc8ce9f2c88820010912..e14d2a2f9bb58407b2d328c12322cf8ae6e032f5 100644 (file)
Binary files a/gfx/menu/luma/gametype_lms.tga and b/gfx/menu/luma/gametype_lms.tga differ
index 15d273634fa1caa6a8471eeaae9370f422e456e3..93b021e4555aacef4889d76b5384addc99715edc 100644 (file)
Binary files a/gfx/menu/luma/gametype_nb.tga and b/gfx/menu/luma/gametype_nb.tga differ
index a9a0f175249d02aa1d8752032a01e60e9a989ff1..48a0c5a13a37e5ce40de8579fb2f3c0b8d302ecd 100644 (file)
Binary files a/gfx/menu/luma/gametype_ons.tga and b/gfx/menu/luma/gametype_ons.tga differ
index 10d7e41ed0e360f258c49cffdb050e1815e1b792..a03204238f00dfe439f0b62fc8bbf991a9a4d879 100644 (file)
Binary files a/gfx/menu/luma/gametype_rc.tga and b/gfx/menu/luma/gametype_rc.tga differ
index 289641e902e5f5787982fec84a8f267c50fba78d..3a6c0922f4b047a54f7137e430f499745032aedd 100644 (file)
Binary files a/gfx/menu/luma/gametype_tdm.tga and b/gfx/menu/luma/gametype_tdm.tga differ
index 2c9eccc26349f1aaae5b8d269d06330feb2ba3bc..8a8f7d984d9ca4e25cae4a32082aa0455557727c 100644 (file)
Binary files a/gfx/menu/luma/gametype_vip.tga and b/gfx/menu/luma/gametype_vip.tga differ
index 226af4c1bf237ff596b4128c9621d410d1e8df5f..2ec91efca551f9dfacc1b056768948b7f1dd02b0 100644 (file)
@@ -15,7 +15,7 @@ seta hud_dock_color "0 0 0"
 seta hud_dock_color_team "1"
 seta hud_dock_alpha "1"
 
-seta hud_progressbar_alpha "0.600000"
+seta hud_progressbar_alpha "0.6"
 seta hud_progressbar_strength_color "1 0.39 0"
 seta hud_progressbar_superweapons_color "0.77 0.67 0"
 seta hud_progressbar_shield_color "0.36 1 0.07"
@@ -35,7 +35,6 @@ seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.005000"
 seta hud_configure_grid_ysize "0.005000"
 
-seta hud_panel_weapons "1"
 seta hud_panel_weapons_pos "0.965000 0.125000"
 seta hud_panel_weapons_size "0.035000 0.770000"
 seta hud_panel_weapons_bg "border_default_east"
@@ -46,7 +45,7 @@ seta hud_panel_weapons_bg_border ""
 seta hud_panel_weapons_bg_padding "0"
 seta hud_panel_weapons_accuracy "0"
 seta hud_panel_weapons_label "1"
-seta hud_panel_weapons_label_scale "0.300000"
+seta hud_panel_weapons_label_scale "0.3"
 seta hud_panel_weapons_complainbubble "1"
 seta hud_panel_weapons_complainbubble_padding "0"
 seta hud_panel_weapons_complainbubble_time "0"
@@ -65,10 +64,9 @@ seta hud_panel_weapons_timeout_fadefgmin "0.4"
 seta hud_panel_weapons_timeout_speed_in "0.25"
 seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
-seta hud_panel_weapons_noncurrent_alpha "0.800000"
-seta hud_panel_weapons_noncurrent_scale "0.900000"
+seta hud_panel_weapons_noncurrent_alpha "0.8"
+seta hud_panel_weapons_noncurrent_scale "0.9"
 
-seta hud_panel_ammo "1"
 seta hud_panel_ammo_pos "0.315000 0.865000"
 seta hud_panel_ammo_size "0.370000 0.060000"
 seta hud_panel_ammo_bg "border_tab_south"
@@ -78,15 +76,14 @@ seta hud_panel_ammo_bg_alpha ""
 seta hud_panel_ammo_bg_border ""
 seta hud_panel_ammo_bg_padding "4"
 seta hud_panel_ammo_onlycurrent "0"
-seta hud_panel_ammo_noncurrent_alpha "0.600000"
-seta hud_panel_ammo_noncurrent_scale "0.400000"
+seta hud_panel_ammo_noncurrent_alpha "0.6"
+seta hud_panel_ammo_noncurrent_scale "0.4"
 seta hud_panel_ammo_iconalign "0"
 seta hud_panel_ammo_progressbar "0"
 seta hud_panel_ammo_progressbar_name "progressbar"
 seta hud_panel_ammo_progressbar_xoffset "0"
 seta hud_panel_ammo_text "1"
 
-seta hud_panel_powerups "1"
 seta hud_panel_powerups_pos "0.325000 0.815000"
 seta hud_panel_powerups_size "0.350000 0.055000"
 seta hud_panel_powerups_bg "border_shadow_south"
@@ -100,7 +97,6 @@ seta hud_panel_powerups_baralign "3"
 seta hud_panel_powerups_progressbar "1"
 seta hud_panel_powerups_text "1"
 
-seta hud_panel_healtharmor "1"
 seta hud_panel_healtharmor_pos "0.300000 0.925000"
 seta hud_panel_healtharmor_size "0.400000 0.070000"
 seta hud_panel_healtharmor_bg "border_default_south"
@@ -109,6 +105,7 @@ seta hud_panel_healtharmor_bg_color_team ""
 seta hud_panel_healtharmor_bg_alpha ""
 seta hud_panel_healtharmor_bg_border "4"
 seta hud_panel_healtharmor_bg_padding ""
+seta hud_panel_healtharmor_combined "0"
 seta hud_panel_healtharmor_flip "0"
 seta hud_panel_healtharmor_iconalign "3"
 seta hud_panel_healtharmor_baralign "3"
@@ -119,7 +116,6 @@ seta hud_panel_healtharmor_progressbar_gfx "1"
 seta hud_panel_healtharmor_progressbar_gfx_smooth "2"
 seta hud_panel_healtharmor_text "1"
 
-seta hud_panel_notify "1"
 seta hud_panel_notify_pos "0.730000 0.800000"
 seta hud_panel_notify_size "0.265000 0.200000"
 seta hud_panel_notify_bg "0"
@@ -134,7 +130,6 @@ seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
 seta hud_panel_notify_icon_aspect "1"
 
-seta hud_panel_timer "1"
 seta hud_panel_timer_pos "0.456000 0"
 seta hud_panel_timer_size "0.088000 0.030000"
 seta hud_panel_timer_bg "border_plain_north"
@@ -144,7 +139,6 @@ seta hud_panel_timer_bg_alpha ""
 seta hud_panel_timer_bg_border ""
 seta hud_panel_timer_bg_padding "0"
 
-seta hud_panel_radar "1"
 seta hud_panel_radar_pos "0 0"
 seta hud_panel_radar_size "0.200000 0.250000"
 seta hud_panel_radar_bg "border_corner_northwest"
@@ -162,7 +156,6 @@ seta hud_panel_radar_maximized_size "0.5 0.5"
 seta hud_panel_radar_maximized_rotation "1"
 seta hud_panel_radar_maximized_zoommode "3"
 
-seta hud_panel_score "1"
 seta hud_panel_score_pos "0.880000 0"
 seta hud_panel_score_size "0.120000 0.080000"
 seta hud_panel_score_bg "border_corner_northeast"
@@ -173,7 +166,6 @@ seta hud_panel_score_bg_border ""
 seta hud_panel_score_bg_padding "1"
 seta hud_panel_score_rankings "1"
 
-seta hud_panel_racetimer "1"
 seta hud_panel_racetimer_pos "0.360000 0.110000"
 seta hud_panel_racetimer_size "0.280000 0.090000"
 seta hud_panel_racetimer_bg "0"
@@ -183,7 +175,6 @@ seta hud_panel_racetimer_bg_alpha ""
 seta hud_panel_racetimer_bg_border ""
 seta hud_panel_racetimer_bg_padding ""
 
-seta hud_panel_vote "1"
 seta hud_panel_vote_pos "0.740000 0.690000"
 seta hud_panel_vote_size "0.190000 0.090000"
 seta hud_panel_vote_bg " "
@@ -192,9 +183,8 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.700000"
+seta hud_panel_vote_alreadyvoted_alpha "0.7"
 
-seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.370000 0.030000"
 seta hud_panel_modicons_size "0.260000 0.07000"
 seta hud_panel_modicons_bg "border_fading_north"
@@ -207,7 +197,6 @@ seta hud_panel_modicons_ca_layout "1"
 seta hud_panel_modicons_dom_layout "1"
 seta hud_panel_modicons_freezetag_layout "1"
 
-seta hud_panel_pressedkeys "1"
 seta hud_panel_pressedkeys_pos "0.445000 0.710000"
 seta hud_panel_pressedkeys_size "0.110000 0.090000"
 seta hud_panel_pressedkeys_bg " "
@@ -216,10 +205,9 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding "1"
-seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
-seta hud_panel_chat "1"
 seta hud_panel_chat_pos "0.010000 0.700000"
 seta hud_panel_chat_size "0.460000 0.190000"
 seta hud_panel_chat_bg "0"
@@ -229,7 +217,6 @@ seta hud_panel_chat_bg_alpha ""
 seta hud_panel_chat_bg_border ""
 seta hud_panel_chat_bg_padding ""
 
-seta hud_panel_engineinfo "0"
 seta hud_panel_engineinfo_pos "0.930000 0.970000"
 seta hud_panel_engineinfo_size "0.070000 0.030000"
 seta hud_panel_engineinfo_bg "0"
@@ -241,7 +228,6 @@ seta hud_panel_engineinfo_bg_padding ""
 seta hud_panel_engineinfo_framecounter_time "0.1"
 seta hud_panel_engineinfo_framecounter_decimals "0"
 
-seta hud_panel_infomessages "1"
 seta hud_panel_infomessages_pos "0.720000 0.100000"
 seta hud_panel_infomessages_size "0.280000 0.080000"
 seta hud_panel_infomessages_bg "0"
@@ -252,13 +238,12 @@ seta hud_panel_infomessages_bg_border ""
 seta hud_panel_infomessages_bg_padding "0"
 seta hud_panel_infomessages_flip "1"
 
-seta hud_panel_physics "3"
 seta hud_panel_physics_pos "0.410000 0.625000"
 seta hud_panel_physics_size "0.180000 0.080000"
 seta hud_panel_physics_bg "0"
 seta hud_panel_physics_bg_color ""
 seta hud_panel_physics_bg_color_team ""
-seta hud_panel_physics_bg_alpha "0.700000"
+seta hud_panel_physics_bg_alpha "0.7"
 seta hud_panel_physics_bg_border ""
 seta hud_panel_physics_bg_padding ""
 seta hud_panel_physics_speed_unit_show "1"
@@ -277,7 +262,6 @@ seta hud_panel_physics_acceleration_progressbar_nonlinear "0"
 seta hud_panel_physics_text "1"
 seta hud_panel_physics_text_scale "0.7"
 
-seta hud_panel_centerprint "1"
 seta hud_panel_centerprint_pos "0.175000 0.220000"
 seta hud_panel_centerprint_size "0.650000 0.220000"
 seta hud_panel_centerprint_bg "0"
@@ -300,7 +284,6 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
-seta hud_panel_minigameboard "1"
 seta hud_panel_minigameboard_pos "0.22 0.15"
 seta hud_panel_minigameboard_size "0.50 0.60"
 seta hud_panel_minigameboard_bg "border_small"
@@ -310,7 +293,6 @@ seta hud_panel_minigameboard_bg_alpha ""
 seta hud_panel_minigameboard_bg_border ""
 seta hud_panel_minigameboard_bg_padding ""
 
-seta hud_panel_minigamestatus "1"
 seta hud_panel_minigamestatus_pos "0.74 0.15"
 seta hud_panel_minigamestatus_size "0.2 0.60"
 seta hud_panel_minigamestatus_bg "border_small"
@@ -320,7 +302,6 @@ seta hud_panel_minigamestatus_bg_alpha ""
 seta hud_panel_minigamestatus_bg_border ""
 seta hud_panel_minigamestatus_bg_padding ""
 
-seta hud_panel_minigamehelp "1"
 seta hud_panel_minigamehelp_pos "0.22 0.78"
 seta hud_panel_minigamehelp_size "0.50 0.20"
 seta hud_panel_minigamehelp_bg ""
@@ -330,7 +311,6 @@ seta hud_panel_minigamehelp_bg_alpha ""
 seta hud_panel_minigamehelp_bg_border ""
 seta hud_panel_minigamehelp_bg_padding ""
 
-seta hud_panel_minigamemenu "0"
 seta hud_panel_minigamemenu_pos "0 0.26"
 seta hud_panel_minigamemenu_size "0.2 0.49"
 seta hud_panel_minigamemenu_bg "border_small"
@@ -340,7 +320,6 @@ seta hud_panel_minigamemenu_bg_alpha ""
 seta hud_panel_minigamemenu_bg_border ""
 seta hud_panel_minigamemenu_bg_padding ""
 
-seta hud_panel_mapvote "1"
 seta hud_panel_mapvote_pos "0 0"
 seta hud_panel_mapvote_size "1 1"
 seta hud_panel_mapvote_bg "border_default"
@@ -350,10 +329,9 @@ seta hud_panel_mapvote_bg_alpha ""
 seta hud_panel_mapvote_bg_border ""
 seta hud_panel_mapvote_bg_padding ""
 
-seta hud_panel_itemstime "2"
 seta hud_panel_itemstime_pos "0.030000 0.260000"
 seta hud_panel_itemstime_size "0.070000 0.230000"
-seta hud_panel_itemstime_bg "border_itemstime"
+seta hud_panel_itemstime_bg "border_default"
 seta hud_panel_itemstime_bg_color ""
 seta hud_panel_itemstime_bg_color_team ""
 seta hud_panel_itemstime_bg_alpha ""
@@ -367,7 +345,6 @@ seta hud_panel_itemstime_text "1"
 seta hud_panel_itemstime_ratio "2"
 seta hud_panel_itemstime_dynamicsize "1"
 
-seta hud_panel_quickmenu "1"
 seta hud_panel_quickmenu_pos "0.600000 0.445000"
 seta hud_panel_quickmenu_size "0.220000 0.240000"
 seta hud_panel_quickmenu_bg ""
index 04902e07f8a64fee26a1dc990515730535a635e8..7badb25057d5d01e36f26e47bef8b1fb3556e403 100644 (file)
@@ -15,7 +15,7 @@ seta hud_dock_color "0 0.449576 0.860796"
 seta hud_dock_color_team "1"
 seta hud_dock_alpha "1"
 
-seta hud_progressbar_alpha "0.500000"
+seta hud_progressbar_alpha "0.5"
 seta hud_progressbar_strength_color "0 0 0.6"
 seta hud_progressbar_superweapons_color "0.6 0.3 0"
 seta hud_progressbar_shield_color "0.6 0 0.6"
@@ -35,7 +35,6 @@ seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
 seta hud_configure_grid_ysize "0.010000"
 
-seta hud_panel_weapons "1"
 seta hud_panel_weapons_pos "0.930000 0.170000"
 seta hud_panel_weapons_size "0.070000 0.650000"
 seta hud_panel_weapons_bg "border_small_weapons"
@@ -46,7 +45,7 @@ seta hud_panel_weapons_bg_border ""
 seta hud_panel_weapons_bg_padding "4"
 seta hud_panel_weapons_accuracy "1"
 seta hud_panel_weapons_label "1"
-seta hud_panel_weapons_label_scale "0.500000"
+seta hud_panel_weapons_label_scale "0.5"
 seta hud_panel_weapons_complainbubble "1"
 seta hud_panel_weapons_complainbubble_padding "-1"
 seta hud_panel_weapons_complainbubble_time "0"
@@ -68,7 +67,6 @@ seta hud_panel_weapons_onlyowned "1"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 
-seta hud_panel_ammo "1"
 seta hud_panel_ammo_pos "0.330000 0.960000"
 seta hud_panel_ammo_size "0.350000 0.040000"
 seta hud_panel_ammo_bg ""
@@ -78,7 +76,7 @@ seta hud_panel_ammo_bg_alpha ""
 seta hud_panel_ammo_bg_border ""
 seta hud_panel_ammo_bg_padding ""
 seta hud_panel_ammo_onlycurrent "0"
-seta hud_panel_ammo_noncurrent_alpha "0.700000"
+seta hud_panel_ammo_noncurrent_alpha "0.7"
 seta hud_panel_ammo_noncurrent_scale "1"
 seta hud_panel_ammo_iconalign "0"
 seta hud_panel_ammo_progressbar "0"
@@ -86,7 +84,6 @@ seta hud_panel_ammo_progressbar_name "progressbar"
 seta hud_panel_ammo_progressbar_xoffset "0"
 seta hud_panel_ammo_text "1"
 
-seta hud_panel_powerups "1"
 seta hud_panel_powerups_pos "0.360000 0.850000"
 seta hud_panel_powerups_size "0.290000 0.030000"
 seta hud_panel_powerups_bg "border_small_powerups"
@@ -100,7 +97,6 @@ seta hud_panel_powerups_baralign "3"
 seta hud_panel_powerups_progressbar "1"
 seta hud_panel_powerups_text "1"
 
-seta hud_panel_healtharmor "1"
 seta hud_panel_healtharmor_pos "0.320000 0.910000"
 seta hud_panel_healtharmor_size "0.370000 0.060000"
 seta hud_panel_healtharmor_bg "border_small_healtharmor"
@@ -109,6 +105,7 @@ seta hud_panel_healtharmor_bg_color_team ""
 seta hud_panel_healtharmor_bg_alpha ""
 seta hud_panel_healtharmor_bg_border ""
 seta hud_panel_healtharmor_bg_padding ""
+seta hud_panel_healtharmor_combined "0"
 seta hud_panel_healtharmor_flip "0"
 seta hud_panel_healtharmor_iconalign "3"
 seta hud_panel_healtharmor_baralign "3"
@@ -119,7 +116,6 @@ seta hud_panel_healtharmor_progressbar_gfx "1"
 seta hud_panel_healtharmor_progressbar_gfx_smooth "2"
 seta hud_panel_healtharmor_text "1"
 
-seta hud_panel_notify "1"
 seta hud_panel_notify_pos "0.710000 0.800000"
 seta hud_panel_notify_size "0.290000 0.190000"
 seta hud_panel_notify_bg "0"
@@ -134,7 +130,6 @@ seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
 seta hud_panel_notify_icon_aspect "2"
 
-seta hud_panel_timer "1"
 seta hud_panel_timer_pos "0.800000 0.040000"
 seta hud_panel_timer_size "0.070000 0.040000"
 seta hud_panel_timer_bg "border_small_timer"
@@ -144,16 +139,15 @@ seta hud_panel_timer_bg_alpha ""
 seta hud_panel_timer_bg_border ""
 seta hud_panel_timer_bg_padding "0"
 
-seta hud_panel_radar "2"
 seta hud_panel_radar_pos "0 0"
 seta hud_panel_radar_size "0.200000 0.240000"
 seta hud_panel_radar_bg "border_small_radar"
 seta hud_panel_radar_bg_color ""
 seta hud_panel_radar_bg_color_team ""
-seta hud_panel_radar_bg_alpha "0.800000"
+seta hud_panel_radar_bg_alpha "0.8"
 seta hud_panel_radar_bg_border ""
 seta hud_panel_radar_bg_padding "-1"
-seta hud_panel_radar_foreground_alpha "0.800000"
+seta hud_panel_radar_foreground_alpha "0.8"
 seta hud_panel_radar_rotation "0"
 seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
@@ -162,7 +156,6 @@ seta hud_panel_radar_maximized_size "0.5 0.5"
 seta hud_panel_radar_maximized_rotation "1"
 seta hud_panel_radar_maximized_zoommode "3"
 
-seta hud_panel_score "1"
 seta hud_panel_score_pos "0.890000 0.030000"
 seta hud_panel_score_size "0.100000 0.050000"
 seta hud_panel_score_bg "border_small_score"
@@ -173,7 +166,6 @@ seta hud_panel_score_bg_border ""
 seta hud_panel_score_bg_padding "0"
 seta hud_panel_score_rankings "1"
 
-seta hud_panel_racetimer "1"
 seta hud_panel_racetimer_pos "0.360000 0.110000"
 seta hud_panel_racetimer_size "0.280000 0.090000"
 seta hud_panel_racetimer_bg "0"
@@ -183,18 +175,16 @@ seta hud_panel_racetimer_bg_alpha ""
 seta hud_panel_racetimer_bg_border ""
 seta hud_panel_racetimer_bg_padding ""
 
-seta hud_panel_vote "1"
 seta hud_panel_vote_pos "0.720000 0.670000"
 seta hud_panel_vote_size "0.190000 0.090000"
-seta hud_panel_vote_bg "border_vote"
+seta hud_panel_vote_bg "border_default"
 seta hud_panel_vote_bg_color ""
 seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.500000"
+seta hud_panel_vote_alreadyvoted_alpha "0.5"
 
-seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.410000 0"
 seta hud_panel_modicons_size "0.180000 0.080000"
 seta hud_panel_modicons_bg "border_small_modicons"
@@ -207,7 +197,6 @@ seta hud_panel_modicons_ca_layout "1"
 seta hud_panel_modicons_dom_layout "1"
 seta hud_panel_modicons_freezetag_layout "1"
 
-seta hud_panel_pressedkeys "1"
 seta hud_panel_pressedkeys_pos "0.450000 0.720000"
 seta hud_panel_pressedkeys_size "0.110000 0.090000"
 seta hud_panel_pressedkeys_bg "0"
@@ -216,10 +205,9 @@ seta hud_panel_pressedkeys_bg_color_team ""
 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_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
-seta hud_panel_chat "1"
 seta hud_panel_chat_pos "0.010000 0.700000"
 seta hud_panel_chat_size "0.460000 0.190000"
 seta hud_panel_chat_bg "0"
@@ -229,7 +217,6 @@ seta hud_panel_chat_bg_alpha ""
 seta hud_panel_chat_bg_border ""
 seta hud_panel_chat_bg_padding ""
 
-seta hud_panel_engineinfo "0"
 seta hud_panel_engineinfo_pos "0.930000 0.970000"
 seta hud_panel_engineinfo_size "0.070000 0.030000"
 seta hud_panel_engineinfo_bg "0"
@@ -241,7 +228,6 @@ seta hud_panel_engineinfo_bg_padding ""
 seta hud_panel_engineinfo_framecounter_time "0.1"
 seta hud_panel_engineinfo_framecounter_decimals "0"
 
-seta hud_panel_infomessages "1"
 seta hud_panel_infomessages_pos "0.720000 0.100000"
 seta hud_panel_infomessages_size "0.280000 0.080000"
 seta hud_panel_infomessages_bg "0"
@@ -252,7 +238,6 @@ seta hud_panel_infomessages_bg_border ""
 seta hud_panel_infomessages_bg_padding "0"
 seta hud_panel_infomessages_flip "1"
 
-seta hud_panel_physics "3"
 seta hud_panel_physics_pos "0.420000 0.620000"
 seta hud_panel_physics_size "0.170000 0.080000"
 seta hud_panel_physics_bg ""
@@ -277,7 +262,6 @@ seta hud_panel_physics_acceleration_progressbar_nonlinear "0"
 seta hud_panel_physics_text "1"
 seta hud_panel_physics_text_scale "0.7"
 
-seta hud_panel_centerprint "1"
 seta hud_panel_centerprint_pos "0.175000 0.220000"
 seta hud_panel_centerprint_size "0.650000 0.220000"
 seta hud_panel_centerprint_bg "0"
@@ -300,7 +284,6 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
-seta hud_panel_minigameboard "1"
 seta hud_panel_minigameboard_pos "0.22 0.15"
 seta hud_panel_minigameboard_size "0.50 0.60"
 seta hud_panel_minigameboard_bg "border_small"
@@ -310,7 +293,6 @@ seta hud_panel_minigameboard_bg_alpha ""
 seta hud_panel_minigameboard_bg_border ""
 seta hud_panel_minigameboard_bg_padding ""
 
-seta hud_panel_minigamestatus "1"
 seta hud_panel_minigamestatus_pos "0.74 0.15"
 seta hud_panel_minigamestatus_size "0.2 0.60"
 seta hud_panel_minigamestatus_bg "border_small"
@@ -320,7 +302,6 @@ seta hud_panel_minigamestatus_bg_alpha ""
 seta hud_panel_minigamestatus_bg_border ""
 seta hud_panel_minigamestatus_bg_padding ""
 
-seta hud_panel_minigamehelp "1"
 seta hud_panel_minigamehelp_pos "0.22 0.78"
 seta hud_panel_minigamehelp_size "0.50 0.20"
 seta hud_panel_minigamehelp_bg ""
@@ -330,7 +311,6 @@ seta hud_panel_minigamehelp_bg_alpha ""
 seta hud_panel_minigamehelp_bg_border ""
 seta hud_panel_minigamehelp_bg_padding ""
 
-seta hud_panel_minigamemenu "0"
 seta hud_panel_minigamemenu_pos "0 0.26"
 seta hud_panel_minigamemenu_size "0.2 0.49"
 seta hud_panel_minigamemenu_bg "border_small"
@@ -340,7 +320,6 @@ seta hud_panel_minigamemenu_bg_alpha ""
 seta hud_panel_minigamemenu_bg_border ""
 seta hud_panel_minigamemenu_bg_padding ""
 
-seta hud_panel_mapvote "1"
 seta hud_panel_mapvote_pos "0 0"
 seta hud_panel_mapvote_size "1 1"
 seta hud_panel_mapvote_bg "0"
@@ -350,10 +329,9 @@ seta hud_panel_mapvote_bg_alpha ""
 seta hud_panel_mapvote_bg_border ""
 seta hud_panel_mapvote_bg_padding ""
 
-seta hud_panel_itemstime "2"
 seta hud_panel_itemstime_pos "0.030000 0.260000"
 seta hud_panel_itemstime_size "0.070000 0.230000"
-seta hud_panel_itemstime_bg "border_itemstime"
+seta hud_panel_itemstime_bg "border_default"
 seta hud_panel_itemstime_bg_color ""
 seta hud_panel_itemstime_bg_color_team ""
 seta hud_panel_itemstime_bg_alpha ""
@@ -367,7 +345,6 @@ seta hud_panel_itemstime_text "1"
 seta hud_panel_itemstime_ratio "2"
 seta hud_panel_itemstime_dynamicsize "1"
 
-seta hud_panel_quickmenu "1"
 seta hud_panel_quickmenu_pos "0.610000 0.450000"
 seta hud_panel_quickmenu_size "0.200000 0.210000"
 seta hud_panel_quickmenu_bg ""
index 76214f49035e9abdeae7d30ca50966f2c213f5af..76edc7bc09fc766003bbb7ebf0afb90b653981b2 100644 (file)
@@ -12,10 +12,10 @@ seta hud_panel_fg_alpha "1"
 
 seta hud_dock "0"
 seta hud_dock_color "0 0.449576 0.860796"
-seta hud_dock_color_team "0.700000"
+seta hud_dock_color_team "0.7"
 seta hud_dock_alpha "1"
 
-seta hud_progressbar_alpha "0.500000"
+seta hud_progressbar_alpha "0.5"
 seta hud_progressbar_strength_color "0 0 0.6"
 seta hud_progressbar_superweapons_color "0.6 0.3 0"
 seta hud_progressbar_shield_color "0.6 0 0.6"
@@ -35,7 +35,6 @@ seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
 seta hud_configure_grid_ysize "0.010000"
 
-seta hud_panel_weapons "1"
 seta hud_panel_weapons_pos "0.350000 0.940000"
 seta hud_panel_weapons_size "0.300000 0.060000"
 seta hud_panel_weapons_bg ""
@@ -68,7 +67,6 @@ seta hud_panel_weapons_onlyowned "1"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 
-seta hud_panel_ammo "1"
 seta hud_panel_ammo_pos "0.650000 0.890000"
 seta hud_panel_ammo_size "0.055000 0.110000"
 seta hud_panel_ammo_bg ""
@@ -86,7 +84,6 @@ seta hud_panel_ammo_progressbar_name "progressbar"
 seta hud_panel_ammo_progressbar_xoffset "0"
 seta hud_panel_ammo_text "1"
 
-seta hud_panel_powerups "1"
 seta hud_panel_powerups_pos "0.290000 0.890000"
 seta hud_panel_powerups_size "0.055000 0.110000"
 seta hud_panel_powerups_bg "0"
@@ -100,7 +97,6 @@ seta hud_panel_powerups_baralign "1"
 seta hud_panel_powerups_progressbar "1"
 seta hud_panel_powerups_text "1"
 
-seta hud_panel_healtharmor "1"
 seta hud_panel_healtharmor_pos "0.350000 0.890000"
 seta hud_panel_healtharmor_size "0.300000 0.050000"
 seta hud_panel_healtharmor_bg ""
@@ -109,6 +105,7 @@ seta hud_panel_healtharmor_bg_color_team ""
 seta hud_panel_healtharmor_bg_alpha ""
 seta hud_panel_healtharmor_bg_border ""
 seta hud_panel_healtharmor_bg_padding "0"
+seta hud_panel_healtharmor_combined "0"
 seta hud_panel_healtharmor_flip "0"
 seta hud_panel_healtharmor_iconalign "3"
 seta hud_panel_healtharmor_baralign "3"
@@ -119,7 +116,6 @@ seta hud_panel_healtharmor_progressbar_gfx "1"
 seta hud_panel_healtharmor_progressbar_gfx_smooth "2"
 seta hud_panel_healtharmor_text "1"
 
-seta hud_panel_notify "1"
 seta hud_panel_notify_pos "0 0"
 seta hud_panel_notify_size "0.210000 0.260000"
 seta hud_panel_notify_bg "0"
@@ -134,7 +130,6 @@ seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
 seta hud_panel_notify_icon_aspect "2"
 
-seta hud_panel_timer "1"
 seta hud_panel_timer_pos "0.435000 0"
 seta hud_panel_timer_size "0.135000 0.060000"
 seta hud_panel_timer_bg "0"
@@ -144,16 +139,15 @@ seta hud_panel_timer_bg_alpha ""
 seta hud_panel_timer_bg_border ""
 seta hud_panel_timer_bg_padding "0"
 
-seta hud_panel_radar "2"
 seta hud_panel_radar_pos "0.810000 0"
 seta hud_panel_radar_size "0.190000 0.250000"
-seta hud_panel_radar_bg "border_radar"
+seta hud_panel_radar_bg "border_default"
 seta hud_panel_radar_bg_color ""
 seta hud_panel_radar_bg_color_team ""
-seta hud_panel_radar_bg_alpha "0.500000"
+seta hud_panel_radar_bg_alpha "0.5"
 seta hud_panel_radar_bg_border "0"
 seta hud_panel_radar_bg_padding "0"
-seta hud_panel_radar_foreground_alpha "0.500000"
+seta hud_panel_radar_foreground_alpha "0.5"
 seta hud_panel_radar_rotation "0"
 seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
@@ -162,7 +156,6 @@ seta hud_panel_radar_maximized_size "0.5 0.5"
 seta hud_panel_radar_maximized_rotation "1"
 seta hud_panel_radar_maximized_zoommode "3"
 
-seta hud_panel_score "1"
 seta hud_panel_score_pos "0.465000 0.045000"
 seta hud_panel_score_size "0.090000 0.060000"
 seta hud_panel_score_bg ""
@@ -173,7 +166,6 @@ seta hud_panel_score_bg_border ""
 seta hud_panel_score_bg_padding ""
 seta hud_panel_score_rankings "1"
 
-seta hud_panel_racetimer "1"
 seta hud_panel_racetimer_pos "0.360000 0.090000"
 seta hud_panel_racetimer_size "0.280000 0.090000"
 seta hud_panel_racetimer_bg "0"
@@ -183,7 +175,6 @@ seta hud_panel_racetimer_bg_alpha ""
 seta hud_panel_racetimer_bg_border ""
 seta hud_panel_racetimer_bg_padding ""
 
-seta hud_panel_vote "1"
 seta hud_panel_vote_pos "0 0.890000"
 seta hud_panel_vote_size "0.170000 0.110000"
 seta hud_panel_vote_bg ""
@@ -192,9 +183,8 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.800000"
+seta hud_panel_vote_alreadyvoted_alpha "0.8"
 
-seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.560000 0"
 seta hud_panel_modicons_size "0.050000 0.100000"
 seta hud_panel_modicons_bg ""
@@ -207,7 +197,6 @@ seta hud_panel_modicons_ca_layout "1"
 seta hud_panel_modicons_dom_layout "1"
 seta hud_panel_modicons_freezetag_layout "1"
 
-seta hud_panel_pressedkeys "1"
 seta hud_panel_pressedkeys_pos "0.450000 0.650000"
 seta hud_panel_pressedkeys_size "0.100000 0.110000"
 seta hud_panel_pressedkeys_bg "0"
@@ -216,10 +205,9 @@ seta hud_panel_pressedkeys_bg_color_team ""
 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_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
-seta hud_panel_chat "1"
 seta hud_panel_chat_pos "0 0.775000"
 seta hud_panel_chat_size "0.460000 0.110000"
 seta hud_panel_chat_bg "0"
@@ -229,7 +217,6 @@ seta hud_panel_chat_bg_alpha ""
 seta hud_panel_chat_bg_border ""
 seta hud_panel_chat_bg_padding ""
 
-seta hud_panel_engineinfo "0"
 seta hud_panel_engineinfo_pos "0.910000 0.970000"
 seta hud_panel_engineinfo_size "0.090000 0.030000"
 seta hud_panel_engineinfo_bg "0"
@@ -241,7 +228,6 @@ seta hud_panel_engineinfo_bg_padding ""
 seta hud_panel_engineinfo_framecounter_time "0.1"
 seta hud_panel_engineinfo_framecounter_decimals "0"
 
-seta hud_panel_infomessages "1"
 seta hud_panel_infomessages_pos "0.710000 0"
 seta hud_panel_infomessages_size "0.290000 0.100000"
 seta hud_panel_infomessages_bg "0"
@@ -252,7 +238,6 @@ seta hud_panel_infomessages_bg_border ""
 seta hud_panel_infomessages_bg_padding "0"
 seta hud_panel_infomessages_flip "1"
 
-seta hud_panel_physics "3"
 seta hud_panel_physics_pos "0.440000 0.590000"
 seta hud_panel_physics_size "0.120000 0.050000"
 seta hud_panel_physics_bg ""
@@ -277,7 +262,6 @@ seta hud_panel_physics_acceleration_progressbar_nonlinear "0"
 seta hud_panel_physics_text "1"
 seta hud_panel_physics_text_scale "0.7"
 
-seta hud_panel_centerprint "1"
 seta hud_panel_centerprint_pos "0.175000 0.220000"
 seta hud_panel_centerprint_size "0.650000 0.220000"
 seta hud_panel_centerprint_bg "0"
@@ -300,7 +284,6 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
-seta hud_panel_minigameboard "1"
 seta hud_panel_minigameboard_pos "0.22 0.15"
 seta hud_panel_minigameboard_size "0.50 0.60"
 seta hud_panel_minigameboard_bg "border_small"
@@ -310,7 +293,6 @@ seta hud_panel_minigameboard_bg_alpha ""
 seta hud_panel_minigameboard_bg_border ""
 seta hud_panel_minigameboard_bg_padding ""
 
-seta hud_panel_minigamestatus "1"
 seta hud_panel_minigamestatus_pos "0.74 0.15"
 seta hud_panel_minigamestatus_size "0.2 0.60"
 seta hud_panel_minigamestatus_bg "border_small"
@@ -320,7 +302,6 @@ seta hud_panel_minigamestatus_bg_alpha ""
 seta hud_panel_minigamestatus_bg_border ""
 seta hud_panel_minigamestatus_bg_padding ""
 
-seta hud_panel_minigamehelp "1"
 seta hud_panel_minigamehelp_pos "0.22 0.78"
 seta hud_panel_minigamehelp_size "0.50 0.20"
 seta hud_panel_minigamehelp_bg ""
@@ -330,7 +311,6 @@ seta hud_panel_minigamehelp_bg_alpha ""
 seta hud_panel_minigamehelp_bg_border ""
 seta hud_panel_minigamehelp_bg_padding ""
 
-seta hud_panel_minigamemenu "0"
 seta hud_panel_minigamemenu_pos "0 0.26"
 seta hud_panel_minigamemenu_size "0.2 0.49"
 seta hud_panel_minigamemenu_bg "border_small"
@@ -340,7 +320,6 @@ seta hud_panel_minigamemenu_bg_alpha ""
 seta hud_panel_minigamemenu_bg_border ""
 seta hud_panel_minigamemenu_bg_padding ""
 
-seta hud_panel_mapvote "1"
 seta hud_panel_mapvote_pos "0 0"
 seta hud_panel_mapvote_size "1 1"
 seta hud_panel_mapvote_bg "0"
@@ -350,7 +329,6 @@ seta hud_panel_mapvote_bg_alpha ""
 seta hud_panel_mapvote_bg_border ""
 seta hud_panel_mapvote_bg_padding ""
 
-seta hud_panel_itemstime "2"
 seta hud_panel_itemstime_pos "0.000000 0.310000"
 seta hud_panel_itemstime_size "0.070000 0.180000"
 seta hud_panel_itemstime_bg ""
@@ -367,7 +345,6 @@ seta hud_panel_itemstime_text "1"
 seta hud_panel_itemstime_ratio "2"
 seta hud_panel_itemstime_dynamicsize "1"
 
-seta hud_panel_quickmenu "1"
 seta hud_panel_quickmenu_pos "0.600000 0.460000"
 seta hud_panel_quickmenu_size "0.190000 0.190000"
 seta hud_panel_quickmenu_bg ""
index 722a316fd0c031ff37f58f42fda32f6d9a0d8b21..f2670d8e2d7b0923e25112947641ba315ef3fd85 100644 (file)
@@ -12,7 +12,7 @@ seta hud_panel_fg_alpha "1"
 
 seta hud_dock "0"
 seta hud_dock_color "0 0.449576 0.860796"
-seta hud_dock_color_team "0.700000"
+seta hud_dock_color_team "0.7"
 seta hud_dock_alpha "1"
 
 seta hud_progressbar_alpha "0.3"
@@ -35,7 +35,6 @@ seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
 seta hud_configure_grid_ysize "0.010000"
 
-seta hud_panel_weapons "1"
 seta hud_panel_weapons_pos "0.350000 0.940000"
 seta hud_panel_weapons_size "0.300000 0.060000"
 seta hud_panel_weapons_bg ""
@@ -68,7 +67,6 @@ seta hud_panel_weapons_onlyowned "1"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 
-seta hud_panel_ammo "1"
 seta hud_panel_ammo_pos "0.450000 0.630000"
 seta hud_panel_ammo_size "0.080000 0.040000"
 seta hud_panel_ammo_bg ""
@@ -86,7 +84,6 @@ seta hud_panel_ammo_progressbar_name "progressbar_ammo"
 seta hud_panel_ammo_progressbar_xoffset "0.32"
 seta hud_panel_ammo_text "1"
 
-seta hud_panel_powerups "1"
 seta hud_panel_powerups_pos "0.270000 0.940000"
 seta hud_panel_powerups_size "0.080000 0.060000"
 seta hud_panel_powerups_bg "0"
@@ -100,15 +97,15 @@ seta hud_panel_powerups_baralign "1"
 seta hud_panel_powerups_progressbar "1"
 seta hud_panel_powerups_text "1"
 
-seta hud_panel_healtharmor "1"
 seta hud_panel_healtharmor_pos "0.350000 0.380000"
 seta hud_panel_healtharmor_size "0.070000 0.240000"
 seta hud_panel_healtharmor_bg "border_healtharmor"
 seta hud_panel_healtharmor_bg_color "0.464391 0.464391 0.464391"
 seta hud_panel_healtharmor_bg_color_team ""
-seta hud_panel_healtharmor_bg_alpha "0.600000"
+seta hud_panel_healtharmor_bg_alpha "0.6"
 seta hud_panel_healtharmor_bg_border "-1"
 seta hud_panel_healtharmor_bg_padding "0"
+seta hud_panel_healtharmor_combined "0"
 seta hud_panel_healtharmor_flip "0"
 seta hud_panel_healtharmor_iconalign "1"
 seta hud_panel_healtharmor_baralign "1"
@@ -119,7 +116,6 @@ seta hud_panel_healtharmor_progressbar_gfx "1"
 seta hud_panel_healtharmor_progressbar_gfx_smooth "2"
 seta hud_panel_healtharmor_text "0"
 
-seta hud_panel_notify "1"
 seta hud_panel_notify_pos "0 0"
 seta hud_panel_notify_size "0.210000 0.260000"
 seta hud_panel_notify_bg "0"
@@ -134,7 +130,6 @@ seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
 seta hud_panel_notify_icon_aspect "2"
 
-seta hud_panel_timer "1"
 seta hud_panel_timer_pos "0.435000 0"
 seta hud_panel_timer_size "0.135000 0.060000"
 seta hud_panel_timer_bg "0"
@@ -144,16 +139,15 @@ seta hud_panel_timer_bg_alpha ""
 seta hud_panel_timer_bg_border ""
 seta hud_panel_timer_bg_padding "0"
 
-seta hud_panel_radar "2"
 seta hud_panel_radar_pos "0.810000 0"
 seta hud_panel_radar_size "0.190000 0.250000"
-seta hud_panel_radar_bg "border_radar"
+seta hud_panel_radar_bg "border_default"
 seta hud_panel_radar_bg_color ""
 seta hud_panel_radar_bg_color_team ""
-seta hud_panel_radar_bg_alpha "0.500000"
+seta hud_panel_radar_bg_alpha "0.5"
 seta hud_panel_radar_bg_border "0"
 seta hud_panel_radar_bg_padding "0"
-seta hud_panel_radar_foreground_alpha "0.500000"
+seta hud_panel_radar_foreground_alpha "0.5"
 seta hud_panel_radar_rotation "0"
 seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
@@ -162,7 +156,6 @@ seta hud_panel_radar_maximized_size "0.5 0.5"
 seta hud_panel_radar_maximized_rotation "1"
 seta hud_panel_radar_maximized_zoommode "3"
 
-seta hud_panel_score "1"
 seta hud_panel_score_pos "0.465000 0.045000"
 seta hud_panel_score_size "0.090000 0.060000"
 seta hud_panel_score_bg ""
@@ -173,7 +166,6 @@ seta hud_panel_score_bg_border ""
 seta hud_panel_score_bg_padding ""
 seta hud_panel_score_rankings "1"
 
-seta hud_panel_racetimer "1"
 seta hud_panel_racetimer_pos "0.360000 0.090000"
 seta hud_panel_racetimer_size "0.280000 0.090000"
 seta hud_panel_racetimer_bg "0"
@@ -183,7 +175,6 @@ seta hud_panel_racetimer_bg_alpha ""
 seta hud_panel_racetimer_bg_border ""
 seta hud_panel_racetimer_bg_padding ""
 
-seta hud_panel_vote "1"
 seta hud_panel_vote_pos "0 0.890000"
 seta hud_panel_vote_size "0.170000 0.110000"
 seta hud_panel_vote_bg ""
@@ -192,9 +183,8 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.800000"
+seta hud_panel_vote_alreadyvoted_alpha "0.8"
 
-seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.560000 0"
 seta hud_panel_modicons_size "0.050000 0.100000"
 seta hud_panel_modicons_bg ""
@@ -207,7 +197,6 @@ seta hud_panel_modicons_ca_layout "1"
 seta hud_panel_modicons_dom_layout "1"
 seta hud_panel_modicons_freezetag_layout "1"
 
-seta hud_panel_pressedkeys "1"
 seta hud_panel_pressedkeys_pos "0.450000 0.690000"
 seta hud_panel_pressedkeys_size "0.100000 0.110000"
 seta hud_panel_pressedkeys_bg "0"
@@ -216,10 +205,9 @@ seta hud_panel_pressedkeys_bg_color_team ""
 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_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
-seta hud_panel_chat "1"
 seta hud_panel_chat_pos "0 0.775000"
 seta hud_panel_chat_size "0.460000 0.110000"
 seta hud_panel_chat_bg "0"
@@ -229,7 +217,6 @@ seta hud_panel_chat_bg_alpha ""
 seta hud_panel_chat_bg_border ""
 seta hud_panel_chat_bg_padding ""
 
-seta hud_panel_engineinfo "0"
 seta hud_panel_engineinfo_pos "0.910000 0.970000"
 seta hud_panel_engineinfo_size "0.090000 0.030000"
 seta hud_panel_engineinfo_bg "0"
@@ -241,7 +228,6 @@ seta hud_panel_engineinfo_bg_padding ""
 seta hud_panel_engineinfo_framecounter_time "0.1"
 seta hud_panel_engineinfo_framecounter_decimals "0"
 
-seta hud_panel_infomessages "1"
 seta hud_panel_infomessages_pos "0.710000 0"
 seta hud_panel_infomessages_size "0.290000 0.100000"
 seta hud_panel_infomessages_bg "0"
@@ -252,7 +238,6 @@ seta hud_panel_infomessages_bg_border ""
 seta hud_panel_infomessages_bg_padding "0"
 seta hud_panel_infomessages_flip "1"
 
-seta hud_panel_physics "3"
 seta hud_panel_physics_pos "0.270000 0.730000"
 seta hud_panel_physics_size "0.170000 0.030000"
 seta hud_panel_physics_bg ""
@@ -277,7 +262,6 @@ seta hud_panel_physics_acceleration_progressbar_nonlinear "0"
 seta hud_panel_physics_text "1"
 seta hud_panel_physics_text_scale "0.7"
 
-seta hud_panel_centerprint "1"
 seta hud_panel_centerprint_pos "0.175000 0.220000"
 seta hud_panel_centerprint_size "0.650000 0.220000"
 seta hud_panel_centerprint_bg "0"
@@ -300,7 +284,6 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
-seta hud_panel_minigameboard "1"
 seta hud_panel_minigameboard_pos "0.22 0.15"
 seta hud_panel_minigameboard_size "0.50 0.60"
 seta hud_panel_minigameboard_bg "border_small"
@@ -310,7 +293,6 @@ seta hud_panel_minigameboard_bg_alpha ""
 seta hud_panel_minigameboard_bg_border ""
 seta hud_panel_minigameboard_bg_padding ""
 
-seta hud_panel_minigamestatus "1"
 seta hud_panel_minigamestatus_pos "0.74 0.15"
 seta hud_panel_minigamestatus_size "0.2 0.60"
 seta hud_panel_minigamestatus_bg "border_small"
@@ -320,7 +302,6 @@ seta hud_panel_minigamestatus_bg_alpha ""
 seta hud_panel_minigamestatus_bg_border ""
 seta hud_panel_minigamestatus_bg_padding ""
 
-seta hud_panel_minigamehelp "1"
 seta hud_panel_minigamehelp_pos "0.22 0.78"
 seta hud_panel_minigamehelp_size "0.50 0.20"
 seta hud_panel_minigamehelp_bg ""
@@ -330,7 +311,6 @@ seta hud_panel_minigamehelp_bg_alpha ""
 seta hud_panel_minigamehelp_bg_border ""
 seta hud_panel_minigamehelp_bg_padding ""
 
-seta hud_panel_minigamemenu "0"
 seta hud_panel_minigamemenu_pos "0 0.26"
 seta hud_panel_minigamemenu_size "0.2 0.49"
 seta hud_panel_minigamemenu_bg "border_small"
@@ -340,7 +320,6 @@ seta hud_panel_minigamemenu_bg_alpha ""
 seta hud_panel_minigamemenu_bg_border ""
 seta hud_panel_minigamemenu_bg_padding ""
 
-seta hud_panel_mapvote "1"
 seta hud_panel_mapvote_pos "0 0"
 seta hud_panel_mapvote_size "1 1"
 seta hud_panel_mapvote_bg "0"
@@ -350,7 +329,6 @@ seta hud_panel_mapvote_bg_alpha ""
 seta hud_panel_mapvote_bg_border ""
 seta hud_panel_mapvote_bg_padding ""
 
-seta hud_panel_itemstime "2"
 seta hud_panel_itemstime_pos "0.000000 0.310000"
 seta hud_panel_itemstime_size "0.070000 0.180000"
 seta hud_panel_itemstime_bg ""
@@ -367,7 +345,6 @@ seta hud_panel_itemstime_text "1"
 seta hud_panel_itemstime_ratio "2"
 seta hud_panel_itemstime_dynamicsize "1"
 
-seta hud_panel_quickmenu "1"
 seta hud_panel_quickmenu_pos "0.600000 0.460000"
 seta hud_panel_quickmenu_size "0.190000 0.190000"
 seta hud_panel_quickmenu_bg ""
index 3138471bb798a603f2345e00d80046267efa3b00..fc8d05ffbe5421ba67d493f989baa20fc64bd3cd 100644 (file)
@@ -12,10 +12,10 @@ seta hud_panel_fg_alpha "1"
 
 seta hud_dock "dock"
 seta hud_dock_color "0 0.1875 0.40625"
-seta hud_dock_color_team "0.700000"
+seta hud_dock_color_team "0.7"
 seta hud_dock_alpha "1"
 
-seta hud_progressbar_alpha "0.500000"
+seta hud_progressbar_alpha "0.5"
 seta hud_progressbar_strength_color "0 0 0.6"
 seta hud_progressbar_superweapons_color "0.6 0.3 0"
 seta hud_progressbar_shield_color "0.6 0 0.6"
@@ -35,7 +35,6 @@ seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
 seta hud_configure_grid_ysize "0.010000"
 
-seta hud_panel_weapons "1"
 seta hud_panel_weapons_pos "0.920000 0.090000"
 seta hud_panel_weapons_size "0.060000 0.630000"
 seta hud_panel_weapons_bg ""
@@ -68,7 +67,6 @@ seta hud_panel_weapons_onlyowned "1"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 
-seta hud_panel_ammo "1"
 seta hud_panel_ammo_pos "0.190000 0.920000"
 seta hud_panel_ammo_size "0.120000 0.070000"
 seta hud_panel_ammo_bg ""
@@ -86,7 +84,6 @@ seta hud_panel_ammo_progressbar_name "progressbar"
 seta hud_panel_ammo_progressbar_xoffset "0"
 seta hud_panel_ammo_text "1"
 
-seta hud_panel_powerups "1"
 seta hud_panel_powerups_pos "0.660000 0.940000"
 seta hud_panel_powerups_size "0.330000 0.060000"
 seta hud_panel_powerups_bg "0"
@@ -100,7 +97,6 @@ seta hud_panel_powerups_baralign "3"
 seta hud_panel_powerups_progressbar "1"
 seta hud_panel_powerups_text "1"
 
-seta hud_panel_healtharmor "1"
 seta hud_panel_healtharmor_pos "0.330000 0.920000"
 seta hud_panel_healtharmor_size "0.310000 0.070000"
 seta hud_panel_healtharmor_bg ""
@@ -109,6 +105,7 @@ seta hud_panel_healtharmor_bg_color_team ""
 seta hud_panel_healtharmor_bg_alpha ""
 seta hud_panel_healtharmor_bg_border ""
 seta hud_panel_healtharmor_bg_padding ""
+seta hud_panel_healtharmor_combined "0"
 seta hud_panel_healtharmor_flip "0"
 seta hud_panel_healtharmor_iconalign "3"
 seta hud_panel_healtharmor_baralign "3"
@@ -119,7 +116,6 @@ seta hud_panel_healtharmor_progressbar_gfx "1"
 seta hud_panel_healtharmor_progressbar_gfx_smooth "2"
 seta hud_panel_healtharmor_text "1"
 
-seta hud_panel_notify "1"
 seta hud_panel_notify_pos "0.660000 0.730000"
 seta hud_panel_notify_size "0.320000 0.190000"
 seta hud_panel_notify_bg "0"
@@ -134,7 +130,6 @@ seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
 seta hud_panel_notify_icon_aspect "2"
 
-seta hud_panel_timer "1"
 seta hud_panel_timer_pos "0.870000 0"
 seta hud_panel_timer_size "0.130000 0.060000"
 seta hud_panel_timer_bg "0"
@@ -144,7 +139,6 @@ seta hud_panel_timer_bg_alpha ""
 seta hud_panel_timer_bg_border ""
 seta hud_panel_timer_bg_padding "0"
 
-seta hud_panel_radar "2"
 seta hud_panel_radar_pos "0.030000 0.020000"
 seta hud_panel_radar_size "0.170000 0.220000"
 seta hud_panel_radar_bg ""
@@ -153,7 +147,7 @@ seta hud_panel_radar_bg_color_team ""
 seta hud_panel_radar_bg_alpha ""
 seta hud_panel_radar_bg_border ""
 seta hud_panel_radar_bg_padding "-3"
-seta hud_panel_radar_foreground_alpha "0.800000"
+seta hud_panel_radar_foreground_alpha "0.8"
 seta hud_panel_radar_rotation "0"
 seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
@@ -162,7 +156,6 @@ seta hud_panel_radar_maximized_size "0.5 0.5"
 seta hud_panel_radar_maximized_rotation "1"
 seta hud_panel_radar_maximized_zoommode "3"
 
-seta hud_panel_score "1"
 seta hud_panel_score_pos "0.020000 0.920000"
 seta hud_panel_score_size "0.150000 0.070000"
 seta hud_panel_score_bg ""
@@ -173,7 +166,6 @@ seta hud_panel_score_bg_border ""
 seta hud_panel_score_bg_padding ""
 seta hud_panel_score_rankings "1"
 
-seta hud_panel_racetimer "1"
 seta hud_panel_racetimer_pos "0.360000 0.090000"
 seta hud_panel_racetimer_size "0.280000 0.090000"
 seta hud_panel_racetimer_bg "0"
@@ -183,7 +175,6 @@ seta hud_panel_racetimer_bg_alpha ""
 seta hud_panel_racetimer_bg_border ""
 seta hud_panel_racetimer_bg_padding ""
 
-seta hud_panel_vote "1"
 seta hud_panel_vote_pos "0.020000 0.650000"
 seta hud_panel_vote_size "0.230000 0.110000"
 seta hud_panel_vote_bg ""
@@ -192,9 +183,8 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.800000"
+seta hud_panel_vote_alreadyvoted_alpha "0.8"
 
-seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.040000 0.270000"
 seta hud_panel_modicons_size "0.080000 0.200000"
 seta hud_panel_modicons_bg ""
@@ -207,7 +197,6 @@ seta hud_panel_modicons_ca_layout "1"
 seta hud_panel_modicons_dom_layout "1"
 seta hud_panel_modicons_freezetag_layout "1"
 
-seta hud_panel_pressedkeys "1"
 seta hud_panel_pressedkeys_pos "0.410000 0.710000"
 seta hud_panel_pressedkeys_size "0.180000 0.130000"
 seta hud_panel_pressedkeys_bg "0"
@@ -216,10 +205,9 @@ seta hud_panel_pressedkeys_bg_color_team ""
 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_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
-seta hud_panel_chat "1"
 seta hud_panel_chat_pos "0.020000 0.780000"
 seta hud_panel_chat_size "0.630000 0.110000"
 seta hud_panel_chat_bg "0"
@@ -229,7 +217,6 @@ seta hud_panel_chat_bg_alpha ""
 seta hud_panel_chat_bg_border ""
 seta hud_panel_chat_bg_padding ""
 
-seta hud_panel_engineinfo "0"
 seta hud_panel_engineinfo_pos "0.910000 0.970000"
 seta hud_panel_engineinfo_size "0.090000 0.030000"
 seta hud_panel_engineinfo_bg "0"
@@ -241,7 +228,6 @@ seta hud_panel_engineinfo_bg_padding ""
 seta hud_panel_engineinfo_framecounter_time "0.1"
 seta hud_panel_engineinfo_framecounter_decimals "0"
 
-seta hud_panel_infomessages "1"
 seta hud_panel_infomessages_pos "0.510000 0"
 seta hud_panel_infomessages_size "0.340000 0.090000"
 seta hud_panel_infomessages_bg "0"
@@ -252,7 +238,6 @@ seta hud_panel_infomessages_bg_border ""
 seta hud_panel_infomessages_bg_padding "0"
 seta hud_panel_infomessages_flip "1"
 
-seta hud_panel_physics "3"
 seta hud_panel_physics_pos "0.410000 0.590000"
 seta hud_panel_physics_size "0.180000 0.100000"
 seta hud_panel_physics_bg ""
@@ -277,7 +262,6 @@ seta hud_panel_physics_acceleration_progressbar_nonlinear "0"
 seta hud_panel_physics_text "1"
 seta hud_panel_physics_text_scale "0.7"
 
-seta hud_panel_centerprint "1"
 seta hud_panel_centerprint_pos "0.175000 0.220000"
 seta hud_panel_centerprint_size "0.650000 0.220000"
 seta hud_panel_centerprint_bg "0"
@@ -300,7 +284,6 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
-seta hud_panel_minigameboard "1"
 seta hud_panel_minigameboard_pos "0.22 0.15"
 seta hud_panel_minigameboard_size "0.50 0.60"
 seta hud_panel_minigameboard_bg "border_small"
@@ -310,7 +293,6 @@ seta hud_panel_minigameboard_bg_alpha ""
 seta hud_panel_minigameboard_bg_border ""
 seta hud_panel_minigameboard_bg_padding ""
 
-seta hud_panel_minigamestatus "1"
 seta hud_panel_minigamestatus_pos "0.74 0.15"
 seta hud_panel_minigamestatus_size "0.2 0.60"
 seta hud_panel_minigamestatus_bg "border_small"
@@ -320,7 +302,6 @@ seta hud_panel_minigamestatus_bg_alpha ""
 seta hud_panel_minigamestatus_bg_border ""
 seta hud_panel_minigamestatus_bg_padding ""
 
-seta hud_panel_minigamehelp "1"
 seta hud_panel_minigamehelp_pos "0.22 0.78"
 seta hud_panel_minigamehelp_size "0.50 0.20"
 seta hud_panel_minigamehelp_bg ""
@@ -330,7 +311,6 @@ seta hud_panel_minigamehelp_bg_alpha ""
 seta hud_panel_minigamehelp_bg_border ""
 seta hud_panel_minigamehelp_bg_padding ""
 
-seta hud_panel_minigamemenu "0"
 seta hud_panel_minigamemenu_pos "0 0.26"
 seta hud_panel_minigamemenu_size "0.2 0.49"
 seta hud_panel_minigamemenu_bg "border_small"
@@ -340,7 +320,6 @@ seta hud_panel_minigamemenu_bg_alpha ""
 seta hud_panel_minigamemenu_bg_border ""
 seta hud_panel_minigamemenu_bg_padding ""
 
-seta hud_panel_mapvote "1"
 seta hud_panel_mapvote_pos "0 0"
 seta hud_panel_mapvote_size "1 1"
 seta hud_panel_mapvote_bg "0"
@@ -350,7 +329,6 @@ seta hud_panel_mapvote_bg_alpha ""
 seta hud_panel_mapvote_bg_border ""
 seta hud_panel_mapvote_bg_padding ""
 
-seta hud_panel_itemstime "2"
 seta hud_panel_itemstime_pos "0.020000 0.490000"
 seta hud_panel_itemstime_size "0.090000 0.140000"
 seta hud_panel_itemstime_bg "0"
@@ -364,10 +342,9 @@ seta hud_panel_itemstime_progressbar "1"
 seta hud_panel_itemstime_progressbar_name "progressbar"
 seta hud_panel_itemstime_progressbar_reduced "1"
 seta hud_panel_itemstime_text "1"
-seta hud_panel_itemstime_ratio "3.500000"
+seta hud_panel_itemstime_ratio "3.5"
 seta hud_panel_itemstime_dynamicsize "1"
 
-seta hud_panel_quickmenu "1"
 seta hud_panel_quickmenu_pos "0.700000 0.460000"
 seta hud_panel_quickmenu_size "0.210000 0.250000"
 seta hud_panel_quickmenu_bg ""
index 791653f270a920c139feeb8d5a8170269c449a76..bc1dc9bddae01228cce082efbe7a24c9b369740c 100644 (file)
@@ -5,15 +5,15 @@ seta hud_skin "old"
 seta hud_panel_bg "border_default"
 seta hud_panel_bg_color "0.299327 1 0.81275"
 seta hud_panel_bg_color_team "0"
-seta hud_panel_bg_alpha "0.700000"
+seta hud_panel_bg_alpha "0.7"
 seta hud_panel_bg_border "8"
 seta hud_panel_bg_padding "0"
 seta hud_panel_fg_alpha "1"
 
 seta hud_dock "dock"
 seta hud_dock_color "0 0.697965 0.418232"
-seta hud_dock_color_team "0.700000"
-seta hud_dock_alpha "0.700000"
+seta hud_dock_color_team "0.7"
+seta hud_dock_alpha "0.7"
 
 seta hud_progressbar_alpha "0.5"
 seta hud_progressbar_strength_color "0 0 0.6"
@@ -35,7 +35,6 @@ seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
 seta hud_configure_grid_ysize "0.010000"
 
-seta hud_panel_weapons "1"
 seta hud_panel_weapons_pos "0.375000 0.870000"
 seta hud_panel_weapons_size "0.300000 0.060000"
 seta hud_panel_weapons_bg "0"
@@ -68,7 +67,6 @@ seta hud_panel_weapons_onlyowned "0"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 
-seta hud_panel_ammo "1"
 seta hud_panel_ammo_pos "0.160000 0.910000"
 seta hud_panel_ammo_size "0.190000 0.090000"
 seta hud_panel_ammo_bg "0"
@@ -86,7 +84,6 @@ seta hud_panel_ammo_progressbar_name "progressbar"
 seta hud_panel_ammo_progressbar_xoffset "0"
 seta hud_panel_ammo_text "1"
 
-seta hud_panel_powerups "1"
 seta hud_panel_powerups_pos "0.660000 0.910000"
 seta hud_panel_powerups_size "0.130000 0.090000"
 seta hud_panel_powerups_bg "0"
@@ -100,7 +97,6 @@ seta hud_panel_powerups_baralign "0"
 seta hud_panel_powerups_progressbar "0"
 seta hud_panel_powerups_text "1"
 
-seta hud_panel_healtharmor "1"
 seta hud_panel_healtharmor_pos "0.370000 0.930000"
 seta hud_panel_healtharmor_size "0.300000 0.070000"
 seta hud_panel_healtharmor_bg "0"
@@ -109,6 +105,7 @@ seta hud_panel_healtharmor_bg_color_team ""
 seta hud_panel_healtharmor_bg_alpha ""
 seta hud_panel_healtharmor_bg_border ""
 seta hud_panel_healtharmor_bg_padding ""
+seta hud_panel_healtharmor_combined "0"
 seta hud_panel_healtharmor_flip "0"
 seta hud_panel_healtharmor_iconalign "0"
 seta hud_panel_healtharmor_baralign "0"
@@ -119,7 +116,6 @@ seta hud_panel_healtharmor_progressbar_gfx "1"
 seta hud_panel_healtharmor_progressbar_gfx_smooth "2"
 seta hud_panel_healtharmor_text "1"
 
-seta hud_panel_notify "0"
 seta hud_panel_notify_pos "0.010000 0.650000"
 seta hud_panel_notify_size "0.300000 0.070000"
 seta hud_panel_notify_bg "0"
@@ -134,7 +130,6 @@ seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
 seta hud_panel_notify_icon_aspect "2"
 
-seta hud_panel_timer "1"
 seta hud_panel_timer_pos "0.850000 0"
 seta hud_panel_timer_size "0.150000 0.060000"
 seta hud_panel_timer_bg ""
@@ -144,13 +139,12 @@ seta hud_panel_timer_bg_alpha ""
 seta hud_panel_timer_bg_border ""
 seta hud_panel_timer_bg_padding "0"
 
-seta hud_panel_radar "2"
 seta hud_panel_radar_pos "0 0"
 seta hud_panel_radar_size "0.200000 0.260000"
 seta hud_panel_radar_bg "border_radar"
 seta hud_panel_radar_bg_color ""
 seta hud_panel_radar_bg_color_team ""
-seta hud_panel_radar_bg_alpha "0.500000"
+seta hud_panel_radar_bg_alpha "0.5"
 seta hud_panel_radar_bg_border "0"
 seta hud_panel_radar_bg_padding "0"
 seta hud_panel_radar_foreground_alpha "1"
@@ -162,7 +156,6 @@ seta hud_panel_radar_maximized_size "0.5 0.5"
 seta hud_panel_radar_maximized_rotation "1"
 seta hud_panel_radar_maximized_zoommode "3"
 
-seta hud_panel_score "1"
 seta hud_panel_score_pos "0.760000 0.910000"
 seta hud_panel_score_size "0.200000 0.080000"
 seta hud_panel_score_bg "0"
@@ -173,7 +166,6 @@ seta hud_panel_score_bg_border ""
 seta hud_panel_score_bg_padding ""
 seta hud_panel_score_rankings "0"
 
-seta hud_panel_racetimer "1"
 seta hud_panel_racetimer_pos "0.360000 0.140000"
 seta hud_panel_racetimer_size "0.280000 0.090000"
 seta hud_panel_racetimer_bg "0"
@@ -183,7 +175,6 @@ seta hud_panel_racetimer_bg_alpha ""
 seta hud_panel_racetimer_bg_border ""
 seta hud_panel_racetimer_bg_padding ""
 
-seta hud_panel_vote "1"
 seta hud_panel_vote_pos "0.690000 0.750000"
 seta hud_panel_vote_size "0.300000 0.100000"
 seta hud_panel_vote_bg ""
@@ -192,9 +183,8 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding "-3"
-seta hud_panel_vote_alreadyvoted_alpha "0.750000"
+seta hud_panel_vote_alreadyvoted_alpha "0.75"
 
-seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.010000 0.910000"
 seta hud_panel_modicons_size "0.135000 0.090000"
 seta hud_panel_modicons_bg "0"
@@ -207,7 +197,6 @@ seta hud_panel_modicons_ca_layout "1"
 seta hud_panel_modicons_dom_layout "1"
 seta hud_panel_modicons_freezetag_layout "1"
 
-seta hud_panel_pressedkeys "1"
 seta hud_panel_pressedkeys_pos "0.440000 0.760000"
 seta hud_panel_pressedkeys_size "0.120000 0.094368"
 seta hud_panel_pressedkeys_bg "0"
@@ -216,10 +205,9 @@ seta hud_panel_pressedkeys_bg_color_team ""
 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_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
-seta hud_panel_chat "1"
 seta hud_panel_chat_pos "0 0.760000"
 seta hud_panel_chat_size "0.420000 0.130000"
 seta hud_panel_chat_bg "0"
@@ -229,7 +217,6 @@ seta hud_panel_chat_bg_alpha ""
 seta hud_panel_chat_bg_border ""
 seta hud_panel_chat_bg_padding ""
 
-seta hud_panel_engineinfo "0"
 seta hud_panel_engineinfo_pos "0.887500 0.870000"
 seta hud_panel_engineinfo_size "0.112500 0.030000"
 seta hud_panel_engineinfo_bg "0"
@@ -241,7 +228,6 @@ seta hud_panel_engineinfo_bg_padding ""
 seta hud_panel_engineinfo_framecounter_time "0.1"
 seta hud_panel_engineinfo_framecounter_decimals "0"
 
-seta hud_panel_infomessages "1"
 seta hud_panel_infomessages_pos "0.690000 0.620000"
 seta hud_panel_infomessages_size "0.300000 0.100000"
 seta hud_panel_infomessages_bg "0"
@@ -252,7 +238,6 @@ seta hud_panel_infomessages_bg_border ""
 seta hud_panel_infomessages_bg_padding ""
 seta hud_panel_infomessages_flip "1"
 
-seta hud_panel_physics "3"
 seta hud_panel_physics_pos "0.430000 0.640000"
 seta hud_panel_physics_size "0.140000 0.100000"
 seta hud_panel_physics_bg "0"
@@ -277,7 +262,6 @@ seta hud_panel_physics_acceleration_progressbar_nonlinear "0"
 seta hud_panel_physics_text "2"
 seta hud_panel_physics_text_scale "1"
 
-seta hud_panel_centerprint "1"
 seta hud_panel_centerprint_pos "0.175000 0.260000"
 seta hud_panel_centerprint_size "0.650000 0.200000"
 seta hud_panel_centerprint_bg "0"
@@ -300,7 +284,6 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
-seta hud_panel_minigameboard "1"
 seta hud_panel_minigameboard_pos "0.22 0.15"
 seta hud_panel_minigameboard_size "0.50 0.60"
 seta hud_panel_minigameboard_bg "border_small"
@@ -310,7 +293,6 @@ seta hud_panel_minigameboard_bg_alpha ""
 seta hud_panel_minigameboard_bg_border ""
 seta hud_panel_minigameboard_bg_padding ""
 
-seta hud_panel_minigamestatus "1"
 seta hud_panel_minigamestatus_pos "0.74 0.15"
 seta hud_panel_minigamestatus_size "0.2 0.60"
 seta hud_panel_minigamestatus_bg "border_small"
@@ -320,7 +302,6 @@ seta hud_panel_minigamestatus_bg_alpha ""
 seta hud_panel_minigamestatus_bg_border ""
 seta hud_panel_minigamestatus_bg_padding ""
 
-seta hud_panel_minigamehelp "1"
 seta hud_panel_minigamehelp_pos "0.22 0.78"
 seta hud_panel_minigamehelp_size "0.50 0.20"
 seta hud_panel_minigamehelp_bg ""
@@ -330,7 +311,6 @@ seta hud_panel_minigamehelp_bg_alpha ""
 seta hud_panel_minigamehelp_bg_border ""
 seta hud_panel_minigamehelp_bg_padding ""
 
-seta hud_panel_minigamemenu "0"
 seta hud_panel_minigamemenu_pos "0 0.26"
 seta hud_panel_minigamemenu_size "0.2 0.49"
 seta hud_panel_minigamemenu_bg "border_small"
@@ -340,7 +320,6 @@ seta hud_panel_minigamemenu_bg_alpha ""
 seta hud_panel_minigamemenu_bg_border ""
 seta hud_panel_minigamemenu_bg_padding ""
 
-seta hud_panel_mapvote "1"
 seta hud_panel_mapvote_pos "0 0"
 seta hud_panel_mapvote_size "1 1"
 seta hud_panel_mapvote_bg "0"
@@ -350,7 +329,6 @@ seta hud_panel_mapvote_bg_alpha ""
 seta hud_panel_mapvote_bg_border ""
 seta hud_panel_mapvote_bg_padding ""
 
-seta hud_panel_itemstime "2"
 seta hud_panel_itemstime_pos "0.000000 0.290000"
 seta hud_panel_itemstime_size "0.150000 0.060000"
 seta hud_panel_itemstime_bg "0"
@@ -367,7 +345,6 @@ seta hud_panel_itemstime_text "1"
 seta hud_panel_itemstime_ratio "2"
 seta hud_panel_itemstime_dynamicsize "1"
 
-seta hud_panel_quickmenu "1"
 seta hud_panel_quickmenu_pos "0.010000 0.380000"
 seta hud_panel_quickmenu_size "0.210000 0.250000"
 seta hud_panel_quickmenu_bg ""
index 77048eef75e08a246176019d9df17c9239ce93ba..a9936b99e0e9fe17bf1c5bfecb06da31d5631233 100644 (file)
Binary files a/models/relics/sign_luck.tga and b/models/relics/sign_luck.tga differ
index d046ce1ad72f2923c9b0d558653ec98e9b9e06cb..d023c14c0b09524b5924bf5f42840ae11a469947 100644 (file)
Binary files a/models/relics/sign_luck_glow.tga and b/models/relics/sign_luck_glow.tga differ
index 7e60304ccdda5588029cb08df125085b3e7d3ffc..0f49665424d3d5a0f8af9bdaa483bb088baa1525 100644 (file)
@@ -34,6 +34,8 @@ set g_instagib_speed_highspeed 1.5 "speed-multiplier that applies while you carr
 set g_instagib_damagedbycontents 1 "allow damage from lava pits in instagib"
 set g_instagib_blaster_keepdamage 0 "allow secondary fire to hurt players"
 set g_instagib_blaster_keepforce 0 "allow secondary fire to push players"
+set g_instagib_mirrordamage 0 "allow damage mirror instagib"
+set g_instagib_friendlypush 1 "allow pushing teammates with the vaporizer primary attack"
 
 
 // ==========
@@ -179,6 +181,7 @@ set g_random_gravity_negative 1000 "negative gravity multiplier"
 //  Nades
 // =======
 set g_nades 0 "enable off-hand grenades"
+set g_nades_spread 0.04 "random spread offset of throw direction"
 set g_nades_throw_offset "0 0 0" "nade throwing offset"
 set g_nades_spawn 1 "give nades right away when player spawns rather than delaying entire refire"
 set g_nades_client_select 0 "allow client side selection of nade type"
index acb697787b490c768a5d9e5128d6a00433dbb401..186be97400aaa76e6253d2786d525c31c234f28d 100644 (file)
@@ -1,13 +1,13 @@
 // generated file; do not modify
-#include "announcer.qc"
-#include "bgmscript.qc"
-#include "csqcmodel_hooks.qc"
-#include "main.qc"
-#include "mapvoting.qc"
-#include "miscfunctions.qc"
-#include "player_skeleton.qc"
-#include "scoreboard.qc"
-#include "shownames.qc"
-#include "teamradar.qc"
-#include "view.qc"
-#include "wall.qc"
+#include <client/announcer.qc>
+#include <client/bgmscript.qc>
+#include <client/csqcmodel_hooks.qc>
+#include <client/main.qc>
+#include <client/mapvoting.qc>
+#include <client/miscfunctions.qc>
+#include <client/player_skeleton.qc>
+#include <client/scoreboard.qc>
+#include <client/shownames.qc>
+#include <client/teamradar.qc>
+#include <client/view.qc>
+#include <client/wall.qc>
diff --git a/qcsrc/client/_mod.qh b/qcsrc/client/_mod.qh
new file mode 100644 (file)
index 0000000..1c66ff7
--- /dev/null
@@ -0,0 +1,13 @@
+// generated file; do not modify
+#include <client/announcer.qh>
+#include <client/bgmscript.qh>
+#include <client/csqcmodel_hooks.qh>
+#include <client/main.qh>
+#include <client/mapvoting.qh>
+#include <client/miscfunctions.qh>
+#include <client/player_skeleton.qh>
+#include <client/scoreboard.qh>
+#include <client/shownames.qh>
+#include <client/teamradar.qh>
+#include <client/view.qh>
+#include <client/wall.qh>
index 3320b16620927c9840efeb86021f73ec1392484d..d797cee330f4c6dbb358aab71d6c9dbf79f0114e 100644 (file)
@@ -230,6 +230,7 @@ float autocvar_hud_panel_engineinfo_framecounter_time;
 float autocvar_hud_panel_fg_alpha;
 bool autocvar_hud_panel_healtharmor;
 int autocvar_hud_panel_healtharmor_baralign;
+bool autocvar_hud_panel_healtharmor_combined;
 bool autocvar_hud_panel_healtharmor_flip;
 int autocvar_hud_panel_healtharmor_iconalign;
 int autocvar_hud_panel_healtharmor_maxarmor;
@@ -453,3 +454,4 @@ float autocvar_crosshair_rpc_alpha = 1;
 float autocvar_crosshair_rpc_size = 1;
 int autocvar_cl_nade_timer;
 bool autocvar_cl_items_nofade;
+float autocvar_slowmo;
index d9220c61da1367d025f93d7e0c6f202584d3e509..235f1297fda6e5c7fdc3d6b43c3cab94e0af6109 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "all.qc"
-#include "cl_cmd.qc"
+#include <client/commands/all.qc>
+#include <client/commands/cl_cmd.qc>
diff --git a/qcsrc/client/commands/_mod.qh b/qcsrc/client/commands/_mod.qh
new file mode 100644 (file)
index 0000000..03df563
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <client/commands/all.qh>
+#include <client/commands/cl_cmd.qh>
index 6dadff2f3cb8e610b2fd81bfbd78f77807557614..45444c8791ef50f20157d428e8341e0e146936a5 100644 (file)
@@ -252,7 +252,7 @@ void QuickMenu_Close();
 bool QuickMenu_Open(string mode, string submenu);
 
 bool HUD_MinigameMenu_IsOpened();
-void HUD_MinigameMenu_Close();
+void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger);
 void HUD_MinigameMenu_Open();
 
 void HUD_Radar_Show_Maximized(bool doshow, bool clickable);
index 73066c3d42e0c2c9b2f405f078d4e5bcdf66e0c6..b90f61b8cc443286de41af3507cfbf146f8c988c 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "hud.qc"
-#include "hud_config.qc"
+#include <client/hud/hud.qc>
+#include <client/hud/hud_config.qc>
diff --git a/qcsrc/client/hud/_mod.qh b/qcsrc/client/hud/_mod.qh
new file mode 100644 (file)
index 0000000..ee9ac8f
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <client/hud/hud.qh>
+#include <client/hud/hud_config.qh>
index 07166105e5f6f043d99d65ccb57e95da60275e35..e7d74cf3e585690912667cd49df5c825456dc497 100644 (file)
@@ -60,7 +60,6 @@ void HUD_Panel_ExportCfg(string cfgname)
                {
                        panel = hud_panels_from(i);
 
-                       HUD_Write_PanelCvar("");
                        HUD_Write_PanelCvar("_pos");
                        HUD_Write_PanelCvar("_size");
                        HUD_Write_PanelCvar("_bg");
@@ -120,6 +119,7 @@ void HUD_Panel_ExportCfg(string cfgname)
                                        HUD_Write_PanelCvar("_progressbar_armor");
                                        HUD_Write_PanelCvar("_progressbar_gfx");
                                        HUD_Write_PanelCvar("_progressbar_gfx_smooth");
+                                       HUD_Write_PanelCvar("_combined");
                                        HUD_Write_PanelCvar("_text");
                                        break;
                                case HUD_PANEL_NOTIFY:
index 2995164b919ebcf778d3e2516afe18510effb545..5681474b84e75ea22e1894ddfd1aced1948f03b0 100644 (file)
@@ -1,20 +1,20 @@
 // generated file; do not modify
-#include "ammo.qc"
-#include "centerprint.qc"
-#include "chat.qc"
-#include "engineinfo.qc"
-#include "healtharmor.qc"
-#include "infomessages.qc"
-#include "minigame.qc"
-#include "modicons.qc"
-#include "notify.qc"
-#include "physics.qc"
-#include "powerups.qc"
-#include "pressedkeys.qc"
-#include "quickmenu.qc"
-#include "racetimer.qc"
-#include "radar.qc"
-#include "score.qc"
-#include "timer.qc"
-#include "vote.qc"
-#include "weapons.qc"
+#include <client/hud/panel/ammo.qc>
+#include <client/hud/panel/centerprint.qc>
+#include <client/hud/panel/chat.qc>
+#include <client/hud/panel/engineinfo.qc>
+#include <client/hud/panel/healtharmor.qc>
+#include <client/hud/panel/infomessages.qc>
+#include <client/hud/panel/minigame.qc>
+#include <client/hud/panel/modicons.qc>
+#include <client/hud/panel/notify.qc>
+#include <client/hud/panel/physics.qc>
+#include <client/hud/panel/powerups.qc>
+#include <client/hud/panel/pressedkeys.qc>
+#include <client/hud/panel/quickmenu.qc>
+#include <client/hud/panel/racetimer.qc>
+#include <client/hud/panel/radar.qc>
+#include <client/hud/panel/score.qc>
+#include <client/hud/panel/timer.qc>
+#include <client/hud/panel/vote.qc>
+#include <client/hud/panel/weapons.qc>
diff --git a/qcsrc/client/hud/panel/_mod.qh b/qcsrc/client/hud/panel/_mod.qh
new file mode 100644 (file)
index 0000000..930a3fe
--- /dev/null
@@ -0,0 +1,20 @@
+// generated file; do not modify
+#include <client/hud/panel/ammo.qh>
+#include <client/hud/panel/centerprint.qh>
+#include <client/hud/panel/chat.qh>
+#include <client/hud/panel/engineinfo.qh>
+#include <client/hud/panel/healtharmor.qh>
+#include <client/hud/panel/infomessages.qh>
+#include <client/hud/panel/minigame.qh>
+#include <client/hud/panel/modicons.qh>
+#include <client/hud/panel/notify.qh>
+#include <client/hud/panel/physics.qh>
+#include <client/hud/panel/powerups.qh>
+#include <client/hud/panel/pressedkeys.qh>
+#include <client/hud/panel/quickmenu.qh>
+#include <client/hud/panel/racetimer.qh>
+#include <client/hud/panel/radar.qh>
+#include <client/hud/panel/score.qh>
+#include <client/hud/panel/timer.qh>
+#include <client/hud/panel/vote.qh>
+#include <client/hud/panel/weapons.qh>
index 3b03979177da96edf15e5c4a3ee0ed35f04b0ee1..8f279f2aadc2e1e1c46db7d7118af4da94a75c12 100644 (file)
@@ -74,7 +74,7 @@ void HUD_HealthArmor()
 
     int maxhealth = autocvar_hud_panel_healtharmor_maxhealth;
     int maxarmor = autocvar_hud_panel_healtharmor_maxarmor;
-       if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
+       if(autocvar_hud_panel_healtharmor_combined) // combined health and armor display
        {
                vector v;
                v = healtharmor_maxdamage(health, armor, armorblockpercent, DEATH_WEAPON.m_id);
index c465caf4fddc3911ca2e997adaead177a2f6fa40..cfacd59b60f831085e5216c8c86154f2c5d0cefe 100644 (file)
@@ -19,6 +19,19 @@ int weaponorder_cmp(int i, int j, entity pass)
        return aj - ai; // the string is in REVERSE order (higher prio at the right is what we want, but higher prio first is the string)
 }
 
+#define HUD_WEAPONS_GET_FULL_LAYOUT() MACRO_BEGIN { \
+       int nHidden = 0; \
+       FOREACH(Weapons, it != WEP_Null, { \
+               if (weapons_stat & WepSet_FromWeapon(it)) continue; \
+               if (it.spawnflags & WEP_FLAG_MUTATORBLOCKED) nHidden += 1; \
+       }); \
+       vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1) - nHidden, panel_size, aspect); \
+       columns = table_size.x; \
+       rows = table_size.y; \
+       weapon_size.x = panel_size.x / columns; \
+       weapon_size.y = panel_size.y / rows; \
+} MACRO_END
+
 void HUD_Weapons()
 {
        // declarations
@@ -92,17 +105,35 @@ void HUD_Weapons()
        if(autocvar__hud_configure)
        {
                if(!weapons_stat)
-                       for(i = WEP_FIRST; i <= WEP_LAST; i += floor((WEP_LAST-WEP_FIRST)/5))
-                               weapons_stat |= WepSet_FromWeapon(Weapons_from(i));
+               {
+                       int j = 0;
+                       FOREACH(Weapons, it != WEP_Null && it.impulse >= 0 && (it.impulse % 3 != 0) && j < 6, {
+                               if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED))
+                               {
+                                       weapons_stat |= it.m_wepset;
+                                       ++j;
+                               }
+                       });
+               }
 
                #if 0
                /// debug code
                if(cvar("wep_add"))
                {
+                       int j;
+                       int nHidden = 0;
+                       FOREACH(Weapons, it != WEP_Null, {
+                               if (it.spawnflags & WEP_FLAG_MUTATORBLOCKED) nHidden += 1;
+                       });
                        weapons_stat = '0 0 0';
-                       float countw = 1 + floor((floor(time * cvar("wep_add"))) % (Weapons_COUNT - 1));
-                       for(i = WEP_FIRST; i <= countw; ++i)
-                               weapons_stat |= WepSet_FromWeapon(Weapons_from(i));
+                       float countw = 1 + floor((floor(time * cvar("wep_add"))) % ((Weapons_COUNT - 1) - nHidden));
+                       for(i = 0, j = 0; i <= (Weapons_COUNT - 1) && j < countw; ++i)
+                       {
+                               if(weaponorder[i].spawnflags & WEP_FLAG_MUTATORBLOCKED)
+                                       continue;
+                               weapons_stat |= weaponorder[i].m_wepset;
+                               ++j;
+                       }
                }
                #endif
        }
@@ -128,40 +159,29 @@ void HUD_Weapons()
                        return;
 
                vector old_panel_size = panel_size;
-               vector padded_panel_size = panel_size - '2 2 0' * panel_bg_padding;
-
-               // get the all-weapons layout
-               int nHidden = 0;
-               WepSet weapons_stat = WepSet_GetFromStat();
-               FOREACH(Weapons, it != WEP_Null, {
-                       if (weapons_stat & it.m_wepset) continue;
-                       if (it.spawnflags & WEP_FLAG_MUTATORBLOCKED) nHidden += 1;
-               });
-               vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1) - nHidden, padded_panel_size, aspect);
-               columns = table_size.x;
-               rows = table_size.y;
-               weapon_size.x = padded_panel_size.x / columns;
-               weapon_size.y = padded_panel_size.y / rows;
+               panel_size -= '2 2 0' * panel_bg_padding;
+
+               HUD_WEAPONS_GET_FULL_LAYOUT();
 
                // NOTE: although weapons should aways look the same even if onlyowned is enabled,
                // we enlarge them a bit when possible to better match the desired aspect ratio
-               if(padded_panel_size.x / padded_panel_size.y < aspect)
+               if(panel_size.x / panel_size.y < aspect)
                {
                        // maximum number of rows that allows to display items with the desired aspect ratio
-                       int max_rows = floor(padded_panel_size.y / (weapon_size.x / aspect));
+                       int max_rows = floor(panel_size.y / (weapon_size.x / aspect));
                        columns = min(columns, ceil(weapon_count / max_rows));
                        rows = ceil(weapon_count / columns);
-                       weapon_size.y = min(padded_panel_size.y / rows, weapon_size.x / aspect);
-                       weapon_size.x = min(padded_panel_size.x / columns, aspect * weapon_size.y);
+                       weapon_size.y = min(panel_size.y / rows, weapon_size.x / aspect);
+                       weapon_size.x = min(panel_size.x / columns, aspect * weapon_size.y);
                        vertical_order = false;
                }
                else
                {
-                       int max_columns = floor(padded_panel_size.x / (weapon_size.y * aspect));
+                       int max_columns = floor(panel_size.x / (weapon_size.y * aspect));
                        rows = min(rows, ceil(weapon_count / max_columns));
                        columns = ceil(weapon_count / rows);
-                       weapon_size.x = min(padded_panel_size.x / columns, aspect * weapon_size.y);
-                       weapon_size.y = min(padded_panel_size.y / rows, weapon_size.x / aspect);
+                       weapon_size.x = min(panel_size.x / columns, aspect * weapon_size.y);
+                       weapon_size.y = min(panel_size.y / rows, weapon_size.x / aspect);
                        vertical_order = true;
                }
 
@@ -285,7 +305,7 @@ void HUD_Weapons()
        HUD_Panel_DrawBg(1);
 
        if(center.x == -1)
-               return;
+               return; // panel has gone off screen
 
        if(panel_bg_padding)
        {
@@ -297,11 +317,7 @@ void HUD_Weapons()
 
        if(!rows) // if rows is > 0 onlyowned code has already updated these vars
        {
-               vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1), panel_size, aspect);
-               columns = table_size.x;
-               rows = table_size.y;
-               weapon_size.x = panel_size.x / columns;
-               weapon_size.y = panel_size.y / rows;
+               HUD_WEAPONS_GET_FULL_LAYOUT();
                vertical_order = (panel_size.x / panel_size.y >= aspect);
        }
 
@@ -340,15 +356,21 @@ void HUD_Weapons()
                // retrieve information about the current weapon to be drawn
                entity it = weaponorder[i];
                weapon_id = it.impulse;
-               isCurrent = (it == switchweapon);
 
                // skip if this weapon doesn't exist
                if(!it || weapon_id < 0) { continue; }
 
                // skip this weapon if we don't own it (and onlyowned is enabled)-- or if weapons_complainbubble is showing for this weapon
                if(autocvar_hud_panel_weapons_onlyowned)
-               if (!((weapons_stat & WepSet_FromWeapon(it)) || (it.m_id == complain_weapon)))
-                       continue;
+               {
+                       if (!((weapons_stat & WepSet_FromWeapon(it)) || (it.m_id == complain_weapon)))
+                               continue;
+               }
+               else
+               {
+                       if (it.spawnflags & WEP_FLAG_MUTATORBLOCKED && !(weapons_stat & WepSet_FromWeapon(it)))
+                               continue;
+               }
 
                // figure out the drawing position of weapon
                weapon_pos = (panel_pos + eX * column * weapon_size.x + eY * row * weapon_size.y);
@@ -356,6 +378,7 @@ void HUD_Weapons()
                noncurrent_pos.y = weapon_pos.y + (weapon_size.y - noncurrent_size.y) / 2;
 
                // draw background behind currently selected weapon
+               isCurrent = (it == switchweapon);
                if(isCurrent)
                        drawpic_aspect_skin(weapon_pos, "weapon_current_bg", weapon_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
index 98b266c6d18410a39a466a66b77b452ee10a9ef5..7cbe6e125f14c5c7642bf8b3c039f4df2dc7ac70 100644 (file)
@@ -213,7 +213,7 @@ void Shutdown()
        }
 
        deactivate_minigame();
-       HUD_MinigameMenu_Close();
+       HUD_MinigameMenu_Close(NULL, NULL, NULL);
 }
 
 .float has_team;
diff --git a/qcsrc/client/mutators/_mod.qh b/qcsrc/client/mutators/_mod.qh
new file mode 100644 (file)
index 0000000..98fb481
--- /dev/null
@@ -0,0 +1 @@
+// generated file; do not modify
index 8817a2c71bfa14506774e73886ad3a00a93b5e43..a736d32622cb6b8f470f2334e7bea06c504eb1a0 100644 (file)
@@ -1,7 +1,7 @@
 #include <lib/_all.inc>
 #include "_all.qh"
 
-#include "_mod.inc"
+#include "../client/_mod.inc"
 #include "commands/_mod.inc"
 #include "hud/_mod.inc"
 #include "mutators/_mod.inc"
index 7dcf9876983761fb500f562da5fd62c026c1218f..cf43e7c1d585cf565f7dad46e614216e3f9c3137 100644 (file)
@@ -303,16 +303,24 @@ void Cmd_HUD_Help()
                "other gamemodes except DM.\n"));
 }
 
-#define HUD_DefaultColumnLayout() \
-"ping pl name | " \
-"-teams,cts,lms/kills +ft,tdm/kills -teams,lms/deaths +ft,tdm/deaths -teams,lms,rc,ka/suicides +ft,tdm/suicides -cts,dm,tdm,ka,ft/frags " /* tdm already has this in "score" */ \
-"-rc,cts,nb/dmg -rc,cts,nb/dmgtaken " \
-"+ctf/caps +ctf/pickups +ctf/fckills +ctf/returns +ons/caps +ons/takes " \
-"+lms/lives +lms/rank " \
-"+kh/caps +kh/pushes +kh/destroyed " \
-"?+rc/laps ?+rc/time ?+rc/fastest " \
-"+as/objectives +nb/faults +nb/goals +ka/pickups +ka/bckills +ka/bctime +ft/revivals " \
-"-lms,rc,nb/score"
+// NOTE: adding a gametype with ? to not warn for an optional field
+// make sure it's excluded in a previous exclusive rule, if any
+// otherwise the previous exclusive rule warns anyway
+// e.g. -teams,rc,cts,lms/kills ?+rc/kills
+#define SCOREBOARD_DEFAULT_COLUMNS \
+"ping pl name |" \
+" -teams,rc,cts,inv,lms/kills +ft,tdm/kills ?+rc,inv/kills" \
+" -teams,lms/deaths +ft,tdm/deaths" \
+" -teams,lms,rc,cts,inv,ka/suicides +ft,tdm/suicides ?+rc,inv/suicides" \
+" -cts,dm,tdm,ka,ft/frags" /* tdm already has this in "score" */ \
+" -rc,cts,nb/dmg -rc,cts,nb/dmgtaken" \
+" +ctf/caps +ctf/pickups +ctf/fckills +ctf/returns +ons/caps +ons/takes" \
+" +lms/lives +lms/rank" \
+" +kh/caps +kh/pushes +kh/destroyed" \
+" ?+rc/laps ?+rc/time +rc,cts/fastest" \
+" +as/objectives +nb/faults +nb/goals" \
+" +ka/pickups +ka/bckills +ka/bctime +ft/revivals" \
+" -lms,rc,cts,inv,nb/score"
 
 void Cmd_HUD_SetFields(int argc)
 {
@@ -337,12 +345,12 @@ void Cmd_HUD_SetFields(int argc)
                argc = tokenizebyseparator(strcat("0 1 ", autocvar_scoreboard_columns), " ");
 
        if(argc < 3)
-               argc = tokenizebyseparator(strcat("0 1 ", HUD_DefaultColumnLayout()), " ");
+               argc = tokenizebyseparator(strcat("0 1 ", SCOREBOARD_DEFAULT_COLUMNS), " ");
 
        if(argc == 3)
        {
                if(argv(2) == "default")
-                       argc = tokenizebyseparator(strcat("0 1 ", HUD_DefaultColumnLayout()), " ");
+                       argc = tokenizebyseparator(strcat("0 1 ", SCOREBOARD_DEFAULT_COLUMNS), " ");
                else if(argv(2) == "all")
                {
                        string s;
@@ -397,7 +405,6 @@ void Cmd_HUD_SetFields(int argc)
                {
                        case "ping": hud_field[hud_num_fields] = SP_PING; break;
                        case "pl": hud_field[hud_num_fields] = SP_PL; break;
-                       case "pl": hud_field[hud_num_fields] = SP_PL; break;
                        case "kd": case "kdr": case "kdratio": case "k/d": hud_field[hud_num_fields] = SP_KDRATIO; break;
                        case "sum": case "diff": case "k-d": hud_field[hud_num_fields] = SP_SUM; break;
                        case "name": case "nick": hud_field[hud_num_fields] = SP_NAME; have_name = true; break;
index f1b7a9be5ede7c8ccd4ca511bfb8cfc9851059b8..68711ef3b1ec29b0eebd0719b5ff5cd8702f8138 100644 (file)
@@ -309,7 +309,7 @@ void viewmodel_draw(entity this)
                        this.viewmodel_angles = this.angles;
                }
                anim_update(this);
-               if (!this.animstate_override)
+               if (!this.animstate_override && !this.animstate_looping)
                        anim_set(this, this.anim_idle, true, false, false);
        }
        float f = 0; // 0..1; 0: fully active
@@ -1309,6 +1309,7 @@ void HUD_Crosshair()
 
 void HUD_Draw()
 {
+       if(!intermission)
        if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
        {
                drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, MUTATOR_ARGV(0, vector), autocvar_hud_colorflash_alpha * MUTATOR_ARGV(0, float), DRAWFLAG_ADDITIVE);
@@ -1391,6 +1392,10 @@ void CSQC_UpdateView(float w, float h)
        else
                view_quality = 1;
 
+       // this needs to be updated manually now due to the destruction of engine physics stats
+       if(autocvar_slowmo != STAT(MOVEVARS_TIMESCALE))
+               cvar_set("slowmo", ftos(STAT(MOVEVARS_TIMESCALE)));
+
        button_attack2 = PHYS_INPUT_BUTTON_ATCK2(this);
        button_zoom = PHYS_INPUT_BUTTON_ZOOM(this);
 
index 005158a27894742be8a1a1e66c3cc6aecdb86acc..5fb71ce1eed785f07661a7f32cabe35dbaa4fd5c 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "projectile.qc"
+#include <client/weapons/projectile.qc>
diff --git a/qcsrc/client/weapons/_mod.qh b/qcsrc/client/weapons/_mod.qh
new file mode 100644 (file)
index 0000000..f72a914
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <client/weapons/projectile.qh>
index 0503213ce63360b3e563f248fc056cc92fb91ee5..90edfa6185ac02c18f24faa61136a7b2a05abb7d 100644 (file)
@@ -1,13 +1,13 @@
 // generated file; do not modify
-#include "anim.qc"
-#include "animdecide.qc"
-#include "campaign_file.qc"
-#include "campaign_setup.qc"
-#include "ent_cs.qc"
-#include "mapinfo.qc"
-#include "net_notice.qc"
-#include "playerstats.qc"
-#include "state.qc"
-#include "t_items.qc"
-#include "util.qc"
-#include "viewloc.qc"
+#include <common/anim.qc>
+#include <common/animdecide.qc>
+#include <common/campaign_file.qc>
+#include <common/campaign_setup.qc>
+#include <common/ent_cs.qc>
+#include <common/mapinfo.qc>
+#include <common/net_notice.qc>
+#include <common/playerstats.qc>
+#include <common/state.qc>
+#include <common/t_items.qc>
+#include <common/util.qc>
+#include <common/viewloc.qc>
diff --git a/qcsrc/common/_mod.qh b/qcsrc/common/_mod.qh
new file mode 100644 (file)
index 0000000..e32b270
--- /dev/null
@@ -0,0 +1,13 @@
+// generated file; do not modify
+#include <common/anim.qh>
+#include <common/animdecide.qh>
+#include <common/campaign_file.qh>
+#include <common/campaign_setup.qh>
+#include <common/ent_cs.qh>
+#include <common/mapinfo.qh>
+#include <common/net_notice.qh>
+#include <common/playerstats.qh>
+#include <common/state.qh>
+#include <common/t_items.qh>
+#include <common/util.qh>
+#include <common/viewloc.qh>
index 57ff3f778638957688179b275789b9aa0b89f9c3..d2d24f03d901cb0775702698267551e80eabb7d9 100644 (file)
@@ -1,5 +1,5 @@
 // generated file; do not modify
-#include "all.qc"
-#include "generic.qc"
-#include "markup.qc"
-#include "rpn.qc"
+#include <common/command/all.qc>
+#include <common/command/generic.qc>
+#include <common/command/markup.qc>
+#include <common/command/rpn.qc>
diff --git a/qcsrc/common/command/_mod.qh b/qcsrc/common/command/_mod.qh
new file mode 100644 (file)
index 0000000..440bdcb
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include <common/command/all.qh>
+#include <common/command/generic.qh>
+#include <common/command/markup.qh>
+#include <common/command/rpn.qh>
index 254d13d7e204d0d694503f89d5e0b1e4b6cdd133..71f1dcb0f23cfb6b80a2a159a48363f92cee71d3 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "all.qc"
+#include <common/deathtypes/all.qc>
diff --git a/qcsrc/common/deathtypes/_mod.qh b/qcsrc/common/deathtypes/_mod.qh
new file mode 100644 (file)
index 0000000..cca282a
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/deathtypes/all.qh>
index 25e906275246999b0449099752225833433b9961..6975259c17783f683e86e5717d0198e1e0106f51 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "all.qc"
-#include "effectinfo.qc"
+#include <common/effects/all.qc>
+#include <common/effects/effectinfo.qc>
diff --git a/qcsrc/common/effects/_mod.qh b/qcsrc/common/effects/_mod.qh
new file mode 100644 (file)
index 0000000..3f5ed82
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <common/effects/all.qh>
+#include <common/effects/effectinfo.qh>
index fc5a14fa02c742af8efdf8bd0247fd03d8f59b23..befcce83d8d95ee23300856661ba1fab3ffe46e8 100644 (file)
@@ -1,8 +1,8 @@
 // generated file; do not modify
-#include "all.qc"
-#include "casings.qc"
-#include "damageeffects.qc"
-#include "gibs.qc"
-#include "globalsound.qc"
-#include "lightningarc.qc"
-#include "modeleffects.qc"
+#include <common/effects/qc/all.qc>
+#include <common/effects/qc/casings.qc>
+#include <common/effects/qc/damageeffects.qc>
+#include <common/effects/qc/gibs.qc>
+#include <common/effects/qc/globalsound.qc>
+#include <common/effects/qc/lightningarc.qc>
+#include <common/effects/qc/modeleffects.qc>
diff --git a/qcsrc/common/effects/qc/_mod.qh b/qcsrc/common/effects/qc/_mod.qh
new file mode 100644 (file)
index 0000000..91298f3
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include <common/effects/qc/all.qh>
+#include <common/effects/qc/casings.qh>
+#include <common/effects/qc/damageeffects.qh>
+#include <common/effects/qc/gibs.qh>
+#include <common/effects/qc/globalsound.qh>
+#include <common/effects/qc/lightningarc.qh>
+#include <common/effects/qc/modeleffects.qh>
index 254d13d7e204d0d694503f89d5e0b1e4b6cdd133..0b779498b186ad5a57ba3373155f79baa6969a22 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "all.qc"
+#include <common/gamemodes/all.qc>
diff --git a/qcsrc/common/gamemodes/_mod.qh b/qcsrc/common/gamemodes/_mod.qh
new file mode 100644 (file)
index 0000000..a7b7a54
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/gamemodes/all.qh>
diff --git a/qcsrc/common/gamemodes/gamemode/_mod.qh b/qcsrc/common/gamemodes/gamemode/_mod.qh
new file mode 100644 (file)
index 0000000..98fb481
--- /dev/null
@@ -0,0 +1 @@
+// generated file; do not modify
index 3e72142ab445f1901155ea96c0f1885d629a7638..f48ef74501f430260f2292642dc6a8e44f6483ad 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "nexball.qc"
-#include "weapon.qc"
+#include <common/gamemodes/gamemode/nexball/nexball.qc>
+#include <common/gamemodes/gamemode/nexball/weapon.qc>
diff --git a/qcsrc/common/gamemodes/gamemode/nexball/_mod.qh b/qcsrc/common/gamemodes/gamemode/nexball/_mod.qh
new file mode 100644 (file)
index 0000000..4ac2347
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <common/gamemodes/gamemode/nexball/nexball.qh>
+#include <common/gamemodes/gamemode/nexball/weapon.qh>
index 1d500c1a6d601b067e37ee5fadb0666b2ff21816..d95df1f5eb4941922cb36f8a9316a28142c41e98 100644 (file)
@@ -7,6 +7,7 @@
 int autocvar_g_nexball_goalleadlimit;
 #define autocvar_g_nexball_goallimit cvar("g_nexball_goallimit")
 
+bool autocvar_g_nexball_basketball_jumppad = true;
 float autocvar_g_nexball_basketball_bouncefactor;
 float autocvar_g_nexball_basketball_bouncestop;
 float autocvar_g_nexball_basketball_carrier_highspeed;
@@ -16,6 +17,7 @@ float autocvar_g_nexball_basketball_meter_minpower;
 float autocvar_g_nexball_delay_collect;
 float autocvar_g_nexball_delay_goal;
 float autocvar_g_nexball_delay_start;
+bool autocvar_g_nexball_football_jumppad = true;
 float autocvar_g_nexball_football_bouncefactor;
 float autocvar_g_nexball_football_bouncestop;
 bool autocvar_g_nexball_radar_showallplayers;
@@ -579,6 +581,7 @@ spawnfunc(nexball_basketball)
        if(!self.effects)
                self.effects = autocvar_g_nexball_basketball_effects_default;
        self.solid = SOLID_TRIGGER;
+       self.pushable = autocvar_g_nexball_basketball_jumppad;
        balls |= BALL_BASKET;
        self.bouncefactor = autocvar_g_nexball_basketball_bouncefactor;
        self.bouncestop = autocvar_g_nexball_basketball_bouncestop;
@@ -591,6 +594,7 @@ spawnfunc(nexball_football)
        self.classname = "nexball_football";
        self.solid = SOLID_TRIGGER;
        balls |= BALL_FOOT;
+       self.pushable = autocvar_g_nexball_football_jumppad;
        self.bouncefactor = autocvar_g_nexball_football_bouncefactor;
        self.bouncestop = autocvar_g_nexball_football_bouncestop;
        SpawnBall();
@@ -1095,7 +1099,7 @@ REGISTER_MUTATOR(nb, g_nexball)
                WEP_NEXBALL.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
 
                ActivateTeamplay();
-               SetLimits(autocvar_g_nexball_goallimit, autocvar_g_nexball_goalleadlimit, -1, -1);
+               SetLimits(autocvar_g_nexball_goallimit, autocvar_g_nexball_goalleadlimit, autocvar_timelimit_override, -1);
                have_team_spawns = -1; // request team spawns
        }
 
index d1aac78ed146e301f9ea6f4490d90de6274fd324..334eb561ee14fd816cfcd9113f7d9b5c1a9206af 100644 (file)
@@ -1,6 +1,6 @@
 // generated file; do not modify
-#include "cl_controlpoint.qc"
-#include "cl_generator.qc"
-#include "onslaught.qc"
-#include "sv_controlpoint.qc"
-#include "sv_generator.qc"
+#include <common/gamemodes/gamemode/onslaught/cl_controlpoint.qc>
+#include <common/gamemodes/gamemode/onslaught/cl_generator.qc>
+#include <common/gamemodes/gamemode/onslaught/onslaught.qc>
+#include <common/gamemodes/gamemode/onslaught/sv_controlpoint.qc>
+#include <common/gamemodes/gamemode/onslaught/sv_generator.qc>
diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/_mod.qh b/qcsrc/common/gamemodes/gamemode/onslaught/_mod.qh
new file mode 100644 (file)
index 0000000..e895495
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include <common/gamemodes/gamemode/onslaught/cl_controlpoint.qh>
+#include <common/gamemodes/gamemode/onslaught/cl_generator.qh>
+#include <common/gamemodes/gamemode/onslaught/onslaught.qh>
+#include <common/gamemodes/gamemode/onslaught/sv_controlpoint.qh>
+#include <common/gamemodes/gamemode/onslaught/sv_generator.qh>
index 5271beba1fe51290edeb9fc4a0deba0373f7b9a2..bb302998f2e9c6c8daeb19e08562987126a11153 100644 (file)
@@ -13,7 +13,7 @@ REGISTER_MUTATOR(ons, false)
                ons_Initialize();
 
                ActivateTeamplay();
-               SetLimits(autocvar_g_onslaught_point_limit, -1, -1, -1);
+               SetLimits(autocvar_g_onslaught_point_limit, autocvar_leadlimit_override, autocvar_timelimit_override, -1);
                have_team_spawns = -1; // request team spawns
        }
 
@@ -546,10 +546,7 @@ void ons_ControlPoint_Icon_Damage(entity this, entity inflictor, entity attacker
                onslaught_updatelinks();
 
                // Use targets now (somebody make sure this is in the right place..)
-               setself(this.owner);
-               activator = this;
-               WITHSELF(this, SUB_UseTargets());
-               setself(this);
+               SUB_UseTargets(this.owner, this, NULL);
 
                this.owner.waslinked = this.owner.islinked;
                if(this.owner.model != "models/onslaught/controlpoint_pad.md3")
@@ -611,10 +608,7 @@ void ons_ControlPoint_Icon_Think()
                if(!self.owner.islinked)
                        self.owner.team = 0;
 
-               setself(self.owner);
-               activator = self;
-               SUB_UseTargets ();
-               setself(this);
+               SUB_UseTargets(self.owner, self, NULL);
 
                self.owner.team = t;
 
@@ -676,10 +670,7 @@ void ons_ControlPoint_Icon_BuildThink()
                onslaught_updatelinks();
 
                // Use targets now (somebody make sure this is in the right place..)
-               setself(self.owner);
-               activator = self;
-               SUB_UseTargets ();
-               setself(this);
+               SUB_UseTargets(self.owner, self, NULL);
 
                self.SendFlags |= CPSF_SETUP;
        }
@@ -849,8 +840,7 @@ void ons_ControlPoint_Reset(entity this)
 
        onslaught_updatelinks();
 
-       activator = this;
-       SUB_UseTargets(); // to reset the structures, playerspawns etc.
+       SUB_UseTargets(this, this, NULL); // to reset the structures, playerspawns etc.
 
        CSQCMODEL_AUTOUPDATE(this);
 }
@@ -1953,23 +1943,22 @@ MUTATOR_HOOKFUNCTION(ons, MonsterMove)
 
 void ons_MonsterSpawn_Delayed(entity this)
 {
-       entity e, own = self.owner;
+       entity own = self.owner;
 
-       if(!own) { remove(self); return; }
+       if(!own) { remove(this); return; }
 
        if(own.targetname)
        {
-               e = find(world, target, own.targetname);
+               entity e = find(world, target, own.targetname);
                if(e != world)
                {
                        own.team = e.team;
 
-                       activator = e;
-                       own.use();
+                       own.use(own, e, NULL);
                }
        }
 
-       remove(self);
+       remove(this);
 }
 
 MUTATOR_HOOKFUNCTION(ons, MonsterSpawn)
@@ -1983,20 +1972,19 @@ MUTATOR_HOOKFUNCTION(ons, MonsterSpawn)
 
 void ons_TurretSpawn_Delayed(entity this)
 {
-       entity e, own = self.owner;
+       entity own = self.owner;
 
        if(!own) { remove(self); return; }
 
        if(own.targetname)
        {
-               e = find(world, target, own.targetname);
+               entity e = find(world, target, own.targetname);
                if(e != world)
                {
                        own.team = e.team;
                        own.active = ACTIVE_NOT;
 
-                       activator = e;
-                       own.use();
+                       own.use(own, e, NULL);
                }
        }
 
index 254d13d7e204d0d694503f89d5e0b1e4b6cdd133..330c0374e869f33af0a49dfc6b81fc7923266ace 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "all.qc"
+#include <common/impulses/all.qc>
diff --git a/qcsrc/common/impulses/_mod.qh b/qcsrc/common/impulses/_mod.qh
new file mode 100644 (file)
index 0000000..9f8a7b3
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/impulses/all.qh>
index 254d13d7e204d0d694503f89d5e0b1e4b6cdd133..3b5dd9550f26286b0ad64b35916fce48dbb1fdc4 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "all.qc"
+#include <common/items/all.qc>
diff --git a/qcsrc/common/items/_mod.qh b/qcsrc/common/items/_mod.qh
new file mode 100644 (file)
index 0000000..158814c
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/items/all.qh>
index 453cead661cd07b491f1edc26c33d9a84d4cef18..2540116430a02457d429a9df6cd3e50ca081865b 100644 (file)
@@ -1,7 +1,7 @@
 // generated file; do not modify
-#include "ammo.qc"
-#include "armor.qc"
-#include "health.qc"
-#include "jetpack.qc"
-#include "pickup.qc"
-#include "powerup.qc"
+#include <common/items/item/ammo.qc>
+#include <common/items/item/armor.qc>
+#include <common/items/item/health.qc>
+#include <common/items/item/jetpack.qc>
+#include <common/items/item/pickup.qc>
+#include <common/items/item/powerup.qc>
diff --git a/qcsrc/common/items/item/_mod.qh b/qcsrc/common/items/item/_mod.qh
new file mode 100644 (file)
index 0000000..4539e0f
--- /dev/null
@@ -0,0 +1,7 @@
+// generated file; do not modify
+#include <common/items/item/ammo.qh>
+#include <common/items/item/armor.qh>
+#include <common/items/item/health.qh>
+#include <common/items/item/jetpack.qh>
+#include <common/items/item/pickup.qh>
+#include <common/items/item/powerup.qh>
index 47690d32b9358f6b45d811f59f687ba6c288c90d..43ad69de595d8cace9a34f16d672eeb15baa0815 100644 (file)
@@ -1,5 +1,9 @@
 // generated file; do not modify
-#include "cl_minigames.qc"
-#include "cl_minigames_hud.qc"
-#include "minigames.qc"
-#include "sv_minigames.qc"
+#include <common/minigames/cl_minigames_hud.qc>
+#include <common/minigames/minigames.qc>
+#ifdef CSQC
+    #include <common/minigames/cl_minigames.qc>
+#endif
+#ifdef SVQC
+    #include <common/minigames/sv_minigames.qc>
+#endif
diff --git a/qcsrc/common/minigames/_mod.qh b/qcsrc/common/minigames/_mod.qh
new file mode 100644 (file)
index 0000000..36f5de2
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <common/minigames/cl_minigames_hud.qh>
+#include <common/minigames/minigames.qh>
index 6f7e7c3ae9466cd83d0c4f45dc765efc8e2a9e0a..f080e90d068cd666bc9d471c8041061ec0084d9c 100644 (file)
@@ -98,7 +98,7 @@ void deactivate_minigame()
 
        if ( auto_close_minigamemenu )
        {
-               HUD_MinigameMenu_Close();
+               HUD_MinigameMenu_Close(NULL, NULL, NULL);
                auto_close_minigamemenu = 0;
        }
        else
@@ -393,7 +393,7 @@ MUTATOR_HOOKFUNCTION(minigames, HUD_Command)
        if(argv(1) == "minigame")
        {
                if (HUD_MinigameMenu_IsOpened())
-                       HUD_MinigameMenu_Close();
+                       HUD_MinigameMenu_Close(NULL, NULL, NULL);
                else
                        HUD_MinigameMenu_Open();
                return true;
index e3c7df18f34f778c58f1ba6d911d4711a6367d7e..4359dba22630ae9e5ec93236ace5a31645962401 100644 (file)
@@ -100,7 +100,7 @@ void minigame_cmd_workaround(float dummy, string...cmdargc);
 void minigame_prompt();
 
 float HUD_MinigameMenu_IsOpened();
-void HUD_MinigameMenu_Close();
+void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger);
 float HUD_Minigame_Showpanels();
 // Adds a game-specific entry to the menu
 void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_arg);
index ca2a0ed17c9234e306d03b4cabce5910cf9d79f8..56cae3c228867df92a9ee7d39fd9c5957cf68826 100644 (file)
@@ -112,10 +112,10 @@ entity HUD_MinigameMenu_activeitem;
 
 // Click the given item
 void HUD_MinigameMenu_Click(entity menuitem)
-{SELFPARAM();
+{
        if ( menuitem )
        {
-               WITHSELF(menuitem, menuitem.use());
+               menuitem.use(menuitem, NULL, NULL);
        }
 }
 
@@ -146,7 +146,7 @@ void HUD_MinigameMenu_EraseEntry ( entity e )
 }
 
 // Minigame menu options: create entry
-entity HUD_MinigameMenu_SpawnEntry(string s, vector offset, vector fontsize, vector color,void() click)
+entity HUD_MinigameMenu_SpawnEntry(string s, vector offset, vector fontsize, vector color,void(entity, entity, entity) click)
 {
        entity entry = spawn();
        entry.message = s;
@@ -160,7 +160,7 @@ entity HUD_MinigameMenu_SpawnEntry(string s, vector offset, vector fontsize, vec
 }
 
 // Spawn a child entry of a collapsable entry
-entity HUD_MinigameMenu_SpawnSubEntry(string s, void() click, entity parent)
+entity HUD_MinigameMenu_SpawnSubEntry(string s, void(entity, entity, entity) click, entity parent)
 {
        vector item_fontsize = hud_fontsize*1.25;
        vector item_offset = '1 0 0' * item_fontsize_x;
@@ -171,43 +171,43 @@ entity HUD_MinigameMenu_SpawnSubEntry(string s, void() click, entity parent)
 }
 
 // Click action for Create sub-entries
-void HUD_MinigameMenu_ClickCreate_Entry()
-{SELFPARAM();
-       minigame_cmd("create ",self.netname);
+void HUD_MinigameMenu_ClickCreate_Entry(entity this, entity actor, entity trigger)
+{
+       minigame_cmd("create ", this.netname);
 }
 
 // Helper click action for collapsible entries
 // returns true when you have to create the sub-entries
-bool HUD_MinigameMenu_Click_ExpandCollapse()
-{SELFPARAM();
+bool HUD_MinigameMenu_Click_ExpandCollapse(entity this)
+{
        entity e;
-       if ( self.flags & 2 )
+       if ( this.flags & 2 )
        {
                if ( HUD_MinigameMenu_activeitem &&
-                               HUD_MinigameMenu_activeitem.owner == self )
+                               HUD_MinigameMenu_activeitem.owner == this )
                        HUD_MinigameMenu_activeitem = world;
-               self.flags &= ~2;
-               for ( e = self.list_next; e != world && e.owner == self; e = self.list_next )
+               this.flags &= ~2;
+               for ( e = this.list_next; e != world && e.owner == this; e = this.list_next )
                {
                        if ( e.flags & 2 )
                                HUD_MinigameMenu_Click(e);
-                       self.list_next = e.list_next;
+                       this.list_next = e.list_next;
                        remove(e);
                }
-               if ( self.list_next )
-                       self.list_next.list_prev = self;
+               if ( this.list_next )
+                       this.list_next.list_prev = this;
                else
-                       HUD_MinigameMenu_last_entry = self;
+                       HUD_MinigameMenu_last_entry = this;
        }
        else
        {
                for ( e = HUD_MinigameMenu_entries; e != world; e = e.list_next )
                {
-                       if ( e.flags & 2 && e.origin_x == self.origin_x)
+                       if ( e.flags & 2 && e.origin_x == this.origin_x)
                                HUD_MinigameMenu_Click(e);
                }
 
-               self.flags |= 2;
+               this.flags |= 2;
 
                return true;
        }
@@ -215,14 +215,14 @@ bool HUD_MinigameMenu_Click_ExpandCollapse()
 }
 
 // Click action for the Create menu
-void HUD_MinigameMenu_ClickCreate()
-{SELFPARAM();
-       if ( HUD_MinigameMenu_Click_ExpandCollapse() )
+void HUD_MinigameMenu_ClickCreate(entity this, entity actor, entity trigger)
+{
+       if ( HUD_MinigameMenu_Click_ExpandCollapse(this) )
        {
                entity curr;
-               entity prev = self;
+               entity prev = this;
                FOREACH(Minigames, true, {
-                       curr = HUD_MinigameMenu_SpawnSubEntry(it.message, HUD_MinigameMenu_ClickCreate_Entry, self);
+                       curr = HUD_MinigameMenu_SpawnSubEntry(it.message, HUD_MinigameMenu_ClickCreate_Entry, this);
                        curr.netname = it.netname;
                        curr.model = strzone(minigame_texture(strcat(it.netname,"/icon")));
                        HUD_MinigameMenu_InsertEntry( curr, prev );
@@ -232,26 +232,26 @@ void HUD_MinigameMenu_ClickCreate()
 }
 
 // Click action for Join sub-entries
-void HUD_MinigameMenu_ClickJoin_Entry()
-{SELFPARAM();
-       minigame_cmd("join ",self.netname);
-       HUD_MinigameMenu_EraseEntry(self);
+void HUD_MinigameMenu_ClickJoin_Entry(entity this, entity actor, entity trigger)
+{
+       minigame_cmd("join ",this.netname);
+       HUD_MinigameMenu_EraseEntry(this);
 }
 
 // Click action for the Join menu
-void HUD_MinigameMenu_ClickJoin()
-{SELFPARAM();
-       if ( HUD_MinigameMenu_Click_ExpandCollapse() )
+void HUD_MinigameMenu_ClickJoin(entity this, entity actor, entity trigger)
+{
+       if ( HUD_MinigameMenu_Click_ExpandCollapse(this) )
        {
                entity e = world;
                entity curr;
-               entity prev = self;
+               entity prev = this;
                while( (e = find(e,classname,"minigame")) )
                {
                        if ( e != active_minigame )
                        {
                                curr = HUD_MinigameMenu_SpawnSubEntry(
-                                       e.netname, HUD_MinigameMenu_ClickJoin_Entry, self );
+                                       e.netname, HUD_MinigameMenu_ClickJoin_Entry, this );
                                curr.netname = e.netname;
                                curr.model = strzone(minigame_texture(strcat(e.descriptor.netname,"/icon")));
                                HUD_MinigameMenu_InsertEntry( curr, prev );
@@ -268,22 +268,22 @@ void HUD_MinigameMenu_ClickNoop()
 }*/
 
 // Click action for Quit
-void HUD_MinigameMenu_ClickQuit()
+void HUD_MinigameMenu_ClickQuit(entity this, entity actor, entity trigger)
 {
        deactivate_minigame();
        minigame_cmd("end");
 }
 
 // Click action for Invite sub-entries
-void HUD_MinigameMenu_ClickInvite_Entry()
-{SELFPARAM();
-       minigame_cmd("invite #",self.netname);
+void HUD_MinigameMenu_ClickInvite_Entry(entity this, entity actor, entity trigger)
+{
+       minigame_cmd("invite #",this.netname);
 }
 
 // Click action for the Invite menu
-void HUD_MinigameMenu_ClickInvite()
-{SELFPARAM();
-       if ( HUD_MinigameMenu_Click_ExpandCollapse() )
+void HUD_MinigameMenu_ClickInvite(entity this, entity actor, entity trigger)
+{
+       if ( HUD_MinigameMenu_Click_ExpandCollapse(this) )
        {
                entity e;
                entity prev = self;
@@ -305,10 +305,10 @@ void HUD_MinigameMenu_ClickInvite()
        }
 }
 
-void HUD_MinigameMenu_ClickCustomEntry()
-{SELFPARAM();
+void HUD_MinigameMenu_ClickCustomEntry(entity this, entity actor, entity trigger)
+{
        if ( active_minigame )
-               active_minigame.minigame_event(active_minigame,"menu_click",self.netname);
+               active_minigame.minigame_event(active_minigame,"menu_click",this.netname);
 }
 
 // Adds a game-specific entry to the menu
@@ -322,17 +322,17 @@ void HUD_MinigameMenu_CustomEntry(entity parent, string menumessage, string even
 }
 
 // Click action for the Current Game menu
-void HUD_MinigameMenu_ClickCurrentGame()
-{SELFPARAM();
-       if ( HUD_MinigameMenu_Click_ExpandCollapse() )
+void HUD_MinigameMenu_ClickCurrentGame(entity this, entity actor, entity trigger)
+{
+       if ( HUD_MinigameMenu_Click_ExpandCollapse(this) )
        {
                HUD_MinigameMenu_InsertEntry( HUD_MinigameMenu_SpawnSubEntry(
-                       _("Quit"), HUD_MinigameMenu_ClickQuit, self ), self);
+                       _("Quit"), HUD_MinigameMenu_ClickQuit, this ), this);
 
-               active_minigame.minigame_event(active_minigame,"menu_show",self);
+               active_minigame.minigame_event(active_minigame,"menu_show",this);
 
                HUD_MinigameMenu_InsertEntry( HUD_MinigameMenu_SpawnSubEntry(
-                       _("Invite"), HUD_MinigameMenu_ClickInvite, self), self);
+                       _("Invite"), HUD_MinigameMenu_ClickInvite, this), this);
        }
 }
 // Whether the minigame menu panel is open
@@ -342,7 +342,7 @@ bool HUD_MinigameMenu_IsOpened()
 }
 
 // Close the minigame menu panel
-void HUD_MinigameMenu_Close()
+void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger)
 {
        if ( HUD_MinigameMenu_IsOpened() )
        {
@@ -665,7 +665,7 @@ float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary
                        }
                        else if ( nPrimary == K_ESCAPE )
                        {
-                               HUD_MinigameMenu_Close();
+                               HUD_MinigameMenu_Close(NULL, NULL, NULL);
                                return true;
                        }
                }
index f53fc0b65723420ca682778865a05e9b0c71cf10..0ccb46c9f55126366e1d0097be7701db14dc9795 100644 (file)
@@ -1,9 +1,9 @@
 // generated file; do not modify
-#include "bd.qc"
-#include "c4.qc"
-#include "nmm.qc"
-#include "pong.qc"
-#include "pp.qc"
-#include "ps.qc"
-#include "snake.qc"
-#include "ttt.qc"
+#include <common/minigames/minigame/bd.qc>
+#include <common/minigames/minigame/c4.qc>
+#include <common/minigames/minigame/nmm.qc>
+#include <common/minigames/minigame/pong.qc>
+#include <common/minigames/minigame/pp.qc>
+#include <common/minigames/minigame/ps.qc>
+#include <common/minigames/minigame/snake.qc>
+#include <common/minigames/minigame/ttt.qc>
diff --git a/qcsrc/common/minigames/minigame/_mod.qh b/qcsrc/common/minigames/minigame/_mod.qh
new file mode 100644 (file)
index 0000000..5098420
--- /dev/null
@@ -0,0 +1,9 @@
+// generated file; do not modify
+#include <common/minigames/minigame/bd.qh>
+#include <common/minigames/minigame/c4.qh>
+#include <common/minigames/minigame/nmm.qh>
+#include <common/minigames/minigame/pong.qh>
+#include <common/minigames/minigame/pp.qh>
+#include <common/minigames/minigame/ps.qh>
+#include <common/minigames/minigame/snake.qh>
+#include <common/minigames/minigame/ttt.qh>
diff --git a/qcsrc/common/models/_mod.qh b/qcsrc/common/models/_mod.qh
new file mode 100644 (file)
index 0000000..98fb481
--- /dev/null
@@ -0,0 +1 @@
+// generated file; do not modify
index 8dff76f6955ab428a5daee7e4436776a9fbe9c3c..f9d80b3f4e36f6de4e97cc4e84fe442b559e8e5b 100644 (file)
@@ -1,4 +1,4 @@
 // generated file; do not modify
-#include "all.qc"
-#include "spawn.qc"
-#include "sv_monsters.qc"
+#include <common/monsters/all.qc>
+#include <common/monsters/spawn.qc>
+#include <common/monsters/sv_monsters.qc>
diff --git a/qcsrc/common/monsters/_mod.qh b/qcsrc/common/monsters/_mod.qh
new file mode 100644 (file)
index 0000000..48427f9
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#include <common/monsters/all.qh>
+#include <common/monsters/spawn.qh>
+#include <common/monsters/sv_monsters.qh>
index 6b8a307db685aef9a6c699c514b832a4da3da883..23e649ab875810fd2cee74738d10a18c2146d5ed 100644 (file)
@@ -1,6 +1,6 @@
 // generated file; do not modify
-#include "mage.qc"
-#include "shambler.qc"
-#include "spider.qc"
-#include "wyvern.qc"
-#include "zombie.qc"
+#include <common/monsters/monster/mage.qc>
+#include <common/monsters/monster/shambler.qc>
+#include <common/monsters/monster/spider.qc>
+#include <common/monsters/monster/wyvern.qc>
+#include <common/monsters/monster/zombie.qc>
diff --git a/qcsrc/common/monsters/monster/_mod.qh b/qcsrc/common/monsters/monster/_mod.qh
new file mode 100644 (file)
index 0000000..a1c048d
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include <common/monsters/monster/mage.qh>
+#include <common/monsters/monster/shambler.qh>
+#include <common/monsters/monster/spider.qh>
+#include <common/monsters/monster/wyvern.qh>
+#include <common/monsters/monster/zombie.qh>
index 3cfa18cdf4bc166e3f296cc11274a260acf3e050..139967a2ccb5fcc5826265b9a488c32ea2bedc38 100644 (file)
@@ -105,6 +105,11 @@ void M_Shambler_Attack_Lightning_Explode()
        self.nextthink = time + 0.2;
 }
 
+void M_Shambler_Attack_Lightning_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, M_Shambler_Attack_Lightning_Explode());
+}
+
 void M_Shambler_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if (this.health <= 0)
@@ -116,14 +121,14 @@ void M_Shambler_Attack_Lightning_Damage(entity this, entity inflictor, entity at
        this.health = this.health - damage;
 
        if (this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, this.use));
+               W_PrepareExplosionByDamage(this, attacker, adaptor_think2use);
 }
 
 void M_Shambler_Attack_Lightning_Touch()
 {SELFPARAM();
        PROJECTILE_TOUCH;
 
-       self.use ();
+       self.use(this, NULL, NULL);
 }
 
 void M_Shambler_Attack_Lightning_Think()
@@ -157,7 +162,7 @@ void M_Shambler_Attack_Lightning(entity this)
        gren.cnt = time + 5;
        gren.nextthink = time;
        gren.think = M_Shambler_Attack_Lightning_Think;
-       gren.use = M_Shambler_Attack_Lightning_Explode;
+       gren.use = M_Shambler_Attack_Lightning_Explode_use;
        gren.touch = M_Shambler_Attack_Lightning_Touch;
 
        gren.takedamage = DAMAGE_YES;
index 9b0541c14edb581a2f342337a8511b249c56c961..0b2e3650b4c3cdf23d86008393709646af99614d 100644 (file)
@@ -151,6 +151,11 @@ void M_Spider_Attack_Web_Explode()
        }
 }
 
+void M_Spider_Attack_Web_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, M_Spider_Attack_Web_Explode());
+}
+
 void M_Spider_Attack_Web_Touch()
 {
        PROJECTILE_TOUCH;
@@ -168,7 +173,7 @@ void M_Spider_Attack_Web(entity this)
 
        entity proj = new(plasma);
        proj.owner = proj.realowner = this;
-       proj.use = M_Spider_Attack_Web_Explode;
+       proj.use = M_Spider_Attack_Web_Explode_use;
        proj.think = adaptor_think2use_hittype_splash;
        proj.bot_dodge = true;
        proj.bot_dodgerating = 0;
index 9d1022fa36cd92fcda738a5477699a6f80cd74d4..def29e969df9a8b373d50121deb37f77065877dc 100644 (file)
@@ -548,9 +548,9 @@ void Monster_Dead_Fade(entity this)
        }
 }
 
-void Monster_Use()
-{SELFPARAM();
-       if(Monster_ValidTarget(this, activator)) { this.enemy = activator; }
+void Monster_Use(entity this, entity actor, entity trigger)
+{
+       if(Monster_ValidTarget(this, actor)) { this.enemy = actor; }
 }
 
 vector Monster_Move_Target(entity this, entity targ)
@@ -931,9 +931,9 @@ void Monster_Dead_Think()
        }
 }
 
-void Monster_Appear()
-{SELFPARAM();
-       this.enemy = activator;
+void Monster_Appear(entity this, entity actor, entity trigger)
+{
+       this.enemy = actor;
        this.spawnflags &= ~MONSTERFLAG_APPEAR; // otherwise, we get an endless loop
        Monster_Spawn(this, this.monsterid);
 }
@@ -1102,9 +1102,7 @@ void Monster_Damage(entity this, entity inflictor, entity attacker, float damage
                        this.candrop = false; // killed by mobkill command
 
                // TODO: fix this?
-               activator = attacker;
-               other = this.enemy;
-               WITHSELF(this, SUB_UseTargets());
+               SUB_UseTargets(this, attacker, this.enemy);
                this.target2 = this.oldtarget2; // reset to original target on death, incase we respawn
 
                Monster_Dead(this, attacker, (this.health <= -100 || deathtype == DEATH_KILL.m_id));
index 254d13d7e204d0d694503f89d5e0b1e4b6cdd133..8220b2d19540a75e8f6a2014fce6b88672e3e408 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "all.qc"
+#include <common/mutators/all.qc>
diff --git a/qcsrc/common/mutators/_mod.qh b/qcsrc/common/mutators/_mod.qh
new file mode 100644 (file)
index 0000000..5d6ac56
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/all.qh>
index 14e0e3d6510f81b7d84df7f26e5ffe93ce5cddc8..30d67e34bcd8da1d5b971e5d4386584f40215b6b 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "itemstime.qc"
+#include <common/mutators/mutator/itemstime.qc>
diff --git a/qcsrc/common/mutators/mutator/_mod.qh b/qcsrc/common/mutators/mutator/_mod.qh
new file mode 100644 (file)
index 0000000..ac056ac
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/itemstime.qh>
index 791cd03378546a1b0ed4020412017254fafd797b..16e6308acf9d39e466c350241b96d3ece7f990e6 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "bloodloss.qc"
+#include <common/mutators/mutator/bloodloss/bloodloss.qc>
diff --git a/qcsrc/common/mutators/mutator/bloodloss/_mod.qh b/qcsrc/common/mutators/mutator/bloodloss/_mod.qh
new file mode 100644 (file)
index 0000000..b1d45e2
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/bloodloss/bloodloss.qh>
index ff8da6266ce02a855cd3f029d4c0cc4ccce33ad8..bdbbae46cdd60b60bac6541367bce201df18930a 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "breakablehook.qc"
+#include <common/mutators/mutator/breakablehook/breakablehook.qc>
diff --git a/qcsrc/common/mutators/mutator/breakablehook/_mod.qh b/qcsrc/common/mutators/mutator/breakablehook/_mod.qh
new file mode 100644 (file)
index 0000000..8a41908
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/breakablehook/breakablehook.qh>
index df0201d1f74c6857f3195ddca5dfcf776a7399ed..c06263a92f056dd90672e3c345a7c8515526b8f9 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "all.qc"
-#include "buffs.qc"
+#include <common/mutators/mutator/buffs/all.qc>
+#include <common/mutators/mutator/buffs/buffs.qc>
diff --git a/qcsrc/common/mutators/mutator/buffs/_mod.qh b/qcsrc/common/mutators/mutator/buffs/_mod.qh
new file mode 100644 (file)
index 0000000..2133c72
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <common/mutators/mutator/buffs/all.qh>
+#include <common/mutators/mutator/buffs/buffs.qh>
index cd18f3318e1a541596d3c847dc62ccb47127638e..f898b93f8c1882df6b476bf77a0e643ebcdb6721 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "bugrigs.qc"
+#include <common/mutators/mutator/bugrigs/bugrigs.qc>
diff --git a/qcsrc/common/mutators/mutator/bugrigs/_mod.qh b/qcsrc/common/mutators/mutator/bugrigs/_mod.qh
new file mode 100644 (file)
index 0000000..dd8bcbd
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/bugrigs/bugrigs.qh>
index 2f61e45977c39c80d9a50b3ef80b788d736b5923..3ddb376fc9db5f685cc219bf52ecd0332b37f5c6 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "campcheck.qc"
+#include <common/mutators/mutator/campcheck/campcheck.qc>
diff --git a/qcsrc/common/mutators/mutator/campcheck/_mod.qh b/qcsrc/common/mutators/mutator/campcheck/_mod.qh
new file mode 100644 (file)
index 0000000..81345f1
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/campcheck/campcheck.qh>
index 1d0bd19ebc512f315fb5bdede23a9b0a2c3bac09..0036bbaf330181d2d4f7ab9f538f9556efe56313 100644 (file)
@@ -58,9 +58,9 @@ MUTATOR_HOOKFUNCTION(campcheck, PlayerPreThink)
                        {
                                Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_CAMPCHECK);
                                if(self.vehicle)
-                                       Damage(self.vehicle, self, self, autocvar_g_campcheck_damage * 2, DEATH_CAMP.m_id, self.vehicle.origin, '0 0 0');
+                                       Damage(self.vehicle, world, world, autocvar_g_campcheck_damage * 2, DEATH_CAMP.m_id, self.vehicle.origin, '0 0 0');
                                else
-                                       Damage(self, self, self, bound(0, autocvar_g_campcheck_damage, self.health + self.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP.m_id, self.origin, '0 0 0');
+                                       Damage(self, world, world, bound(0, autocvar_g_campcheck_damage, self.health + self.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP.m_id, self.origin, '0 0 0');
                        }
                        self.campcheck_nextcheck = time + autocvar_g_campcheck_interval;
                        self.campcheck_traveled_distance = 0;
index 4423f2bdb1591670afcb270146f4883267e103fe..72136952258113fec67b40cba93287bfc3b3a6a5 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "cloaked.qc"
+#include <common/mutators/mutator/cloaked/cloaked.qc>
diff --git a/qcsrc/common/mutators/mutator/cloaked/_mod.qh b/qcsrc/common/mutators/mutator/cloaked/_mod.qh
new file mode 100644 (file)
index 0000000..5606b9a
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/cloaked/cloaked.qh>
index ff53767252cc81410affe24f4ccb7b37fb4bfa86..b5dfbc32abe990c5abc382684909d6f879086078 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "damagetext.qc"
+#include <common/mutators/mutator/damagetext/damagetext.qc>
diff --git a/qcsrc/common/mutators/mutator/damagetext/_mod.qh b/qcsrc/common/mutators/mutator/damagetext/_mod.qh
new file mode 100644 (file)
index 0000000..2775109
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/damagetext/damagetext.qh>
index 0b44b7346ea73328d8db3067becf0f7078bb3fe4..3c01fa88a92b64c5c6366386eeb213b390a50d06 100644 (file)
@@ -151,20 +151,29 @@ CLASS(XonoticDamageTextSettings, XonoticTab)
     METHOD(XonoticDamageTextSettings, showNotify, void(entity this)) { loadAllCvars(this); }
     METHOD(XonoticDamageTextSettings, fill, void(entity this))
     {
+       entity e;
         this.gotoRC(this, 0, 1); this.setFirstColumn(this, this.currentColumn);
             this.TD(this, 1, 3, makeXonoticCheckBox(0, "cl_damagetext", _("Draw damage numbers")));
         this.TR(this);
-            this.TD(this, 1, 1, makeXonoticTextLabel(0, _("Font size:")));
-            this.TD(this, 1, 2, makeXonoticSlider(0, 50, 1, "cl_damagetext_size"));
+            this.TD(this, 1, 1, e = makeXonoticTextLabel(0, _("Font size:")));
+                setDependent(e, "cl_damagetext", 1, 1);
+            this.TD(this, 1, 2, e = makeXonoticSlider(0, 50, 1, "cl_damagetext_size"));
+                setDependent(e, "cl_damagetext", 1, 1);
         this.TR(this);
-            this.TD(this, 1, 1, makeXonoticTextLabel(0, _("Accumulate range:")));
-            this.TD(this, 1, 2, makeXonoticSlider(0, 500, 1, "cl_damagetext_accumulate_range"));
+            this.TD(this, 1, 1, e = makeXonoticTextLabel(0, _("Accumulate range:")));
+                setDependent(e, "cl_damagetext", 1, 1);
+            this.TD(this, 1, 2, e = makeXonoticSlider(0, 500, 1, "cl_damagetext_accumulate_range"));
+                setDependent(e, "cl_damagetext", 1, 1);
         this.TR(this);
-            this.TD(this, 1, 1, makeXonoticTextLabel(0, _("Lifetime:")));
-            this.TD(this, 1, 2, makeXonoticSlider(0, 10, 1, "cl_damagetext_alpha_lifetime"));
+            this.TD(this, 1, 1, e = makeXonoticTextLabel(0, _("Lifetime:")));
+                setDependent(e, "cl_damagetext", 1, 1);
+            this.TD(this, 1, 2, e = makeXonoticSlider(0, 10, 1, "cl_damagetext_alpha_lifetime"));
+                setDependent(e, "cl_damagetext", 1, 1);
         this.TR(this);
-            this.TD(this, 1, 1, makeXonoticTextLabel(0, _("Color:")));
-            this.TD(this, 2, 2, makeXonoticColorpickerString("cl_damagetext_color", "cl_damagetext_color"));
+            this.TD(this, 1, 1, e = makeXonoticTextLabel(0, _("Color:")));
+                setDependent(e, "cl_damagetext", 1, 1);
+            this.TD(this, 2, 2, e = makeXonoticColorpickerString("cl_damagetext_color", "cl_damagetext_color"));
+                setDependent(e, "cl_damagetext", 1, 1);
     }
 ENDCLASS(XonoticDamageTextSettings)
 #endif
index 92244a517ea5c8e270c71d8b804581748a87d4b7..4902d5fc1b36e0f34f3be37ebde5418e55306575 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "dodging.qc"
+#include <common/mutators/mutator/dodging/dodging.qc>
diff --git a/qcsrc/common/mutators/mutator/dodging/_mod.qh b/qcsrc/common/mutators/mutator/dodging/_mod.qh
new file mode 100644 (file)
index 0000000..b2b65f0
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/dodging/dodging.qh>
index 8c1f531540f70727d2546ae330ebd08dadd8c30e..8f481380742f46080c9c088967407c9029d889c9 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "doublejump.qc"
+#include <common/mutators/mutator/doublejump/doublejump.qc>
diff --git a/qcsrc/common/mutators/mutator/doublejump/_mod.qh b/qcsrc/common/mutators/mutator/doublejump/_mod.qh
new file mode 100644 (file)
index 0000000..e55b143
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/doublejump/doublejump.qh>
index 9eff27e68c1c29ca77406c7e5a902cf034fe602a..ec6da662e7a1b26be37f1fe4cdd122874294448d 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "hook.qc"
+#include <common/mutators/mutator/hook/hook.qc>
diff --git a/qcsrc/common/mutators/mutator/hook/_mod.qh b/qcsrc/common/mutators/mutator/hook/_mod.qh
new file mode 100644 (file)
index 0000000..50c0c13
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/hook/hook.qh>
index e5e4393698a805cd5efa5ea4bbe2b973c44dbf18..dad005fe494a1002959c2ab5eafd094b4bd2ee6f 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "instagib.qc"
-#include "items.qc"
+#include <common/mutators/mutator/instagib/instagib.qc>
+#include <common/mutators/mutator/instagib/items.qc>
diff --git a/qcsrc/common/mutators/mutator/instagib/_mod.qh b/qcsrc/common/mutators/mutator/instagib/_mod.qh
new file mode 100644 (file)
index 0000000..2e88f42
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <common/mutators/mutator/instagib/instagib.qh>
+#include <common/mutators/mutator/instagib/items.qh>
index f8f2e5a7dfb41ec821f611b8f8573a784e97d01c..ec11970fed3519536b2076f8d9cee51e3a286df7 100644 (file)
@@ -288,6 +288,9 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate)
                if(IS_PLAYER(frag_attacker))
                if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
                {
+                       if(!autocvar_g_instagib_friendlypush && SAME_TEAM(frag_target, frag_attacker))
+                               frag_force = '0 0 0';
+
                        if(frag_target.armorvalue)
                        {
                                frag_target.armorvalue -= 1;
@@ -303,7 +306,11 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate)
                        if(frag_deathtype & HITTYPE_SECONDARY)
                        {
                                if(!autocvar_g_instagib_blaster_keepdamage || frag_attacker == frag_target)
-                                       frag_damage = frag_mirrordamage = 0;
+                               {
+                                       frag_damage = 0;
+                                       if(!autocvar_g_instagib_mirrordamage)
+                                               frag_mirrordamage = 0; // never do mirror damage on enemies
+                               }
 
                                if(frag_target != frag_attacker)
                                {
@@ -315,6 +322,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate)
                }
        }
 
+       if(!autocvar_g_instagib_mirrordamage) // only apply the taking lives hack if we don't want to support real damage mirroring
        if(IS_PLAYER(frag_attacker))
        if(frag_mirrordamage > 0)
        {
@@ -329,6 +337,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate)
        }
 
        if(frag_target.alpha && frag_target.alpha < 1)
+       if(IS_PLAYER(frag_target))
                yoda = 1;
 
        return false;
index 2783d099ac15ca77ef4f16f73177e6fe371f345b..68d313e95ce5608e6cc352cda79f0503f5b9b7c2 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "invincibleproj.qc"
+#include <common/mutators/mutator/invincibleproj/invincibleproj.qc>
diff --git a/qcsrc/common/mutators/mutator/invincibleproj/_mod.qh b/qcsrc/common/mutators/mutator/invincibleproj/_mod.qh
new file mode 100644 (file)
index 0000000..dc3f32f
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/invincibleproj/invincibleproj.qh>
index d2132e680ce723b8c14f973910b84d70c5ddd41d..db31be3fddf35d6efcaf5b0876a48b40e9990f4b 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "melee_only.qc"
+#include <common/mutators/mutator/melee_only/melee_only.qc>
diff --git a/qcsrc/common/mutators/mutator/melee_only/_mod.qh b/qcsrc/common/mutators/mutator/melee_only/_mod.qh
new file mode 100644 (file)
index 0000000..2228d64
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/melee_only/melee_only.qh>
index aae84aafc5925baf88528826addaa897d5b277d6..8fcc96ea218b6810bdc65416d997fe14e2f38e42 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "midair.qc"
+#include <common/mutators/mutator/midair/midair.qc>
diff --git a/qcsrc/common/mutators/mutator/midair/_mod.qh b/qcsrc/common/mutators/mutator/midair/_mod.qh
new file mode 100644 (file)
index 0000000..48272b8
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/midair/midair.qh>
index a58cf852ba8db184d4f28859d42cd7922aaef8f8..eb3fab00780dd2ed50fe114c08e2d4fc429280a1 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "multijump.qc"
+#include <common/mutators/mutator/multijump/multijump.qc>
diff --git a/qcsrc/common/mutators/mutator/multijump/_mod.qh b/qcsrc/common/mutators/mutator/multijump/_mod.qh
new file mode 100644 (file)
index 0000000..29df9af
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/multijump/multijump.qh>
index 90555458034d62974143ffeff089ec50c7b7ae03..28739d2e1a37bcbfcd3fb4618853e94e6f9b098f 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "nades.qc"
-#include "net.qc"
+#include <common/mutators/mutator/nades/nades.qc>
+#include <common/mutators/mutator/nades/net.qc>
diff --git a/qcsrc/common/mutators/mutator/nades/_mod.qh b/qcsrc/common/mutators/mutator/nades/_mod.qh
new file mode 100644 (file)
index 0000000..0ca855a
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <common/mutators/mutator/nades/nades.qh>
+#include <common/mutators/mutator/nades/net.qh>
index 8d17edb0b6c164b7114bf24b551b16c396bb7065..cabfd31b816ec03e53e3eae5c8f94e0bf840aa2f 100644 (file)
@@ -4,6 +4,7 @@
 
 #ifdef SVQC
 bool autocvar_g_nades_nade_small;
+float autocvar_g_nades_spread = 0.04;
 #endif
 
 REGISTER_STAT(NADES_SMALL, int, autocvar_g_nades_nade_small)
@@ -804,7 +805,7 @@ void nade_damage(entity this, entity inflictor, entity attacker, float damage, i
                this.realowner = attacker;
 
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, nade_boom));
+               W_PrepareExplosionByDamage(this, attacker, nade_boom);
        else
                nade_burn_spawn(this);
 }
@@ -1068,7 +1069,9 @@ void nades_CheckThrow()
                        float _force = time - held_nade.nade_time_primed;
                        _force /= autocvar_g_nades_nade_lifetime;
                        _force = autocvar_g_nades_nade_minforce + (_force * (autocvar_g_nades_nade_maxforce - autocvar_g_nades_nade_minforce));
-                       toss_nade(self, true, (v_forward * 0.75 + v_up * 0.2 + v_right * 0.05) * _force, 0);
+                       vector dir = (v_forward * 0.75 + v_up * 0.2 + v_right * 0.05);
+                       dir = W_CalculateSpread(dir, autocvar_g_nades_spread, g_weaponspreadfactor, autocvar_g_projectiles_spread_style);
+                       toss_nade(self, true, dir * _force, 0);
                }
        }
 }
@@ -1122,7 +1125,9 @@ CLASS(NadeOffhand, OffhandWeapon)
                                float _force = time - held_nade.nade_time_primed;
                                _force /= autocvar_g_nades_nade_lifetime;
                                _force = autocvar_g_nades_nade_minforce + (_force * (autocvar_g_nades_nade_maxforce - autocvar_g_nades_nade_minforce));
-                               toss_nade(player, false, (v_forward * 0.7 + v_up * 0.2 + v_right * 0.1) * _force, 0);
+                               vector dir = (v_forward * 0.7 + v_up * 0.2 + v_right * 0.1);
+                               dir = W_CalculateSpread(dir, autocvar_g_nades_spread, g_weaponspreadfactor, autocvar_g_projectiles_spread_style);
+                               toss_nade(player, false, dir * _force, 0);
                        }
                }
     }
index 97665f5c4eb6d32d97392324ffbb49a0fb135f21..90e9811ea6c0a3196e660f8ccb73f5d50e5c7298 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "new_toys.qc"
+#include <common/mutators/mutator/new_toys/new_toys.qc>
diff --git a/qcsrc/common/mutators/mutator/new_toys/_mod.qh b/qcsrc/common/mutators/mutator/new_toys/_mod.qh
new file mode 100644 (file)
index 0000000..ec3b810
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/new_toys/new_toys.qh>
index b98eab4fd1a7850b3e597f45846062327890932c..a669175da2ebb221b895e42cf63407202f1dccb3 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "nix.qc"
+#include <common/mutators/mutator/nix/nix.qc>
diff --git a/qcsrc/common/mutators/mutator/nix/_mod.qh b/qcsrc/common/mutators/mutator/nix/_mod.qh
new file mode 100644 (file)
index 0000000..6c012fe
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/nix/nix.qh>
index 19c25a06372bfc13bf86245471cf1eda373c5f5d..5b42a4dd11fec6420d530a25a3096edb5b334f5e 100644 (file)
@@ -1,4 +1,4 @@
 // generated file; do not modify
-#include "hmg.qc"
-#include "overkill.qc"
-#include "rpc.qc"
+#include <common/mutators/mutator/overkill/hmg.qc>
+#include <common/mutators/mutator/overkill/overkill.qc>
+#include <common/mutators/mutator/overkill/rpc.qc>
diff --git a/qcsrc/common/mutators/mutator/overkill/_mod.qh b/qcsrc/common/mutators/mutator/overkill/_mod.qh
new file mode 100644 (file)
index 0000000..7a46694
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#include <common/mutators/mutator/overkill/hmg.qh>
+#include <common/mutators/mutator/overkill/overkill.qh>
+#include <common/mutators/mutator/overkill/rpc.qh>
index 5a06302d9f282fe5cc92a550dee40b90d9eaf21f..2d9d423cf5502bc1ff66a3ba5d7e7af7defd688e 100644 (file)
@@ -80,7 +80,7 @@ void W_RocketPropelledChainsaw_Damage(entity this, entity inflictor, entity atta
        this.health = this.health - damage;
 
        if (this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, W_RocketPropelledChainsaw_Explode));
+               W_PrepareExplosionByDamage(this, attacker, W_RocketPropelledChainsaw_Explode);
 }
 
 void W_RocketPropelledChainsaw_Think()
index 8174e85415da698f080a00eabf90587e0f274026..4d4ef59f8ac581b438f48effb461e31b48404e87 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "physical_items.qc"
+#include <common/mutators/mutator/physical_items/physical_items.qc>
diff --git a/qcsrc/common/mutators/mutator/physical_items/_mod.qh b/qcsrc/common/mutators/mutator/physical_items/_mod.qh
new file mode 100644 (file)
index 0000000..a347cec
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/physical_items/physical_items.qh>
index a4017bd975cc0936b3db2f6b6cf3e21d05f82edd..a0bd94d00eab025aa6f843161be5fac9528649ff 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "pinata.qc"
+#include <common/mutators/mutator/pinata/pinata.qc>
diff --git a/qcsrc/common/mutators/mutator/pinata/_mod.qh b/qcsrc/common/mutators/mutator/pinata/_mod.qh
new file mode 100644 (file)
index 0000000..1602640
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/pinata/pinata.qh>
index e07c8af793efcdd3adeecc8d4c5f2ea8515dec7a..feeaec8d6966e8319a0d242ae0cd55420b85c42c 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "random_gravity.qc"
+#include <common/mutators/mutator/random_gravity/random_gravity.qc>
diff --git a/qcsrc/common/mutators/mutator/random_gravity/_mod.qh b/qcsrc/common/mutators/mutator/random_gravity/_mod.qh
new file mode 100644 (file)
index 0000000..99a11ed
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/random_gravity/random_gravity.qh>
index 92ef3cc0d82bea1f23c365886ec3a6295a3c93cf..0841ae680b745135b4b8ee8845a06a9dd158724f 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "rocketflying.qc"
+#include <common/mutators/mutator/rocketflying/rocketflying.qc>
diff --git a/qcsrc/common/mutators/mutator/rocketflying/_mod.qh b/qcsrc/common/mutators/mutator/rocketflying/_mod.qh
new file mode 100644 (file)
index 0000000..75ca141
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/rocketflying/rocketflying.qh>
index e50a4ba8dc3446554c058b1447a777c31c60babc..bc579ec512d070e8171e16d2a161c007ce9c6d54 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "rocketminsta.qc"
+#include <common/mutators/mutator/rocketminsta/rocketminsta.qc>
diff --git a/qcsrc/common/mutators/mutator/rocketminsta/_mod.qh b/qcsrc/common/mutators/mutator/rocketminsta/_mod.qh
new file mode 100644 (file)
index 0000000..29a367d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/rocketminsta/rocketminsta.qh>
index 2550d2d66b8fff5bdaf8746a4b271cfa18e9888f..f88b36a534e3bd57ffde4f4df0f841ceec1e747f 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "running_guns.qc"
+#include <common/mutators/mutator/running_guns/running_guns.qc>
diff --git a/qcsrc/common/mutators/mutator/running_guns/_mod.qh b/qcsrc/common/mutators/mutator/running_guns/_mod.qh
new file mode 100644 (file)
index 0000000..559be4c
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/running_guns/running_guns.qh>
index c1e80d487bc44f54a01c672a8a512c1b5bd076a8..8e54c1f95e62e2690766d611e71dedccb9c8827c 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "sandbox.qc"
+#include <common/mutators/mutator/sandbox/sandbox.qc>
diff --git a/qcsrc/common/mutators/mutator/sandbox/_mod.qh b/qcsrc/common/mutators/mutator/sandbox/_mod.qh
new file mode 100644 (file)
index 0000000..81e250c
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/sandbox/sandbox.qh>
index 612f5a0d0ff482f05ac0b478e9a338363ea21d75..b7d3af7f4dd3124e9f5521daa0e814a386e9d357 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "spawn_near_teammate.qc"
+#include <common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qc>
diff --git a/qcsrc/common/mutators/mutator/spawn_near_teammate/_mod.qh b/qcsrc/common/mutators/mutator/spawn_near_teammate/_mod.qh
new file mode 100644 (file)
index 0000000..5f53e95
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qh>
index bb63a1861d00fb1591d9bda9c01d27427d755f39..d5005242f241344d6cdf4571994dadeedd36b4d2 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "superspec.qc"
+#include <common/mutators/mutator/superspec/superspec.qc>
diff --git a/qcsrc/common/mutators/mutator/superspec/_mod.qh b/qcsrc/common/mutators/mutator/superspec/_mod.qh
new file mode 100644 (file)
index 0000000..b544ffc
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/superspec/superspec.qh>
index 06bb8d30a5156a94a54fd28f06bb26f70f4b3e04..42dad3926e539193afb390660b551c6b70e97237 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "touchexplode.qc"
+#include <common/mutators/mutator/touchexplode/touchexplode.qc>
diff --git a/qcsrc/common/mutators/mutator/touchexplode/_mod.qh b/qcsrc/common/mutators/mutator/touchexplode/_mod.qh
new file mode 100644 (file)
index 0000000..ec71f52
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/touchexplode/touchexplode.qh>
index c0164ea8f70c0bf326eb5f10c1eb45dd7e72e60a..856ed84c463aa54dbb0fc71943fcfc4b4d8af34f 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "vampire.qc"
+#include <common/mutators/mutator/vampire/vampire.qc>
diff --git a/qcsrc/common/mutators/mutator/vampire/_mod.qh b/qcsrc/common/mutators/mutator/vampire/_mod.qh
new file mode 100644 (file)
index 0000000..551184c
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/vampire/vampire.qh>
index 4f2e935c07128ba7275eb8f17ad54991fa2c5b2c..868a4ef3fc2e6688214aec9c10c2fab117dc1868 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "vampirehook.qc"
+#include <common/mutators/mutator/vampirehook/vampirehook.qc>
diff --git a/qcsrc/common/mutators/mutator/vampirehook/_mod.qh b/qcsrc/common/mutators/mutator/vampirehook/_mod.qh
new file mode 100644 (file)
index 0000000..5d57816
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/vampirehook/vampirehook.qh>
index a5ebe76e3dfc13a5c86a5e463d380149f010fe81..7547fb5770b0e6d6273e14579fd51d2ed0ca7bcb 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "waypointsprites.qc"
+#include <common/mutators/mutator/waypoints/waypointsprites.qc>
diff --git a/qcsrc/common/mutators/mutator/waypoints/_mod.qh b/qcsrc/common/mutators/mutator/waypoints/_mod.qh
new file mode 100644 (file)
index 0000000..4036f10
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/waypoints/waypointsprites.qh>
index 1fb8fda3b09db8952ec0d7e1e9516a89f719dd5b..d391c73fb18c7aa86b44603d77c3ad1e89d05d17 100644 (file)
@@ -1100,7 +1100,7 @@ entity WaypointSprite_AttachCarrier(
 {
     WaypointSprite_Kill(carrier.waypointsprite_attached); // FC overrides attached
     entity e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', world, carrier.team, carrier, waypointsprite_attachedforcarrier, false, icon);
-    if (e)
+    if (carrier.health)
     {
         WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id) * 2);
         WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id));
index c110d3fedf6e1e6b085cede292a02d732ee398de..742510b883501ca97946c1b851ed4ac6aa148b72 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "weaponarena_random.qc"
+#include <common/mutators/mutator/weaponarena_random/weaponarena_random.qc>
diff --git a/qcsrc/common/mutators/mutator/weaponarena_random/_mod.qh b/qcsrc/common/mutators/mutator/weaponarena_random/_mod.qh
new file mode 100644 (file)
index 0000000..68d6a24
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/mutators/mutator/weaponarena_random/weaponarena_random.qh>
index 254d13d7e204d0d694503f89d5e0b1e4b6cdd133..33566850f806f4aaf39a451b3e8addb4e0555ac2 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "all.qc"
+#include <common/notifications/all.qc>
diff --git a/qcsrc/common/notifications/_mod.qh b/qcsrc/common/notifications/_mod.qh
new file mode 100644 (file)
index 0000000..726be67
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/notifications/all.qh>
index fb423ecf5f0ffe7c951a3897174ee3cd1f5fca6b..3a61cd4e9a433c03742c10a5233e4a044f32c181 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "movelib.qc"
-#include "player.qc"
+#include <common/physics/movelib.qc>
+#include <common/physics/player.qc>
diff --git a/qcsrc/common/physics/_mod.qh b/qcsrc/common/physics/_mod.qh
new file mode 100644 (file)
index 0000000..39dacad
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <common/physics/movelib.qh>
+#include <common/physics/player.qh>
index 674b82964d23e43e46f444dbcd7bc82c9ae5fe9b..4effcbd04a0a983e4d4bac87e760ada7f99d4928 100644 (file)
@@ -1,7 +1,7 @@
 // generated file; do not modify
-#include "follow.qc"
-#include "movetypes.qc"
-#include "push.qc"
-#include "step.qc"
-#include "toss.qc"
-#include "walk.qc"
+#include <common/physics/movetypes/follow.qc>
+#include <common/physics/movetypes/movetypes.qc>
+#include <common/physics/movetypes/push.qc>
+#include <common/physics/movetypes/step.qc>
+#include <common/physics/movetypes/toss.qc>
+#include <common/physics/movetypes/walk.qc>
diff --git a/qcsrc/common/physics/movetypes/_mod.qh b/qcsrc/common/physics/movetypes/_mod.qh
new file mode 100644 (file)
index 0000000..32ae381
--- /dev/null
@@ -0,0 +1,7 @@
+// generated file; do not modify
+#include <common/physics/movetypes/follow.qh>
+#include <common/physics/movetypes/movetypes.qh>
+#include <common/physics/movetypes/push.qh>
+#include <common/physics/movetypes/step.qh>
+#include <common/physics/movetypes/toss.qh>
+#include <common/physics/movetypes/walk.qh>
index 0ecfa180f45bc143e6d11c831bdbbc41bc0a7b60..41ada953d59a9a137a5a2144b3e53a68faee020d 100644 (file)
@@ -596,7 +596,7 @@ void CheckPlayerJump(entity this)
        {
                float air_jump = !PlayerJump(this) || player_multijump; // PlayerJump() has important side effects
                float activate = JETPACK_JUMP(this) && air_jump && PHYS_INPUT_BUTTON_JUMP(this) || PHYS_INPUT_BUTTON_JETPACK(this);
-               float has_fuel = !PHYS_JETPACK_FUEL(this) || PHYS_AMMO_FUEL(this) || ITEMS_STAT(this) & IT_UNLIMITED_WEAPON_AMMO;
+               float has_fuel = !PHYS_JETPACK_FUEL(this) || PHYS_AMMO_FUEL(this) || (ITEMS_STAT(this) & IT_UNLIMITED_WEAPON_AMMO);
 
                if (!(ITEMS_STAT(this) & ITEM_Jetpack.m_itemid)) { }
                else if (this.jetpack_stopped) { }
@@ -1295,10 +1295,6 @@ bool IsFlying(entity this)
        return true;
 }
 
-#ifdef CSQC
-float autocvar_slowmo;
-#endif
-
 void PM_Main(entity this)
 {
        int buttons = PHYS_INPUT_BUTTON_MASK(this);
@@ -1309,11 +1305,6 @@ void PM_Main(entity this)
 
        this.spectatorspeed = STAT(SPECTATORSPEED);
 
-       vector oldv_angle = this.v_angle;
-       vector oldangles = this.angles; // we need to save these, as they're abused by other code
-       this.v_angle = PHYS_INPUT_ANGLES(this);
-       this.angles = PHYS_WORLD_ANGLES(this);
-
        this.team = myteam + 1; // is this correct?
        if (!(PHYS_INPUT_BUTTON_JUMP(this))) // !jump
                UNSET_JUMP_HELD(this); // canjump = true
@@ -1337,9 +1328,6 @@ void PM_Main(entity this)
        if (this.PlayerPhysplug)
                if (this.PlayerPhysplug(this))
                        return;
-#elif defined(CSQC)
-       if(autocvar_slowmo != STAT(MOVEVARS_TIMESCALE))
-               cvar_set("slowmo", ftos(STAT(MOVEVARS_TIMESCALE)));
 #endif
 
 #ifdef SVQC
@@ -1553,11 +1541,6 @@ LABEL(end)
        this.lastflags = this.flags;
 
        this.lastclassname = this.classname;
-
-#ifdef CSQC
-       this.v_angle = oldv_angle;
-       this.angles = oldangles;
-#endif
 }
 
 #if defined(SVQC)
index 233762202efda470e23ed15819f2fa2fadf34bd5..ec2f7cad3ddf3d4fc9ca8ae568824b37d216854c 100644 (file)
@@ -427,7 +427,7 @@ void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest)
                                PS_B_IN_DB = db_create();
 
                        // now request the information
-                       uri = strcat(uri, "/player/", uri_escape(uri_escape(joiningplayer.crypto_idfp)), "/elo.txt");
+                       uri = strcat(uri, "/player/", uri_escape(uri_escape(uri_escape(joiningplayer.crypto_idfp))), "/elo.txt");
                        LOG_TRACE("Retrieving playerstats from URL: ", uri, "\n");
                        url_single_fopen(
                                uri,
index 254d13d7e204d0d694503f89d5e0b1e4b6cdd133..787b6f1901032e5fa702f2942429764a88181f07 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "all.qc"
+#include <common/sounds/all.qc>
diff --git a/qcsrc/common/sounds/_mod.qh b/qcsrc/common/sounds/_mod.qh
new file mode 100644 (file)
index 0000000..99eea86
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <common/sounds/all.qh>
index d75e08027171aee5cf812333cb56367bb974a3e8..1d96923ed0fe314b643e8dd510421c5615b34476 100644 (file)
@@ -39,8 +39,7 @@ void ClientState_attach(entity this)
 
     GetCvars(this, 0);  // get other cvars from player
 
-       // TODO: xonstat elo.txt support, until then just 404s
-       if (false && IS_REAL_CLIENT(this)) { PlayerStats_PlayerBasic_CheckUpdate(this); }
+       if (IS_REAL_CLIENT(this)) { PlayerStats_PlayerBasic_CheckUpdate(this); }
 
        // TODO: fold all of these into ClientState
 
index 87623da3630d62f7a98e1e20bea14cbf960accf6..a3ac40b670010a39cfff08aea30f1c7c826b4037 100644 (file)
@@ -816,7 +816,7 @@ LABEL(pickup)
        other.last_pickup = time;
 
        Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1);
-       _sound (other, CH_TRIGGER, (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM);
+       _sound (other, (this.itemdef.instanceOfPowerup ? CH_TRIGGER_SINGLE : CH_TRIGGER), (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM);
 
        if (this.classname == "droppedweapon")
                remove (this);
@@ -1421,29 +1421,31 @@ spawnfunc(item_invincible)
 // compatibility:
 spawnfunc(item_quad) { this.classname = "item_strength";spawnfunc_item_strength(this);}
 
-void target_items_use()
-{SELFPARAM();
-       if(activator.classname == "droppedweapon")
+void target_items_use(entity this, entity actor, entity trigger)
+{
+       other = trigger; // TODO
+
+       if(actor.classname == "droppedweapon")
        {
                EXACTTRIGGER_TOUCH;
-               remove(activator);
+               remove(actor);
                return;
        }
 
-       if (!IS_PLAYER(activator))
+       if (!IS_PLAYER(actor))
                return;
-       if(IS_DEAD(activator))
+       if(IS_DEAD(actor))
                return;
        EXACTTRIGGER_TOUCH;
 
-       FOREACH_ENTITY_ENT(enemy, activator,
+       FOREACH_ENTITY_ENT(enemy, actor,
        {
                if(it.classname == "droppedweapon")
                        remove(it);
        });
 
-       if(GiveItems(activator, 0, tokenize_console(self.netname)))
-               centerprint(activator, self.message);
+       if(GiveItems(actor, 0, tokenize_console(this.netname)))
+               centerprint(actor, this.message);
 }
 
 spawnfunc(target_items)
index 1eb4b182dee07359b7fd7d0baf8b2948c877071a..ce8307821ca11b0faea0811529e153eb2614661c 100644 (file)
@@ -114,8 +114,6 @@ float commodity_pickupevalfunc(entity player, entity item);
 void _StartItem(entity this, entity def, float defaultrespawntime, float defaultrespawntimejitter);
 
 
-void target_items_use ();
-
 float GiveWeapon(entity e, float wpn, float op, float val);
 
 float GiveBit(entity e, .float fld, float bit, float op, float val);
index 8c5a22c2fb8066849a0db85afd1a2d50c73a4121..c049b10828d94f28669e578f2e2d53ce082f307f 100644 (file)
@@ -1,6 +1,6 @@
 // generated file; do not modify
-#include "include.qc"
-#include "platforms.qc"
-#include "subs.qc"
-#include "teleporters.qc"
-#include "triggers.qc"
+#include <common/triggers/include.qc>
+#include <common/triggers/platforms.qc>
+#include <common/triggers/subs.qc>
+#include <common/triggers/teleporters.qc>
+#include <common/triggers/triggers.qc>
diff --git a/qcsrc/common/triggers/_mod.qh b/qcsrc/common/triggers/_mod.qh
new file mode 100644 (file)
index 0000000..2fba604
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include <common/triggers/include.qh>
+#include <common/triggers/platforms.qh>
+#include <common/triggers/subs.qh>
+#include <common/triggers/teleporters.qh>
+#include <common/triggers/triggers.qh>
index 2497d85084cd1b9b61a0ea9a48a3a15ad1a69829..675e3689b36e69daf1a5c8f562f4582512f6f1db 100644 (file)
@@ -1,19 +1,19 @@
 // generated file; do not modify
-#include "bobbing.qc"
-#include "breakable.qc"
-#include "button.qc"
-#include "conveyor.qc"
-#include "door.qc"
-#include "door_rotating.qc"
-#include "door_secret.qc"
-#include "fourier.qc"
-#include "include.qc"
-#include "ladder.qc"
-#include "pendulum.qc"
-#include "plat.qc"
-#include "pointparticles.qc"
-#include "rainsnow.qc"
-#include "rotating.qc"
-#include "stardust.qc"
-#include "train.qc"
-#include "vectormamamam.qc"
+#include <common/triggers/func/bobbing.qc>
+#include <common/triggers/func/breakable.qc>
+#include <common/triggers/func/button.qc>
+#include <common/triggers/func/conveyor.qc>
+#include <common/triggers/func/door.qc>
+#include <common/triggers/func/door_rotating.qc>
+#include <common/triggers/func/door_secret.qc>
+#include <common/triggers/func/fourier.qc>
+#include <common/triggers/func/include.qc>
+#include <common/triggers/func/ladder.qc>
+#include <common/triggers/func/pendulum.qc>
+#include <common/triggers/func/plat.qc>
+#include <common/triggers/func/pointparticles.qc>
+#include <common/triggers/func/rainsnow.qc>
+#include <common/triggers/func/rotating.qc>
+#include <common/triggers/func/stardust.qc>
+#include <common/triggers/func/train.qc>
+#include <common/triggers/func/vectormamamam.qc>
diff --git a/qcsrc/common/triggers/func/_mod.qh b/qcsrc/common/triggers/func/_mod.qh
new file mode 100644 (file)
index 0000000..fb179a4
--- /dev/null
@@ -0,0 +1,19 @@
+// generated file; do not modify
+#include <common/triggers/func/bobbing.qh>
+#include <common/triggers/func/breakable.qh>
+#include <common/triggers/func/button.qh>
+#include <common/triggers/func/conveyor.qh>
+#include <common/triggers/func/door.qh>
+#include <common/triggers/func/door_rotating.qh>
+#include <common/triggers/func/door_secret.qh>
+#include <common/triggers/func/fourier.qh>
+#include <common/triggers/func/include.qh>
+#include <common/triggers/func/ladder.qh>
+#include <common/triggers/func/pendulum.qh>
+#include <common/triggers/func/plat.qh>
+#include <common/triggers/func/pointparticles.qh>
+#include <common/triggers/func/rainsnow.qh>
+#include <common/triggers/func/rotating.qh>
+#include <common/triggers/func/stardust.qh>
+#include <common/triggers/func/train.qh>
+#include <common/triggers/func/vectormamamam.qh>
index feaf8785093d97b9663d67096ae3c8d22d853394..25857be3a1f48d659bc35a0f1a1c2a6467a845bc 100644 (file)
@@ -47,121 +47,121 @@ void func_breakable_damage(entity this, entity inflictor, entity attacker, float
 // func_breakable
 // - basically func_assault_destructible for general gameplay use
 //
-void LaunchDebris (string debrisname, vector force)
-{SELFPARAM();
+void LaunchDebris (entity this, string debrisname, vector force)
+{
        entity dbr = spawn();
-       vector org = self.absmin
-                  + '1 0 0' * random() * (self.absmax.x - self.absmin.x)
-                  + '0 1 0' * random() * (self.absmax.y - self.absmin.y)
-                  + '0 0 1' * random() * (self.absmax.z - self.absmin.z);
+       vector org = this.absmin
+                  + '1 0 0' * random() * (this.absmax.x - this.absmin.x)
+                  + '0 1 0' * random() * (this.absmax.y - this.absmin.y)
+                  + '0 0 1' * random() * (this.absmax.z - this.absmin.z);
        setorigin(dbr, org);
        _setmodel (dbr, debrisname );
-       dbr.skin = self.debrisskin;
-       dbr.colormap = self.colormap; // inherit team colors
-       dbr.owner = self; // do not be affected by our own explosion
-       dbr.movetype = self.debrismovetype;
-       dbr.solid = self.debrissolid;
+       dbr.skin = this.debrisskin;
+       dbr.colormap = this.colormap; // inherit team colors
+       dbr.owner = this; // do not be affected by our own explosion
+       dbr.movetype = this.debrismovetype;
+       dbr.solid = this.debrissolid;
        if(dbr.solid != SOLID_BSP) // SOLID_BSP has exact collision, MAYBE this works? TODO check this out
                setsize(dbr, '0 0 0', '0 0 0'); // needed for performance, until engine can deal better with it
-       dbr.velocity_x = self.debrisvelocity.x + self.debrisvelocityjitter.x * crandom();
-       dbr.velocity_y = self.debrisvelocity.y + self.debrisvelocityjitter.y * crandom();
-       dbr.velocity_z = self.debrisvelocity.z + self.debrisvelocityjitter.z * crandom();
-       self.velocity = self.velocity + force * self.debrisdamageforcescale;
-       dbr.avelocity_x = random()*self.debrisavelocityjitter.x;
-       dbr.avelocity_y = random()*self.debrisavelocityjitter.y;
-       dbr.avelocity_z = random()*self.debrisavelocityjitter.z;
-       dbr.damageforcescale = self.debrisdamageforcescale;
+       dbr.velocity_x = this.debrisvelocity.x + this.debrisvelocityjitter.x * crandom();
+       dbr.velocity_y = this.debrisvelocity.y + this.debrisvelocityjitter.y * crandom();
+       dbr.velocity_z = this.debrisvelocity.z + this.debrisvelocityjitter.z * crandom();
+       this.velocity = this.velocity + force * this.debrisdamageforcescale;
+       dbr.avelocity_x = random()*this.debrisavelocityjitter.x;
+       dbr.avelocity_y = random()*this.debrisavelocityjitter.y;
+       dbr.avelocity_z = random()*this.debrisavelocityjitter.z;
+       dbr.damageforcescale = this.debrisdamageforcescale;
        if(dbr.damageforcescale)
                dbr.takedamage = DAMAGE_YES;
-       SUB_SetFade(dbr, time + self.debristime + crandom() * self.debristimejitter, self.debrisfadetime);
+       SUB_SetFade(dbr, time + this.debristime + crandom() * this.debristimejitter, this.debrisfadetime);
 }
 
-void func_breakable_colormod()
-{SELFPARAM();
+void func_breakable_colormod(entity this)
+{
        float h;
-       if (!(self.spawnflags & 2))
+       if (!(this.spawnflags & 2))
                return;
-       h = self.health / self.max_health;
+       h = this.health / this.max_health;
        if(h < 0.25)
-               self.colormod = '1 0 0';
+               this.colormod = '1 0 0';
        else if(h <= 0.75)
-               self.colormod = '1 0 0' + '0 1 0' * (2 * h - 0.5);
+               this.colormod = '1 0 0' + '0 1 0' * (2 * h - 0.5);
        else
-               self.colormod = '1 1 1';
+               this.colormod = '1 1 1';
 
-       CSQCMODEL_AUTOUPDATE(self);
+       CSQCMODEL_AUTOUPDATE(this);
 }
 
-void func_breakable_look_destroyed()
-{SELFPARAM();
+void func_breakable_look_destroyed(entity this)
+{
        float floorZ;
 
-       if(self.solid == SOLID_BSP) // in case a misc_follow moved me, save the current origin first
-               self.dropped_origin = self.origin;
+       if(this.solid == SOLID_BSP) // in case a misc_follow moved me, save the current origin first
+               this.dropped_origin = this.origin;
 
-       if(self.mdl_dead == "")
-               self.effects |= EF_NODRAW;
+       if(this.mdl_dead == "")
+               this.effects |= EF_NODRAW;
        else {
-               if (self.origin == '0 0 0')     {       // probably no origin brush, so don't spawn in the middle of the map..
-                       floorZ = self.absmin.z;
-                       setorigin(self,((self.absmax+self.absmin)*.5));
-                       self.origin_z = floorZ;
+               if (this.origin == '0 0 0')     {       // probably no origin brush, so don't spawn in the middle of the map..
+                       floorZ = this.absmin.z;
+                       setorigin(this,((this.absmax+this.absmin)*.5));
+                       this.origin_z = floorZ;
                }
-               _setmodel(self, self.mdl_dead);
-               self.effects &= ~EF_NODRAW;
+               _setmodel(this, this.mdl_dead);
+               this.effects &= ~EF_NODRAW;
        }
 
-       CSQCMODEL_AUTOUPDATE(self);
+       CSQCMODEL_AUTOUPDATE(this);
 
-       self.solid = SOLID_NOT;
+       this.solid = SOLID_NOT;
 }
 
-void func_breakable_look_restore()
-{SELFPARAM();
-       _setmodel(self, self.mdl);
-       self.effects &= ~EF_NODRAW;
+void func_breakable_look_restore(entity this)
+{
+       _setmodel(this, this.mdl);
+       this.effects &= ~EF_NODRAW;
 
-       if(self.mdl_dead != "") // only do this if we use mdl_dead, to behave better with misc_follow
-               setorigin(self, self.dropped_origin);
+       if(this.mdl_dead != "") // only do this if we use mdl_dead, to behave better with misc_follow
+               setorigin(this, this.dropped_origin);
 
-       CSQCMODEL_AUTOUPDATE(self);
+       CSQCMODEL_AUTOUPDATE(this);
 
-       self.solid = SOLID_BSP;
+       this.solid = SOLID_BSP;
 }
 
-void func_breakable_behave_destroyed()
-{SELFPARAM();
-       self.health = self.max_health;
-       self.takedamage = DAMAGE_NO;
-       self.bot_attack = false;
-       self.event_damage = func_null;
-       self.state = 1;
-       if(self.spawnflags & 4)
-               self.use = func_null;
-       func_breakable_colormod();
-       if (self.noise1)
-               stopsound (self, CH_TRIGGER_SINGLE);
+void func_breakable_behave_destroyed(entity this)
+{
+       this.health = this.max_health;
+       this.takedamage = DAMAGE_NO;
+       this.bot_attack = false;
+       this.event_damage = func_null;
+       this.state = 1;
+       if(this.spawnflags & 4)
+               this.use = func_null;
+       func_breakable_colormod(this);
+       if (this.noise1)
+               stopsound (this, CH_TRIGGER_SINGLE);
 }
 
-void func_breakable_behave_restore()
-{SELFPARAM();
-       self.health = self.max_health;
-       if(self.sprite)
+void func_breakable_behave_restore(entity this)
+{
+       this.health = this.max_health;
+       if(this.sprite)
        {
-               WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
-               WaypointSprite_UpdateHealth(self.sprite, self.health);
+               WaypointSprite_UpdateMaxHealth(this.sprite, this.max_health);
+               WaypointSprite_UpdateHealth(this.sprite, this.health);
        }
-       if(!(self.spawnflags & 4))
+       if(!(this.spawnflags & 4))
        {
-               self.takedamage = DAMAGE_AIM;
-               self.bot_attack = true;
-               self.event_damage = func_breakable_damage;
+               this.takedamage = DAMAGE_AIM;
+               this.bot_attack = true;
+               this.event_damage = func_breakable_damage;
        }
-       self.state = 0;
-       self.nextthink = 0; // cancel auto respawn
-       func_breakable_colormod();
-       if (self.noise1)
-               _sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
+       this.state = 0;
+       this.nextthink = 0; // cancel auto respawn
+       func_breakable_colormod(this);
+       if (this.noise1)
+               _sound (this, CH_TRIGGER_SINGLE, this.noise1, VOL_BASE, ATTEN_NORM);
 }
 
 void func_breakable_init_for_player(entity player)
@@ -173,57 +173,67 @@ void func_breakable_init_for_player(entity player)
        }
 }
 
-void func_breakable_destroyed()
-{SELFPARAM();
-       func_breakable_look_destroyed();
-       func_breakable_behave_destroyed();
+void func_breakable_destroyed(entity this)
+{
+       func_breakable_look_destroyed(this);
+       func_breakable_behave_destroyed(this);
 
-       CSQCMODEL_AUTOUPDATE(self);
+       CSQCMODEL_AUTOUPDATE(this);
 }
 
-void func_breakable_restore()
-{SELFPARAM();
-       func_breakable_look_restore();
-       func_breakable_behave_restore();
+void func_breakable_restore(entity this, entity actor, entity trigger)
+{
+       func_breakable_look_restore(this);
+       func_breakable_behave_restore(this);
 
-       CSQCMODEL_AUTOUPDATE(self);
+       CSQCMODEL_AUTOUPDATE(this);
 }
 
-vector debrisforce; // global, set before calling this
-void func_breakable_destroy()
+void func_breakable_restore_self()
 {SELFPARAM();
+       func_breakable_restore(this, NULL, NULL);
+}
+
+vector debrisforce; // global, set before calling this
+void func_breakable_destroy(entity this, entity actor, entity trigger)
+{
        float n, i;
        string oldmsg;
 
-       activator = self.owner;
-       self.owner = world; // set by W_PrepareExplosionByDamage
+       entity act = this.owner;
+       this.owner = world; // set by W_PrepareExplosionByDamage
 
        // now throw around the debris
-       n = tokenize_console(self.debris);
+       n = tokenize_console(this.debris);
        for(i = 0; i < n; ++i)
-               LaunchDebris(argv(i), debrisforce);
+               LaunchDebris(this, argv(i), debrisforce);
 
-       func_breakable_destroyed();
+       func_breakable_destroyed(this);
 
-       if(self.noise)
-               _sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
+       if(this.noise)
+               _sound (this, CH_TRIGGER, this.noise, VOL_BASE, ATTEN_NORM);
 
-       if(self.dmg)
-               RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, world, self.dmg_force, DEATH_HURTTRIGGER.m_id, world);
+       if(this.dmg)
+               RadiusDamage(this, act, this.dmg, this.dmg_edge, this.dmg_radius, this, world, this.dmg_force, DEATH_HURTTRIGGER.m_id, world);
 
-       if(self.cnt) // TODO
-               __pointparticles(self.cnt, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
+       if(this.cnt) // TODO
+               __pointparticles(this.cnt, this.absmin * 0.5 + this.absmax * 0.5, '0 0 0', this.count);
 
-       if(self.respawntime)
+       if(this.respawntime)
        {
-               self.think = func_breakable_restore;
-               self.nextthink = time + self.respawntime + crandom() * self.respawntimejitter;
+               this.think = func_breakable_restore_self;
+               this.nextthink = time + this.respawntime + crandom() * this.respawntimejitter;
        }
 
-       oldmsg = self.message;
-       self.message = "";
-       SUB_UseTargets();
-       self.message = oldmsg;
+       oldmsg = this.message;
+       this.message = "";
+       SUB_UseTargets(this, act, trigger);
+       this.message = oldmsg;
+}
+
+void func_breakable_destroy_self()
+{SELFPARAM();
+       func_breakable_destroy(this, NULL, NULL);
 }
 
 void func_breakable_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
@@ -243,7 +253,7 @@ void func_breakable_damage(entity this, entity inflictor, entity attacker, float
                WaypointSprite_Ping(this.sprite);
                WaypointSprite_UpdateHealth(this.sprite, this.health);
        }
-       WITHSELF(this, func_breakable_colormod());
+       func_breakable_colormod(this);
 
        if(this.health <= 0)
        {
@@ -261,18 +271,18 @@ void func_breakable_damage(entity this, entity inflictor, entity attacker, float
                // do not explode NOW but in the NEXT FRAME!
                // because recursive calls to RadiusDamage are not allowed
                this.nextthink = time;
-               this.think = func_breakable_destroy;
+               this.think = func_breakable_destroy_self;
        }
 }
 
 void func_breakable_reset(entity this)
 {
        this.team = this.team_saved;
-       func_breakable_look_restore();
+       func_breakable_look_restore(this);
        if(this.spawnflags & 1)
-               func_breakable_behave_destroyed();
+               func_breakable_behave_destroyed(this);
        else
-               func_breakable_behave_restore();
+               func_breakable_behave_restore(this);
 
        CSQCMODEL_AUTOUPDATE(this);
 }
index e9ae0a5472042f24cfbada02a1ce52cdbd9fd07d..a1cabdc6c0326d2fa82bb766bfc1f5cd8c87abef 100644 (file)
@@ -9,8 +9,7 @@ void button_wait()
        self.state = STATE_TOP;
        self.SUB_NEXTTHINK = self.SUB_LTIME + self.wait;
        self.SUB_THINK = button_return;
-       activator = self.enemy;
-       SUB_UseTargets();
+       SUB_UseTargets(self, self.enemy, NULL);
        self.frame = 1;                 // use alternate textures
 }
 
@@ -60,13 +59,13 @@ void button_reset()
                self.takedamage = DAMAGE_YES;   // can be shot again
 }
 
-void button_use()
-{SELFPARAM();
-       if(self.active != ACTIVE_ACTIVE)
+void button_use(entity this, entity actor, entity trigger)
+{
+       if(this.active != ACTIVE_ACTIVE)
                return;
 
-       self.enemy = activator;
-       button_fire ();
+       this.enemy = actor;
+       WITHSELF(this, button_fire());
 }
 
 void button_touch()
index 583c737438ac3fae10131e2497018df65789ca38..5cd17e7bfc3e1544cdeca427a884d09b5b542828 100644 (file)
@@ -58,11 +58,11 @@ void conveyor_think()
 
 #ifdef SVQC
 
-void conveyor_use()
-{SELFPARAM();
-       self.state = !self.state;
+void conveyor_use(entity this, entity actor, entity trigger)
+{
+       this.state = !this.state;
 
-       self.SendFlags |= 2;
+       this.SendFlags |= 2;
 }
 
 void conveyor_reset(entity this)
index 1e19dfafc7205e3e74d9c1aad7daa23f34adf567..30de40fa9c51874e28ef6f4b2290b9b6b146c1b8 100644 (file)
@@ -141,7 +141,7 @@ void door_go_up()
        string oldmessage;
        oldmessage = self.message;
        self.message = "";
-       SUB_UseTargets();
+       SUB_UseTargets(self, NULL, NULL);
        self.message = oldmessage;
 }
 
@@ -206,16 +206,15 @@ bool door_check_keys(entity door, entity player)
        return false;
 }
 
-void door_fire()
-{SELFPARAM();
-       entity  starte;
-
-       if (self.owner != self)
-               objerror ("door_fire: self.owner != self");
+void door_fire(entity this, entity actor, entity trigger)
+{
+       entity starte;
+       if (this.owner != this)
+               objerror ("door_fire: this.owner != this");
 
-       if (self.spawnflags & DOOR_TOGGLE)
+       if (this.spawnflags & DOOR_TOGGLE)
        {
-               if (self.state == STATE_UP || self.state == STATE_TOP)
+               if (this.state == STATE_UP || this.state == STATE_TOP)
                {
                        starte = self;
                        do
@@ -262,14 +261,12 @@ void door_fire()
        setself(this);
 }
 
-void door_use()
-{SELFPARAM();
+void door_use(entity this, entity actor, entity trigger)
+{
        //dprint("door_use (model: ");dprint(self.model);dprint(")\n");
 
-       if (self.owner)
-       {
-               WITHSELF(self.owner, door_fire());
-       }
+       if (this.owner)
+               WITHSELF(this.owner, door_fire(this.owner, actor, trigger));
 }
 
 void door_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
@@ -289,7 +286,7 @@ void door_damage(entity this, entity inflictor, entity attacker, float damage, i
        {
                this.owner.health = this.owner.max_health;
                this.owner.takedamage = DAMAGE_NO;      // wil be reset upon return
-               WITHSELF(this.owner, door_use());
+               door_use(this.owner, NULL, NULL);
        }
 }
 
@@ -415,7 +412,7 @@ void door_rotating_go_up()
        string oldmessage;
        oldmessage = self.message;
        self.message = "";
-       SUB_UseTargets();
+       SUB_UseTargets(self, NULL, other); // TODO: is other needed here?
        self.message = oldmessage;
 }
 
@@ -447,10 +444,7 @@ void door_trigger_touch()
 
        self.door_finished = time + 1;
 
-       activator = other;
-
-       setself(self.owner);
-       door_use ();
+       door_use(this.owner, other, NULL);
 }
 
 void door_spawnfield(vector fmins, vector fmaxs)
index 70b5a0a09e884f3a3aac039b42fb8a55e973ea02..3e45302040ca1f805e0e4681f1ae2fc3b4b580fa 100644 (file)
@@ -13,59 +13,59 @@ const float SECRET_1ST_DOWN = 4;            // 1st move is down from arrow
 const float SECRET_NO_SHOOT = 8;               // only opened by trigger
 const float SECRET_YES_SHOOT = 16;     // shootable even if targeted
 
-void fd_secret_use()
-{SELFPARAM();
+void fd_secret_use(entity this, entity actor, entity trigger)
+{
        float temp;
        string message_save;
 
-       self.health = 10000;
-       self.bot_attack = true;
+       this.health = 10000;
+       this.bot_attack = true;
 
        // exit if still moving around...
-       if (self.origin != self.oldorigin)
+       if (this.origin != this.oldorigin)
                return;
 
-       message_save = self.message;
-       self.message = ""; // no more message
-       SUB_UseTargets();                               // fire all targets / killtargets
-       self.message = message_save;
+       message_save = this.message;
+       this.message = ""; // no more message
+       SUB_UseTargets(this, actor, trigger);                           // fire all targets / killtargets
+       this.message = message_save;
 
-       self.velocity = '0 0 0';
+       this.velocity = '0 0 0';
 
        // Make a sound, wait a little...
 
-       if (self.noise1 != "")
-               _sound(self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
-       self.SUB_NEXTTHINK = self.SUB_LTIME + 0.1;
+       if (this.noise1 != "")
+               _sound(this, CH_TRIGGER_SINGLE, this.noise1, VOL_BASE, ATTEN_NORM);
+       this.SUB_NEXTTHINK = this.SUB_LTIME + 0.1;
 
-       temp = 1 - (self.spawnflags & SECRET_1ST_LEFT); // 1 or -1
-       makevectors(self.mangle);
+       temp = 1 - (this.spawnflags & SECRET_1ST_LEFT); // 1 or -1
+       makevectors(this.mangle);
 
-       if (!self.t_width)
+       if (!this.t_width)
        {
-               if (self.spawnflags & SECRET_1ST_DOWN)
-                       self.t_width = fabs(v_up * self.size);
+               if (this.spawnflags & SECRET_1ST_DOWN)
+                       this.t_width = fabs(v_up * this.size);
                else
-                       self.t_width = fabs(v_right * self.size);
+                       this.t_width = fabs(v_right * this.size);
        }
 
-       if (!self.t_length)
-               self.t_length = fabs(v_forward * self.size);
+       if (!this.t_length)
+               this.t_length = fabs(v_forward * this.size);
 
-       if (self.spawnflags & SECRET_1ST_DOWN)
-               self.dest1 = self.origin - v_up * self.t_width;
+       if (this.spawnflags & SECRET_1ST_DOWN)
+               this.dest1 = this.origin - v_up * this.t_width;
        else
-               self.dest1 = self.origin + v_right * (self.t_width * temp);
+               this.dest1 = this.origin + v_right * (this.t_width * temp);
 
-       self.dest2 = self.dest1 + v_forward * self.t_length;
-       SUB_CalcMove(self.dest1, TSPEED_LINEAR, self.speed, fd_secret_move1);
-       if (self.noise2 != "")
-               _sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTEN_NORM);
+       this.dest2 = this.dest1 + v_forward * this.t_length;
+       WITHSELF(this, SUB_CalcMove(this.dest1, TSPEED_LINEAR, this.speed, fd_secret_move1));
+       if (this.noise2 != "")
+               _sound(this, CH_TRIGGER_SINGLE, this.noise2, VOL_BASE, ATTEN_NORM);
 }
 
 void fd_secret_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
-       WITHSELF(this, fd_secret_use());
+       fd_secret_use(this, NULL, NULL);
 }
 
 // Wait after first movement...
index 62b4d5a3629e846bc063e1368f55c189e890df50..9cec88f99463f0563bce49a05d76457b77d06946 100644 (file)
@@ -87,10 +87,10 @@ bool pointparticles_SendEntity(entity this, entity to, float fl)
        return 1;
 }
 
-void pointparticles_use()
-{SELFPARAM();
-       self.state = !self.state;
-       self.SendFlags |= 2;
+void pointparticles_use(entity this, entity actor, entity trigger)
+{
+       this.state = !this.state;
+       this.SendFlags |= 2;
 }
 
 void pointparticles_think()
index be2c7ed9c3d3828c972cfb592d764223f69c9d87..3f481ae78f4d30ec5dff0c2394efca09bf8717c1 100644 (file)
@@ -1,21 +1,20 @@
 #ifdef SVQC
-void func_rotating_setactive(float astate)
-{SELFPARAM();
-
+void func_rotating_setactive(entity this, int astate)
+{
        if (astate == ACTIVE_TOGGLE)
        {
-               if(self.active == ACTIVE_ACTIVE)
-                       self.active = ACTIVE_NOT;
+               if(this.active == ACTIVE_ACTIVE)
+                       this.active = ACTIVE_NOT;
                else
-                       self.active = ACTIVE_ACTIVE;
+                       this.active = ACTIVE_ACTIVE;
        }
        else
-               self.active = astate;
+               this.active = astate;
 
-       if(self.active  == ACTIVE_NOT)
-               self.avelocity = '0 0 0';
+       if(this.active  == ACTIVE_NOT)
+               this.avelocity = '0 0 0';
        else
-               self.avelocity = self.pos1;
+               this.avelocity = this.pos1;
 }
 
 /*QUAKED spawnfunc_func_rotating (0 .5 .8) ? - - X_AXIS Y_AXIS
index 2b27c7355ce5b814bc1ceac5dff541aacee79a4e..013d4597fb8bf73d36773c00494a1887f41b7b61 100644 (file)
@@ -1,11 +1,11 @@
 .float train_wait_turning;
 void() train_next;
 #ifdef SVQC
-void train_use();
+void train_use(entity this, entity actor, entity trigger);
 #endif
 void train_wait()
 {SELFPARAM();
-       WITHSELF(self.enemy, SUB_UseTargets());
+       SUB_UseTargets(this.enemy, NULL, NULL);
        self.enemy = world;
 
        // if turning is enabled, the train will turn toward the next point while waiting
@@ -176,12 +176,11 @@ void train_link()
        //Net_LinkEntity(self, 0, false, train_send);
 }
 
-void train_use()
+void train_use(entity this, entity actor, entity trigger)
 {
-    SELFPARAM();
-       self.SUB_NEXTTHINK = self.SUB_LTIME + 1;
-       self.SUB_THINK = train_next;
-       self.use = func_null; // not again
+       this.SUB_NEXTTHINK = this.SUB_LTIME + 1;
+       this.SUB_THINK = train_next;
+       this.use = func_null; // not again
 }
 
 void func_train_find(entity this)
index 5a6a06a93a10437a02b82b44affd1c2fc7ce14b5..4a8ec06ef5611342e724c355f6a0936796e726e8 100644 (file)
@@ -1,6 +1,6 @@
 // generated file; do not modify
-#include "corner.qc"
-#include "follow.qc"
-#include "include.qc"
-#include "laser.qc"
-#include "teleport_dest.qc"
+#include <common/triggers/misc/corner.qc>
+#include <common/triggers/misc/follow.qc>
+#include <common/triggers/misc/include.qc>
+#include <common/triggers/misc/laser.qc>
+#include <common/triggers/misc/teleport_dest.qc>
diff --git a/qcsrc/common/triggers/misc/_mod.qh b/qcsrc/common/triggers/misc/_mod.qh
new file mode 100644 (file)
index 0000000..98615cc
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include <common/triggers/misc/corner.qh>
+#include <common/triggers/misc/follow.qh>
+#include <common/triggers/misc/include.qh>
+#include <common/triggers/misc/laser.qh>
+#include <common/triggers/misc/teleport_dest.qh>
index 48e23a287d68de3c00eeeb1af9bf9a1531da0882..6e589eddf04bf4da822ce56e56699b7d3d79ed89 100644 (file)
@@ -10,42 +10,42 @@ REGISTER_NET_LINKED(ENT_CLIENT_LASER)
 
 #ifdef SVQC
 .float modelscale;
-void misc_laser_aim()
-{SELFPARAM();
+void misc_laser_aim(entity this)
+{
        vector a;
-       if(self.enemy)
+       if(this.enemy)
        {
-               if(self.spawnflags & 2)
+               if(this.spawnflags & 2)
                {
-                       if(self.enemy.origin != self.mangle)
+                       if(this.enemy.origin != this.mangle)
                        {
-                               self.mangle = self.enemy.origin;
-                               self.SendFlags |= 2;
+                               this.mangle = this.enemy.origin;
+                               this.SendFlags |= 2;
                        }
                }
                else
                {
-                       a = vectoangles(self.enemy.origin - self.origin);
+                       a = vectoangles(this.enemy.origin - this.origin);
                        a_x = -a_x;
-                       if(a != self.mangle)
+                       if(a != this.mangle)
                        {
-                               self.mangle = a;
-                               self.SendFlags |= 2;
+                               this.mangle = a;
+                               this.SendFlags |= 2;
                        }
                }
        }
        else
        {
-               if(self.angles != self.mangle)
+               if(this.angles != this.mangle)
                {
-                       self.mangle = self.angles;
-                       self.SendFlags |= 2;
+                       this.mangle = this.angles;
+                       this.SendFlags |= 2;
                }
        }
-       if(self.origin != self.oldorigin)
+       if(this.origin != this.oldorigin)
        {
-               self.SendFlags |= 1;
-               self.oldorigin = self.origin;
+               this.SendFlags |= 1;
+               this.oldorigin = this.origin;
        }
 }
 
@@ -67,7 +67,7 @@ void misc_laser_think()
        if(!self.state)
                return;
 
-       misc_laser_aim();
+       misc_laser_aim(this);
 
        if(self.enemy)
        {
@@ -97,8 +97,7 @@ void misc_laser_think()
                        {
                                self.count = 1;
 
-                               activator = self.enemy.pusher;
-                               WITHSELF(self.enemy, SUB_UseTargets());
+                               SUB_UseTargets(self.enemy, self.enemy.pusher, NULL);
                        }
                }
                else
@@ -107,8 +106,7 @@ void misc_laser_think()
                        {
                                self.count = 0;
 
-                               activator = self.enemy.pusher;
-                               WITHSELF(self.enemy, SUB_UseTargets());
+                               SUB_UseTargets(self.enemy, self.enemy.pusher, NULL);
                        }
                }
        }
@@ -188,11 +186,11 @@ Keys:
 "dmg"
  damage per second (-1 for a laser that kills immediately)
 */
-void laser_use()
-{SELFPARAM();
-       self.state = !self.state;
-       self.SendFlags |= 4;
-       misc_laser_aim();
+void laser_use(entity this, entity actor, entity trigger)
+{
+       this.state = !this.state;
+       this.SendFlags |= 4;
+       misc_laser_aim(this);
 }
 
 void laser_reset(entity this)
index a2efc1142e316aeee6e4cd5b4ab740cc72a924ea..7429f2b3550bfbf95db857da277f7b9f45d8d5fc 100644 (file)
@@ -133,16 +133,16 @@ void plat_outside_touch()
                plat_go_down ();
 }
 
-void plat_trigger_use()
-{SELFPARAM();
+void plat_trigger_use(entity this, entity actor, entity trigger)
+{
 #ifdef SVQC
-       if (self.think)
+       if (this.think)
                return;         // already activated
 #elif defined(CSQC)
-       if(self.move_think)
+       if(this.move_think)
                return;
 #endif
-       plat_go_down();
+       WITHSELF(this, plat_go_down());
 }
 
 
@@ -176,12 +176,12 @@ void plat_crush()
        }
 }
 
-void plat_use()
-{SELFPARAM();
-       self.use = func_null;
-       if (self.state != 4)
+void plat_use(entity this, entity actor, entity trigger)
+{
+       this.use = func_null;
+       if (this.state != 4)
                objerror ("plat_use: not in up state");
-       plat_go_down();
+       WITHSELF(this, plat_go_down());
 }
 
 .string sound1, sound2;
index e0a581b7cff7fa693abc6f07f24afb00b754cb9d..9a32e327a23fd324d2a21c34bf0a136c38f65dba 100644 (file)
@@ -5,7 +5,7 @@
 
 void() plat_center_touch;
 void() plat_outside_touch;
-void() plat_trigger_use;
+void plat_trigger_use(entity this, entity actor, entity trigger);
 void() plat_go_up;
 void() plat_go_down;
 void() plat_crush;
index 87c9c329099641e2c1cab962c2f5b8d55d4f26de..7d6ea9de981ce038ea9d9603e6cd1258e00946f1 100644 (file)
@@ -2,7 +2,6 @@ void SUB_NullThink() { }
 
 void()  SUB_CalcMoveDone;
 void() SUB_CalcAngleMoveDone;
-//void() SUB_UseTargets;
 
 /*
 ==================
index aebda5d0a33b5a9ac3709b157f2e21a22d69b893..6a844261379a971e3d76da1a371008aac2c3f63a 100644 (file)
@@ -36,6 +36,7 @@
 
 #endif
 
+
 void SUB_SetFade (entity ent, float when, float fading_time);
 void SUB_VanishOrRemove (entity ent);
 
@@ -55,7 +56,7 @@ void SUB_VanishOrRemove (entity ent);
 .string  platmovetype;
 .float platmovetype_start, platmovetype_end;
 
-entity activator;
+//entity activator;
 
 .string killtarget;
 
index fdfabf75b013fab230639866442aa4c587bc526d..195d5e53481348a3041d8ef783088f6f35c0296e 100644 (file)
@@ -1,8 +1,8 @@
 // generated file; do not modify
-#include "changelevel.qc"
-#include "include.qc"
-#include "location.qc"
-#include "music.qc"
-#include "spawn.qc"
-#include "speaker.qc"
-#include "voicescript.qc"
+#include <common/triggers/target/changelevel.qc>
+#include <common/triggers/target/include.qc>
+#include <common/triggers/target/location.qc>
+#include <common/triggers/target/music.qc>
+#include <common/triggers/target/spawn.qc>
+#include <common/triggers/target/speaker.qc>
+#include <common/triggers/target/voicescript.qc>
diff --git a/qcsrc/common/triggers/target/_mod.qh b/qcsrc/common/triggers/target/_mod.qh
new file mode 100644 (file)
index 0000000..a5462d4
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include <common/triggers/target/changelevel.qh>
+#include <common/triggers/target/include.qh>
+#include <common/triggers/target/location.qh>
+#include <common/triggers/target/music.qh>
+#include <common/triggers/target/spawn.qh>
+#include <common/triggers/target/speaker.qh>
+#include <common/triggers/target/voicescript.qh>
index 69f444073f16ce31432628d63cc95fa05dfb24fb..d4bc850de11eef0766ec3aeeefca3aca59ac75e6 100644 (file)
@@ -2,42 +2,40 @@
 .string chmap, gametype;
 .entity chlevel_targ;
 
-
-void target_changelevel_use()
+void target_changelevel_use(entity this, entity actor, entity trigger)
 {
-       SELFPARAM();
-       if(self.spawnflags & 2)
+       if(this.spawnflags & 2)
        {
                // simply don't react if a non-player triggers it
-               if(!IS_PLAYER(activator)) { return; }
+               if(!IS_PLAYER(actor)) { return; }
 
-               activator.chlevel_targ = self;
+               actor.chlevel_targ = this;
 
                int plnum = 0;
                int realplnum = 0;
                // let's not count bots
                FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), {
                        ++realplnum;
-                       if(it.chlevel_targ == self)
+                       if(it.chlevel_targ == this)
                                ++plnum;
                });
-               if(plnum < ceil(realplnum * min(1, self.count))) // 70% of players
+               if(plnum < ceil(realplnum * min(1, this.count))) // 70% of players
                        return;
        }
 
-       if(self.gametype != "")
-               MapInfo_SwitchGameType(MapInfo_Type_FromString(self.gametype));
+       if(this.gametype != "")
+               MapInfo_SwitchGameType(MapInfo_Type_FromString(this.gametype));
 
-       if (self.chmap == "")
+       if (this.chmap == "")
                localcmd("endmatch\n");
        else
-               localcmd(strcat("changelevel ", self.chmap, "\n"));
+               localcmd(strcat("changelevel ", this.chmap, "\n"));
 }
 
 spawnfunc(target_changelevel)
 {
-       self.use = target_changelevel_use;
+       this.use = target_changelevel_use;
 
-       if(!self.count) { self.count = 0.7; }
+       if(!this.count) { this.count = 0.7; }
 }
 #endif
index 5a4e86c48b370d0dd65baa1f0553abfc433eefb0..c48a0ba26b351270856be3c499e156fbdbd8c2dc 100644 (file)
@@ -44,16 +44,16 @@ void target_music_kill()
             WITHSELF(it, target_music_sendto(MSG_ALL, 0));
        });
 }
-void target_music_use()
+void target_music_use(entity this, entity actor, entity trigger)
 {
-       if(!activator)
+       if(!actor)
                return;
-       if(IS_REAL_CLIENT(activator))
+       if(IS_REAL_CLIENT(actor))
        {
-               msg_entity = activator;
+               msg_entity = actor;
                target_music_sendto(MSG_ONE, 1);
        }
-       FOREACH_CLIENT(IS_SPEC(it) && it.enemy == activator, {
+       FOREACH_CLIENT(IS_SPEC(it) && it.enemy == actor, {
                msg_entity = it;
                target_music_sendto(MSG_ONE, 1);
        });
@@ -132,10 +132,10 @@ void trigger_music_reset(entity this)
        this.cnt = !(this.spawnflags & 1);
        this.SendFlags |= 0x80;
 }
-void trigger_music_use()
-{SELFPARAM();
-       self.cnt = !self.cnt;
-       self.SendFlags |= 0x80;
+void trigger_music_use(entity this, entity actor, entity trigger)
+{
+       this.cnt = !this.cnt;
+       this.SendFlags |= 0x80;
 }
 spawnfunc(trigger_music)
 {
index 82793c9367f969c04b4ecc6a7361e84cc89d9923..74ac8fd99ad8899e6d556cbf9837929f0e2b2664 100644 (file)
@@ -31,13 +31,12 @@ void target_spawn_helper_setsize()
        setsize(self, self.mins, self.maxs);
 }
 
-void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity t3, entity t4, entity act)
-{SELFPARAM();
+void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, entity t2, entity t3, entity t4, entity act, entity trigger)
+{
        float i, n, valuefieldpos;
        string key, value, valuefield, valueoffset, valueoffsetrandom;
        entity valueent;
        vector data, data2;
-       entity oldactivator;
 
        n = tokenize_console(msg);
 
@@ -97,7 +96,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
 
                                if(value == "self")
                                {
-                                       valueent = self;
+                                       valueent = this;
                                        value = "";
                                }
                                else if(value == "activator")
@@ -107,7 +106,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                }
                                else if(value == "other")
                                {
-                                       valueent = other;
+                                       valueent = trigger;
                                        value = "";
                                }
                                else if(value == "pusher")
@@ -218,11 +217,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                value = strcat("target_spawn_helper", value);
                        putentityfieldstring(target_spawn_spawnfunc_field, e, value);
 
-                       oldactivator = activator;
-
-                       activator = act;
                        WITHSELF(e, e.target_spawn_spawnfunc(e));
-                       activator = oldactivator;
 
                        // We called an external function, so we have to re-tokenize msg.
                        n = tokenize_console(msg);
@@ -236,72 +231,72 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
        }
 }
 
-void target_spawn_useon(entity e)
-{SELFPARAM();
-       self.target_spawn_activator = activator;
+void target_spawn_useon(entity e, entity this, entity actor, entity trigger)
+{
+       this.target_spawn_activator = actor;
        target_spawn_edit_entity(
+               this,
                e,
-               self.message,
-               find(world, targetname, self.killtarget),
-               find(world, targetname, self.target2),
-               find(world, targetname, self.target3),
-               find(world, targetname, self.target4),
-               activator
+               this.message,
+               find(world, targetname, this.killtarget),
+               find(world, targetname, this.target2),
+               find(world, targetname, this.target3),
+               find(world, targetname, this.target4),
+               actor,
+               trigger
        );
 }
 
-float target_spawn_cancreate()
-{SELFPARAM();
+bool target_spawn_cancreate(entity this)
+{
        float c;
        entity e;
 
-       c = self.count;
+       c = this.count;
        if(c == 0) // no limit?
-               return 1;
+               return true;
 
        ++c; // increase count to not include MYSELF
-       for(e = world; (e = findfloat(e, target_spawn_id, self.target_spawn_id)); --c)
+       for(e = world; (e = findfloat(e, target_spawn_id, this.target_spawn_id)); --c)
                ;
 
        // if c now is 0, we have AT LEAST the given count (maybe more), so don't spawn any more
        if(c == 0)
-               return 0;
-       return 1;
+               return false;
+       return true;
 }
 
-void target_spawn_use()
-{SELFPARAM();
-       entity e;
-
-       if(self.target == "")
+void target_spawn_use(entity this, entity actor, entity trigger)
+{
+       if(this.target == "")
        {
                // spawn new entity
-               if(!target_spawn_cancreate())
+               if(!target_spawn_cancreate(this))
                        return;
-               e = spawn();
+               entity e = spawn();
                e.spawnfunc_checked = true;
-               target_spawn_useon(e);
-               e.target_spawn_id = self.target_spawn_id;
+               target_spawn_useon(e, this, actor, trigger);
+               e.target_spawn_id = this.target_spawn_id;
        }
-       else if(self.target == "*activator")
+       else if(this.target == "*activator")
        {
                // edit entity
-               if(activator)
-                       target_spawn_useon(activator);
+               if(actor)
+                       target_spawn_useon(actor, this, actor, trigger);
        }
        else
        {
                // edit entity
-               for(e = world; (e = find(e, targetname, self.target)); )
-                       target_spawn_useon(e);
+               for(entity e = world; (e = find(e, targetname, this.target)); )
+                       target_spawn_useon(e, this, actor, trigger);
        }
 }
 
 void target_spawn_spawnfirst(entity this)
 {
-       activator = self.target_spawn_activator;
-       if(self.spawnflags & 2)
-               target_spawn_use();
+       entity act = this.target_spawn_activator;
+       if(this.spawnflags & 2)
+               target_spawn_use(this, act, NULL);
 }
 
 void initialize_field_db()
index 3c43b0e9ea590f7ed0528080d0bbaab65f80f327..046128f796d2cef4d353942496d952cb8d8c11c5 100644 (file)
@@ -1,21 +1,21 @@
 #ifdef SVQC
 // TODO add a way to do looped sounds with sound(); then complete this entity
-void target_speaker_use_off();
-void target_speaker_use_activator()
-{SELFPARAM();
-       if (!IS_REAL_CLIENT(activator))
+void target_speaker_use_off(entity this, entity actor, entity trigger);
+void target_speaker_use_activator(entity this, entity actor, entity trigger)
+{
+       if (!IS_REAL_CLIENT(actor))
                return;
        string snd;
-       if(substring(self.noise, 0, 1) == "*")
+       if(substring(this.noise, 0, 1) == "*")
        {
-               var .string sample = GetVoiceMessageSampleField(substring(self.noise, 1, -1));
+               var .string sample = GetVoiceMessageSampleField(substring(this.noise, 1, -1));
                if(GetPlayerSoundSampleField_notFound)
                        snd = SND(Null);
-               else if(activator.(sample) == "")
+               else if(actor.(sample) == "")
                        snd = SND(Null);
                else
                {
-                       tokenize_console(activator.(sample));
+                       tokenize_console(actor.(sample));
                        float n;
                        n = stof(argv(1));
                        if(n > 0)
@@ -25,23 +25,23 @@ void target_speaker_use_activator()
                }
        }
        else
-               snd = self.noise;
-       msg_entity = activator;
-       soundto(MSG_ONE, self, CH_TRIGGER, snd, VOL_BASE * self.volume, self.atten);
+               snd = this.noise;
+       msg_entity = actor;
+       soundto(MSG_ONE, this, CH_TRIGGER, snd, VOL_BASE * this.volume, this.atten);
 }
-void target_speaker_use_on()
-{SELFPARAM();
+void target_speaker_use_on(entity this, entity actor, entity trigger)
+{
        string snd;
-       if(substring(self.noise, 0, 1) == "*")
+       if(substring(this.noise, 0, 1) == "*")
        {
-               var .string sample = GetVoiceMessageSampleField(substring(self.noise, 1, -1));
+               var .string sample = GetVoiceMessageSampleField(substring(this.noise, 1, -1));
                if(GetPlayerSoundSampleField_notFound)
                        snd = SND(Null);
-               else if(activator.(sample) == "")
+               else if(actor.(sample) == "")
                        snd = SND(Null);
                else
                {
-                       tokenize_console(activator.(sample));
+                       tokenize_console(actor.(sample));
                        float n;
                        n = stof(argv(1));
                        if(n > 0)
@@ -51,27 +51,27 @@ void target_speaker_use_on()
                }
        }
        else
-               snd = self.noise;
-       _sound(self, CH_TRIGGER_SINGLE, snd, VOL_BASE * self.volume, self.atten);
-       if(self.spawnflags & 3)
-               self.use = target_speaker_use_off;
+               snd = this.noise;
+       _sound(this, CH_TRIGGER_SINGLE, snd, VOL_BASE * this.volume, this.atten);
+       if(this.spawnflags & 3)
+               this.use = target_speaker_use_off;
 }
-void target_speaker_use_off()
-{SELFPARAM();
-       sound(self, CH_TRIGGER_SINGLE, SND_Null, VOL_BASE * self.volume, self.atten);
-       self.use = target_speaker_use_on;
+void target_speaker_use_off(entity this, entity actor, entity trigger)
+{
+       sound(this, CH_TRIGGER_SINGLE, SND_Null, VOL_BASE * this.volume, this.atten);
+       this.use = target_speaker_use_on;
 }
 void target_speaker_reset(entity this)
 {
        if(this.spawnflags & 1) // LOOPED_ON
        {
                if(this.use == target_speaker_use_on)
-                       target_speaker_use_on();
+                       target_speaker_use_on(this, NULL, NULL);
        }
        else if(this.spawnflags & 2)
        {
                if(this.use == target_speaker_use_off)
-                       target_speaker_use_off();
+                       target_speaker_use_off(this, NULL, NULL);
        }
 }
 
@@ -101,7 +101,7 @@ spawnfunc(target_speaker)
                        self.use = target_speaker_use_activator;
                else if(self.spawnflags & 1) // LOOPED_ON
                {
-                       target_speaker_use_on();
+                       target_speaker_use_on(self, NULL, NULL);
                        self.reset = target_speaker_reset;
                }
                else if(self.spawnflags & 2) // LOOPED_OFF
index 1d1816a7741e988f46f9ee70f6773efc5843fe6f..e8433177094dfec0337a9e101f878bface1873c4 100644 (file)
@@ -9,13 +9,13 @@ void target_voicescript_clear(entity pl)
        pl.voicescript = world;
 }
 
-void target_voicescript_use()
-{SELFPARAM();
-       if(activator.voicescript != self)
+void target_voicescript_use(entity this, entity actor, entity trigger)
+{
+       if(actor.voicescript != this)
        {
-               activator.voicescript = self;
-               activator.voicescript_index = 0;
-               activator.voicescript_nextthink = time + self.delay;
+               actor.voicescript = this;
+               actor.voicescript_index = 0;
+               actor.voicescript_nextthink = time + this.delay;
        }
 }
 
index b0571dc310b4e2c333d8dab4142b62bf0a425f15..9366678b15c50dd79db5f194dcc3aadfec7d6a57 100644 (file)
@@ -30,7 +30,7 @@ entity teleport_first;
 
 #ifdef SVQC
 
-void trigger_teleport_use();
+void trigger_teleport_use(entity this, entity actor, entity trigger);
 
 #define TDEATHLOOP(o) \
        entity head; \
index 03fa001a8bdf4cf2d647d5816f44489ffda1bbe7..05a496eb39261d72b390dca54022038cc35e5c11 100644 (file)
@@ -1,25 +1,25 @@
 // generated file; do not modify
-#include "counter.qc"
-#include "delay.qc"
-#include "disablerelay.qc"
-#include "flipflop.qc"
-#include "gamestart.qc"
-#include "gravity.qc"
-#include "heal.qc"
-#include "hurt.qc"
-#include "impulse.qc"
-#include "include.qc"
-#include "jumppads.qc"
-#include "keylock.qc"
-#include "magicear.qc"
-#include "monoflop.qc"
-#include "multi.qc"
-#include "multivibrator.qc"
-#include "relay.qc"
-#include "relay_activators.qc"
-#include "relay_if.qc"
-#include "relay_teamcheck.qc"
-#include "secret.qc"
-#include "swamp.qc"
-#include "teleport.qc"
-#include "viewloc.qc"
+#include <common/triggers/trigger/counter.qc>
+#include <common/triggers/trigger/delay.qc>
+#include <common/triggers/trigger/disablerelay.qc>
+#include <common/triggers/trigger/flipflop.qc>
+#include <common/triggers/trigger/gamestart.qc>
+#include <common/triggers/trigger/gravity.qc>
+#include <common/triggers/trigger/heal.qc>
+#include <common/triggers/trigger/hurt.qc>
+#include <common/triggers/trigger/impulse.qc>
+#include <common/triggers/trigger/include.qc>
+#include <common/triggers/trigger/jumppads.qc>
+#include <common/triggers/trigger/keylock.qc>
+#include <common/triggers/trigger/magicear.qc>
+#include <common/triggers/trigger/monoflop.qc>
+#include <common/triggers/trigger/multi.qc>
+#include <common/triggers/trigger/multivibrator.qc>
+#include <common/triggers/trigger/relay.qc>
+#include <common/triggers/trigger/relay_activators.qc>
+#include <common/triggers/trigger/relay_if.qc>
+#include <common/triggers/trigger/relay_teamcheck.qc>
+#include <common/triggers/trigger/secret.qc>
+#include <common/triggers/trigger/swamp.qc>
+#include <common/triggers/trigger/teleport.qc>
+#include <common/triggers/trigger/viewloc.qc>
diff --git a/qcsrc/common/triggers/trigger/_mod.qh b/qcsrc/common/triggers/trigger/_mod.qh
new file mode 100644 (file)
index 0000000..2c7477b
--- /dev/null
@@ -0,0 +1,25 @@
+// generated file; do not modify
+#include <common/triggers/trigger/counter.qh>
+#include <common/triggers/trigger/delay.qh>
+#include <common/triggers/trigger/disablerelay.qh>
+#include <common/triggers/trigger/flipflop.qh>
+#include <common/triggers/trigger/gamestart.qh>
+#include <common/triggers/trigger/gravity.qh>
+#include <common/triggers/trigger/heal.qh>
+#include <common/triggers/trigger/hurt.qh>
+#include <common/triggers/trigger/impulse.qh>
+#include <common/triggers/trigger/include.qh>
+#include <common/triggers/trigger/jumppads.qh>
+#include <common/triggers/trigger/keylock.qh>
+#include <common/triggers/trigger/magicear.qh>
+#include <common/triggers/trigger/monoflop.qh>
+#include <common/triggers/trigger/multi.qh>
+#include <common/triggers/trigger/multivibrator.qh>
+#include <common/triggers/trigger/relay.qh>
+#include <common/triggers/trigger/relay_activators.qh>
+#include <common/triggers/trigger/relay_if.qh>
+#include <common/triggers/trigger/relay_teamcheck.qh>
+#include <common/triggers/trigger/secret.qh>
+#include <common/triggers/trigger/swamp.qh>
+#include <common/triggers/trigger/teleport.qh>
+#include <common/triggers/trigger/viewloc.qh>
index d5811e479ed2bec89677d1d0bde1634ae28acfbf..5ada6805fc067ae7d4410ca29a5fb39f4ec8fd57 100644 (file)
@@ -1,25 +1,25 @@
 #ifdef SVQC
-void counter_use()
-{SELFPARAM();
-       self.count -= 1;
-       if (self.count < 0)
+void counter_use(entity this, entity actor, entity trigger)
+{
+       this.count -= 1;
+       if (this.count < 0)
                return;
 
-       if (self.count == 0)
+       if (this.count == 0)
        {
-               if(IS_PLAYER(activator) && (self.spawnflags & SPAWNFLAG_NOMESSAGE) == 0)
-                       Send_Notification(NOTIF_ONE, activator, MSG_CENTER, CENTER_SEQUENCE_COMPLETED);
+               if(IS_PLAYER(actor) && (this.spawnflags & SPAWNFLAG_NOMESSAGE) == 0)
+                       Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_SEQUENCE_COMPLETED);
 
-               self.enemy = activator;
-               multi_trigger ();
+               this.enemy = actor;
+               WITHSELF(this, multi_trigger ());
        }
        else
        {
-               if(IS_PLAYER(activator) && (self.spawnflags & SPAWNFLAG_NOMESSAGE) == 0)
-               if(self.count >= 4)
-                       Send_Notification(NOTIF_ONE, activator, MSG_CENTER, CENTER_SEQUENCE_COUNTER);
+               if(IS_PLAYER(actor) && (this.spawnflags & SPAWNFLAG_NOMESSAGE) == 0)
+               if(this.count >= 4)
+                       Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_SEQUENCE_COUNTER);
                else
-                       Send_Notification(NOTIF_ONE, activator, MSG_CENTER, CENTER_SEQUENCE_COUNTER_FEWMORE, self.count);
+                       Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_SEQUENCE_COUNTER_FEWMORE, this.count);
        }
 }
 
index fb341ebb77a124bb543dab8e2871dca5f0d7ede8..02c1aa968b7e14d302072f7d665e369fafcd9da3 100644 (file)
@@ -1,8 +1,8 @@
 #ifdef SVQC
-void delay_use()
-{SELFPARAM();
-    self.think = SUB_UseTargets;
-   self.nextthink = self.wait;
+void delay_use(entity this, entity actor, entity trigger)
+{
+   this.think = SUB_UseTargets_self;
+   this.nextthink = this.wait;
 }
 
 void delay_reset(entity this)
index a1f13d277e5f87e68d3391323596d0d9072cc659..a09e0ba09750a32cb4811116bd50f4bed1562d6b 100644 (file)
@@ -1,12 +1,9 @@
 #ifdef SVQC
-void trigger_disablerelay_use()
-{SELFPARAM();
-       entity e;
-
-       float a, b;
-       a = b = 0;
+void trigger_disablerelay_use(entity this, entity actor, entity trigger)
+{
+       int a = 0, b = 0;
 
-       for(e = world; (e = find(e, targetname, self.target)); )
+       for(entity e = world; (e = find(e, targetname, this.target)); )
        {
                if(e.use == SUB_UseTargets)
                {
@@ -26,6 +23,6 @@ void trigger_disablerelay_use()
 
 spawnfunc(trigger_disablerelay)
 {
-       self.use = trigger_disablerelay_use;
+       this.use = trigger_disablerelay_use;
 }
 #endif
index d2549f6c506b228500974313e3f13f5bab397597..e4923bdf545bdf8cb43740858ffc384071191539 100644 (file)
@@ -2,11 +2,11 @@
 /*QUAKED spawnfunc_trigger_flipflop (.5 .5 .5) (-8 -8 -8) (8 8 8) START_ENABLED
 "Flip-flop" trigger gate... lets only every second trigger event through
 */
-void flipflop_use()
-{SELFPARAM();
-    self.state = !self.state;
-    if(self.state)
-        SUB_UseTargets();
+void flipflop_use(entity this, entity actor, entity trigger)
+{
+    this.state = !this.state;
+    if(this.state)
+        SUB_UseTargets(this, actor, trigger);
 }
 
 spawnfunc(trigger_flipflop)
index 9c0c0791ab3443c3b25672c1dda77b42add84dba..5f3206a2af5bb470b16c388e306381e0b8aa8aae 100644 (file)
@@ -1,24 +1,28 @@
 #ifdef SVQC
-void gamestart_use(entity this)
+void gamestart_use(entity this, entity actor, entity trigger)
 {
-       activator = self;
-       SUB_UseTargets();
-       remove(self);
+       SUB_UseTargets(this, this, trigger);
+       remove(this);
+}
+
+void gamestart_use_this(entity this)
+{
+       gamestart_use(this, NULL, NULL);
 }
 
 void self_spawnfunc_trigger_gamestart();
 spawnfunc(trigger_gamestart)
 {
-       setuse(this, gamestart_use);
+       this.use = gamestart_use;
        this.reset2 = self_spawnfunc_trigger_gamestart;
 
        if(this.wait)
        {
-               this.think = this.use;
+               this.think = adaptor_think2use;
                this.nextthink = game_starttime + this.wait;
        }
        else
-               InitializeEntity(this, gamestart_use, INITPRIO_FINDTARGET);
+               InitializeEntity(this, gamestart_use_this, INITPRIO_FINDTARGET);
 }
 void self_spawnfunc_trigger_gamestart() { SELFPARAM(); spawnfunc_trigger_gamestart(this); }
 
index a6b3eedde651521db1a84c409b00940cec16c6a3..c7dd586cb3b3f266435bed42dd0a458be6511d7e 100644 (file)
@@ -32,9 +32,9 @@ void trigger_gravity_check_think()
        }
 }
 
-void trigger_gravity_use()
-{SELFPARAM();
-       self.state = !self.state;
+void trigger_gravity_use(entity this, entity actor, entity trigger)
+{
+       this.state = !this.state;
 }
 
 void trigger_gravity_touch()
index 771b4f0648d0c0cc42b636135cadf564312ca78a..a7ee567ebc08ec3c8a0615720e4cbe1fd35af98f 100644 (file)
@@ -1,10 +1,10 @@
 #ifdef SVQC
-void trigger_hurt_use()
-{SELFPARAM();
-       if(IS_PLAYER(activator))
-               self.enemy = activator;
+void trigger_hurt_use(entity this, entity actor, entity trigger)
+{
+       if(IS_PLAYER(actor))
+               this.enemy = actor;
        else
-               self.enemy = world; // let's just destroy it, if taking over is too much work
+               this.enemy = world; // let's just destroy it, if taking over is too much work
 }
 
 .float triggerhurttime;
index 556fe66358ed00fae0eda7d5bd4786824b43f8d1..44413a9c4b9171f8182c0cf8a04f9de0b08e8e24 100644 (file)
@@ -3,12 +3,12 @@
 #include "jumppads.qh"
 #include <common/physics/movetypes/movetypes.qh>
 
-void trigger_push_use()
-{SELFPARAM();
+void trigger_push_use(entity this, entity actor, entity trigger)
+{
        if(teamplay)
        {
-               self.team = activator.team;
-               self.SendFlags |= 2;
+               this.team = actor.team;
+               this.SendFlags |= 2;
        }
 }
 #endif
@@ -235,10 +235,7 @@ void trigger_push_touch()
        }
 
        if(this.enemy.target)
-       {
-               activator = other;
-               WITHSELF(this.enemy, SUB_UseTargets());
-       }
+               SUB_UseTargets(this.enemy, other, other); // TODO: do we need other as trigger too?
 
        if (other.flags & FL_PROJECTILE)
        {
@@ -440,8 +437,6 @@ spawnfunc(target_position) { target_push_init(this); }
 
 NET_HANDLE(ENT_CLIENT_TRIGGER_PUSH, bool isnew)
 {
-       make_pure(this);
-
        this.classname = "jumppad";
        int mytm = ReadByte(); if(mytm) { this.team = mytm - 1; }
        this.spawnflags = ReadInt24_t();
index 07973614b88a23ae9a24ed8a6a70030706ede592..6fd61dc9da7561fb0bd684d30e50f95113267917 100644 (file)
@@ -15,8 +15,8 @@ const int NUM_JUMPPADSUSED = 3;
 float trigger_push_calculatevelocity_flighttime;
 
 #ifdef SVQC
-void() SUB_UseTargets;
-void trigger_push_use();
+void SUB_UseTargets(entity this, entity actor, entity trigger);
+void trigger_push_use(entity this, entity actor, entity trigger);
 #endif
 
 /*
index 182650ed5bed4aa74625fd94f21534aab9aacd13..311075aa0a0a0ed5c23cedc57d7194c4b6a0d937 100644 (file)
@@ -1,24 +1,11 @@
 /**
  * trigger given targets
  */
-void trigger_keylock_trigger(string s)
-{SELFPARAM();
-       entity otemp = other;
-       entity atemp = activator;
-
-       entity t;
-       for(t = world; (t = find(t, targetname, s)); )
+void trigger_keylock_trigger(entity this, entity actor, string s)
+{
+       for(entity t = world; (t = find(t, targetname, s)); )
                if(t.use)
-               {
-                       setself(t);
-                       other = this;
-                       activator = atemp;
-                       self.use();
-               }
-
-       setself(this);
-       other = otemp;
-       activator = atemp;
+                       t.use(t, actor, this);
 }
 
 /**
@@ -44,8 +31,6 @@ void trigger_keylock_touch()
        if(self.itemkeys)
                key_used = item_keys_usekey(self, other);
 
-       activator = other;
-
        if(self.itemkeys)
        {
 #ifdef SVQC
@@ -70,7 +55,7 @@ void trigger_keylock_touch()
                if(self.delay <= time || started_delay == true)
                if(self.target2)
                {
-                       trigger_keylock_trigger(self.target2);
+                       trigger_keylock_trigger(this, other, self.target2);
                        started_delay = true;
                        self.delay = time + self.wait;
                }
@@ -84,7 +69,7 @@ void trigger_keylock_touch()
 #endif
 
                if(self.target)
-                       trigger_keylock_trigger(self.target);
+                       trigger_keylock_trigger(this, other, self.target);
 
                if(self.killtarget)
                        trigger_keylock_kill(self.killtarget);
index f973c7a6fd42139053829d06117dcf229e406eec..2c94fa395db722bd944e73047d1ee259788587ae 100644 (file)
@@ -28,13 +28,10 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay,
 
                if(dotrigger)
                {
-                       activator = source;
-                       setself(ear);
                        savemessage = self.message;
                        self.message = string_null;
-                       SUB_UseTargets();
+                       SUB_UseTargets(ear, source, NULL);
                        self.message = savemessage;
-                       setself(this);
                }
 
                if(ear.netname != "")
@@ -118,13 +115,10 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay,
 
        if(dotrigger)
        {
-               activator = source;
-               setself(ear);
                savemessage = self.message;
                self.message = string_null;
-               SUB_UseTargets();
+               SUB_UseTargets(ear, source, NULL);
                self.message = savemessage;
-               setself(this);
        }
 
        if(ear.spawnflags & 16)
index 26975ab6d144885ff60efb777e6fe2f727b0e5bf..994d498c11e8b0a43056979fccd29ee5430542e7 100644 (file)
@@ -2,30 +2,29 @@
 /*QUAKED spawnfunc_trigger_monoflop (.5 .5 .5) (-8 -8 -8) (8 8 8)
 "Mono-flop" trigger gate... turns one trigger event into one "on" and one "off" event, separated by a delay of "wait"
 */
-void monoflop_use()
-{SELFPARAM();
-       self.nextthink = time + self.wait;
-       self.enemy = activator;
-       if(self.state)
+void monoflop_use(entity this, entity actor, entity trigger)
+{
+       this.nextthink = time + this.wait;
+       this.enemy = actor;
+       if(this.state)
                return;
-       self.state = 1;
-       SUB_UseTargets();
+       this.state = 1;
+       SUB_UseTargets(this, actor, trigger);
 }
-void monoflop_fixed_use()
-{SELFPARAM();
-       if(self.state)
+void monoflop_fixed_use(entity this, entity actor, entity trigger)
+{
+       if(this.state)
                return;
-       self.nextthink = time + self.wait;
-       self.state = 1;
-       self.enemy = activator;
-       SUB_UseTargets();
+       this.nextthink = time + this.wait;
+       this.state = 1;
+       this.enemy = actor;
+       SUB_UseTargets(this, actor, trigger);
 }
 
 void monoflop_think()
 {SELFPARAM();
-       self.state = 0;
-       activator = self.enemy;
-       SUB_UseTargets();
+       this.state = 0;
+       SUB_UseTargets(this, this.enemy, NULL);
 }
 
 void monoflop_reset(entity this)
@@ -36,14 +35,14 @@ void monoflop_reset(entity this)
 
 spawnfunc(trigger_monoflop)
 {
-       if(!self.wait)
-               self.wait = 1;
-       if(self.spawnflags & 1)
-               self.use = monoflop_fixed_use;
+       if(!this.wait)
+               this.wait = 1;
+       if(this.spawnflags & 1)
+               this.use = monoflop_fixed_use;
        else
-               self.use = monoflop_use;
-       self.think = monoflop_think;
-       self.state = 0;
-       self.reset = monoflop_reset;
+               this.use = monoflop_use;
+       this.think = monoflop_think;
+       this.state = 0;
+       this.reset = monoflop_reset;
 }
 #endif
index 3f0a4b27fef60d5058fba15f2298da394ae14950..ce7bba67321ce482a15c9f28bf414742029d9f49 100644 (file)
@@ -41,9 +41,7 @@ void multi_trigger()
 // don't trigger again until reset
        self.takedamage = DAMAGE_NO;
 
-       activator = self.enemy;
-       other = self.goalentity;
-       SUB_UseTargets();
+       SUB_UseTargets(self, self.enemy, self.goalentity);
 
        if (self.wait > 0)
        {
@@ -61,11 +59,11 @@ void multi_trigger()
        }
 }
 
-void multi_use()
-{SELFPARAM();
-       self.goalentity = other;
-       self.enemy = activator;
-       multi_trigger();
+void multi_use(entity this, entity actor, entity trigger)
+{
+       this.goalentity = trigger;
+       this.enemy = actor;
+       WITHSELF(this, multi_trigger());
 }
 
 void multi_touch()
index 78b3383fc0422f787fa68c075bd6bdd9c5514dd9..a50f62b7abd699f207746792a1693f7a07dd9c26 100644 (file)
@@ -8,9 +8,8 @@ void multivibrator_send()
 
        newstate = (time < cyclestart + self.wait);
 
-       activator = self;
        if(self.state != newstate)
-               SUB_UseTargets();
+               SUB_UseTargets(self, self, NULL);
        self.state = newstate;
 
        if(self.state)
@@ -19,20 +18,20 @@ void multivibrator_send()
                self.nextthink = cyclestart + self.wait + self.respawntime + 0.01;
 }
 
-void multivibrator_toggle()
-{SELFPARAM();
-       if(self.nextthink == 0)
+void multivibrator_toggle(entity this, entity actor, entity trigger)
+{
+       if(this.nextthink == 0)
        {
-               multivibrator_send();
+               WITHSELF(this, multivibrator_send());
        }
        else
        {
-               if(self.state)
+               if(this.state)
                {
-                       SUB_UseTargets();
-                       self.state = 0;
+                       SUB_UseTargets(this, actor, trigger);
+                       this.state = 0;
                }
-               self.nextthink = 0;
+               this.nextthink = 0;
        }
 }
 
index 147b6178a1e15abdeef8c6e924e295ce2137cfa1..dabbbd2d96b05acad53b2ee499377b7dc6383d6a 100644 (file)
@@ -1,11 +1,10 @@
 #ifdef SVQC
-void relay_activators_use()
-{SELFPARAM();
+void relay_activators_use(entity this, entity actor, entity trigger)
+{
        for(entity trg = world; (trg = find(trg, targetname, this.target)); )
        {
-               setself(trg);
                if (trg.setactive)
-                       trg.setactive(this.cnt);
+                       trg.setactive(trg, this.cnt);
                else
                {
                        //bprint("Not using setactive\n");
@@ -18,24 +17,23 @@ void relay_activators_use()
                                trg.active = this.cnt;
                }
        }
-       setself(this);
 }
 
 spawnfunc(relay_activate)
 {
-       self.cnt = ACTIVE_ACTIVE;
-       self.use = relay_activators_use;
+       this.cnt = ACTIVE_ACTIVE;
+       this.use = relay_activators_use;
 }
 
 spawnfunc(relay_deactivate)
 {
-       self.cnt = ACTIVE_NOT;
-       self.use = relay_activators_use;
+       this.cnt = ACTIVE_NOT;
+       this.use = relay_activators_use;
 }
 
 spawnfunc(relay_activatetoggle)
 {
-       self.cnt = ACTIVE_TOGGLE;
-       self.use = relay_activators_use;
+       this.cnt = ACTIVE_TOGGLE;
+       this.use = relay_activators_use;
 }
 #endif
index e45996bd855695593b1717e83e8b7f7551c700ad..ea90a06cb70d19865b24365bf582ebfbcadcfaee 100644 (file)
@@ -1,20 +1,19 @@
 #ifdef SVQC
-void trigger_relay_if_use()
-{SELFPARAM();
-       float n;
-       n = self.count;
+void trigger_relay_if_use(entity this, entity actor, entity trigger)
+{
+       int n = this.count;
 
        // TODO make this generic AND faster than nextent()ing through all, if somehow possible
-       n = (cvar_string(self.netname) == cvar_string(self.message));
-       if(self.spawnflags & 1)
+       n = (cvar_string(this.netname) == cvar_string(this.message));
+       if(this.spawnflags & 1)
                n = !n;
 
        if(n)
-               SUB_UseTargets();
+               SUB_UseTargets(this, actor, trigger);
 }
 
 spawnfunc(trigger_relay_if)
 {
-       self.use = trigger_relay_if_use;
+       this.use = trigger_relay_if_use;
 }
 #endif
index 193dba36825fe8ce1aefc43b06948c9d1a223277..2972d32bbf79b3e23fa6da66e4e9569e982a6824 100644 (file)
@@ -1,23 +1,23 @@
 #ifdef SVQC
-void trigger_relay_teamcheck_use()
-{SELFPARAM();
-       if(activator.team)
+void trigger_relay_teamcheck_use(entity this, entity actor, entity trigger)
+{
+       if(actor.team)
        {
-               if(self.spawnflags & 2)
+               if(this.spawnflags & 2)
                {
-                       if(DIFF_TEAM(activator, self))
-                               SUB_UseTargets();
+                       if(DIFF_TEAM(actor, this))
+                               SUB_UseTargets(this, actor, trigger);
                }
                else
                {
-                       if(SAME_TEAM(activator, self))
-                               SUB_UseTargets();
+                       if(SAME_TEAM(actor, this))
+                               SUB_UseTargets(this, actor, trigger);
                }
        }
        else
        {
-               if(self.spawnflags & 1)
-                       SUB_UseTargets();
+               if(this.spawnflags & 1)
+                       SUB_UseTargets(this, actor, trigger);
        }
 }
 
index 92ae805b5259641dd9e8cb3bd174b5df9b642a3e..c9b8147139aa8eb27b99a5b28694a41092e046ac 100644 (file)
@@ -1,12 +1,12 @@
 REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_TELEPORT)
 
 #ifdef SVQC
-void trigger_teleport_use()
-{SELFPARAM();
+void trigger_teleport_use(entity this, entity actor, entity trigger)
+{
        if(teamplay)
-               self.team = activator.team;
+               this.team = actor.team;
 #ifdef SVQC
-       self.SendFlags |= SF_TRIGGER_UPDATE;
+       this.SendFlags |= SF_TRIGGER_UPDATE;
 #endif
 }
 #endif
@@ -49,12 +49,11 @@ void Teleport_Touch ()
        e = Simple_TeleportPlayer(self, other);
 
 #ifdef SVQC
-       activator = other;
        string s = self.target; self.target = string_null;
-       SUB_UseTargets();
+       SUB_UseTargets(self, other, other); // TODO: should we be using other for trigger too?
        if (!self.target) self.target = s;
 
-       WITHSELF(e, SUB_UseTargets());
+       SUB_UseTargets(e, other, other);
 #endif
 }
 
index 1ca03fd4fefc819113b7b6aaae62ba1c9009d8aa..4493138d08dca032f149aaba09a4f8e5f2817f53 100644 (file)
@@ -1,11 +1,10 @@
-void SUB_DontUseTargets() { }
+void SUB_DontUseTargets(entity this, entity actor, entity trigger) { }
 
-void() SUB_UseTargets;
+void SUB_UseTargets(entity this, entity actor, entity trigger);
 
 void DelayThink()
 {SELFPARAM();
-       activator = this.enemy;
-       SUB_UseTargets ();
+       SUB_UseTargets (this, this.enemy, NULL);
        remove(this);
 }
 
@@ -184,22 +183,18 @@ match (string)self.target and call their .use function
 
 ==============================
 */
-void SUB_UseTargets()
-{SELFPARAM();
-       entity t, otemp, act;
-       string s;
-       float i;
-
+void SUB_UseTargets(entity this, entity actor, entity trigger)
+{
 //
 // check for a delay
 //
        if (this.delay)
        {
        // create a temp object to fire at a later time
-               t = new(DelayedUse);
+               entity t = new(DelayedUse);
                t.nextthink = time + this.delay;
                t.think = DelayThink;
-               t.enemy = activator;
+               t.enemy = actor;
                t.message = this.message;
                t.killtarget = this.killtarget;
                t.target = this.target;
@@ -209,18 +204,19 @@ void SUB_UseTargets()
                return;
        }
 
+       string s;
 
 //
 // print the message
 //
 #ifdef SVQC
        if(this)
-       if(IS_PLAYER(activator) && this.message != "")
-       if(IS_REAL_CLIENT(activator))
+       if(IS_PLAYER(actor) && this.message != "")
+       if(IS_REAL_CLIENT(actor))
        {
-               centerprint(activator, this.message);
+               centerprint(actor, this.message);
                if (this.noise == "")
-                       play2(activator, SND(TALK));
+                       play2(actor, SND(TALK));
        }
 
 //
@@ -229,7 +225,7 @@ void SUB_UseTargets()
        s = this.killtarget;
        if (s != "")
        {
-               for(t = world; (t = find(t, targetname, s)); )
+               for(entity t = world; (t = find(t, targetname, s)); )
                        remove(t);
        }
 #endif
@@ -237,13 +233,11 @@ void SUB_UseTargets()
 //
 // fire targets
 //
-       act = activator;
-       otemp = other;
 
        if(this.target_random)
                RandomSelection_Init();
 
-       for(i = 0; i < 4; ++i)
+       for(int i = 0; i < 4; ++i)
        {
                switch(i)
                {
@@ -257,38 +251,34 @@ void SUB_UseTargets()
                {
                        // Flag to set func_clientwall state
                        // 1 == deactivate, 2 == activate, 0 == do nothing
-                       float aw_flag = this.antiwall_flag;
-                       for(t = world; (t = find(t, targetname, s)); )
-                       if(t.use)
+                       int aw_flag = this.antiwall_flag;
+                       for(entity t = world; (t = find(t, targetname, s)); )
                        {
-                               if(this.target_random)
+                               if(t.use)
                                {
-                                       RandomSelection_Add(t, 0, string_null, 1, 0);
-                               }
-                               else
-                               {
-                                       if (t.classname == "func_clientwall" || t.classname == "func_clientillusionary")
-                                               t.antiwall_flag = aw_flag;
-                                       setself(t);
-                                       other = this;
-                                       activator = act;
-                                       self.use();
+                                       if(this.target_random)
+                                       {
+                                               RandomSelection_Add(t, 0, string_null, 1, 0);
+                                       }
+                                       else
+                                       {
+                                               if (t.classname == "func_clientwall" || t.classname == "func_clientillusionary")
+                                                       t.antiwall_flag = aw_flag;
+
+                                               t.use(t, actor, this);
+                                       }
                                }
                        }
                }
        }
 
        if(this.target_random && RandomSelection_chosen_ent)
-       {
-               setself(RandomSelection_chosen_ent);
-               other = this;
-               activator = act;
-               self.use();
-       }
+               RandomSelection_chosen_ent.use(RandomSelection_chosen_ent, actor, this);
+}
 
-       activator = act;
-       setself(this);
-       other = otemp;
+void SUB_UseTargets_self()
+{SELFPARAM();
+       SUB_UseTargets(this, NULL, NULL);
 }
 
 #ifdef CSQC
index 552a8050f6cb462664d7b3a50c425d59fccb3d80..40c3114bab5983451be09892c943a8c4ba83170d 100644 (file)
@@ -1,8 +1,8 @@
 // generated file; do not modify
-#include "all.qc"
-#include "checkpoint.qc"
-#include "cl_turrets.qc"
-#include "config.qc"
-#include "sv_turrets.qc"
-#include "targettrigger.qc"
-#include "util.qc"
+#include <common/turrets/all.qc>
+#include <common/turrets/checkpoint.qc>
+#include <common/turrets/cl_turrets.qc>
+#include <common/turrets/config.qc>
+#include <common/turrets/sv_turrets.qc>
+#include <common/turrets/targettrigger.qc>
+#include <common/turrets/util.qc>
diff --git a/qcsrc/common/turrets/_mod.qh b/qcsrc/common/turrets/_mod.qh
new file mode 100644 (file)
index 0000000..6da539e
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include <common/turrets/all.qh>
+#include <common/turrets/checkpoint.qh>
+#include <common/turrets/cl_turrets.qh>
+#include <common/turrets/config.qh>
+#include <common/turrets/sv_turrets.qh>
+#include <common/turrets/targettrigger.qh>
+#include <common/turrets/util.qh>
index 1502be25114f1ddfb5bf90192c796d9f37d2febb..2578c1e6dba117bc781648eb08e6bfa94f5aeccc 100644 (file)
@@ -455,7 +455,7 @@ void turret_projectile_damage(entity this, entity inflictor, entity attacker, fl
        this.health     -= damage;
        //this.realowner = attacker; // Dont change realowner, it does not make much sense for turrets
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(this.owner, turret_projectile_explode));
+               W_PrepareExplosionByDamage(this, this.owner, turret_projectile_explode);
 }
 
 entity turret_projectile(Sound _snd, float _size, float _health, float _death, float _proj_type, float _cull, float _cli_anim)
@@ -1179,16 +1179,16 @@ void turret_think()
        When .used a turret switch team to activator.team.
        If activator is world, the turret go inactive.
 */
-void turret_use()
-{SELFPARAM();
-       LOG_TRACE("Turret ",self.netname, " used by ", activator.classname, "\n");
+void turret_use(entity this, entity actor, entity trigger)
+{
+       LOG_TRACE("Turret ",this.netname, " used by ", actor.classname, "\n");
 
-       self.team = activator.team;
+       this.team = actor.team;
 
-       if(self.team == 0)
-               self.active = ACTIVE_NOT;
+       if(this.team == 0)
+               this.active = ACTIVE_NOT;
        else
-               self.active = ACTIVE_ACTIVE;
+               this.active = ACTIVE_ACTIVE;
 
 }
 
index 367321425fa68014da06138577eb1743ef9898d4..0a1652b1a9e92b4cdd74fc7a2422a22d02c88fc0 100644 (file)
@@ -1,23 +1,23 @@
 // generated file; do not modify
-#include "ewheel.qc"
-#include "ewheel_weapon.qc"
-#include "flac.qc"
-#include "flac_weapon.qc"
-#include "fusionreactor.qc"
-#include "hellion.qc"
-#include "hellion_weapon.qc"
-#include "hk.qc"
-#include "hk_weapon.qc"
-#include "machinegun.qc"
-#include "machinegun_weapon.qc"
-#include "mlrs.qc"
-#include "mlrs_weapon.qc"
-#include "phaser.qc"
-#include "phaser_weapon.qc"
-#include "plasma.qc"
-#include "plasma_dual.qc"
-#include "plasma_weapon.qc"
-#include "tesla.qc"
-#include "tesla_weapon.qc"
-#include "walker.qc"
-#include "walker_weapon.qc"
+#include <common/turrets/turret/ewheel.qc>
+#include <common/turrets/turret/ewheel_weapon.qc>
+#include <common/turrets/turret/flac.qc>
+#include <common/turrets/turret/flac_weapon.qc>
+#include <common/turrets/turret/fusionreactor.qc>
+#include <common/turrets/turret/hellion.qc>
+#include <common/turrets/turret/hellion_weapon.qc>
+#include <common/turrets/turret/hk.qc>
+#include <common/turrets/turret/hk_weapon.qc>
+#include <common/turrets/turret/machinegun.qc>
+#include <common/turrets/turret/machinegun_weapon.qc>
+#include <common/turrets/turret/mlrs.qc>
+#include <common/turrets/turret/mlrs_weapon.qc>
+#include <common/turrets/turret/phaser.qc>
+#include <common/turrets/turret/phaser_weapon.qc>
+#include <common/turrets/turret/plasma.qc>
+#include <common/turrets/turret/plasma_dual.qc>
+#include <common/turrets/turret/plasma_weapon.qc>
+#include <common/turrets/turret/tesla.qc>
+#include <common/turrets/turret/tesla_weapon.qc>
+#include <common/turrets/turret/walker.qc>
+#include <common/turrets/turret/walker_weapon.qc>
diff --git a/qcsrc/common/turrets/turret/_mod.qh b/qcsrc/common/turrets/turret/_mod.qh
new file mode 100644 (file)
index 0000000..4650901
--- /dev/null
@@ -0,0 +1,23 @@
+// generated file; do not modify
+#include <common/turrets/turret/ewheel.qh>
+#include <common/turrets/turret/ewheel_weapon.qh>
+#include <common/turrets/turret/flac.qh>
+#include <common/turrets/turret/flac_weapon.qh>
+#include <common/turrets/turret/fusionreactor.qh>
+#include <common/turrets/turret/hellion.qh>
+#include <common/turrets/turret/hellion_weapon.qh>
+#include <common/turrets/turret/hk.qh>
+#include <common/turrets/turret/hk_weapon.qh>
+#include <common/turrets/turret/machinegun.qh>
+#include <common/turrets/turret/machinegun_weapon.qh>
+#include <common/turrets/turret/mlrs.qh>
+#include <common/turrets/turret/mlrs_weapon.qh>
+#include <common/turrets/turret/phaser.qh>
+#include <common/turrets/turret/phaser_weapon.qh>
+#include <common/turrets/turret/plasma.qh>
+#include <common/turrets/turret/plasma_dual.qh>
+#include <common/turrets/turret/plasma_weapon.qh>
+#include <common/turrets/turret/tesla.qh>
+#include <common/turrets/turret/tesla_weapon.qh>
+#include <common/turrets/turret/walker.qh>
+#include <common/turrets/turret/walker_weapon.qh>
index 798e141ecd2e5caa4e12765eee020ab8830a0f6c..0bdfca46ed2cec92acc84a9f96d81f34114e4385 100644 (file)
@@ -50,7 +50,7 @@ void ewheel_move_path()
             if (self.pathgoal)
             {
                 if (self.pathgoal.use)
-                    self.pathgoal.use();
+                    self.pathgoal.use(self.pathgoal, NULL, NULL);
 
                 if (self.pathgoal.enemy)
                 {
index 918ce4ca3a1bbc91c1c14de41af6595399379855..51ace9a7d0ddab65889b3c062d587743cdc022e1 100644 (file)
@@ -109,7 +109,7 @@ void walker_rocket_damage(entity this, entity inflictor, entity attacker, float
     this.velocity = this.velocity + vforce;
 
     if (this.health <= 0)
-        WITHSELF(this, W_PrepareExplosionByDamage(this.owner, walker_rocket_explode));
+        W_PrepareExplosionByDamage(this, this.owner, walker_rocket_explode);
 }
 
 #define WALKER_ROCKET_MOVE movelib_move_simple(self, newdir, (autocvar_g_turrets_unit_walker_rocket_speed), (autocvar_g_turrets_unit_walker_rocket_turnrate)); UpdateCSQCProjectile(self)
@@ -313,7 +313,7 @@ void walker_move_path()
             if (self.pathgoal)
             {
                 if (self.pathgoal.use)
-                    self.pathgoal.use();
+                    self.pathgoal.use(self, NULL, NULL);
 
                 if (self.pathgoal.enemy)
                 {
index 0e6b6d6ba44e2e409f13c37e9789ebb0e2be9f7b..ec643fcb5885cac7d20ccd0cfe0cf16b93b6ea80 100644 (file)
@@ -1480,13 +1480,6 @@ vector animfixfps(entity e, vector a, vector b)
 }
 #endif
 
-#ifdef SVQC
-void dedicated_print(string input) // print(), but only print if the server is not local
-{
-       if(server_is_dedicated) { LOG_INFO(input); }
-}
-#endif
-
 #ifndef MENUQC
 Notification Announcer_PickNumber(int type, int num)
 {
index 7bc8675335958fef698d3c06692b63a0eb7edb86..066033a175a1791a2ce05326b223de57db40d4ae 100644 (file)
@@ -2,6 +2,7 @@
 #define COMMON_UTIL_H
 
 #ifndef MENUQC
+
 vector real_origin(entity ent);
 #endif
 
@@ -27,8 +28,8 @@ void depthfirst(entity start, .entity up, .entity downleft, .entity right, void(
 float median(float a, float b, float c);
 
 // converts a number to a string with the indicated number of decimals
-// works for up to 10 decimals!
 string ftos_decimals(float number, float decimals);
+string ftos_mindecimals(float number);
 
 bool fexists(string f);
 
@@ -273,10 +274,6 @@ string CCR(string input);
 vector animfixfps(entity e, vector a, vector b);
 #endif
 
-#ifdef SVQC
-void dedicated_print(string input);
-#endif
-
 #ifndef MENUQC
 const float CNT_NORMAL = 1;
 const float CNT_GAMESTART = 2;
index e80489b8fab6d890c9117fea4e504f4cf8f38046..269858f8475ac67cf427be7290191c01c365a8ca 100644 (file)
@@ -1,4 +1,4 @@
 // generated file; do not modify
-#include "all.qc"
-#include "cl_vehicles.qc"
-#include "sv_vehicles.qc"
+#include <common/vehicles/all.qc>
+#include <common/vehicles/cl_vehicles.qc>
+#include <common/vehicles/sv_vehicles.qc>
diff --git a/qcsrc/common/vehicles/_mod.qh b/qcsrc/common/vehicles/_mod.qh
new file mode 100644 (file)
index 0000000..d21e829
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#include <common/vehicles/all.qh>
+#include <common/vehicles/cl_vehicles.qh>
+#include <common/vehicles/sv_vehicles.qh>
index 35b6c677f957de6fbfe84ee53ad28a78ce4aa3e7..fc44613e5d111cbafd02f69700f9552b09fb7678 100644 (file)
@@ -208,7 +208,7 @@ void vehicles_projectile_damage(entity this, entity inflictor, entity attacker,
        {
                this.takedamage = DAMAGE_NO;
                this.event_damage = func_null;
-               this.think = this.use;
+               this.think = adaptor_think2use;
                this.nextthink = time;
        }
 }
@@ -232,6 +232,11 @@ void vehicles_projectile_explode()
        remove (self);
 }
 
+void vehicles_projectile_explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, vehicles_projectile_explode());
+}
+
 entity vehicles_projectile(entity this, string _mzlfx, Sound _mzlsound,
                                                   vector _org, vector _vel,
                                                   float _dmg, float _radi, float _force,  float _size,
@@ -257,7 +262,7 @@ entity vehicles_projectile(entity this, string _mzlfx, Sound _mzlsound,
        proj.bot_dodgerating  = _dmg;
        proj.velocity            = _vel;
        proj.touch                      = vehicles_projectile_explode;
-       proj.use                          = vehicles_projectile_explode;
+       proj.use                          = vehicles_projectile_explode_use;
        proj.owner                      = this;
        proj.realowner          = _owner;
        proj.think                      = SUB_Remove_self;
@@ -541,29 +546,29 @@ void vehicles_setreturn(entity veh)
 
 }
 
-void vehicle_use()
-{SELFPARAM();
-       LOG_TRACE("vehicle ",self.netname, " used by ", activator.classname, "\n");
+void vehicle_use(entity this, entity actor, entity trigger)
+{
+       LOG_TRACE("vehicle ",this.netname, " used by ", actor.classname, "\n");
 
-       self.tur_head.team = activator.team;
+       this.tur_head.team = actor.team;
 
-       if(self.tur_head.team == 0)
-               self.active = ACTIVE_NOT;
+       if(this.tur_head.team == 0)
+               this.active = ACTIVE_NOT;
        else
-               self.active = ACTIVE_ACTIVE;
+               this.active = ACTIVE_ACTIVE;
 
-       if(self.active == ACTIVE_ACTIVE && !IS_DEAD(self) && !gameover)
+       if(this.active == ACTIVE_ACTIVE && !IS_DEAD(this) && !gameover)
        {
-               LOG_TRACE("Respawning vehicle: ", self.netname, "\n");
-               if(self.effects & EF_NODRAW)
+               LOG_TRACE("Respawning vehicle: ", this.netname, "\n");
+               if(this.effects & EF_NODRAW)
                {
-                       self.think = vehicles_spawn;
-                       self.nextthink = time + 3;
+                       this.think = vehicles_spawn;
+                       this.nextthink = time + 3;
                }
                else
                {
-                       vehicles_setreturn(self);
-                       vehicles_reset_colors(self);
+                       vehicles_setreturn(this);
+                       vehicles_reset_colors(this);
                }
        }
 }
index 6cc322ef9ca610a8ead5dcd8543723d5a059aa4a..165ae07e6d92a7bb4eb4e0a3ec8ca9494237dcfa 100644 (file)
@@ -26,6 +26,8 @@ float autocvar_g_vehicles_vaporizer_damagerate = 0.001;
 float autocvar_g_vehicles_tag_damagerate = 5;
 float autocvar_g_vehicles_weapon_damagerate = 1;
 
+.float vehicle_last_trace;
+
 // flags:
 .int vehicle_flags;
 
index fbead4741d5ad7a606e772076973fc675875c790..065f760d21dbc0a2f3264e58354b6c638cc5be4b 100644 (file)
@@ -1,9 +1,9 @@
 // generated file; do not modify
-#include "bumblebee.qc"
-#include "bumblebee_weapons.qc"
-#include "racer.qc"
-#include "racer_weapon.qc"
-#include "raptor.qc"
-#include "raptor_weapons.qc"
-#include "spiderbot.qc"
-#include "spiderbot_weapons.qc"
+#include <common/vehicles/vehicle/bumblebee.qc>
+#include <common/vehicles/vehicle/bumblebee_weapons.qc>
+#include <common/vehicles/vehicle/racer.qc>
+#include <common/vehicles/vehicle/racer_weapon.qc>
+#include <common/vehicles/vehicle/raptor.qc>
+#include <common/vehicles/vehicle/raptor_weapons.qc>
+#include <common/vehicles/vehicle/spiderbot.qc>
+#include <common/vehicles/vehicle/spiderbot_weapons.qc>
diff --git a/qcsrc/common/vehicles/vehicle/_mod.qh b/qcsrc/common/vehicles/vehicle/_mod.qh
new file mode 100644 (file)
index 0000000..3d6606e
--- /dev/null
@@ -0,0 +1,9 @@
+// generated file; do not modify
+#include <common/vehicles/vehicle/bumblebee.qh>
+#include <common/vehicles/vehicle/bumblebee_weapons.qh>
+#include <common/vehicles/vehicle/racer.qh>
+#include <common/vehicles/vehicle/racer_weapon.qh>
+#include <common/vehicles/vehicle/raptor.qh>
+#include <common/vehicles/vehicle/raptor_weapons.qh>
+#include <common/vehicles/vehicle/spiderbot.qh>
+#include <common/vehicles/vehicle/spiderbot_weapons.qh>
index da259784f64a5c7c45a2bfe5192571b49b96a3d8..ded599b7d2a77cc5b481f65a36dd8ef858f646f3 100644 (file)
@@ -31,6 +31,8 @@ REGISTER_VEHICLE(RACER, NEW(Racer));
 
 bool autocvar_g_vehicle_racer = true;
 
+float autocvar_g_vehicle_racer_thinkrate = 0.05; // TODO: any higher causes it to sink in liquids
+
 float autocvar_g_vehicle_racer_speed_afterburn = 3000;
 // energy consumed per second
 float autocvar_g_vehicle_racer_afterburn_cost = 100;
@@ -182,7 +184,9 @@ bool racer_frame(entity this)
 
        vehicles_frame(vehic, this);
 
-       if(pointcontents(vehic.origin) != CONTENT_WATER)
+       traceline(vehic.origin, vehic.origin + '0 0 1', MOVE_NOMONSTERS, this);
+       int cont = trace_dpstartcontents;
+       if(cont & DPCONTENTS_WATER)
                vehic.air_finished = time + autocvar_g_vehicle_racer_water_time;
 
        if(IS_DEAD(vehic))
@@ -195,7 +199,11 @@ bool racer_frame(entity this)
 
        PHYS_INPUT_BUTTON_ZOOM(this) = PHYS_INPUT_BUTTON_CROUCH(this) = false;
 
-       crosshair_trace(this);
+       if(time >= vehic.vehicle_last_trace)
+       {
+               crosshair_trace(this);
+               vehic.vehicle_last_trace = time + autocvar_g_vehicle_racer_thinkrate;
+       }
 
        vehic.angles_x *= -1;
 
@@ -219,10 +227,9 @@ bool racer_frame(entity this)
        vector df = vehic.velocity * -autocvar_g_vehicle_racer_friction;
        //vehic.velocity_z = ftmp;
 
-       int cont = pointcontents(vehic.origin);
        if(this.movement)
        {
-               if(cont == CONTENT_WATER || cont == CONTENT_LAVA || cont == CONTENT_SLIME)
+               if(cont & DPCONTENTS_LIQUIDSMASK)
                {
                        if(this.movement_x) { df += v_forward * ((this.movement_x > 0) ? autocvar_g_vehicle_racer_water_speed_forward : -autocvar_g_vehicle_racer_water_speed_forward); }
                        if(this.movement_y) { df += v_right * ((this.movement_y > 0) ? autocvar_g_vehicle_racer_water_speed_strafe : -autocvar_g_vehicle_racer_water_speed_strafe); }
@@ -264,7 +271,7 @@ bool racer_frame(entity this)
 
                vehic.wait = time;
 
-               if(cont == CONTENT_WATER || cont == CONTENT_LAVA || cont == CONTENT_SLIME)
+               if(cont & DPCONTENTS_LIQUIDSMASK)
                {
                        vehic.vehicle_energy -= autocvar_g_vehicle_racer_waterburn_cost * PHYS_INPUT_TIMELENGTH;
                        df += (v_forward * autocvar_g_vehicle_racer_waterburn_speed);
@@ -298,7 +305,7 @@ bool racer_frame(entity this)
                sound (vehic.tur_head, CH_TRIGGER_SINGLE, SND_Null, VOL_VEHICLEENGINE, ATTEN_NORM);
        }
 
-       if(cont == CONTENT_WATER || cont == CONTENT_LAVA || cont == CONTENT_SLIME)
+       if(cont & DPCONTENTS_LIQUIDSMASK)
                vehic.racer_watertime = time;
 
        float dforce = autocvar_g_vehicle_racer_downforce;
@@ -333,6 +340,7 @@ bool racer_frame(entity this)
 
        if(autocvar_g_vehicle_racer_rocket_locktarget)
        {
+               if(vehic.vehicle_last_trace == time + autocvar_g_vehicle_racer_thinkrate)
                vehicles_locktarget(vehic, (1 / autocvar_g_vehicle_racer_rocket_locking_time) * frametime,
                                                 (1 / autocvar_g_vehicle_racer_rocket_locking_releasetime) * frametime,
                                                 autocvar_g_vehicle_racer_rocket_locked_time);
@@ -400,35 +408,32 @@ bool racer_frame(entity this)
 
 void racer_think()
 {SELFPARAM();
-       self.nextthink = time;
-
-       float pushdeltatime = time - self.lastpushtime;
-       if (pushdeltatime > 0.15) pushdeltatime = 0;
-       self.lastpushtime = time;
-       if(!pushdeltatime) return;
+       this.nextthink = time + autocvar_g_vehicle_racer_thinkrate;
 
-       tracebox(self.origin, self.mins, self.maxs, self.origin - ('0 0 1' * autocvar_g_vehicle_racer_springlength), MOVE_NOMONSTERS, self);
+       tracebox(this.origin, this.mins, this.maxs, this.origin - ('0 0 1' * autocvar_g_vehicle_racer_springlength), MOVE_NOMONSTERS, this);
 
-       vector df = self.velocity * -autocvar_g_vehicle_racer_friction;
+       vector df = this.velocity * -autocvar_g_vehicle_racer_friction;
        df_z += (1 - trace_fraction) * autocvar_g_vehicle_racer_hoverpower + sin(time * 2) * (autocvar_g_vehicle_racer_springlength * 2);
 
        float forced = autocvar_g_vehicle_racer_upforcedamper;
 
-       int cont = pointcontents(self.origin - '0 0 64');
-       if(cont == CONTENT_WATER || cont == CONTENT_LAVA || cont == CONTENT_SLIME)
+       //int cont = pointcontents(self.origin - '0 0 64');
+       traceline(this.origin - '0 0 64', this.origin - '0 0 64', MOVE_NOMONSTERS, this);
+       //if(cont == CONTENT_WATER || cont == CONTENT_LAVA || cont == CONTENT_SLIME)
+       if(trace_dpstartcontents & DPCONTENTS_LIQUIDSMASK)
        {
                forced = autocvar_g_vehicle_racer_water_upforcedamper;
-               self.velocity_z += 200;
+               this.velocity_z += 200;
        }
 
-       self.velocity += df * pushdeltatime;
-       if(self.velocity_z > 0)
-               self.velocity_z *= 1 - forced * pushdeltatime;
+       this.velocity += df * autocvar_g_vehicle_racer_thinkrate;
+       if(this.velocity_z > 0)
+               this.velocity_z *= 1 - forced * autocvar_g_vehicle_racer_thinkrate;
 
-       self.angles_x *= 1 - (autocvar_g_vehicle_racer_anglestabilizer * pushdeltatime);
-       self.angles_z *= 1 - (autocvar_g_vehicle_racer_anglestabilizer * pushdeltatime);
+       this.angles_x *= 1 - (autocvar_g_vehicle_racer_anglestabilizer * autocvar_g_vehicle_racer_thinkrate);
+       this.angles_z *= 1 - (autocvar_g_vehicle_racer_anglestabilizer * autocvar_g_vehicle_racer_thinkrate);
 
-       CSQCMODEL_AUTOUPDATE(self);
+       CSQCMODEL_AUTOUPDATE(this);
 }
 
 void racer_exit(float eject)
index ee86a622974ef0bff1fc37826730ff1978a69565..36655fd1de8a9bf56683ad17fb9df789ab42440a 100644 (file)
@@ -74,7 +74,7 @@ void racer_rocket_tracker()
 
     if (IS_DEAD(self.owner) || self.cnt < time)
     {
-        self.use();
+        self.use(self, NULL, NULL);
         return;
     }
 
@@ -126,7 +126,7 @@ void racer_rocket_groundhugger()
 
     if(IS_DEAD(self.owner) || self.cnt < time)
     {
-        self.use();
+        self.use(self, NULL, NULL);
         return;
     }
 
index afa57de2dad1f0fa328520996595a4892b716b0d..dd209676d49dce7f7206b02c9c286ddc145dc139 100644 (file)
@@ -23,7 +23,7 @@ void spiderbot_rocket_unguided()
     UpdateCSQCProjectile(self);
 
     if (IS_DEAD(self.owner) || self.cnt < time || vdist(self.pos1 - self.origin, <, 16))
-        self.use();
+        self.use(self, NULL, NULL);
 }
 
 void spiderbot_rocket_guided()
@@ -43,7 +43,7 @@ void spiderbot_rocket_guided()
     UpdateCSQCProjectile(self);
 
     if (IS_DEAD(self.owner) || self.cnt < time)
-        self.use();
+        self.use(self, NULL, NULL);
 }
 
 void spiderbot_guide_release(entity this)
index d2c6fb8338093369bcb2ba3c1c97a11b6a17d4b8..034b149bff0b42d731ff733ebbddfb6b95a4ff49 100644 (file)
@@ -1,4 +1,4 @@
 // generated file; do not modify
-#include "all.qc"
-#include "calculations.qc"
-#include "config.qc"
+#include <common/weapons/all.qc>
+#include <common/weapons/calculations.qc>
+#include <common/weapons/config.qc>
diff --git a/qcsrc/common/weapons/_mod.qh b/qcsrc/common/weapons/_mod.qh
new file mode 100644 (file)
index 0000000..f5e07a8
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#include <common/weapons/all.qh>
+#include <common/weapons/calculations.qh>
+#include <common/weapons/config.qh>
index 1a4888434cccc287d0dd4c690d062024166b64cf..e8307f39d20068151236b4e26d9155c820d61d2f 100644 (file)
@@ -157,104 +157,106 @@ vector W_CalculateSpread(vector forward, float spread, float spreadfactor, float
        float sigma;
        vector v1 = '0 0 0', v2;
        float dx, dy, r;
-       float sstyle;
        spread *= spreadfactor; //g_weaponspreadfactor;
        if(spread <= 0)
                return forward;
-       sstyle = spreadstyle; //autocvar_g_projectiles_spread_style;
 
-       if(sstyle == 0)
+       switch(spreadstyle)
        {
-               // this is the baseline for the spread value!
-               // standard deviation: sqrt(2/5)
-               // density function: sqrt(1-r^2)
-               return forward + randomvec() * spread;
+               case 0:
+               {
+                       // this is the baseline for the spread value!
+                       // standard deviation: sqrt(2/5)
+                       // density function: sqrt(1-r^2)
+                       return forward + randomvec() * spread;
+               }
+               case 1:
+               {
+                       // same thing, basically
+                       return normalize(forward + cliptoplane(randomvec() * spread, forward));
+               }
+               case 2:
+               {
+                       // circle spread... has at sigma=1 a standard deviation of sqrt(1/2)
+                       sigma = spread * 0.89442719099991587855; // match baseline stddev
+                       v1 = findperpendicular(forward);
+                       v2 = cross(forward, v1);
+                       // random point on unit circle
+                       dx = random() * 2 * M_PI;
+                       dy = sin(dx);
+                       dx = cos(dx);
+                       // radius in our dist function
+                       r = random();
+                       r = sqrt(r);
+                       return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
+               }
+               case 3: // gauss 3d
+               {
+                       sigma = spread * 0.44721359549996; // match baseline stddev
+                       // note: 2D gaussian has sqrt(2) times the stddev of 1D, so this factor is right
+                       v1 = forward;
+                       v1_x += gsl_ran_gaussian(sigma);
+                       v1_y += gsl_ran_gaussian(sigma);
+                       v1_z += gsl_ran_gaussian(sigma);
+                       return v1;
+               }
+               case 4: // gauss 2d
+               {
+                       sigma = spread * 0.44721359549996; // match baseline stddev
+                       // note: 2D gaussian has sqrt(2) times the stddev of 1D, so this factor is right
+                       v1_x = gsl_ran_gaussian(sigma);
+                       v1_y = gsl_ran_gaussian(sigma);
+                       v1_z = gsl_ran_gaussian(sigma);
+                       return normalize(forward + cliptoplane(v1, forward));
+               }
+               case 5: // 1-r
+               {
+                       sigma = spread * 1.154700538379252; // match baseline stddev
+                       v1 = findperpendicular(forward);
+                       v2 = cross(forward, v1);
+                       // random point on unit circle
+                       dx = random() * 2 * M_PI;
+                       dy = sin(dx);
+                       dx = cos(dx);
+                       // radius in our dist function
+                       r = random();
+                       r = solve_cubic_abcd(-2, 3, 0, -r) * '0 1 0';
+                       return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
+               }
+               case 6: // 1-r^2
+               {
+                       sigma = spread * 1.095445115010332; // match baseline stddev
+                       v1 = findperpendicular(forward);
+                       v2 = cross(forward, v1);
+                       // random point on unit circle
+                       dx = random() * 2 * M_PI;
+                       dy = sin(dx);
+                       dx = cos(dx);
+                       // radius in our dist function
+                       r = random();
+                       r = sqrt(1 - r);
+                       r = sqrt(1 - r);
+                       return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
+               }
+               case 7: // (1-r) (2-r)
+               {
+                       sigma = spread * 1.224744871391589; // match baseline stddev
+                       v1 = findperpendicular(forward);
+                       v2 = cross(forward, v1);
+                       // random point on unit circle
+                       dx = random() * 2 * M_PI;
+                       dy = sin(dx);
+                       dx = cos(dx);
+                       // radius in our dist function
+                       r = random();
+                       r = 1 - sqrt(r);
+                       r = 1 - sqrt(r);
+                       return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
+               }
+               default:
+                       error("g_projectiles_spread_style must be 0 (sphere), 1 (flattened sphere), 2 (circle), 3 (gauss 3D), 4 (gauss plane), 5 (linear falloff), 6 (quadratic falloff), 7 (stronger falloff)!");
        }
-       else if(sstyle == 1)
-       {
-               // same thing, basically
-               return normalize(forward + cliptoplane(randomvec() * spread, forward));
-       }
-       else if(sstyle == 2)
-       {
-               // circle spread... has at sigma=1 a standard deviation of sqrt(1/2)
-               sigma = spread * 0.89442719099991587855; // match baseline stddev
-               v1 = findperpendicular(forward);
-               v2 = cross(forward, v1);
-               // random point on unit circle
-               dx = random() * 2 * M_PI;
-               dy = sin(dx);
-               dx = cos(dx);
-               // radius in our dist function
-               r = random();
-               r = sqrt(r);
-               return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
-       }
-       else if(sstyle == 3) // gauss 3d
-       {
-               sigma = spread * 0.44721359549996; // match baseline stddev
-               // note: 2D gaussian has sqrt(2) times the stddev of 1D, so this factor is right
-               v1 = forward;
-               v1_x += gsl_ran_gaussian(sigma);
-               v1_y += gsl_ran_gaussian(sigma);
-               v1_z += gsl_ran_gaussian(sigma);
-               return v1;
-       }
-       else if(sstyle == 4) // gauss 2d
-       {
-               sigma = spread * 0.44721359549996; // match baseline stddev
-               // note: 2D gaussian has sqrt(2) times the stddev of 1D, so this factor is right
-               v1_x = gsl_ran_gaussian(sigma);
-               v1_y = gsl_ran_gaussian(sigma);
-               v1_z = gsl_ran_gaussian(sigma);
-               return normalize(forward + cliptoplane(v1, forward));
-       }
-       else if(sstyle == 5) // 1-r
-       {
-               sigma = spread * 1.154700538379252; // match baseline stddev
-               v1 = findperpendicular(forward);
-               v2 = cross(forward, v1);
-               // random point on unit circle
-               dx = random() * 2 * M_PI;
-               dy = sin(dx);
-               dx = cos(dx);
-               // radius in our dist function
-               r = random();
-               r = solve_cubic_abcd(-2, 3, 0, -r) * '0 1 0';
-               return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
-       }
-       else if(sstyle == 6) // 1-r^2
-       {
-               sigma = spread * 1.095445115010332; // match baseline stddev
-               v1 = findperpendicular(forward);
-               v2 = cross(forward, v1);
-               // random point on unit circle
-               dx = random() * 2 * M_PI;
-               dy = sin(dx);
-               dx = cos(dx);
-               // radius in our dist function
-               r = random();
-               r = sqrt(1 - r);
-               r = sqrt(1 - r);
-               return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
-       }
-       else if(sstyle == 7) // (1-r) (2-r)
-       {
-               sigma = spread * 1.224744871391589; // match baseline stddev
-               v1 = findperpendicular(forward);
-               v2 = cross(forward, v1);
-               // random point on unit circle
-               dx = random() * 2 * M_PI;
-               dy = sin(dx);
-               dx = cos(dx);
-               // radius in our dist function
-               r = random();
-               r = 1 - sqrt(r);
-               r = 1 - sqrt(r);
-               return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
-       }
-       else
-               error("g_projectiles_spread_style must be 0 (sphere), 1 (flattened sphere), 2 (circle), 3 (gauss 3D), 4 (gauss plane), 5 (linear falloff), 6 (quadratic falloff), 7 (stronger falloff)!");
+               
        return '0 0 0';
        /*
         * how to derive falloff functions:
index 7852f1e7f29e001f75b81f9bb211bbdb8c8c5b8e..06cd89d8b78a243093a904d1e5ec0e2a45f86801 100644 (file)
@@ -1,21 +1,21 @@
 // generated file; do not modify
-#include "arc.qc"
-#include "blaster.qc"
-#include "crylink.qc"
-#include "devastator.qc"
-#include "electro.qc"
-#include "fireball.qc"
-#include "hagar.qc"
-#include "hlac.qc"
-#include "hook.qc"
-#include "machinegun.qc"
-#include "minelayer.qc"
-#include "mortar.qc"
-#include "porto.qc"
-#include "rifle.qc"
-#include "seeker.qc"
-#include "shockwave.qc"
-#include "shotgun.qc"
-#include "tuba.qc"
-#include "vaporizer.qc"
-#include "vortex.qc"
+#include <common/weapons/weapon/arc.qc>
+#include <common/weapons/weapon/blaster.qc>
+#include <common/weapons/weapon/crylink.qc>
+#include <common/weapons/weapon/devastator.qc>
+#include <common/weapons/weapon/electro.qc>
+#include <common/weapons/weapon/fireball.qc>
+#include <common/weapons/weapon/hagar.qc>
+#include <common/weapons/weapon/hlac.qc>
+#include <common/weapons/weapon/hook.qc>
+#include <common/weapons/weapon/machinegun.qc>
+#include <common/weapons/weapon/minelayer.qc>
+#include <common/weapons/weapon/mortar.qc>
+#include <common/weapons/weapon/porto.qc>
+#include <common/weapons/weapon/rifle.qc>
+#include <common/weapons/weapon/seeker.qc>
+#include <common/weapons/weapon/shockwave.qc>
+#include <common/weapons/weapon/shotgun.qc>
+#include <common/weapons/weapon/tuba.qc>
+#include <common/weapons/weapon/vaporizer.qc>
+#include <common/weapons/weapon/vortex.qc>
diff --git a/qcsrc/common/weapons/weapon/_mod.qh b/qcsrc/common/weapons/weapon/_mod.qh
new file mode 100644 (file)
index 0000000..bc4fff1
--- /dev/null
@@ -0,0 +1,21 @@
+// generated file; do not modify
+#include <common/weapons/weapon/arc.qh>
+#include <common/weapons/weapon/blaster.qh>
+#include <common/weapons/weapon/crylink.qh>
+#include <common/weapons/weapon/devastator.qh>
+#include <common/weapons/weapon/electro.qh>
+#include <common/weapons/weapon/fireball.qh>
+#include <common/weapons/weapon/hagar.qh>
+#include <common/weapons/weapon/hlac.qh>
+#include <common/weapons/weapon/hook.qh>
+#include <common/weapons/weapon/machinegun.qh>
+#include <common/weapons/weapon/minelayer.qh>
+#include <common/weapons/weapon/mortar.qh>
+#include <common/weapons/weapon/porto.qh>
+#include <common/weapons/weapon/rifle.qh>
+#include <common/weapons/weapon/seeker.qh>
+#include <common/weapons/weapon/shockwave.qh>
+#include <common/weapons/weapon/shotgun.qh>
+#include <common/weapons/weapon/tuba.qh>
+#include <common/weapons/weapon/vaporizer.qh>
+#include <common/weapons/weapon/vortex.qh>
index 3c23e33e779ffb64c059d6742210d6965514d91b..cf391b034a3e76807eab3187e41cb287e33f257b 100644 (file)
@@ -239,6 +239,11 @@ void W_Arc_Bolt_Explode()
        remove(self);
 }
 
+void W_Arc_Bolt_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Arc_Bolt_Explode());
+}
+
 void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(this.health <= 0)
@@ -251,13 +256,13 @@ void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float dam
        this.angles = vectoangles(this.velocity);
 
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, this.think));
+               W_PrepareExplosionByDamage(this, attacker, this.think);
 }
 
 void W_Arc_Bolt_Touch()
 {SELFPARAM();
        PROJECTILE_TOUCH;
-       self.use();
+       self.use(this, NULL, NULL);
 }
 
 void W_Arc_Attack_Bolt(Weapon thiswep)
@@ -282,7 +287,7 @@ void W_Arc_Attack_Bolt(Weapon thiswep)
        missile.damagedbycontents = true;
 
        missile.touch = W_Arc_Bolt_Touch;
-       missile.use = W_Arc_Bolt_Explode;
+       missile.use = W_Arc_Bolt_Explode_use;
        missile.think = adaptor_think2use_hittype_splash;
        missile.nextthink = time + WEP_CVAR(arc, bolt_lifetime);
        PROJECTILE_MAKETRIGGER(missile);
index 2d930ad7212a8b83920e659e8b6992b0e81ef7c2..1cde73d4466bcb887976050518c74820d63c3a8e 100644 (file)
@@ -344,7 +344,7 @@ void W_Devastator_Damage(entity this, entity inflictor, entity attacker, float d
        this.angles = vectoangles(this.velocity);
 
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, W_Devastator_Explode));
+               W_PrepareExplosionByDamage(this, attacker, W_Devastator_Explode);
 }
 
 void W_Devastator_Attack(Weapon thiswep)
index b75106806269d839cd7af02118a72bbf9cc14a08..315ea5a5a470731d5f699df18ae81c1e1e4eeea0 100644 (file)
@@ -191,6 +191,11 @@ void W_Electro_Explode()
        remove(self);
 }
 
+void W_Electro_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Electro_Explode());
+}
+
 void W_Electro_TouchExplode()
 {
        PROJECTILE_TOUCH;
@@ -201,7 +206,7 @@ void W_Electro_Bolt_Think()
 {SELFPARAM();
        if(time >= self.ltime)
        {
-               self.use();
+               this.use(this, NULL, NULL);
                return;
        }
 
@@ -242,7 +247,7 @@ void W_Electro_Bolt_Think()
 
                // if we triggered an orb, should we explode? if not, lets try again next time
                if(found && WEP_CVAR_PRI(electro, midaircombo_explode))
-                       { self.use(); }
+                       { this.use(this, NULL, NULL); }
                else
                        { self.nextthink = min(time + WEP_CVAR_PRI(electro, midaircombo_interval), self.ltime); }
        }
@@ -272,7 +277,7 @@ void W_Electro_Attack_Bolt(Weapon thiswep)
        proj.owner = proj.realowner = self;
        proj.bot_dodge = true;
        proj.bot_dodgerating = WEP_CVAR_PRI(electro, damage);
-       proj.use = W_Electro_Explode;
+       proj.use = W_Electro_Explode_use;
        proj.think = W_Electro_Bolt_Think;
        proj.nextthink = time;
        proj.ltime = time + WEP_CVAR_PRI(electro, lifetime);
@@ -342,7 +347,7 @@ void W_Electro_Orb_Damage(entity this, entity inflictor, entity attacker, float
                }
                else
                {
-                       this.use = W_Electro_Explode;
+                       this.use = W_Electro_Explode_use;
                        this.think = adaptor_think2use; // not _hittype_splash, as this runs "immediately"
                }
        }
@@ -369,7 +374,7 @@ void W_Electro_Attack_Orb(Weapon thiswep)
 
        entity proj = new(electro_orb);
        proj.owner = proj.realowner = self;
-       proj.use = W_Electro_Explode;
+       proj.use = W_Electro_Explode_use;
        proj.think = adaptor_think2use_hittype_splash;
        proj.bot_dodge = true;
        proj.bot_dodgerating = WEP_CVAR_SEC(electro, damage);
index a6db7c9b71ce578845d5058793ed29a1444a340b..4bbcdb68e50498af226bafb5a21f8bead1f2bf8b 100644 (file)
@@ -112,6 +112,11 @@ void W_Fireball_Explode()
        remove(self);
 }
 
+void W_Fireball_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Fireball_Explode());
+}
+
 void W_Fireball_TouchExplode()
 {
        PROJECTILE_TOUCH;
@@ -179,7 +184,7 @@ void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float dam
        if(this.health <= 0)
        {
                this.cnt = 1;
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, W_Fireball_Explode));
+               W_PrepareExplosionByDamage(this, attacker, W_Fireball_Explode);
        }
 }
 
@@ -196,7 +201,7 @@ void W_Fireball_Attack1()
        proj.bot_dodge = true;
        proj.bot_dodgerating = WEP_CVAR_PRI(fireball, damage);
        proj.pushltime = time + WEP_CVAR_PRI(fireball, lifetime);
-       proj.use = W_Fireball_Explode;
+       proj.use = W_Fireball_Explode_use;
        proj.think = W_Fireball_Think;
        proj.nextthink = time;
        proj.health = WEP_CVAR_PRI(fireball, health);
index b764a9e66f679984fd056c539c698cd0bd7feb5e..4b0367fb5e6478079b1fc6ddc91c9f5467821105 100644 (file)
@@ -71,6 +71,11 @@ void W_Hagar_Explode()
        remove(self);
 }
 
+void W_Hagar_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Hagar_Explode());
+}
+
 void W_Hagar_Explode2()
 {SELFPARAM();
        self.event_damage = func_null;
@@ -79,6 +84,11 @@ void W_Hagar_Explode2()
        remove(self);
 }
 
+void W_Hagar_Explode2_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Hagar_Explode2());
+}
+
 void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(this.health <= 0)
@@ -100,13 +110,13 @@ void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage
        this.angles = vectoangles(this.velocity);
 
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, this.think));
+               W_PrepareExplosionByDamage(this, attacker, this.think);
 }
 
 void W_Hagar_Touch()
 {SELFPARAM();
        PROJECTILE_TOUCH;
-       self.use();
+       this.use(this, NULL, NULL);
 }
 
 void W_Hagar_Touch2()
@@ -114,7 +124,7 @@ void W_Hagar_Touch2()
        PROJECTILE_TOUCH;
 
        if(self.cnt > 0 || other.takedamage == DAMAGE_AIM) {
-               self.use();
+               this.use(this, NULL, NULL);
        } else {
                self.cnt++;
                Send_Effect(EFFECT_HAGAR_BOUNCE, self.origin, self.velocity, 1);
@@ -146,7 +156,7 @@ void W_Hagar_Attack(Weapon thiswep)
        missile.damagedbycontents = true;
 
        missile.touch = W_Hagar_Touch;
-       missile.use = W_Hagar_Explode;
+       missile.use = W_Hagar_Explode_use;
        missile.think = adaptor_think2use_hittype_splash;
        missile.nextthink = time + WEP_CVAR_PRI(hagar, lifetime);
        PROJECTILE_MAKETRIGGER(missile);
@@ -189,7 +199,7 @@ void W_Hagar_Attack2(Weapon thiswep)
 
        missile.touch = W_Hagar_Touch2;
        missile.cnt = 0;
-       missile.use = W_Hagar_Explode2;
+       missile.use = W_Hagar_Explode2_use;
        missile.think = adaptor_think2use_hittype_splash;
        missile.nextthink = time + WEP_CVAR_SEC(hagar, lifetime_min) + random() * WEP_CVAR_SEC(hagar, lifetime_rand);
        PROJECTILE_MAKETRIGGER(missile);
@@ -247,7 +257,7 @@ void W_Hagar_Attack2_Load_Release(.entity weaponentity)
                missile.damagedbycontents = true;
 
                missile.touch = W_Hagar_Touch; // not bouncy
-               missile.use = W_Hagar_Explode2;
+               missile.use = W_Hagar_Explode2_use;
                missile.think = adaptor_think2use_hittype_splash;
                missile.nextthink = time + WEP_CVAR_SEC(hagar, lifetime_min) + random() * WEP_CVAR_SEC(hagar, lifetime_rand);
                PROJECTILE_MAKETRIGGER(missile);
@@ -397,6 +407,36 @@ void W_Hagar_Attack2_Load(Weapon thiswep, .entity weaponentity)
        }
 }
 
+void W_Hagar_Attack_Auto(Weapon thiswep, entity actor, .entity weaponentity, int fire)
+{
+       if(!(fire & 1) || actor.hagar_load || actor.hagar_loadblock)
+       {
+               w_ready(thiswep, actor, weaponentity, fire);
+               return;
+       }
+
+       if(!thiswep.wr_checkammo1(thiswep))
+       if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+       {
+               W_SwitchWeapon_Force(actor, w_getbestweapon(actor));
+               w_ready(thiswep, actor, weaponentity, fire);
+               return;
+       }
+
+       W_Hagar_Attack(thiswep);
+
+       int slot = weaponslot(weaponentity);
+       ATTACK_FINISHED(actor, slot) = time + WEP_CVAR_PRI(hagar, refire) * W_WeaponRateFactor();
+       int theframe = WFRAME_FIRE1;
+       entity this = actor.(weaponentity);
+       if(this)
+       {
+               if(this.wframe == WFRAME_FIRE1)
+                       theframe = WFRAME_DONTCHANGE;
+       }
+       weapon_thinkf(actor, weaponentity, theframe, WEP_CVAR_PRI(hagar, refire), W_Hagar_Attack_Auto);
+}
+
 METHOD(Hagar, wr_aim, void(entity thiswep))
 {
     SELFPARAM();
@@ -414,14 +454,12 @@ METHOD(Hagar, wr_think, void(entity thiswep, entity actor, .entity weaponentity,
         W_Hagar_Attack2_Load(thiswep, weaponentity); // must always run each frame
     if(autocvar_g_balance_hagar_reload_ammo && actor.clip_load < min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo))) { // forced reload
         thiswep.wr_reload(thiswep, actor, weaponentity);
-    } else if((fire & 1) && !actor.hagar_load && !actor.hagar_loadblock) // not while secondary is loaded or awaiting reset
-    {
-        if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(hagar, refire)))
-        {
-            W_Hagar_Attack(thiswep);
-            weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(hagar, refire), w_ready);
-        }
     }
+    else if((fire & 1) && !actor.hagar_load && !actor.hagar_loadblock) // not while secondary is loaded or awaiting reset
+       {
+               if(weapon_prepareattack(thiswep, actor, weaponentity, false, 0))
+                       W_Hagar_Attack_Auto(thiswep, actor, weaponentity, fire);
+       }
     else if((fire & 2) && !loadable_secondary && WEP_CVAR(hagar, secondary))
     {
         if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(hagar, refire)))
index 91c2840e6d35e47fefeb0dc3a1a12905949f3c7c..fac16c48716422cdc800cb1e62cd3c999947ce13 100644 (file)
@@ -118,6 +118,11 @@ void W_Hook_Explode2()
        self.movetype = MOVETYPE_NONE;
 }
 
+void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Hook_Explode2());
+}
+
 void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(this.health <= 0)
@@ -129,13 +134,13 @@ void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage,
        this.health = this.health - damage;
 
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(this.realowner, W_Hook_Explode2));
+               W_PrepareExplosionByDamage(this, this.realowner, W_Hook_Explode2);
 }
 
 void W_Hook_Touch2()
 {SELFPARAM();
        PROJECTILE_TOUCH;
-       self.use();
+       this.use(this, NULL, NULL);
 }
 
 void W_Hook_Attack2(Weapon thiswep, entity actor)
@@ -155,7 +160,7 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
 
        gren.nextthink = time + WEP_CVAR_SEC(hook, lifetime);
        gren.think = adaptor_think2use_hittype_splash;
-       gren.use = W_Hook_Explode2;
+       gren.use = W_Hook_Explode2_use;
        gren.touch = W_Hook_Touch2;
 
        gren.takedamage = DAMAGE_YES;
index c6e0fb86bce692d211e72ec39a24f89f29886060..96d7555cda63b4cbf4f4ea540ca6504c4f6a5db6 100644 (file)
@@ -308,7 +308,7 @@ void W_MineLayer_Damage(entity this, entity inflictor, entity attacker, float da
        this.angles = vectoangles(this.velocity);
 
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, W_MineLayer_Explode));
+               W_PrepareExplosionByDamage(this, attacker, W_MineLayer_Explode);
 }
 
 void W_MineLayer_Attack(Weapon thiswep)
@@ -530,15 +530,15 @@ METHOD(MineLayer, wr_think, void(entity thiswep, entity actor, .entity weaponent
 METHOD(MineLayer, wr_checkammo1, bool(entity thiswep))
 {
     SELFPARAM();
-    int slot = 0; // TODO: unhardcode
-    // don't switch while placing a mine
-    if(ATTACK_FINISHED(self, slot) <= time || PS(self).m_weapon != WEP_MINE_LAYER)
-    {
+    //int slot = 0; // TODO: unhardcode
+    // actually do // don't switch while placing a mine
+    //if(ATTACK_FINISHED(self, slot) <= time || PS(self).m_weapon != WEP_MINE_LAYER)
+    //{
         float ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(minelayer, ammo);
         ammo_amount += self.(weapon_load[WEP_MINE_LAYER.m_id]) >= WEP_CVAR(minelayer, ammo);
         return ammo_amount;
-    }
-    return true;
+    //}
+    //return true;
 }
 METHOD(MineLayer, wr_checkammo2, bool(entity thiswep))
 {
index 7c9b908947e31fd78e40e0613d7aa38147a68906..5fbacc7ba4b958cffef6f406d7b1ce53d76853d9 100644 (file)
@@ -84,6 +84,11 @@ void W_Mortar_Grenade_Explode()
        remove(self);
 }
 
+void W_Mortar_Grenade_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Mortar_Grenade_Explode());
+}
+
 void W_Mortar_Grenade_Explode2()
 {SELFPARAM();
        if(other.takedamage == DAMAGE_AIM)
@@ -104,6 +109,10 @@ void W_Mortar_Grenade_Explode2()
        remove(self);
 }
 
+void W_Mortar_Grenade_Explode2_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Mortar_Grenade_Explode2());
+}
 
 void W_Mortar_Grenade_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
@@ -116,7 +125,7 @@ void W_Mortar_Grenade_Damage(entity this, entity inflictor, entity attacker, flo
        this.health = this.health - damage;
 
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, this.use));
+               W_PrepareExplosionByDamage(this, attacker, adaptor_think2use);
 }
 
 void W_Mortar_Grenade_Think1()
@@ -138,7 +147,7 @@ void W_Mortar_Grenade_Touch1()
        PROJECTILE_TOUCH;
        if(other.takedamage == DAMAGE_AIM || WEP_CVAR_PRI(mortar, type) == 0) // always explode when hitting a player, or if normal mortar projectile
        {
-               self.use();
+               this.use(this, NULL, NULL);
        }
        else if(WEP_CVAR_PRI(mortar, type) == 1) // bounce
        {
@@ -170,7 +179,7 @@ void W_Mortar_Grenade_Touch2()
        PROJECTILE_TOUCH;
        if(other.takedamage == DAMAGE_AIM || WEP_CVAR_SEC(mortar, type) == 0) // always explode when hitting a player, or if normal mortar projectile
        {
-               self.use();
+               this.use(this, NULL, NULL);
        }
        else if(WEP_CVAR_SEC(mortar, type) == 1) // bounce
        {
@@ -227,7 +236,7 @@ void W_Mortar_Attack(Weapon thiswep)
        gren.cnt = time + WEP_CVAR_PRI(mortar, lifetime);
        gren.nextthink = time;
        gren.think = W_Mortar_Grenade_Think1;
-       gren.use = W_Mortar_Grenade_Explode;
+       gren.use = W_Mortar_Grenade_Explode_use;
        gren.touch = W_Mortar_Grenade_Touch1;
 
        gren.takedamage = DAMAGE_YES;
@@ -274,7 +283,7 @@ void W_Mortar_Attack2(Weapon thiswep)
 
        gren.nextthink = time + WEP_CVAR_SEC(mortar, lifetime);
        gren.think = adaptor_think2use_hittype_splash;
-       gren.use = W_Mortar_Grenade_Explode2;
+       gren.use = W_Mortar_Grenade_Explode2_use;
        gren.touch = W_Mortar_Grenade_Touch2;
 
        gren.takedamage = DAMAGE_YES;
index 34b6e895f3af59977f130f90b9cd8ec3f83fcc90..6dffec39d3378eddba5453c46bc45e171cc4bb50 100644 (file)
@@ -220,7 +220,7 @@ void W_Seeker_Missile_Damage(entity this, entity inflictor, entity attacker, flo
                this.health = this.health - damage;
 
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, W_Seeker_Missile_Explode));
+               W_PrepareExplosionByDamage(this, attacker, W_Seeker_Missile_Explode);
 }
 
 /*
@@ -313,6 +313,11 @@ void W_Seeker_Flac_Explode()
        remove(self);
 }
 
+void W_Seeker_Flac_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Seeker_Flac_Explode());
+}
+
 void W_Seeker_Flac_Touch()
 {
        PROJECTILE_TOUCH;
@@ -355,7 +360,7 @@ void W_Seeker_Fire_Flac(Weapon thiswep)
        missile.bot_dodge               = true;
        missile.bot_dodgerating = WEP_CVAR(seeker, flac_damage);
        missile.touch                   = W_Seeker_Flac_Explode;
-       missile.use                     = W_Seeker_Flac_Explode;
+       missile.use                     = W_Seeker_Flac_Explode_use;
        missile.think                   = adaptor_think2use_hittype_splash;
        missile.nextthink               = time + WEP_CVAR(seeker, flac_lifetime) + WEP_CVAR(seeker, flac_lifetime_rand);
        missile.solid                   = SOLID_BBOX;
index 933124564c1c37d5c6a1e118b85aafa7d5855421..8ce6caadd546b337e0ccd88c3ade4cfcf5400b6d 100644 (file)
@@ -227,6 +227,11 @@ void W_RocketMinsta_Laser_Explode ()
        remove(self);
 }
 
+void W_RocketMinsta_Laser_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_RocketMinsta_Laser_Explode());
+}
+
 void W_RocketMinsta_Laser_Touch ()
 {SELFPARAM();
        PROJECTILE_TOUCH;
@@ -258,7 +263,7 @@ void W_RocketMinsta_Attack2()
         proj.owner = proj.realowner = self;
         proj.bot_dodge = true;
         proj.bot_dodgerating = autocvar_g_rm_laser_damage;
-        proj.use = W_RocketMinsta_Laser_Explode;
+        proj.use = W_RocketMinsta_Laser_Explode_use;
         proj.think = adaptor_think2use_hittype_splash;
         proj.nextthink = time + autocvar_g_rm_laser_lifetime;
         PROJECTILE_MAKETRIGGER(proj);
@@ -310,7 +315,7 @@ void W_RocketMinsta_Attack3 ()
         proj.owner = proj.realowner = self;
         proj.bot_dodge = true;
         proj.bot_dodgerating = autocvar_g_rm_laser_damage;
-        proj.use = W_RocketMinsta_Laser_Explode;
+        proj.use = W_RocketMinsta_Laser_Explode_use;
         proj.think = adaptor_think2use_hittype_splash;
         proj.nextthink = time + autocvar_g_rm_laser_lifetime;
         PROJECTILE_MAKETRIGGER(proj);
index ce39bca1bda2ff74ead4a9bb5d9a1399a120c132..d0125b5e315c83d2a11c57da8a54785b8157211d 100644 (file)
@@ -41,4 +41,7 @@
 
 #pragma noref 0
 
+#define use use1
+.void(entity this, entity actor, entity trigger) use;
+
 #endif
index 783ac036faf07c3e645cce833b78c3bb6ab5e1d1..e2668a54b7cc5173d2aad78b1b4681f0a54fbc30 100644 (file)
@@ -28,4 +28,7 @@ MACRO_END
 
 #pragma noref 0
 
+#define use use1
+.void(entity this, entity actor, entity trigger) use;
+
 #endif
index 0fee57ec18e87aac641444bd8d424cb82afa106c..c5e020660d3980f5f029bf97af8112b17603f6f6 100644 (file)
@@ -72,6 +72,7 @@ void    isnt_bool(   float this) { print(ftos(this)); }
 #include "functional.qh"
 #include "i18n.qh"
 #include "iter.qh"
+#include "json.qc"
 #include "lazy.qh"
 #include "linkedlist.qh"
 #include "log.qh"
@@ -102,3 +103,5 @@ void    isnt_bool(   float this) { print(ftos(this)); }
 #include "urllib.qc"
 #include "vector.qh"
 #include "yenc.qh"
+
+#include "matrix/_mod.inc"
index fd811e7a9caaa642ab6e60f96217b50ba0532974..115a6a070fe7b076bc651d80ef5933b0f6eaed27 100644 (file)
@@ -1,7 +1,8 @@
 // generated file; do not modify
-#include "angle.qc"
-#include "p2mathlib.qc"
-#include "random.qc"
-#include "sortlist.qc"
-#include "test.qc"
-#include "urllib.qc"
+#include <lib/angle.qc>
+#include <lib/json.qc>
+#include <lib/p2mathlib.qc>
+#include <lib/random.qc>
+#include <lib/sortlist.qc>
+#include <lib/test.qc>
+#include <lib/urllib.qc>
diff --git a/qcsrc/lib/_mod.qh b/qcsrc/lib/_mod.qh
new file mode 100644 (file)
index 0000000..fd97f51
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include <lib/angle.qh>
+#include <lib/json.qh>
+#include <lib/p2mathlib.qh>
+#include <lib/random.qh>
+#include <lib/sortlist.qh>
+#include <lib/test.qh>
+#include <lib/urllib.qh>
index 1d4c6ec262d09e3ad199be062b1083666d0cbaa7..a2012c8fa2eea8f14c2b223b2b3fb95f834457d9 100644 (file)
@@ -1,5 +1,5 @@
 // generated file; do not modify
-#include "cl_model.qc"
-#include "cl_player.qc"
-#include "interpolate.qc"
-#include "sv_model.qc"
+#include <lib/csqcmodel/cl_model.qc>
+#include <lib/csqcmodel/cl_player.qc>
+#include <lib/csqcmodel/interpolate.qc>
+#include <lib/csqcmodel/sv_model.qc>
diff --git a/qcsrc/lib/csqcmodel/_mod.qh b/qcsrc/lib/csqcmodel/_mod.qh
new file mode 100644 (file)
index 0000000..de3102f
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include <lib/csqcmodel/cl_model.qh>
+#include <lib/csqcmodel/cl_player.qh>
+#include <lib/csqcmodel/interpolate.qh>
+#include <lib/csqcmodel/sv_model.qh>
index 4e308ee56a922005761017ae300772a8a69e15da..13fb92749386f7ce5e6806e20879bce88e14ed59 100644 (file)
@@ -164,6 +164,11 @@ void CSQCPlayer_Physics(entity this)
                if(autocvar_cl_movement == 1)
                        CSQCPlayer_CheckWater(this); // we apparently need to check water *before* physics so it can use this for water jump
 
+               vector oldv_angle = this.v_angle;
+               vector oldangles = this.angles; // we need to save these, as they're abused by other code
+               this.v_angle = PHYS_INPUT_ANGLES(this);
+               this.angles = PHYS_WORLD_ANGLES(this);
+
                CSQC_ClientMovement_PlayerMove_Frame(this);
 
                if(autocvar_cl_movement == 1)
@@ -180,6 +185,11 @@ void CSQCPlayer_Physics(entity this)
                        Movetype_Physics_Spam(this);
                }
 
+               view_angles = this.v_angle;
+               input_angles = this.angles;
+               this.v_angle = oldv_angle;
+               this.angles = oldangles;
+
                this.pmove_flags =
                                ((this.flags & FL_DUCKED) ? PMF_DUCKED : 0) |
                                (!(this.flags & FL_JUMPRELEASED) ? PMF_JUMP_HELD : 0) |
index d4c1eadac75db7a4dbbd87a738892b7e0f039565..24764ae1585038b96257e139e857f7f30417dae5 100644 (file)
@@ -9,6 +9,7 @@
        class(Defer).entity owner;
        class(Defer).void() think;
        class(Defer).float nextthink;
+       class(Defer).void(entity) defer_func;
 
        /** Remove self */
        void SUB_Remove(entity this)
                SELFPARAM();
                this.think     = SUB_Remove_self;
                this.nextthink = time;
-               WITHSELF(this.owner, this.selfthink(this));
+               this.defer_func(this.owner);
        }
 
     /**
      * Execute func() after time + fdelay.
      * self when func is executed = self when defer is called
      */
-       void defer(entity this, float fdelay, void(entity this) func)
+       void defer(entity this, float fdelay, void(entity) func)
        {
                entity e    = new_pure(deferred);
                e.owner     = this;
-               setthink(e, func);
+               e.defer_func = func;
                e.think     = defer_think;
                e.nextthink = time + fdelay;
        }
index fae834b49fa684b8f973ec9730c7047d0e6ae59b..c21d02121347d34b79042a31809ccd421693ab3f 100644 (file)
        } MACRO_END
 
 #define STRING_ITERATOR_GET(this) str2chr(this##_s, this##_i++)
+#define STRING_ITERATOR_PEEK(this) str2chr(this##_s, this##_i)
+#define STRING_ITERATOR_NEXT(this) MACRO_BEGIN ++this##_i; MACRO_END
+#define STRING_ITERATOR_UNGET(this) MACRO_BEGIN --this##_i; MACRO_END
+#define STRING_ITERATOR_SAVE(this) this##_i
+#define STRING_ITERATOR_LOAD(this, n) MACRO_BEGIN this##_i = n; MACRO_END
 
 #define FOREACH_CHAR(s, cond, body) \
        MACRO_BEGIN \
diff --git a/qcsrc/lib/json.qc b/qcsrc/lib/json.qc
new file mode 100644 (file)
index 0000000..acdf198
--- /dev/null
@@ -0,0 +1,300 @@
+#include "test.qh"
+
+STRING_ITERATOR(_json, string_null, 0);
+// Store interleaved keys/values in a string buffer
+int _json_buffer;
+// Last read string
+string _json_temp;
+
+/** parse a json object */
+bool _json_parse_object();
+    bool _json_parse_members();
+        bool _json_parse_pair();
+bool _json_parse_array();
+bool _json_parse_value();
+    bool _json_parse_true();
+    bool _json_parse_false();
+    bool _json_parse_null();
+bool _json_parse_string(bool add);
+bool _json_parse_number();
+    bool _json_parse_float();
+    bool _json_parse_int();
+
+#define JSON_BEGIN() int __i = STRING_ITERATOR_SAVE(_json)
+#define JSON_FAIL(reason) goto fail
+#define JSON_END() \
+   return true; \
+:fail \
+   STRING_ITERATOR_LOAD(_json, __i); \
+   return false;
+// Current namespace
+string _json_ns;
+// Current keys
+int _json_keys;
+
+bool _json_parse_object() {
+    JSON_BEGIN();
+    if (STRING_ITERATOR_GET(_json) != '{') JSON_FAIL("expected '{'");
+    WITH(int, _json_keys, bufstr_add(_json_buffer, "", 0), _json_parse_members());
+    if (STRING_ITERATOR_GET(_json) != '}') JSON_FAIL("expected '}'");
+    JSON_END();
+}
+
+    bool _json_parse_members() {
+        JSON_BEGIN();
+        for (;;) {
+            if (!_json_parse_pair()) JSON_FAIL("expected pair");
+            if (STRING_ITERATOR_PEEK(_json) == ',') {
+                STRING_ITERATOR_NEXT(_json);
+                continue;
+            }
+            break;
+        }
+        JSON_END();
+    }
+
+        bool _json_parse_pair() {
+            JSON_BEGIN();
+            if (!_json_parse_string(false)) JSON_FAIL("expected string");
+            string key = _json_temp;
+            bufstr_set(_json_buffer, _json_keys, cons(bufstr_get(_json_buffer, _json_keys), key));
+            key = _json_ns ? strcat(_json_ns, ".", key) : key;
+            bufstr_add(_json_buffer, key, 0);
+            if (STRING_ITERATOR_GET(_json) != ':') JSON_FAIL("expected ':'");
+            bool ret = false; WITH(string, _json_ns, key, ret = _json_parse_value());
+            if (!ret) JSON_FAIL("expected value");
+            JSON_END();
+        }
+
+bool _json_parse_array() {
+    JSON_BEGIN();
+    if (STRING_ITERATOR_GET(_json) != '[') JSON_FAIL("expected '['");
+    int len = bufstr_add(_json_buffer, "0", 0);
+    if (len) bufstr_set(_json_buffer, len - 1, strcat(bufstr_get(_json_buffer, len - 1), ".length"));
+    bool required = false;
+    for (int n = 0; ; n++) {
+        string key = ftos(n);
+        key = _json_ns ? strcat(_json_ns, ".", key) : key;
+        int it = bufstr_add(_json_buffer, key, 0);
+        bool ret = false; WITH(string, _json_ns, key, ret = _json_parse_value());
+        if (!ret) {
+            bufstr_free(_json_buffer, it);
+            if (required) JSON_FAIL("expected value"); else break;
+        }
+        bufstr_set(_json_buffer, len, ftos(n + 1));
+        if (STRING_ITERATOR_PEEK(_json) == ',') {
+            STRING_ITERATOR_NEXT(_json);
+            required = true;
+            continue;
+        }
+        break;
+    }
+    if (STRING_ITERATOR_GET(_json) != ']') JSON_FAIL("expected ']'");
+    JSON_END();
+}
+
+bool _json_parse_value() {
+    JSON_BEGIN();
+    if (!(_json_parse_string(true)
+        || _json_parse_number()
+        || _json_parse_object()
+        || _json_parse_array()
+        || _json_parse_true()
+        || _json_parse_false()
+        || _json_parse_null())) JSON_FAIL("expected value");
+    JSON_END();
+}
+
+    bool _json_parse_true() {
+        JSON_BEGIN();
+        if (!(STRING_ITERATOR_GET(_json) == 't'
+            && STRING_ITERATOR_GET(_json) == 'r'
+            && STRING_ITERATOR_GET(_json) == 'u'
+            && STRING_ITERATOR_GET(_json) == 'e'))
+            JSON_FAIL("expected 'true'");
+        bufstr_add(_json_buffer, "1", 0);
+        JSON_END();
+    }
+
+    bool _json_parse_false() {
+        JSON_BEGIN();
+        if (!(STRING_ITERATOR_GET(_json) == 'f'
+            && STRING_ITERATOR_GET(_json) == 'a'
+            && STRING_ITERATOR_GET(_json) == 'l'
+            && STRING_ITERATOR_GET(_json) == 's'
+            && STRING_ITERATOR_GET(_json) == 'e'))
+            JSON_FAIL("expected 'false'");
+        bufstr_add(_json_buffer, "0", 0);
+        JSON_END();
+    }
+
+    bool _json_parse_null() {
+        JSON_BEGIN();
+        if (!(STRING_ITERATOR_GET(_json) == 'n'
+            && STRING_ITERATOR_GET(_json) == 'u'
+            && STRING_ITERATOR_GET(_json) == 'l'
+            && STRING_ITERATOR_GET(_json) == 'l'))
+            JSON_FAIL("expected 'null'");
+        bufstr_add(_json_buffer, "", 0);
+        JSON_END();
+    }
+
+bool _json_parse_string(bool add) {
+    JSON_BEGIN();
+    if (STRING_ITERATOR_GET(_json) != '"') JSON_FAIL("expected opening '\"'");
+    string s = "";
+    for (int c; (c = STRING_ITERATOR_GET(_json)); ) {
+        if (c == '"') {
+            STRING_ITERATOR_UNGET(_json);
+            break;
+        } else if (c == '\\') {
+            string esc;
+            switch (STRING_ITERATOR_GET(_json)) {
+                default:
+                    JSON_FAIL("expected ( '\"' | '\\' | 'n' | 't' )");
+                case '"': esc = "\""; break;
+                case '\\': esc = "\\"; break;
+                case 'n': esc = "\n"; break;
+                case 't': esc = "\t"; break;
+                case 'u': esc = "\\u"; break; // TODO
+                case '/': esc = "/"; break;
+            }
+            s = strcat(s, esc);
+        } else {
+            s = strcat(s, chr2str(c));
+        }
+    }
+    if (STRING_ITERATOR_GET(_json) != '"') JSON_FAIL("expected closing '\"'");
+    if (add) bufstr_add(_json_buffer, s, 0);
+    _json_temp = s;
+    JSON_END();
+}
+
+bool _json_parse_number() {
+    JSON_BEGIN();
+    if (!(_json_parse_float() || _json_parse_int())) JSON_FAIL("expected number");
+    JSON_END();
+}
+
+    bool _json_parse_float() {
+        JSON_BEGIN();
+        string s = "";
+        bool needdot = true;
+        for (int c; (c = STRING_ITERATOR_GET(_json)); ) {
+            if (!(c >= '0' && c <= '9')) {
+                if (c == '.' && needdot) {
+                    // fine
+                    needdot = false;
+                } else {
+                    STRING_ITERATOR_UNGET(_json);
+                    break;
+                }
+            }
+            s = strcat(s, chr2str(c));
+        }
+        if (s == "") JSON_FAIL("expected float");
+        bufstr_add(_json_buffer, s, 0);
+        JSON_END();
+    }
+
+    bool _json_parse_int() {
+        JSON_BEGIN();
+        string s = "";
+        for (int c; (c = STRING_ITERATOR_GET(_json)); ) {
+            if (!(c >= '0' && c <= '9')) {
+                STRING_ITERATOR_UNGET(_json);
+                break;
+            }
+            if (s == "" && c == '0') JSON_FAIL("expected [1-9]");
+            s = strcat(s, chr2str(c));
+        }
+        if (s == "") JSON_FAIL("expected int");
+        if (ftos(stof(s)) != s) JSON_FAIL("expected int");
+        bufstr_add(_json_buffer, s, 0);
+        JSON_END();
+    }
+
+int json_parse(string in, bool() func) {
+    string trimmed = "";
+    LABEL(trim) {
+        int o = strstrofs(in, "\"", 0);
+        if (o >= 0) {
+            string part = substring(in, 0, o + 1); in = substring(in, o + 1, -1);
+            part = strreplace(" ", "", part);
+            part = strreplace("\n", "", part);
+            trimmed = strcat(trimmed, part);
+            goto trim_str;
+        } else {
+            string part = in;
+            part = strreplace(" ", "", part);
+            part = strreplace("\n", "", part);
+            trimmed = strcat(trimmed, part);
+            goto done;
+        }
+    }
+    LABEL(trim_str) {
+        int o = strstrofs(in, "\"", 0);
+        int esc = strstrofs(in, "\\\"", 0);
+        if (o < esc || esc < 0) {
+            // simple string
+            string part = substring(in, 0, o + 1); in = substring(in, o + 1, -1);
+            trimmed = strcat(trimmed, part);
+            goto trim;
+        } else {
+            // has escape
+            string part = substring(in, 0, esc + 2); in = substring(in, esc + 2, -1);
+            trimmed = strcat(trimmed, part);
+            goto trim_str;
+        }
+    }
+    LABEL(done);
+
+    STRING_ITERATOR_SET(_json, trimmed, 0);
+    _json_buffer = buf_create();
+    bool ret = func();
+    if (!ret) {
+        buf_del(_json_buffer);
+        _json_buffer = -1;
+    }
+    return _json_buffer;
+}
+
+string json_get(int buf, string key)
+{
+    for (int i = 1, n = buf_getsize(buf); i < n; i += 2) {
+        if (bufstr_get(buf, i) == key) return bufstr_get(buf, i + 1);
+    }
+    return string_null;
+}
+
+void json_del(int buf)
+{
+    buf_del(buf);
+}
+
+void json_dump(int buf)
+{
+    for (int i = 0, n = buf_getsize(buf); i < n; ++i) {
+        print(bufstr_get(buf, i), "\n");
+    }
+}
+
+#undef JSON_BEGIN
+#undef JSON_FAIL
+#undef JSON_END
+
+TEST(json, Parse)
+{
+    string s = "{\n\
+    \"m_string\": \"\\\"string\\\"\",\n\
+    \"m_int\": 123,\n\
+    \"m_bool\": true,\n\
+    \"m_null\": null,\n\
+    \"m_obj\": { },\n\
+    \"m_arr\": [ ]\n}"; // "
+    print(s, "\n");
+    int buf = json_parse(s, _json_parse_object);
+    EXPECT_NE(-1, buf);
+    json_dump(buf);
+    SUCCEED();
+}
index 02a25cdad0d0679d577c00191a9835e4750f5084..370d96be5629f2fdc3e6a26b767799a7c1c2c7b4 100644 (file)
@@ -38,11 +38,11 @@ string(string...) strcat0n = #53;
 string(string...) strcat0n = #115;
 #endif
 
-#define __SOURCELOC__ (sprintf("^9"__FILE__"^7"  ":"  "^9%s^7"  ":"  "^9"STR(__LINE__)"^7", __FUNC__))
+#define __SOURCELOC__ (sprintf("^7%s^9" "(" "^9"__FILE__"^7"  ":"  "^9"STR(__LINE__)"^7" ")", __FUNC__))
 
 #define _LOG(f, level, s) \
        MACRO_BEGIN { \
-               f(sprintf("^9[::^7" PROGNAME "^9::" level "^9] [%s^9]\n^7%s\n", __SOURCELOC__, s)); \
+               f(sprintf("^9[::" "^7"PROGNAME"^9" "::" level"^9" "] %s\n^7%s\n", __SOURCELOC__, s)); \
        } MACRO_END
 
 #define  LOG_FATAL(...) _LOG_FATAL(strcat0n(__VA_ARGS__))
diff --git a/qcsrc/lib/matrix/_mod.inc b/qcsrc/lib/matrix/_mod.inc
new file mode 100644 (file)
index 0000000..4854f09
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <lib/matrix/command.qc>
+#include <lib/matrix/matrix.qc>
diff --git a/qcsrc/lib/matrix/_mod.qh b/qcsrc/lib/matrix/_mod.qh
new file mode 100644 (file)
index 0000000..9658122
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <lib/matrix/command.qh>
+#include <lib/matrix/matrix.qh>
diff --git a/qcsrc/lib/matrix/command.qc b/qcsrc/lib/matrix/command.qc
new file mode 100644 (file)
index 0000000..27c7ec9
--- /dev/null
@@ -0,0 +1,48 @@
+#include "command.qh"
+
+#include <common/command/all.qh>
+
+GENERIC_COMMAND(mx, "Send a matrix command") {
+    switch (argv(1)) {
+        case "user":
+            if (matrix_user) strunzone(matrix_user);
+            matrix_user = strzone(substring(command, argv_start_index(2), -1));
+            break;
+        case "token":
+            if (matrix_access_token) strunzone(matrix_access_token);
+            matrix_access_token = strzone(substring(command, argv_start_index(2), -1));
+            break;
+        case "messages":
+            MX_Messages(string_null);
+            break;
+        case "nick":
+            MX_Nick(substring(command, argv_start_index(2), -1));
+            break;
+        case "join":
+            string s = substring(command, argv_start_index(2), -1);
+            if (s != matrix_room && matrix_room != "") {
+                MX_Leave(matrix_room);
+                strunzone(matrix_room);
+            }
+            matrix_room = strzone(s);
+            MX_Join(matrix_room);
+            break;
+        case "sync":
+            MX_Sync(string_null);
+            break;
+        case "typing":
+            MX_Typing(true);
+            break;
+        case "say":
+            MX_Say(substring(command, argv_start_index(2), -1));
+            break;
+        case "leave":
+            MX_Leave(matrix_room);
+            matrix_room = string_null;
+            break;
+        case "forget":
+            MX_Forget(matrix_room);
+            matrix_room = "";
+            break;
+    }
+}
diff --git a/qcsrc/lib/matrix/command.qh b/qcsrc/lib/matrix/command.qh
new file mode 100644 (file)
index 0000000..7645954
--- /dev/null
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "matrix.qh"
diff --git a/qcsrc/lib/matrix/matrix.qc b/qcsrc/lib/matrix/matrix.qc
new file mode 100644 (file)
index 0000000..23ec02e
--- /dev/null
@@ -0,0 +1,212 @@
+#include "matrix.qh"
+
+.string message;
+
+void MX_Nick_(entity fh, entity pass, int status);
+void MX_Nick(string name)
+{
+    if (!matrix_access_token) return;
+    entity pass = new_pure(mx);
+    pass.message = name;
+    url_single_fopen(
+        sprintf("%s/_matrix/client/r0/profile/%s/displayname?access_token=%s", autocvar_matrix_server, matrix_user, matrix_access_token),
+        FILE_WRITE,
+        MX_Nick_,
+        pass
+    );
+}
+void MX_Nick_(entity fh, entity pass, int status)
+{
+    switch (status) {
+        case URL_READY_CANWRITE: {
+            fh.url_verb = "PUT";
+            fh.url_content_type = "application/json";
+            url_fputs(fh, sprintf("{\"displayname\": \"%s\"}", pass.message));
+            remove(pass);
+            url_fclose(fh);
+            break;
+        }
+    }
+}
+
+
+void MX_Messages_(entity fh, entity pass, int status);
+void MX_Messages(string from)
+{
+    if (!matrix_access_token) return;
+    string s = sprintf("%s/_matrix/client/r0/events?room_id=%s&limit=50&timeout=30000&from=%s&access_token=%s", autocvar_matrix_server, matrix_room, from, matrix_access_token);
+    url_single_fopen(
+        s,
+        FILE_READ,
+        MX_Messages_,
+        NULL
+    );
+}
+void MX_Messages_(entity fh, entity pass, int status)
+{
+    switch (status) {
+        default: {
+            LOG_WARNINGF("status: %d", status);
+            break;
+        }
+        case URL_READY_CLOSED: break;
+        case URL_READY_CANREAD: {
+            string json = "";
+            for (string s; (s = url_fgets(fh)); ) { json = strcat(json, s, "\n"); }
+            url_fclose(fh);
+            int buf = json_parse(json, _json_parse_object);
+            EXPECT_NE(-1, buf);
+            for (int i = 0, n = stof(json_get(buf, "chunk.length")); i < n; ++i) {
+                MX_Handle(buf, sprintf("chunk.%d", i));
+            }
+            MX_Messages(json_get(buf, "end"));
+            break;
+        }
+    }
+}
+
+
+void MX_Sync_(entity fh, entity pass, int status);
+void MX_Sync(string since)
+{
+    if (!matrix_access_token) return;
+    string s = strcat(autocvar_matrix_server, "/_matrix/client/r0/sync?");
+    if (since) {
+        s = strcat(s,
+            "since=", since, "&",
+            "timeout=30000&",
+            sprintf("filter={\"account_data\":{\"types\":[]},\"presence\":{\"types\":[]},\"room\":{\"rooms\":[\"%s\"]}}&", matrix_room)
+        );
+    } else {
+        s = strcat(s,
+            "timeout=0&",
+            "filter={\"account_data\":{\"types\":[]},\"presence\":{\"types\":[]},\"room\":{\"rooms\":[]}}&"
+        );
+    }
+    s = strcat(s, "access_token=", matrix_access_token);
+    url_single_fopen(s, FILE_READ, MX_Sync_, NULL);
+}
+void MX_Sync_(entity fh, entity pass, int status)
+{
+    switch (status) {
+        default: {
+            LOG_WARNINGF("status: %d", status);
+            break;
+        }
+        case URL_READY_CLOSED: break;
+        case URL_READY_CANREAD: {
+            string json = "";
+            for (string s; (s = url_fgets(fh)); ) { json = strcat(json, s, "\n"); }
+            url_fclose(fh);
+            int buf = json_parse(json, _json_parse_object);
+            EXPECT_NE(-1, buf);
+            string arr = sprintf("rooms.join.%s.timeline.events", matrix_room);
+            for (int i = 0, n = stof(json_get(buf, sprintf("%s.length", arr))); i < n; ++i) {
+                MX_Handle(buf, sprintf("%s.%d", arr, i));
+            }
+            MX_Sync(json_get(buf, "next_batch"));
+            break;
+        }
+    }
+}
+
+
+void MX_JLF_(entity fh, entity pass, int status);
+void MX_Join(string room)
+{
+    if (!matrix_access_token) return;
+    url_single_fopen(
+        sprintf("%s/_matrix/client/r0/rooms/%s/join?access_token=%s", autocvar_matrix_server, matrix_room, matrix_access_token),
+        FILE_WRITE,
+        MX_JLF_,
+        NULL
+    );
+}
+void MX_Leave(string room)
+{
+    if (!matrix_access_token) return;
+    url_single_fopen(
+        sprintf("%s/_matrix/client/r0/rooms/%s/leave?access_token=%s", autocvar_matrix_server, matrix_room, matrix_access_token),
+        FILE_WRITE,
+        MX_JLF_,
+        NULL
+    );
+}
+void MX_Forget(string room)
+{
+    if (!matrix_access_token) return;
+    url_single_fopen(
+        sprintf("%s/_matrix/client/r0/rooms/%s/forget?access_token=%s", autocvar_matrix_server, matrix_room, matrix_access_token),
+        FILE_WRITE,
+        MX_JLF_,
+        NULL
+    );
+}
+void MX_JLF_(entity fh, entity pass, int status)
+{
+    switch (status) {
+        case URL_READY_CANWRITE: {
+            fh.url_content_type = "application/json";
+            url_fputs(fh, sprintf("{}", pass.message));
+            url_fclose(fh);
+            break;
+        }
+    }
+}
+
+
+void MX_Typing_(entity fh, entity pass, int status);
+void MX_Typing(bool state)
+{
+    if (!matrix_access_token) return;
+    entity pass = new_pure(mx);
+    pass.message = state ? "true" : "false";
+    url_single_fopen(
+        sprintf("%s/_matrix/client/r0/rooms/%s/typing/%s?access_token=%s", autocvar_matrix_server, matrix_room, matrix_user, matrix_access_token),
+        FILE_WRITE,
+        MX_Typing_,
+        pass
+    );
+}
+void MX_Typing_(entity fh, entity pass, int status)
+{
+    switch (status) {
+        case URL_READY_CANWRITE: {
+            fh.url_verb = "PUT";
+            fh.url_content_type = "application/json";
+            url_fputs(fh, sprintf("{\"typing\": %s, \"timeout\": 30000}", pass.message));
+            remove(pass);
+            url_fclose(fh);
+            break;
+        }
+    }
+}
+
+
+void MX_Say_(entity fh, entity pass, int status);
+void MX_Say(string body)
+{
+    if (!matrix_access_token) return;
+    static int txnid;
+    entity pass = new_pure(mx);
+    pass.message = strzone(body);
+    url_single_fopen(
+        sprintf("%s/_matrix/client/r0/rooms/%s/send/m.room.message/%d?access_token=%s", autocvar_matrix_server, matrix_room, ++txnid, matrix_access_token),
+        FILE_WRITE,
+        MX_Say_,
+        pass
+    );
+}
+void MX_Say_(entity fh, entity pass, int status)
+{
+    switch (status) {
+        case URL_READY_CANWRITE: {
+            fh.url_verb = "PUT";
+            fh.url_content_type = "application/json";
+            url_fputs(fh, sprintf("{\"msgtype\": \"m.text\", \"body\": \"%s\"}", pass.message));
+            strunzone(pass.message); remove(pass);
+            url_fclose(fh);
+            break;
+        }
+    }
+}
diff --git a/qcsrc/lib/matrix/matrix.qh b/qcsrc/lib/matrix/matrix.qh
new file mode 100644 (file)
index 0000000..076d8a2
--- /dev/null
@@ -0,0 +1,17 @@
+#pragma once
+
+string autocvar_matrix_server = "http://matrix.org";
+string matrix_user;
+string matrix_access_token;
+string matrix_room;
+
+void MX_Messages(string from);
+void MX_Nick(string name);
+void MX_Join(string room);
+void MX_Sync(string since);
+void MX_Typing(bool state);
+void MX_Say(string body);
+void MX_Leave(string room);
+void MX_Forget(string room);
+
+var void(int buf, string ancestor) MX_Handle;
index e1e3193308c4a0fe021301445e827dedd97a4ec8..fd6ca20365000cc0fa7553e57b560823452eec24 100644 (file)
@@ -50,10 +50,10 @@ entity __spawn(string _classname, string _sourceLoc, bool pure)
        if (pure) {
                make_pure(this);
                #ifdef CSQC
-               setorigin(this, '0 0 10000');
+               setorigin(this, (world.mins + world.maxs) * 0.5);
                #endif
                #ifdef SVQC
-        setorigin(this, '0 0 -10000');
+        setorigin(this, (world.mins + world.maxs) * 0.5);
         #endif
        }
        return this;
index 31d7d07c80db730f1db4f376a71c3f6f6dae1de9..092a8945b7a25faf0286cef3a7234c315b837772 100644 (file)
@@ -37,9 +37,9 @@
 void touch_self() { SELFPARAM(); this.selftouch(this); }
 #define settouch(e, f) (e.touch = touch_self, e.selftouch = f)
 
-.void(entity this) selfuse;
-void use_self() { SELFPARAM(); this.selfuse(this); }
-#define setuse(e, f) (e.use = use_self, e.selfuse = f)
+//.void(entity this) selfuse;
+//void use_self() { SELFPARAM(); this.selfuse(this); }
+//#define setuse(e, f) (e.use = use_self, e.selfuse = f)
 
 .void(entity this) selfthink;
 void think_self() { SELFPARAM(); this.selfthink(this); }
index 47a8175cac598554b3f2965a7dfc83db5429d2f5..384188091d0c4b0c92917bacafd3253707be3fe6 100644 (file)
@@ -281,16 +281,24 @@ void buf_save(float buf, string pFilename)
 
 /**
  * converts a number to a string with the indicated number of decimals
- * works for up to 10 decimals!
  */
 string ftos_decimals(float number, int decimals)
 {
        // inhibit stupid negative zero
        if (number == 0) number = 0;
-       // we have sprintf...
        return sprintf("%.*f", decimals, number);
 }
 
+/**
+ * converts a number to a string with the minimum number of decimals
+ */
+string ftos_mindecimals(float number)
+{
+       // inhibit stupid negative zero
+       if (number == 0) number = 0;
+       return sprintf("%.7g", number);
+}
+
 int vercmp_recursive(string v1, string v2)
 {
        int dot1 = strstrofs(v1, ".", 0);
index af00f979ca0175dd8a5316e64525763b819adbf4..d05ae28cd903b76edc4770204b142d5f8689c589 100644 (file)
@@ -46,19 +46,19 @@ bool RUN_ALL_TESTS();
 #define EXPECT_FALSE(condition) EXPECT_EQ(false, condition)
 #define ASSERT_FALSE(condition) ASSERT_EQ(false, condition)
 
-#define EXPECT_NE(val1, val2) EXPECT_TRUE(val1 != val2)
+#define EXPECT_NE(val1, val2) EXPECT_TRUE((val1) != (val2))
 #define ASSERT_NE(val1, val2) _TEST_ASSERT(EXPECT_NE(val1, val2))
 
-#define EXPECT_LT(val1, val2) EXPECT_TRUE(val1 < val2)
+#define EXPECT_LT(val1, val2) EXPECT_TRUE((val1) < (val2))
 #define ASSERT_LT(val1, val2) _TEST_ASSERT(EXPECT_LT(val1, val2))
 
-#define EXPECT_LE(val1, val2) EXPECT_TRUE(val1 <= val2)
+#define EXPECT_LE(val1, val2) EXPECT_TRUE((val1) <= (val2))
 #define ASSERT_LE(val1, val2) _TEST_ASSERT(EXPECT_LE(val1, val2))
 
-#define EXPECT_GT(val1, val2) EXPECT_TRUE(val1 > val2)
+#define EXPECT_GT(val1, val2) EXPECT_TRUE((val1) > (val2))
 #define ASSERT_GT(val1, val2) _TEST_ASSERT(EXPECT_GT(val1, val2))
 
-#define EXPECT_GE(val1, val2) EXPECT_TRUE(val1 >= val2)
+#define EXPECT_GE(val1, val2) EXPECT_TRUE((val1) >= (val2))
 #define ASSERT_GE(val1, val2) _TEST_ASSERT(EXPECT_GE(val1, val2))
 
 #define EXPECT_NO_FATAL_FAILURE(statement) EXPECT_NO_FATAL_FAILURE_(statement, { })
index 80145d8b84c15142b97be992968e38601e1f7c5f..c4c700a72d6b8341e9e561af642d638853c78e9d 100644 (file)
@@ -7,6 +7,8 @@ const float URL_FH_STDOUT = -2;
 
 // URLs
 .string url_url;
+.string url_content_type;
+.string url_verb;
 .float url_wbuf;
 .float url_wbufpos;
 .float url_rbuf;
@@ -96,6 +98,8 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                // create a writing end that does nothing yet
                                e = new_pure(url_single_fopen_file);
                                e.url_url = strzone(url);
+                               e.url_content_type = "text/plain";
+                               e.url_verb = "";
                                e.url_fh = URL_FH_CURL;
                                e.url_wbuf = buf_create();
                                if (e.url_wbuf < 0)
@@ -231,7 +235,7 @@ void url_fclose(entity e)
                        }
 
                        // POST the data
-                       if (!crypto_uri_postbuf(e.url_url, i + MIN_URL_ID, "text/plain", "", e.url_wbuf, 0))
+                       if (!crypto_uri_postbuf(e.url_url, i + MIN_URL_ID, e.url_content_type, e.url_verb, e.url_wbuf, 0))
                        {
                                LOG_INFO("url_fclose: failure in crypto_uri_postbuf\n");
                                e.url_ready(e, e.url_ready_pass, URL_READY_ERROR);
index ef257d6f6dd2a6d23aff8bd84e41bff97d97e3d9..274e8c0aeb21c51473f69fd36c7cfdd480a50f2e 100644 (file)
@@ -1,7 +1,7 @@
 // generated file; do not modify
-#include "anglestransform.qc"
-#include "client.qc"
-#include "common.qc"
-#include "mathlib.qc"
-#include "server.qc"
-#include "util_server.qc"
+#include <lib/warpzone/anglestransform.qc>
+#include <lib/warpzone/client.qc>
+#include <lib/warpzone/common.qc>
+#include <lib/warpzone/mathlib.qc>
+#include <lib/warpzone/server.qc>
+#include <lib/warpzone/util_server.qc>
diff --git a/qcsrc/lib/warpzone/_mod.qh b/qcsrc/lib/warpzone/_mod.qh
new file mode 100644 (file)
index 0000000..d679cc9
--- /dev/null
@@ -0,0 +1,7 @@
+// generated file; do not modify
+#include <lib/warpzone/anglestransform.qh>
+#include <lib/warpzone/client.qh>
+#include <lib/warpzone/common.qh>
+#include <lib/warpzone/mathlib.qh>
+#include <lib/warpzone/server.qh>
+#include <lib/warpzone/util_server.qh>
index 2b860d6f4311283a905d8d48c760402513ba06e6..f8260b5ad0a7c3c2b7c4fb52bef6699efe7ade73 100644 (file)
@@ -241,21 +241,18 @@ void WarpZone_Touch ()
        {
 #ifdef SVQC
                string save1, save2;
-               activator = other;
 
                save1 = this.target; this.target = string_null;
                save2 = this.target3; this.target3 = string_null;
-               SUB_UseTargets();
+               SUB_UseTargets(this, other, other); // use other too?
                if (!this.target) this.target = save1;
                if (!this.target3) this.target3 = save2;
 
-               setself(this.enemy);
                save1 = this.target; this.target = string_null;
                save2 = this.target2; this.target2 = string_null;
-               SUB_UseTargets();
+               SUB_UseTargets(this.enemy, other, other); // use other too?
                if (!this.target) this.target = save1;
                if (!this.target2) this.target2 = save2;
-               setself(this);
 #endif
        }
        else
@@ -412,27 +409,19 @@ float WarpZone_CheckProjectileImpact(entity player)
        player.velvec = player.warpzone_oldvelocity;
        if(WarpZone_Teleport(wz, player, 0, 1))
        {
-               entity oldself;
                string save1, save2;
 
-               oldself = self;
-               self = wz;
-               other = player;
-               activator = player;
-
-               save1 = self.target; self.target = string_null;
-               save2 = self.target3; self.target3 = string_null;
-               SUB_UseTargets();
-               if (!self.target) self.target = save1;
-               if (!self.target3) self.target3 = save2;
-
-               self = self.enemy;
-               save1 = self.target; self.target = string_null;
-               save2 = self.target2; self.target2 = string_null;
-               SUB_UseTargets();
-               if (!self.target) self.target = save1;
-               if (!self.target2) self.target2 = save2;
-               self = oldself;
+               save1 = wz.target; wz.target = string_null;
+               save2 = wz.target3; wz.target3 = string_null;
+               SUB_UseTargets(wz, player, player);
+               if (!wz.target) wz.target = save1;
+               if (!wz.target3) wz.target3 = save2;
+
+               save1 = wz.enemy.target; wz.enemy.target = string_null;
+               save2 = wz.enemy.target2; wz.enemy.target2 = string_null;
+               SUB_UseTargets(wz.enemy, player, player);
+               if (!wz.enemy.target) wz.enemy.target = save1;
+               if (!wz.enemy.target2) wz.enemy.target2 = save2;
        }
        else
        {
@@ -906,8 +895,8 @@ bool visible_to_some_client(entity ent)
        ));
        return false;
 }
-void trigger_warpzone_reconnect_use()
-{SELFPARAM();
+void trigger_warpzone_reconnect_use(entity this, entity actor, entity trigger)
+{
        // NOTE: this matches for target, not targetname, but of course
        // targetname must be set too on the other entities
        for(entity e = warpzone_first; e; e = e.warpzone_next)
index 589808ec117bdeb2cf8924137193e0c4bc34766d..e1a26e76b6449bf442fb47f18e4bd6c3892e040f 100644 (file)
@@ -1,4 +1,5 @@
 // generated file; do not modify
-#include "draw.qc"
-#include "item.qc"
-#include "menu.qc"
+#include <menu/draw.qc>
+#include <menu/item.qc>
+#include <menu/matrix.qc>
+#include <menu/menu.qc>
diff --git a/qcsrc/menu/_mod.qh b/qcsrc/menu/_mod.qh
new file mode 100644 (file)
index 0000000..a5fe87d
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include <menu/draw.qh>
+#include <menu/item.qh>
+#include <menu/matrix.qh>
+#include <menu/menu.qh>
index c8048a1178c1a009e96c74c8d30ce417a655fd79..e979fe2f5b38e3966ffe0135826528cc1e18e670 100644 (file)
@@ -1,5 +1,5 @@
 // generated file; do not modify
-#include "animation.qc"
-#include "animhost.qc"
-#include "easing.qc"
-#include "keyframe.qc"
+#include <menu/anim/animation.qc>
+#include <menu/anim/animhost.qc>
+#include <menu/anim/easing.qc>
+#include <menu/anim/keyframe.qc>
diff --git a/qcsrc/menu/anim/_mod.qh b/qcsrc/menu/anim/_mod.qh
new file mode 100644 (file)
index 0000000..8208cdd
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include <menu/anim/animation.qh>
+#include <menu/anim/animhost.qh>
+#include <menu/anim/easing.qh>
+#include <menu/anim/keyframe.qh>
index 061d60a452786ed14ba1816296643ff61a6fc9e4..e721f357a3953f975ff1b1de84bf0d2f627506d0 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "all.qc"
-#include "menu_cmd.qc"
+#include <menu/command/all.qc>
+#include <menu/command/menu_cmd.qc>
diff --git a/qcsrc/menu/command/_mod.qh b/qcsrc/menu/command/_mod.qh
new file mode 100644 (file)
index 0000000..5e66557
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <menu/command/all.qh>
+#include <menu/command/menu_cmd.qh>
index a470788a6f3b87faa081f94f48d56911ddfc4796..d80de382d24ef7df17816fc2584ef2c36f108ff8 100644 (file)
@@ -1,17 +1,17 @@
 // generated file; do not modify
-#include "borderimage.qc"
-#include "button.qc"
-#include "checkbox.qc"
-#include "container.qc"
-#include "dialog.qc"
-#include "image.qc"
-#include "inputbox.qc"
-#include "inputcontainer.qc"
-#include "label.qc"
-#include "listbox.qc"
-#include "modalcontroller.qc"
-#include "nexposee.qc"
-#include "radiobutton.qc"
-#include "slider.qc"
-#include "tab.qc"
-#include "textslider.qc"
+#include <menu/item/borderimage.qc>
+#include <menu/item/button.qc>
+#include <menu/item/checkbox.qc>
+#include <menu/item/container.qc>
+#include <menu/item/dialog.qc>
+#include <menu/item/image.qc>
+#include <menu/item/inputbox.qc>
+#include <menu/item/inputcontainer.qc>
+#include <menu/item/label.qc>
+#include <menu/item/listbox.qc>
+#include <menu/item/modalcontroller.qc>
+#include <menu/item/nexposee.qc>
+#include <menu/item/radiobutton.qc>
+#include <menu/item/slider.qc>
+#include <menu/item/tab.qc>
+#include <menu/item/textslider.qc>
diff --git a/qcsrc/menu/item/_mod.qh b/qcsrc/menu/item/_mod.qh
new file mode 100644 (file)
index 0000000..0dee9d9
--- /dev/null
@@ -0,0 +1,17 @@
+// generated file; do not modify
+#include <menu/item/borderimage.qh>
+#include <menu/item/button.qh>
+#include <menu/item/checkbox.qh>
+#include <menu/item/container.qh>
+#include <menu/item/dialog.qh>
+#include <menu/item/image.qh>
+#include <menu/item/inputbox.qh>
+#include <menu/item/inputcontainer.qh>
+#include <menu/item/label.qh>
+#include <menu/item/listbox.qh>
+#include <menu/item/modalcontroller.qh>
+#include <menu/item/nexposee.qh>
+#include <menu/item/radiobutton.qh>
+#include <menu/item/slider.qh>
+#include <menu/item/tab.qh>
+#include <menu/item/textslider.qh>
diff --git a/qcsrc/menu/matrix.qc b/qcsrc/menu/matrix.qc
new file mode 100644 (file)
index 0000000..b0c4ec8
--- /dev/null
@@ -0,0 +1,26 @@
+var void MX_Handle(int buf, string ancestor)
+{
+    string type = json_get(buf, strcat(ancestor, ".type"));
+    switch (type) {
+        case "m.typing": {
+            string arr = strcat(ancestor, ".content.user_ids");
+            for (int i = 0, n = stof(json_get(buf, sprintf("%s.length", arr))); i < n; ++i) {
+                string s = json_get(buf, sprintf("%s.%d", arr, i));
+                print("\{1}", s, " is typing...\n");
+            }
+            break;
+        }
+        case "m.room.message": {
+            string msgtype = json_get(buf, strcat(ancestor, ".content.msgtype"));
+            switch (msgtype) {
+                case "m.text": {
+                    string sender = json_get(buf, strcat(ancestor, ".sender"));
+                    string body = json_get(buf, strcat(ancestor, ".content.body"));
+                    if (body) print("\{1}", sender, ": ", body, "\n");
+                    break;
+                }
+            }
+            break;
+        }
+    }
+}
diff --git a/qcsrc/menu/mutators/_mod.qh b/qcsrc/menu/mutators/_mod.qh
new file mode 100644 (file)
index 0000000..98fb481
--- /dev/null
@@ -0,0 +1 @@
+// generated file; do not modify
index 57a34c36c7d9c0776876957a32968222b36e8f45..9b15d8caa6345efb2792e3d336e4d037489a3bfd 100644 (file)
@@ -1,6 +1,6 @@
 #include <lib/_all.inc>
 
-#include "_mod.inc"
+#include "../menu/_mod.inc"
 #include "anim/_mod.inc"
 #include "command/_mod.inc"
 #include "item/_mod.inc"
index 4702bbf70d9fade4851a3333e25b85bf99d47b3f..867f77b8402b797db0297b0e34c7343aff1a8b20 100644 (file)
 // generated file; do not modify
-#include "bigbutton.qc"
-#include "bigcommandbutton.qc"
-#include "button.qc"
-#include "campaign.qc"
-#include "charmap.qc"
-#include "checkbox.qc"
-#include "checkbox_slider_invalid.qc"
-#include "checkbox_string.qc"
-#include "colorbutton.qc"
-#include "colorpicker.qc"
-#include "colorpicker_string.qc"
-#include "commandbutton.qc"
-#include "credits.qc"
-#include "crosshairpicker.qc"
-#include "crosshairpreview.qc"
-#include "cvarlist.qc"
-#include "datasource.qc"
-#include "demolist.qc"
-#include "dialog.qc"
-#include "dialog_credits.qc"
-#include "dialog_firstrun.qc"
-#include "dialog_hudpanel_ammo.qc"
-#include "dialog_hudpanel_centerprint.qc"
-#include "dialog_hudpanel_chat.qc"
-#include "dialog_hudpanel_engineinfo.qc"
-#include "dialog_hudpanel_healtharmor.qc"
-#include "dialog_hudpanel_infomessages.qc"
-#include "dialog_hudpanel_itemstime.qc"
-#include "dialog_hudpanel_modicons.qc"
-#include "dialog_hudpanel_notification.qc"
-#include "dialog_hudpanel_physics.qc"
-#include "dialog_hudpanel_powerups.qc"
-#include "dialog_hudpanel_pressedkeys.qc"
-#include "dialog_hudpanel_quickmenu.qc"
-#include "dialog_hudpanel_racetimer.qc"
-#include "dialog_hudpanel_radar.qc"
-#include "dialog_hudpanel_score.qc"
-#include "dialog_hudpanel_timer.qc"
-#include "dialog_hudpanel_vote.qc"
-#include "dialog_hudpanel_weapons.qc"
-#include "dialog_hudsetup_exit.qc"
-#include "dialog_monstertools.qc"
-#include "dialog_multiplayer.qc"
-#include "dialog_multiplayer_create.qc"
-#include "dialog_multiplayer_create_mapinfo.qc"
-#include "dialog_multiplayer_create_mutators.qc"
-#include "dialog_multiplayer_join.qc"
-#include "dialog_multiplayer_join_serverinfo.qc"
-#include "dialog_multiplayer_media.qc"
-#include "dialog_multiplayer_media_demo.qc"
-#include "dialog_multiplayer_media_demo_startconfirm.qc"
-#include "dialog_multiplayer_media_demo_timeconfirm.qc"
-#include "dialog_multiplayer_media_musicplayer.qc"
-#include "dialog_multiplayer_media_screenshot.qc"
-#include "dialog_multiplayer_media_screenshot_viewer.qc"
-#include "dialog_multiplayer_profile.qc"
-#include "dialog_quit.qc"
-#include "dialog_sandboxtools.qc"
-#include "dialog_settings.qc"
-#include "dialog_settings_audio.qc"
-#include "dialog_settings_effects.qc"
-#include "dialog_settings_game.qc"
-#include "dialog_settings_game_crosshair.qc"
-#include "dialog_settings_game_hud.qc"
-#include "dialog_settings_game_hudconfirm.qc"
-#include "dialog_settings_game_messages.qc"
-#include "dialog_settings_game_model.qc"
-#include "dialog_settings_game_view.qc"
-#include "dialog_settings_game_weapons.qc"
-#include "dialog_settings_input.qc"
-#include "dialog_settings_input_userbind.qc"
-#include "dialog_settings_misc.qc"
-#include "dialog_settings_misc_cvars.qc"
-#include "dialog_settings_misc_reset.qc"
-#include "dialog_settings_user.qc"
-#include "dialog_settings_user_languagewarning.qc"
-#include "dialog_settings_video.qc"
-#include "dialog_singleplayer.qc"
-#include "dialog_singleplayer_winner.qc"
-#include "dialog_teamselect.qc"
-#include "gametypelist.qc"
-#include "hudskinlist.qc"
-#include "image.qc"
-#include "inputbox.qc"
-#include "keybinder.qc"
-#include "languagelist.qc"
-#include "listbox.qc"
-#include "mainwindow.qc"
-#include "maplist.qc"
-#include "nexposee.qc"
-#include "picker.qc"
-#include "playerlist.qc"
-#include "playermodel.qc"
-#include "playlist.qc"
-#include "radiobutton.qc"
-#include "rootdialog.qc"
-#include "screenshotimage.qc"
-#include "screenshotlist.qc"
-#include "serverlist.qc"
-#include "skinlist.qc"
-#include "slider.qc"
-#include "slider_decibels.qc"
-#include "slider_particles.qc"
-#include "slider_picmip.qc"
-#include "slider_resolution.qc"
-#include "slider_sbfadetime.qc"
-#include "soundlist.qc"
-#include "statslist.qc"
-#include "tab.qc"
-#include "tabcontroller.qc"
-#include "textlabel.qc"
-#include "textslider.qc"
-#include "util.qc"
-#include "weaponarenacheckbox.qc"
-#include "weaponslist.qc"
+#include <menu/xonotic/bigbutton.qc>
+#include <menu/xonotic/bigcommandbutton.qc>
+#include <menu/xonotic/button.qc>
+#include <menu/xonotic/campaign.qc>
+#include <menu/xonotic/charmap.qc>
+#include <menu/xonotic/checkbox.qc>
+#include <menu/xonotic/checkbox_slider_invalid.qc>
+#include <menu/xonotic/checkbox_string.qc>
+#include <menu/xonotic/colorbutton.qc>
+#include <menu/xonotic/colorpicker.qc>
+#include <menu/xonotic/colorpicker_string.qc>
+#include <menu/xonotic/commandbutton.qc>
+#include <menu/xonotic/credits.qc>
+#include <menu/xonotic/crosshairpicker.qc>
+#include <menu/xonotic/crosshairpreview.qc>
+#include <menu/xonotic/cvarlist.qc>
+#include <menu/xonotic/datasource.qc>
+#include <menu/xonotic/demolist.qc>
+#include <menu/xonotic/dialog.qc>
+#include <menu/xonotic/dialog_credits.qc>
+#include <menu/xonotic/dialog_firstrun.qc>
+#include <menu/xonotic/dialog_hudpanel_ammo.qc>
+#include <menu/xonotic/dialog_hudpanel_centerprint.qc>
+#include <menu/xonotic/dialog_hudpanel_chat.qc>
+#include <menu/xonotic/dialog_hudpanel_engineinfo.qc>
+#include <menu/xonotic/dialog_hudpanel_healtharmor.qc>
+#include <menu/xonotic/dialog_hudpanel_infomessages.qc>
+#include <menu/xonotic/dialog_hudpanel_itemstime.qc>
+#include <menu/xonotic/dialog_hudpanel_modicons.qc>
+#include <menu/xonotic/dialog_hudpanel_notification.qc>
+#include <menu/xonotic/dialog_hudpanel_physics.qc>
+#include <menu/xonotic/dialog_hudpanel_powerups.qc>
+#include <menu/xonotic/dialog_hudpanel_pressedkeys.qc>
+#include <menu/xonotic/dialog_hudpanel_quickmenu.qc>
+#include <menu/xonotic/dialog_hudpanel_racetimer.qc>
+#include <menu/xonotic/dialog_hudpanel_radar.qc>
+#include <menu/xonotic/dialog_hudpanel_score.qc>
+#include <menu/xonotic/dialog_hudpanel_timer.qc>
+#include <menu/xonotic/dialog_hudpanel_vote.qc>
+#include <menu/xonotic/dialog_hudpanel_weapons.qc>
+#include <menu/xonotic/dialog_hudsetup_exit.qc>
+#include <menu/xonotic/dialog_monstertools.qc>
+#include <menu/xonotic/dialog_multiplayer.qc>
+#include <menu/xonotic/dialog_multiplayer_create.qc>
+#include <menu/xonotic/dialog_multiplayer_create_mapinfo.qc>
+#include <menu/xonotic/dialog_multiplayer_create_mutators.qc>
+#include <menu/xonotic/dialog_multiplayer_join.qc>
+#include <menu/xonotic/dialog_multiplayer_join_serverinfo.qc>
+#include <menu/xonotic/dialog_multiplayer_media.qc>
+#include <menu/xonotic/dialog_multiplayer_media_demo.qc>
+#include <menu/xonotic/dialog_multiplayer_media_demo_startconfirm.qc>
+#include <menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc>
+#include <menu/xonotic/dialog_multiplayer_media_musicplayer.qc>
+#include <menu/xonotic/dialog_multiplayer_media_screenshot.qc>
+#include <menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc>
+#include <menu/xonotic/dialog_multiplayer_profile.qc>
+#include <menu/xonotic/dialog_quit.qc>
+#include <menu/xonotic/dialog_sandboxtools.qc>
+#include <menu/xonotic/dialog_settings.qc>
+#include <menu/xonotic/dialog_settings_audio.qc>
+#include <menu/xonotic/dialog_settings_effects.qc>
+#include <menu/xonotic/dialog_settings_game.qc>
+#include <menu/xonotic/dialog_settings_game_crosshair.qc>
+#include <menu/xonotic/dialog_settings_game_hud.qc>
+#include <menu/xonotic/dialog_settings_game_hudconfirm.qc>
+#include <menu/xonotic/dialog_settings_game_messages.qc>
+#include <menu/xonotic/dialog_settings_game_model.qc>
+#include <menu/xonotic/dialog_settings_game_view.qc>
+#include <menu/xonotic/dialog_settings_game_weapons.qc>
+#include <menu/xonotic/dialog_settings_input.qc>
+#include <menu/xonotic/dialog_settings_input_userbind.qc>
+#include <menu/xonotic/dialog_settings_misc.qc>
+#include <menu/xonotic/dialog_settings_misc_cvars.qc>
+#include <menu/xonotic/dialog_settings_misc_reset.qc>
+#include <menu/xonotic/dialog_settings_user.qc>
+#include <menu/xonotic/dialog_settings_user_languagewarning.qc>
+#include <menu/xonotic/dialog_settings_video.qc>
+#include <menu/xonotic/dialog_singleplayer.qc>
+#include <menu/xonotic/dialog_singleplayer_winner.qc>
+#include <menu/xonotic/dialog_teamselect.qc>
+#include <menu/xonotic/gametypelist.qc>
+#include <menu/xonotic/hudskinlist.qc>
+#include <menu/xonotic/image.qc>
+#include <menu/xonotic/inputbox.qc>
+#include <menu/xonotic/keybinder.qc>
+#include <menu/xonotic/languagelist.qc>
+#include <menu/xonotic/listbox.qc>
+#include <menu/xonotic/mainwindow.qc>
+#include <menu/xonotic/maplist.qc>
+#include <menu/xonotic/nexposee.qc>
+#include <menu/xonotic/picker.qc>
+#include <menu/xonotic/playerlist.qc>
+#include <menu/xonotic/playermodel.qc>
+#include <menu/xonotic/playlist.qc>
+#include <menu/xonotic/radiobutton.qc>
+#include <menu/xonotic/rootdialog.qc>
+#include <menu/xonotic/screenshotimage.qc>
+#include <menu/xonotic/screenshotlist.qc>
+#include <menu/xonotic/serverlist.qc>
+#include <menu/xonotic/skinlist.qc>
+#include <menu/xonotic/slider.qc>
+#include <menu/xonotic/slider_decibels.qc>
+#include <menu/xonotic/slider_particles.qc>
+#include <menu/xonotic/slider_picmip.qc>
+#include <menu/xonotic/slider_resolution.qc>
+#include <menu/xonotic/slider_sbfadetime.qc>
+#include <menu/xonotic/soundlist.qc>
+#include <menu/xonotic/statslist.qc>
+#include <menu/xonotic/tab.qc>
+#include <menu/xonotic/tabcontroller.qc>
+#include <menu/xonotic/textlabel.qc>
+#include <menu/xonotic/textslider.qc>
+#include <menu/xonotic/util.qc>
+#include <menu/xonotic/weaponarenacheckbox.qc>
+#include <menu/xonotic/weaponslist.qc>
diff --git a/qcsrc/menu/xonotic/_mod.qh b/qcsrc/menu/xonotic/_mod.qh
new file mode 100644 (file)
index 0000000..adfefc0
--- /dev/null
@@ -0,0 +1,116 @@
+// generated file; do not modify
+#include <menu/xonotic/bigbutton.qh>
+#include <menu/xonotic/bigcommandbutton.qh>
+#include <menu/xonotic/button.qh>
+#include <menu/xonotic/campaign.qh>
+#include <menu/xonotic/charmap.qh>
+#include <menu/xonotic/checkbox.qh>
+#include <menu/xonotic/checkbox_slider_invalid.qh>
+#include <menu/xonotic/checkbox_string.qh>
+#include <menu/xonotic/colorbutton.qh>
+#include <menu/xonotic/colorpicker.qh>
+#include <menu/xonotic/colorpicker_string.qh>
+#include <menu/xonotic/commandbutton.qh>
+#include <menu/xonotic/credits.qh>
+#include <menu/xonotic/crosshairpicker.qh>
+#include <menu/xonotic/crosshairpreview.qh>
+#include <menu/xonotic/cvarlist.qh>
+#include <menu/xonotic/datasource.qh>
+#include <menu/xonotic/demolist.qh>
+#include <menu/xonotic/dialog.qh>
+#include <menu/xonotic/dialog_credits.qh>
+#include <menu/xonotic/dialog_firstrun.qh>
+#include <menu/xonotic/dialog_hudpanel_ammo.qh>
+#include <menu/xonotic/dialog_hudpanel_centerprint.qh>
+#include <menu/xonotic/dialog_hudpanel_chat.qh>
+#include <menu/xonotic/dialog_hudpanel_engineinfo.qh>
+#include <menu/xonotic/dialog_hudpanel_healtharmor.qh>
+#include <menu/xonotic/dialog_hudpanel_infomessages.qh>
+#include <menu/xonotic/dialog_hudpanel_itemstime.qh>
+#include <menu/xonotic/dialog_hudpanel_modicons.qh>
+#include <menu/xonotic/dialog_hudpanel_notification.qh>
+#include <menu/xonotic/dialog_hudpanel_physics.qh>
+#include <menu/xonotic/dialog_hudpanel_powerups.qh>
+#include <menu/xonotic/dialog_hudpanel_pressedkeys.qh>
+#include <menu/xonotic/dialog_hudpanel_quickmenu.qh>
+#include <menu/xonotic/dialog_hudpanel_racetimer.qh>
+#include <menu/xonotic/dialog_hudpanel_radar.qh>
+#include <menu/xonotic/dialog_hudpanel_score.qh>
+#include <menu/xonotic/dialog_hudpanel_timer.qh>
+#include <menu/xonotic/dialog_hudpanel_vote.qh>
+#include <menu/xonotic/dialog_hudpanel_weapons.qh>
+#include <menu/xonotic/dialog_hudsetup_exit.qh>
+#include <menu/xonotic/dialog_monstertools.qh>
+#include <menu/xonotic/dialog_multiplayer.qh>
+#include <menu/xonotic/dialog_multiplayer_create.qh>
+#include <menu/xonotic/dialog_multiplayer_create_mapinfo.qh>
+#include <menu/xonotic/dialog_multiplayer_create_mutators.qh>
+#include <menu/xonotic/dialog_multiplayer_join.qh>
+#include <menu/xonotic/dialog_multiplayer_join_serverinfo.qh>
+#include <menu/xonotic/dialog_multiplayer_media.qh>
+#include <menu/xonotic/dialog_multiplayer_media_demo.qh>
+#include <menu/xonotic/dialog_multiplayer_media_demo_startconfirm.qh>
+#include <menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qh>
+#include <menu/xonotic/dialog_multiplayer_media_musicplayer.qh>
+#include <menu/xonotic/dialog_multiplayer_media_screenshot.qh>
+#include <menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qh>
+#include <menu/xonotic/dialog_multiplayer_profile.qh>
+#include <menu/xonotic/dialog_quit.qh>
+#include <menu/xonotic/dialog_sandboxtools.qh>
+#include <menu/xonotic/dialog_settings.qh>
+#include <menu/xonotic/dialog_settings_audio.qh>
+#include <menu/xonotic/dialog_settings_effects.qh>
+#include <menu/xonotic/dialog_settings_game.qh>
+#include <menu/xonotic/dialog_settings_game_crosshair.qh>
+#include <menu/xonotic/dialog_settings_game_hud.qh>
+#include <menu/xonotic/dialog_settings_game_hudconfirm.qh>
+#include <menu/xonotic/dialog_settings_game_messages.qh>
+#include <menu/xonotic/dialog_settings_game_model.qh>
+#include <menu/xonotic/dialog_settings_game_view.qh>
+#include <menu/xonotic/dialog_settings_game_weapons.qh>
+#include <menu/xonotic/dialog_settings_input.qh>
+#include <menu/xonotic/dialog_settings_input_userbind.qh>
+#include <menu/xonotic/dialog_settings_misc.qh>
+#include <menu/xonotic/dialog_settings_misc_cvars.qh>
+#include <menu/xonotic/dialog_settings_misc_reset.qh>
+#include <menu/xonotic/dialog_settings_user.qh>
+#include <menu/xonotic/dialog_settings_user_languagewarning.qh>
+#include <menu/xonotic/dialog_settings_video.qh>
+#include <menu/xonotic/dialog_singleplayer.qh>
+#include <menu/xonotic/dialog_singleplayer_winner.qh>
+#include <menu/xonotic/dialog_teamselect.qh>
+#include <menu/xonotic/gametypelist.qh>
+#include <menu/xonotic/hudskinlist.qh>
+#include <menu/xonotic/image.qh>
+#include <menu/xonotic/inputbox.qh>
+#include <menu/xonotic/keybinder.qh>
+#include <menu/xonotic/languagelist.qh>
+#include <menu/xonotic/listbox.qh>
+#include <menu/xonotic/mainwindow.qh>
+#include <menu/xonotic/maplist.qh>
+#include <menu/xonotic/nexposee.qh>
+#include <menu/xonotic/picker.qh>
+#include <menu/xonotic/playerlist.qh>
+#include <menu/xonotic/playermodel.qh>
+#include <menu/xonotic/playlist.qh>
+#include <menu/xonotic/radiobutton.qh>
+#include <menu/xonotic/rootdialog.qh>
+#include <menu/xonotic/screenshotimage.qh>
+#include <menu/xonotic/screenshotlist.qh>
+#include <menu/xonotic/serverlist.qh>
+#include <menu/xonotic/skinlist.qh>
+#include <menu/xonotic/slider.qh>
+#include <menu/xonotic/slider_decibels.qh>
+#include <menu/xonotic/slider_particles.qh>
+#include <menu/xonotic/slider_picmip.qh>
+#include <menu/xonotic/slider_resolution.qh>
+#include <menu/xonotic/slider_sbfadetime.qh>
+#include <menu/xonotic/soundlist.qh>
+#include <menu/xonotic/statslist.qh>
+#include <menu/xonotic/tab.qh>
+#include <menu/xonotic/tabcontroller.qh>
+#include <menu/xonotic/textlabel.qh>
+#include <menu/xonotic/textslider.qh>
+#include <menu/xonotic/util.qh>
+#include <menu/xonotic/weaponarenacheckbox.qh>
+#include <menu/xonotic/weaponslist.qh>
index 21743b9a1506801ea9a4a86bce1843c706d85447..6015e48bad45369c9b350e4eefe38d29202f2e8a 100644 (file)
@@ -77,9 +77,9 @@ void XonoticCheckBox_saveCvars(entity me)
                return;
 
        if(me.checked)
-               cvar_set(me.cvarName, ftos(me.yesValue));
+               cvar_set(me.cvarName, ftos_mindecimals(me.yesValue));
        else
-               cvar_set(me.cvarName, ftos(me.noValue));
+               cvar_set(me.cvarName, ftos_mindecimals(me.noValue));
 
        CheckSendCvars(me, me.cvarName);
 }
index 956285ec8b71f218da1e95ef9ddca1658c22b8ac..f23af46d9ea017839dc159122168db91a9146fef 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "inputbox.qh"
 #include "../item/container.qh"
+#include "../item/checkbox.qh"
 
 entity makeXonoticCvarList()
 {
@@ -16,19 +17,47 @@ void XonoticCvarList_configureXonoticCvarList(entity me)
        me.handle = buf_create();
        me.nItems = 0;
 }
+void CvarList_Load(entity me, string filter)
+{
+       if(me.handle < 0)
+               return;
+
+       buf_cvarlist(me.handle, filter, "_");
+       me.nItems = buf_getsize(me.handle);
+       if(autocvar_menu_cvarlist_onlymodified)
+       {
+               float newbuf = buf_create();
+               for (int i = 0; i < me.nItems; ++i)
+               {
+                       string k = bufstr_get(me.handle, i);
+                       if(cvar_string(k) != cvar_defstring(k))
+                               bufstr_add(newbuf, k, false);
+               }
+               buf_del(me.handle);
+               me.handle = newbuf;
+               me.nItems = buf_getsize(me.handle);
+       }
+}
 void XonoticCvarList_showNotify(entity me)
 {
        bool force_initial_selection = false;
        if(me.handle >= 0 && me.nItems <= 0) // me.handle not loaded yet?
                force_initial_selection = true;
-       buf_cvarlist(me.handle, "", "_");
-       me.nItems = buf_getsize(me.handle);
+       CvarList_Load(me, me.controlledTextbox.text);
        if(force_initial_selection)
                me.setSelected(me, 0);
 }
+void XonoticCvarList_hideNotify(entity me)
+{
+       if(me.handle)
+               buf_del(me.handle);
+       me.handle = buf_create();
+       me.nItems = 0;
+}
 void XonoticCvarList_destroy(entity me)
 {
-       buf_del(me.handle);
+       if(me.handle)
+               buf_del(me.handle);
 }
 string autocvar_menu_forced_saved_cvars;
 string autocvar_menu_reverted_nonsaved_cvars;
@@ -102,9 +131,14 @@ void XonoticCvarList_setSelected(entity me, float i)
 }
 void CvarList_Filter_Change(entity box, entity me)
 {
-       buf_cvarlist(me.handle, box.text, "_");
-       me.nItems = buf_getsize(me.handle);
-
+       CvarList_Load(me, box.text);
+       me.setSelected(me, 0);
+}
+void CvarList_Filter_ModifiedCvars(entity box, entity me)
+{
+       cvar_set("menu_cvarlist_onlymodified", ftos(!autocvar_menu_cvarlist_onlymodified));
+       box.setChecked(box, autocvar_menu_cvarlist_onlymodified);
+       CvarList_Load(me, me.controlledTextbox.text);
        me.setSelected(me, 0);
 }
 void XonoticCvarList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
index 4bc56b3b8de93a3f2954489587f7358b85b35c14..2c99866cf7671d7bf35c9cdf438c7f2dbcdeeea7 100644 (file)
@@ -8,6 +8,7 @@ CLASS(XonoticCvarList, XonoticListBox)
        METHOD(XonoticCvarList, resizeNotify, void(entity, vector, vector, vector, vector));
        METHOD(XonoticCvarList, keyDown, float(entity, float, float, float));
        METHOD(XonoticCvarList, showNotify, void(entity));
+       METHOD(XonoticCvarList, hideNotify, void(entity));
 
        METHOD(XonoticCvarList, destroy, void(entity));
 
@@ -38,6 +39,9 @@ CLASS(XonoticCvarList, XonoticListBox)
 ENDCLASS(XonoticCvarList)
 entity makeXonoticCvarList();
 void CvarList_Filter_Change(entity box, entity me);
+void CvarList_Filter_ModifiedCvars(entity box, entity me);
 void CvarList_Value_Change(entity box, entity me);
 void CvarList_Revert_Click(entity btn, entity me);
 void CvarList_End_Editing(entity box, entity me);
+
+float autocvar_menu_cvarlist_onlymodified;
index c158ebabfca0309288fbc2f1537434b450bc2bba..ac305b83258638cd4352305a7071d338a5d85b3d 100644 (file)
@@ -11,6 +11,8 @@ void XonoticHUDHealthArmorDialog_fill(entity me)
 
        DIALOG_HUDPANEL_COMMON();
 
+       me.TR(me);
+               me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_combined", _("Combine health and armor")));
        me.TR(me);
                me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_progressbar", _("Enable status bar")));
        me.TR(me);
index 68ffe79ea56546b2139ddfe6a18b8f5ac213865a..495047c5fca1788ff6cb4e21b338fd0c8b0e9878 100644 (file)
@@ -6,7 +6,7 @@ CLASS(XonoticHUDHealthArmorDialog, XonoticRootDialog)
        ATTRIB(XonoticHUDHealthArmorDialog, title, string, _("Health/Armor Panel"))
        ATTRIB(XonoticHUDHealthArmorDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
        ATTRIB(XonoticHUDHealthArmorDialog, intendedWidth, float, 0.4)
-       ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 15)
+       ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 16)
        ATTRIB(XonoticHUDHealthArmorDialog, columns, float, 4)
        ATTRIB(XonoticHUDHealthArmorDialog, name, string, "HUDhealtharmor")
        ATTRIB(XonoticHUDHealthArmorDialog, requiresConnection, float, true)
index 1676aab803080fc7fcec89ddc06831520ea2294d..61339b6b938cc54800e1326bba256b00d08488a4 100644 (file)
@@ -56,6 +56,7 @@ void XonoticHUDWeaponsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Weapon ID scale:")));
+                       setDependent(e, "hud_panel_weapons_label", 1, 2);
                        me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.05, "hud_panel_weapons_label_scale"));
                        setDependent(e, "hud_panel_weapons_label", 1, 2);
        me.TR(me);
@@ -65,11 +66,13 @@ void XonoticHUDWeaponsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Ammo bar alpha:")));
+                       setDependent(e, "hud_panel_weapons_ammo", 1, 1);
                        me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_weapons_ammo_alpha"));
                        setDependent(e, "hud_panel_weapons_ammo", 1, 1);
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Ammo bar color:")));
+                       setDependent(e, "hud_panel_weapons_ammo", 1, 1);
                me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color", "hud_panel_weapons_ammo_color"));
                        setDependent(e, "hud_panel_weapons_ammo", 1, 1);
                me.TR(me);
index 1b0666c75afd59f3c4ad86f10ad13a034bf6b709..0f5c5a4af225bf2dd34cf7c9f31b7975d9076159 100644 (file)
@@ -135,6 +135,7 @@ void XonoticEffectsSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(1, "mod_q3bsp_nolightmaps", _("Use lightmaps"),
                        _("Use high resolution lightmaps, which will look pretty but use up some extra video memory (default: enabled)")));
+                       e.applyButton = effectsApplyButton;
                me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_deluxemapping", _("Deluxe mapping"),
                        _("Use per-pixel lighting effects (default: enabled)")));
                        setDependentAND(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0);
index 664306738df38625e1acd1d67ef15b26b4157946..a03c5473127ccd3258438a229c894b4acf8712bf 100644 (file)
@@ -123,6 +123,7 @@ void XonoticGameCrosshairSettingsTab_fill(entity me)
                        setDependent(e, "crosshair_enabled", 1, 2);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Hit testing:")));
+                       setDependent(e, "crosshair_enabled", 1, 2);
                me.TD(me, 1, 2, e = makeXonoticTextSlider_T("crosshair_hittest",
                        _("None: do not do hit tests for the crosshair; TrueAim: blur the crosshair when you would not hit the wall; Enemies: also enlarge the crosshair when you would hit an enemy")));
                        e.addValue(e, ZCTX(_("HTTST^Disabled")), "0");
index f1fec78cf22e44140895a7837033bc7fe66fa037..f35e0d22db2633a47e34043eda73d04819769a04 100644 (file)
@@ -1,5 +1,6 @@
 #include "dialog_settings_misc_cvars.qh"
 
+#include "checkbox.qh"
 #include "cvarlist.qh"
 #include "textlabel.qh"
 #include "inputbox.qh"
@@ -28,15 +29,16 @@ void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIS
 
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:")));
-               me.TD(me, 1, me.columns - 1, e = makeXonoticInputBox(0, string_null));
-                       e.color = SKINCOLOR_CVARLIST_CONTROLS;
-                       e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
-                       e.cb_color = SKINCOLOR_CVARLIST_CONTROLS;
-                       e.cb_colorC = SKINCOLOR_CVARLIST_CONTROLS;
-                       e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
+               me.TD(me, 1, 3, e = makeXonoticInputBox(0, string_null));
+                       e.color = e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
+                       e.cb_color = e.cb_colorC = e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
                        e.onChange = CvarList_Filter_Change;
                        e.onChangeEntity = cvarlist;
                        cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "menu_cvarlist_onlymodified", _("Modified cvars only")));
+                       e.color = e.colorC = e.colorF = e.colorD = SKINCOLOR_CVARLIST_CONTROLS;
+                       e.onClickEntity = cvarlist;
+                       e.onClick = CvarList_Filter_ModifiedCvars;
        me.TR(me);
                me.TD(me, me.rows - me.currentRow - 9, me.columns, cvarlist);
        me.gotoRC(me, me.rows - 8, 0);
@@ -51,11 +53,8 @@ void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIS
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:")));
                me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
                        cvarlist.cvarValueBox = e;
-                       e.color = SKINCOLOR_CVARLIST_CONTROLS;
-                       e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
-                       e.cb_color = SKINCOLOR_CVARLIST_CONTROLS;
-                       e.cb_colorC = SKINCOLOR_CVARLIST_CONTROLS;
-                       e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
+                       e.color = e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
+                       e.cb_color = e.cb_colorC = e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
                        e.onChange = CvarList_Value_Change;
                        e.onChangeEntity = cvarlist;
                        e.onEnter = CvarList_End_Editing;
index 1ec53c623eebe6bec086520cf9e52b2c7f788958..9320a6ebf2101603fe79e478d3b1abf347f8fe7e 100644 (file)
@@ -86,6 +86,7 @@ void XonoticVideoSettingsTab_fill(entity me)
                        e.addValue(e, _("4x"), "4");
                        e.configureXonoticTextSliderValues(e);
                        setDependent(e, "r_viewfbo", 0, 0);
+                       e.applyButton = videoApplyButton;
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "r_viewfbo", _("High-quality frame buffer")));
                        setDependent(e, "vid_samples", 1, 1);
@@ -154,6 +155,7 @@ void XonoticVideoSettingsTab_fill(entity me)
                        _("Make the CPU wait for the GPU to finish each frame, can help with some strange input or video lag on some machines (default: disabled)")));
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", _("Use OpenGL 2.0 shaders (GLSL)")));
+                       e.applyButton = videoApplyButton;
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "v_glslgamma", _("Use GLSL to handle color control"),
index 3cb20d3018dfaa69b20c0ac3867dd62f98d01992..ca2db83573d02a468f7077cb5474f331979fc00d 100644 (file)
@@ -59,9 +59,9 @@ void Xonotic_KeyBinds_Read()
        for(int imp = 1; imp <= 9; ++imp)
        {
         string w_list = "";
-               ADD_TO_W_LIST(!(it.flags & WEP_FLAG_MUTATORBLOCKED) && !(it.flags & WEP_FLAG_SUPERWEAPON));
-               ADD_TO_W_LIST(it.flags & WEP_FLAG_SUPERWEAPON);
-               ADD_TO_W_LIST(it.flags & WEP_FLAG_MUTATORBLOCKED);
+               ADD_TO_W_LIST(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & WEP_TYPE_OTHER) && !(it.spawnflags & WEP_FLAG_HIDDEN) && !(it.spawnflags & WEP_FLAG_SUPERWEAPON));
+               ADD_TO_W_LIST((it.spawnflags & WEP_FLAG_SUPERWEAPON) && !(it.spawnflags & WEP_TYPE_OTHER) && !(it.spawnflags & WEP_FLAG_HIDDEN));
+               ADD_TO_W_LIST((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & WEP_TYPE_OTHER) && !(it.spawnflags & WEP_FLAG_HIDDEN));
                if(w_list)
                        KEYBIND_DEF(strcat("weapon_group_", itos(imp)), substring(w_list, 0, -4));
                if(imp == 0)
index fc4228cf98b0503b55f013a15df217d1909978f5..c8e057a641416aa922a9760b6cbaafa3072b881e 100644 (file)
@@ -58,7 +58,7 @@ void XonoticSlider_saveCvars(entity me)
        if (!me.cvarName)
                return;
 
-       cvar_set(me.cvarName, ftos(me.value));
+       cvar_set(me.cvarName, ftos_mindecimals(me.value));
 
        CheckSendCvars(me, me.cvarName);
 }
index d502c48ed35b35c8f28c2806364bb0fd13db00bb..f22742f1dda7292b497fc88aeead8ae7d905b997 100644 (file)
@@ -1,32 +1,33 @@
 // generated file; do not modify
-#include "anticheat.qc"
-#include "antilag.qc"
-#include "campaign.qc"
-#include "cheats.qc"
-#include "cl_client.qc"
-#include "cl_impulse.qc"
-#include "cl_player.qc"
-#include "g_damage.qc"
-#include "g_hook.qc"
-#include "g_lights.qc"
-#include "g_models.qc"
-#include "g_subs.qc"
-#include "g_world.qc"
-#include "ipban.qc"
-#include "item_key.qc"
-#include "mapvoting.qc"
-#include "miscfunctions.qc"
-#include "playerdemo.qc"
-#include "portals.qc"
-#include "race.qc"
-#include "round_handler.qc"
-#include "scores.qc"
-#include "scores_rules.qc"
-#include "spawnpoints.qc"
-#include "steerlib.qc"
-#include "sv_main.qc"
-#include "teamplay.qc"
-#include "tests.qc"
-#include "t_halflife.qc"
-#include "t_quake.qc"
-#include "t_quake3.qc"
+#include <server/anticheat.qc>
+#include <server/antilag.qc>
+#include <server/campaign.qc>
+#include <server/cheats.qc>
+#include <server/cl_client.qc>
+#include <server/cl_impulse.qc>
+#include <server/cl_player.qc>
+#include <server/g_damage.qc>
+#include <server/g_hook.qc>
+#include <server/g_lights.qc>
+#include <server/g_models.qc>
+#include <server/g_subs.qc>
+#include <server/g_world.qc>
+#include <server/ipban.qc>
+#include <server/item_key.qc>
+#include <server/mapvoting.qc>
+#include <server/matrix.qc>
+#include <server/miscfunctions.qc>
+#include <server/playerdemo.qc>
+#include <server/portals.qc>
+#include <server/race.qc>
+#include <server/round_handler.qc>
+#include <server/scores.qc>
+#include <server/scores_rules.qc>
+#include <server/spawnpoints.qc>
+#include <server/steerlib.qc>
+#include <server/sv_main.qc>
+#include <server/teamplay.qc>
+#include <server/tests.qc>
+#include <server/t_halflife.qc>
+#include <server/t_quake.qc>
+#include <server/t_quake3.qc>
diff --git a/qcsrc/server/_mod.qh b/qcsrc/server/_mod.qh
new file mode 100644 (file)
index 0000000..17e0a82
--- /dev/null
@@ -0,0 +1,33 @@
+// generated file; do not modify
+#include <server/anticheat.qh>
+#include <server/antilag.qh>
+#include <server/campaign.qh>
+#include <server/cheats.qh>
+#include <server/cl_client.qh>
+#include <server/cl_impulse.qh>
+#include <server/cl_player.qh>
+#include <server/g_damage.qh>
+#include <server/g_hook.qh>
+#include <server/g_lights.qh>
+#include <server/g_models.qh>
+#include <server/g_subs.qh>
+#include <server/g_world.qh>
+#include <server/ipban.qh>
+#include <server/item_key.qh>
+#include <server/mapvoting.qh>
+#include <server/matrix.qh>
+#include <server/miscfunctions.qh>
+#include <server/playerdemo.qh>
+#include <server/portals.qh>
+#include <server/race.qh>
+#include <server/round_handler.qh>
+#include <server/scores.qh>
+#include <server/scores_rules.qh>
+#include <server/spawnpoints.qh>
+#include <server/steerlib.qh>
+#include <server/sv_main.qh>
+#include <server/teamplay.qh>
+#include <server/tests.qh>
+#include <server/t_halflife.qh>
+#include <server/t_quake.qh>
+#include <server/t_quake3.qh>
index 893bb647859e8da75b80b26b05e028c59e1ab530..c565298e8f509988b2e6c3d58d2888cda1e6e38a 100644 (file)
@@ -220,8 +220,11 @@ float autocvar_g_maxspeed;
 bool autocvar_g_instagib_damagedbycontents = true;
 bool autocvar_g_instagib_blaster_keepdamage = false;
 bool autocvar_g_instagib_blaster_keepforce = false;
+bool autocvar_g_instagib_mirrordamage;
+bool autocvar_g_instagib_friendlypush = true;
 #define autocvar_g_mirrordamage cvar("g_mirrordamage")
 #define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual")
+bool autocvar_g_mirrordamage_onlyweapons;
 
 float autocvar_g_movement_highspeed = 1;
 string autocvar_g_mutatormsg;
@@ -331,6 +334,7 @@ int autocvar_sv_clientcommand_antispam_count;
 bool autocvar_sv_curl_serverpackages_auto;
 bool autocvar_sv_db_saveasdump;
 bool autocvar_sv_defaultcharacter;
+bool autocvar_sv_defaultcharacterskin;
 string autocvar_sv_defaultplayercolors;
 string autocvar_sv_defaultplayermodel;
 string autocvar_sv_defaultplayermodel_blue;
index 02ef867616416ec5cae4ebf252aa2820f4ec6869..787939110d9951f662439e926cd936a38b57dfb8 100644 (file)
@@ -1,6 +1,6 @@
 // generated file; do not modify
-#include "aim.qc"
-#include "bot.qc"
-#include "navigation.qc"
-#include "scripting.qc"
-#include "waypoints.qc"
+#include <server/bot/aim.qc>
+#include <server/bot/bot.qc>
+#include <server/bot/navigation.qc>
+#include <server/bot/scripting.qc>
+#include <server/bot/waypoints.qc>
diff --git a/qcsrc/server/bot/_mod.qh b/qcsrc/server/bot/_mod.qh
new file mode 100644 (file)
index 0000000..802d391
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include <server/bot/aim.qh>
+#include <server/bot/bot.qh>
+#include <server/bot/navigation.qh>
+#include <server/bot/scripting.qh>
+#include <server/bot/waypoints.qh>
index 2d6a642bab38d064d563b46880d17f2044648a1c..0f138d2d5610a57c75c5b013ba83c0766433993b 100644 (file)
@@ -156,8 +156,8 @@ void bot_lagfunc(entity this, float t, float f1, float f2, entity e1, vector v1,
        }
        this.bot_aimtarg = e1;
        this.bot_aimlatency = this.ping; // FIXME?  Shouldn't this be in the lag item?
-       this.bot_aimselforigin = v1;
-       this.bot_aimselfvelocity = v2;
+       //this.bot_aimselforigin = v1;
+       //this.bot_aimselfvelocity = v2;
        this.bot_aimtargorigin = v3;
        this.bot_aimtargvelocity = v4;
        if(skill <= 0)
index 5a1cb16c4d05a8a56d9f8cc1b2747cf8770db70e..a26e64bc792aa14a8ae96f2510c79d88f7d66048 100644 (file)
@@ -74,8 +74,8 @@ vector shotdir;
 .vector bot_5th_order_aimfilter;
 .vector bot_olddesiredang;
 
-.vector bot_aimselforigin;
-.vector bot_aimselfvelocity;
+//.vector bot_aimselforigin;
+//.vector bot_aimselfvelocity;
 .vector bot_aimtargorigin;
 .vector bot_aimtargvelocity;
 
index fa2d660a07b9dcd317b6a5bd21f910a0f7b18744..a6270bc13872c604093ff34cfb9bf1964fe20292 100644 (file)
@@ -1,3 +1,3 @@
 // generated file; do not modify
-#include "havocbot.qc"
-#include "roles.qc"
+#include <server/bot/havocbot/havocbot.qc>
+#include <server/bot/havocbot/roles.qc>
diff --git a/qcsrc/server/bot/havocbot/_mod.qh b/qcsrc/server/bot/havocbot/_mod.qh
new file mode 100644 (file)
index 0000000..4b62d1b
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include <server/bot/havocbot/havocbot.qh>
+#include <server/bot/havocbot/roles.qh>
index 5403b35ca6110e3dde18e1840d019300de04ac1e..cff3fe21452ad42a9f1a931927dcbcc82e18670f 100644 (file)
@@ -1106,24 +1106,24 @@ void havocbot_chooseweapon(entity this)
 
 void havocbot_aim(entity this)
 {
-       vector selfvel, enemyvel;
+       vector myvel, enemyvel;
 //     if(this.flags & FL_INWATER)
 //             return;
        if (time < this.nextaim)
                return;
        this.nextaim = time + 0.1;
-       selfvel = this.velocity;
+       myvel = this.velocity;
        if (!this.waterlevel)
-               selfvel.z = 0;
+               myvel.z = 0;
        if (this.enemy)
        {
                enemyvel = this.enemy.velocity;
                if (!this.enemy.waterlevel)
                        enemyvel.z = 0;
-               lag_additem(this, time + this.ping, 0, 0, this.enemy, this.origin, selfvel, (this.enemy.absmin + this.enemy.absmax) * 0.5, enemyvel);
+               lag_additem(this, time + this.ping, 0, 0, this.enemy, this.origin, myvel, (this.enemy.absmin + this.enemy.absmax) * 0.5, enemyvel);
        }
        else
-               lag_additem(this, time + this.ping, 0, 0, world, this.origin, selfvel, ( this.goalcurrent.absmin + this.goalcurrent.absmax ) * 0.5, '0 0 0');
+               lag_additem(this, time + this.ping, 0, 0, world, this.origin, myvel, ( this.goalcurrent.absmin + this.goalcurrent.absmax ) * 0.5, '0 0 0');
 }
 
 bool havocbot_moveto_refresh_route(entity this)
@@ -1273,6 +1273,7 @@ vector havocbot_dodge()
        // LordHavoc: disabled because this is too expensive
        return '0 0 0';
 #if 0
+SELFPARAM();
        entity head;
        vector dodge, v, n;
        float danger, bestdanger, vl, d;
@@ -1282,13 +1283,13 @@ vector havocbot_dodge()
        head = findchainfloat(bot_dodge, true);
        while(head)
        {
-               if (head.owner != self)
+               if (head.owner != this)
                {
                        vl = vlen(head.velocity);
                        if (vl > autocvar_sv_maxspeed * 0.3)
                        {
                                n = normalize(head.velocity);
-                               v = self.origin - head.origin;
+                               v = this.origin - head.origin;
                                d = v * n;
                                if (d > (0 - head.bot_dodgerating))
                                if (d < (vl * 0.2 + head.bot_dodgerating))
@@ -1306,11 +1307,11 @@ vector havocbot_dodge()
                        }
                        else
                        {
-                               danger = head.bot_dodgerating - vlen(head.origin - self.origin);
+                               danger = head.bot_dodgerating - vlen(head.origin - this.origin);
                                if (bestdanger < danger)
                                {
                                        bestdanger = danger;
-                                       dodge = normalize(self.origin - head.origin);
+                                       dodge = normalize(this.origin - head.origin);
                                }
                        }
                }
index 56cf7d98159188bb64df3cf8ee7ae66198c0288a..e4e389b15c915659d96f99195ddec174ae3b144d 100644 (file)
@@ -15,8 +15,8 @@
 // rough simulation of walking from one point to another to test if a path
 // can be traveled, used for waypoint linking and havocbot
 
-float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float movemode)
-{SELFPARAM();
+bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float movemode)
+{
        vector org;
        vector move;
        vector dir;
@@ -30,7 +30,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float
        if(autocvar_bot_debug_tracewalk)
        {
                debugresetnodes();
-               debugnode(self, start);
+               debugnode(e, start);
        }
 
        move = end - start;
@@ -81,7 +81,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float
                        return true;
                }
                if(autocvar_bot_debug_tracewalk)
-                       debugnode(self, org);
+                       debugnode(e, org);
 
                if (dist <= 0)
                        break;
@@ -107,16 +107,16 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float
                        tracebox(org, m1, m2, org + move * stepdist, movemode, e);
 
                        if(autocvar_bot_debug_tracewalk)
-                               debugnode(self, trace_endpos);
+                               debugnode(e, trace_endpos);
 
                        if (trace_fraction < 1)
                        {
                                swimming = true;
                                org = trace_endpos - normalize(org - trace_endpos) * stepdist;
-                               for (; org.z < end.z + self.maxs.z; org.z += stepdist)
+                               for (; org.z < end.z + e.maxs.z; org.z += stepdist)
                                {
                                                if(autocvar_bot_debug_tracewalk)
-                                                       debugnode(self, org);
+                                                       debugnode(e, org);
 
                                        if(pointcontents(org) == CONTENT_EMPTY)
                                                        break;
@@ -142,7 +142,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float
                        tracebox(org, m1, m2, move, movemode, e);
 
                        if(autocvar_bot_debug_tracewalk)
-                               debugnode(self, trace_endpos);
+                               debugnode(e, trace_endpos);
 
                        // hit something
                        if (trace_fraction < 1)
@@ -470,8 +470,6 @@ float navigation_markroutes_nearestwaypoints(entity this, entity waylist, float
                        if(vdist(diff, <, maxdist))
                        {
                                head.wpconsidered = true;
-                               entity oldself = self;
-                               setself(this);
                                if (tracewalk(this, this.origin, this.mins, this.maxs, v, bot_navigation_movemode))
                                {
                                        head.wpnearestpoint = v;
@@ -480,7 +478,6 @@ float navigation_markroutes_nearestwaypoints(entity this, entity waylist, float
                                        head.enemy = world;
                                        c = c + 1;
                                }
-                               setself(oldself);
                        }
                }
                head = head.chain;
@@ -1086,8 +1083,6 @@ void navigation_unstuck(entity this)
                // evaluate the next goal on the queue
                float d = vlen(this.origin - bot_waypoint_queue_goal.origin);
                LOG_DEBUG(strcat(this.netname, " evaluating ", bot_waypoint_queue_goal.classname, " with distance ", ftos(d), "\n"));
-               entity oldself = self;
-               setself(this); // tracewalk has questionable use of self
                if(tracewalk(bot_waypoint_queue_goal, this.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), bot_waypoint_queue_goal.origin, bot_navigation_movemode))
                {
                        if( d > bot_waypoint_queue_bestgoalrating)
@@ -1096,7 +1091,6 @@ void navigation_unstuck(entity this)
                                bot_waypoint_queue_bestgoal = bot_waypoint_queue_goal;
                        }
                }
-               setself(oldself);
                bot_waypoint_queue_goal = bot_waypoint_queue_goal.bot_waypoint_queue_nextgoal;
 
                if (!bot_waypoint_queue_goal)
index 184710818c1aac266a32e620695cd97fbbd66b1f..bba6a1b9e2a7084b1fb9a1ad06a2a975c57b7596 100644 (file)
@@ -32,6 +32,7 @@ entity waypoint_spawn(vector m1, vector m2, float f)
        w = new(waypoint);
        w.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
        w.wpflags = f;
+       w.solid = SOLID_TRIGGER;
        setorigin(w, (m1 + m2) * 0.5);
        setsize(w, m1 - w.origin, m2 - w.origin);
        if (vlen(w.size) > 0)
@@ -171,20 +172,20 @@ void waypoint_think()
 
        bot_navigation_movemode = ((autocvar_bot_navigation_ignoreplayers) ? MOVE_NOMONSTERS : MOVE_NORMAL);
 
-       //dprint("waypoint_think wpisbox = ", ftos(self.wpisbox), "\n");
-       sm1 = self.origin + self.mins;
-       sm2 = self.origin + self.maxs;
+       //dprint("waypoint_think wpisbox = ", ftos(this.wpisbox), "\n");
+       sm1 = this.origin + this.mins;
+       sm2 = this.origin + this.maxs;
        for(e = world; (e = find(e, classname, "waypoint")); )
        {
-               if (boxesoverlap(self.absmin, self.absmax, e.absmin, e.absmax))
+               if (boxesoverlap(this.absmin, this.absmax, e.absmin, e.absmax))
                {
-                       waypoint_addlink(self, e);
-                       waypoint_addlink(e, self);
+                       waypoint_addlink(this, e);
+                       waypoint_addlink(e, this);
                }
                else
                {
                        ++relink_total;
-                       if(!checkpvs(self.origin, e))
+                       if(!checkpvs(this.origin, e))
                        {
                                ++relink_pvsculled;
                                continue;
@@ -193,7 +194,7 @@ void waypoint_think()
                        sv.x = bound(sm1_x, sv.x, sm2_x);
                        sv.y = bound(sm1_y, sv.y, sm2_y);
                        sv.z = bound(sm1_z, sv.z, sm2_z);
-                       ev = self.origin;
+                       ev = this.origin;
                        em1 = e.origin + e.mins;
                        em2 = e.origin + e.maxs;
                        ev.x = bound(em1_x, ev.x, em2_x);
@@ -207,9 +208,9 @@ void waypoint_think()
                                continue;
                        }
                        navigation_testtracewalk = 0;
-                       if (!self.wpisbox)
+                       if (!this.wpisbox)
                        {
-                               tracebox(sv - STAT(PL_MIN, NULL).z * '0 0 1', STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), sv, false, self);
+                               tracebox(sv - STAT(PL_MIN, NULL).z * '0 0 1', STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), sv, false, this);
                                if (!trace_startsolid)
                                {
                                        //dprint("sv deviation", vtos(trace_endpos - sv), "\n");
@@ -225,20 +226,20 @@ void waypoint_think()
                                        ev = trace_endpos + '0 0 1';
                                }
                        }
-                       //traceline(self.origin, e.origin, false, world);
+                       //traceline(this.origin, e.origin, false, world);
                        //if (trace_fraction == 1)
-                       if (!self.wpisbox && tracewalk(self, sv, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), ev, MOVE_NOMONSTERS))
-                               waypoint_addlink(self, e);
+                       if (!this.wpisbox && tracewalk(this, sv, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), ev, MOVE_NOMONSTERS))
+                               waypoint_addlink(this, e);
                        else
                                relink_walkculled += 0.5;
                        if (!e.wpisbox && tracewalk(e, ev, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), sv, MOVE_NOMONSTERS))
-                               waypoint_addlink(e, self);
+                               waypoint_addlink(e, this);
                        else
                                relink_walkculled += 0.5;
                }
        }
        navigation_testtracewalk = 0;
-       self.wplinked = true;
+       this.wplinked = true;
 }
 
 void waypoint_clearlinks(entity wp)
index e13678dce5995e6381c3dd248cdb275aecc174a8..add6d535564b5e9bd4a855cfede7582678436c24 100644 (file)
@@ -675,8 +675,7 @@ float CheatCommand(float argc)
                        IS_CHEAT(0, argc, 0);
                        setself(spawn());
                        self.target = argv(1);
-                       activator = this;
-                       SUB_UseTargets();
+                       SUB_UseTargets(self, this, NULL);
                        remove(self);
                        setself(this);
                        DID_CHEAT();
@@ -685,8 +684,7 @@ float CheatCommand(float argc)
                        IS_CHEAT(0, argc, 0);
                        setself(spawn());
                        self.killtarget = argv(1);
-                       activator = this;
-                       SUB_UseTargets();
+                       SUB_UseTargets(self, this, NULL);
                        remove(self);
                        setself(this);
                        DID_CHEAT();
index 9edcf8d5f0806097e3ea7b058d28e4f4c8e662ad..c157530fa7d39b9cbbb1e7597ce03aba5db0aa58 100644 (file)
@@ -371,6 +371,19 @@ void FixPlayermodel(entity player)
                        defaultmodel = substring(defaultmodel, 0, i);
                }
        }
+       if(autocvar_sv_defaultcharacterskin && !defaultskin)
+       {
+               if(teamplay)
+               {
+                       string s = Static_Team_ColorName_Lower(player.team);
+                       if (s != "neutral")
+                               defaultskin = cvar(strcat("sv_defaultplayerskin_", s));
+               }
+
+               if(!defaultskin)
+                       defaultskin = autocvar_sv_defaultplayerskin;
+       }
+
        MUTATOR_CALLHOOK(FixPlayermodel, defaultmodel, defaultskin);
        defaultmodel = ret_string;
        defaultskin = ret_int;
@@ -401,8 +414,16 @@ void FixPlayermodel(entity player)
                        chmdl = true;
                }
 
-               oldskin = player.skin;
-               player.skin = stof(player.playerskin);
+               if(!autocvar_sv_defaultcharacterskin)
+               {
+                       oldskin = player.skin;
+                       player.skin = stof(player.playerskin);
+               }
+               else
+               {
+                       oldskin = player.skin;
+                       player.skin = defaultskin;
+               }
        }
 
        if(chmdl || oldskin != player.skin) // model or skin has changed
@@ -569,7 +590,8 @@ void PutClientInServer()
                this.oldorigin = this.origin;
                this.prevorigin = this.origin;
                this.lastteleporttime = time; // prevent insane speeds due to changing origin
-        this.hud = HUD_NORMAL;
+               this.conveyor = NULL; // prevent conveyors at the previous location from moving a freshly spawned player
+               this.hud = HUD_NORMAL;
 
                this.event_damage = PlayerDamage;
 
@@ -607,9 +629,7 @@ void PutClientInServer()
                {
                        string s = spot.target;
                        spot.target = string_null;
-                       WITH(entity, activator, this, LAMBDA(
-                               WITHSELF(spot, SUB_UseTargets())
-                       ));
+                       SUB_UseTargets(spot, this, NULL);
                        spot.target = s;
                }
 
index 42904695c693b35e39835bed217e3c78ef2635c8..8aaf68cda69dac1753364cfe1e84cd07c10129c3 100644 (file)
@@ -657,6 +657,12 @@ void MoveToTeam(entity client, int team_colour, int type)
        LogTeamchange(client.playerid, client.team, type);
 }
 
+/** print(), but only print if the server is not local */
+void dedicated_print(string input)
+{
+       if (server_is_dedicated) print(input);
+}
+
 /**
  * message "": do not say, just test flood control
  * return value:
@@ -664,20 +670,14 @@ void MoveToTeam(entity client, int team_colour, int type)
  *   0 = reject
  *  -1 = fake accept
  */
-int Say(entity source, float teamsay, entity privatesay, string msgin, bool floodcontrol)
+int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodcontrol)
 {
-       string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, colorprefix;
-       float flood;
-       var .float flood_field;
-       float ret;
-       string privatemsgprefix = string_null; float privatemsgprefixlen = 0;
-
-       if(!teamsay && !privatesay)
-               if(substring(msgin, 0, 1) == " ")
-                       msgin = substring(msgin, 1, strlen(msgin) - 1); // work around DP say bug (say_team does not have this!)
+       if (!teamsay && !privatesay) if (substring(msgin, 0, 1) == " ")
+        msgin = substring(msgin, 1, -1); // work around DP say bug (say_team does not have this!)
 
        msgin = formatmessage(msgin);
 
+    string colorstr;
        if (!IS_PLAYER(source))
                colorstr = "^0"; // black for spectators
        else if(teamplay)
@@ -691,6 +691,11 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
        if(intermission_running)
                teamsay = false;
 
+    if (!source) {
+               colorstr = "";
+               teamsay = false;
+    }
+
        if(msgin != "")
                msgin = trigger_magicear_processmessage_forallears(source, teamsay, privatesay, msgin);
 
@@ -705,18 +710,18 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
        }
        */
 
-       if(autocvar_g_chat_teamcolors)
-               namestr = playername(source);
-       else
-               namestr = source.netname;
+    string namestr = "";
+    if (source)
+        namestr = autocvar_g_chat_teamcolors ? playername(source) : source.netname;
 
-       if(strdecolorize(namestr) == namestr)
-               colorprefix = "^3";
-       else
-               colorprefix = "^7";
+    string colorprefix = (strdecolorize(namestr) == namestr) ? "^3" : "^7";
 
-       if(msgin != "")
-       {
+    string msgstr, cmsgstr;
+    string privatemsgprefix = string_null;
+    int privatemsgprefixlen = 0;
+       if (msgin == "") {
+        msgstr = cmsgstr = "";
+       } else {
                if(privatesay)
                {
                        msgstr = strcat("\{1}\{13}* ", colorprefix, namestr, "^3 tells you: ^7");
@@ -750,23 +755,22 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
                                msgin = strreplace("/me", strcat(colorprefix, namestr), msgin);
                                msgstr = strcat("\{1}^4* ", "^7", msgin);
                        }
-                       else
-                               msgstr = strcat("\{1}", colorprefix, namestr, "^7: ", msgin);
+                       else {
+                msgstr = "\{1}";
+                msgstr = strcat(msgstr, (namestr != "") ? strcat(colorprefix, namestr, "^7: ") : "^7");
+                msgstr = strcat(msgstr, msgin);
+            }
                        cmsgstr = "";
                }
                msgstr = strcat(strreplace("\n", " ", msgstr), "\n"); // newlines only are good for centerprint
        }
-       else
-       {
-               msgstr = cmsgstr = "";
-       }
 
-       fullmsgstr = msgstr;
-       fullcmsgstr = cmsgstr;
+       string fullmsgstr = msgstr;
+       string fullcmsgstr = cmsgstr;
 
        // FLOOD CONTROL
-       flood = 0;
-       flood_field = floodcontrol_chat;
+       int flood = 0;
+       var .float flood_field = floodcontrol_chat;
        if(floodcontrol)
        {
                float flood_spl;
@@ -838,6 +842,7 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
                        source.(flood_field) = flood = 0;
        }
 
+    string sourcemsgstr, sourcecmsgstr;
        if(flood == 2) // cannot happen for empty msgstr
        {
                if(autocvar_g_chat_flood_notify_flooder)
@@ -858,8 +863,7 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
                sourcecmsgstr = cmsgstr;
        }
 
-       if(!privatesay)
-       if (!IS_PLAYER(source))
+       if (!privatesay && source && !IS_PLAYER(source))
        {
                if (!intermission_running)
                        if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !(warmup_stage || gameover)))
@@ -873,6 +877,7 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
        if(privatesay)
                sourcemsgstr = strcat(privatemsgprefix, substring(sourcemsgstr, privatemsgprefixlen, -1));
 
+    int ret;
        if(source.muted)
        {
                // always fake the message
@@ -913,7 +918,7 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
                {
                        sprint(source, sourcemsgstr);
                        dedicated_print(msgstr); // send to server console too
-                       FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source && it.active_minigame == source.active_minigame, LAMBDA(sprint(it, msgstr)));
+                       FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source && it.active_minigame == source.active_minigame, sprint(it, msgstr));
                }
                else if(teamsay > 0) // team message, only sent to team mates
                {
@@ -921,26 +926,27 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
                        dedicated_print(msgstr); // send to server console too
                        if(sourcecmsgstr != "")
                                centerprint(source, sourcecmsgstr);
-                       FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source && it.team == source.team, LAMBDA(
+                       FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source && it.team == source.team, {
                                sprint(it, msgstr);
                                if(cmsgstr != "")
                                        centerprint(it, cmsgstr);
-                       ));
+                       });
                }
                else if(teamsay < 0) // spectator message, only sent to spectators
                {
                        sprint(source, sourcemsgstr);
                        dedicated_print(msgstr); // send to server console too
-                       FOREACH_CLIENT(!IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source, LAMBDA(sprint(it, msgstr)));
-               }
-               else if(sourcemsgstr != msgstr) // trimmed/server fixed message, sent to all players
-               {
-                       sprint(source, sourcemsgstr);
-                       dedicated_print(msgstr); // send to server console too
-                       FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source, LAMBDA(sprint(it, msgstr)));
+                       FOREACH_CLIENT(!IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source, sprint(it, msgstr));
                }
                else
-                       bprint(msgstr); // entirely normal message, sent to all players -- bprint sends to server console too.
+               {
+            if (source) {
+                sprint(source, sourcemsgstr);
+                dedicated_print(msgstr); // send to server console too
+                MX_Say(strcat(playername(source), "^7: ", msgin));
+            }
+            FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source, sprint(it, msgstr));
+        }
        }
 
        return ret;
index 1f2b37a0dcf4c17cf24a3264bd95cc617a362c4a..fa15432311d98b7a247ca547451b3fbdd6310131 100644 (file)
@@ -1,9 +1,11 @@
 // generated file; do not modify
-#include "all.qc"
-#include "banning.qc"
-#include "cmd.qc"
-#include "common.qc"
-#include "getreplies.qc"
-#include "radarmap.qc"
-#include "sv_cmd.qc"
-#include "vote.qc"
+#include <server/command/all.qc>
+#include <server/command/banning.qc>
+#include <server/command/cmd.qc>
+#ifdef SVQC
+    #include <server/command/sv_cmd.qc>
+#endif
+#include <server/command/common.qc>
+#include <server/command/getreplies.qc>
+#include <server/command/radarmap.qc>
+#include <server/command/vote.qc>
diff --git a/qcsrc/server/command/_mod.qh b/qcsrc/server/command/_mod.qh
new file mode 100644 (file)
index 0000000..60e34ff
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include <server/command/all.qh>
+#include <server/command/banning.qh>
+#include <server/command/cmd.qh>
+#include <server/command/common.qh>
+#include <server/command/getreplies.qh>
+#include <server/command/radarmap.qh>
+#include <server/command/vote.qh>
index 4bd8dee6e5d15d30c953db2971caf57f1b8868b2..252ab2f852cbf45647ea9b8d81a5b402f1fad57c 100644 (file)
@@ -202,9 +202,7 @@ void VoteCount(float first_count)
        // declarations
        vote_accept_count = vote_reject_count = vote_abstain_count = 0;
 
-       float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
-           || ((autocvar_sv_vote_nospectators == 1) && (warmup_stage || gameover))
-           || (autocvar_sv_vote_nospectators == 0));
+       bool spectators_allowed = (!autocvar_sv_vote_nospectators || (autocvar_sv_vote_nospectators == 1 && (warmup_stage || gameover)));
 
        float vote_player_count = 0, notvoters = 0;
        float vote_real_player_count = 0, vote_real_accept_count = 0;
@@ -570,10 +568,15 @@ float VoteCommand_checkargs(float startpos, float argc)
 {
        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 cmdrestriction = "";  // No we don't.
        string charlist, arg;
        float checkmate;
 
+       if(cvar_type(cvarname) & CVAR_TYPEFLAG_EXISTS)
+               cmdrestriction = cvar_string(cvarname);
+       else
+               LOG_INFO("NOTE: ", cvarname, " does not exist, no restrictions will be applied.\n");
+
        if (cmdrestriction == "") return true;
 
        ++startpos;  // skip command name
@@ -747,9 +750,7 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm
        {
                case CMD_REQUEST_COMMAND:
                {
-                       float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
-                           || ((autocvar_sv_vote_nospectators == 1) && warmup_stage)
-                           || (autocvar_sv_vote_nospectators == 0));
+                       bool spectators_allowed = (!autocvar_sv_vote_nospectators || (autocvar_sv_vote_nospectators == 1 && (warmup_stage || gameover)));
 
                        float tmp_playercount = 0;
 
@@ -887,9 +888,7 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co
 
                                        default:  // calling a vote for master
                                        {
-                                               float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
-                                                   || ((autocvar_sv_vote_nospectators == 1) && warmup_stage)
-                                                   || (autocvar_sv_vote_nospectators == 0));
+                                               bool spectators_allowed = (!autocvar_sv_vote_nospectators || (autocvar_sv_vote_nospectators == 1 && (warmup_stage || gameover)));
 
                                                if (!autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
                                                else if (vote_called)
index 7124e4468f3f6cf82878c23ec71b251cad460760..29374036cf4c4d5e7007b1d261ef1e2166e73563 100644 (file)
@@ -299,8 +299,8 @@ void W_Porto_Remove (entity p);
 .entity ballcarried; // Also used for keepaway
 float g_nexball_meter_period;
 
-void SUB_DontUseTargets();
-void SUB_UseTargets();
+void SUB_DontUseTargets(entity this, entity actor, entity trigger);
+void SUB_UseTargets(entity this, entity actor, entity trigger);
 
 .void(entity this) reset; // if set, an entity is reset using this
 .void() reset2; // if set, an entity is reset using this (after calling ALL the reset functions for other entities)
@@ -384,7 +384,7 @@ const float ACTIVE_IDLE     = 2;
 const float ACTIVE_BUSY        = 2;
 const float ACTIVE_TOGGLE      = 3;
 .float active;
-.void (float act_state) setactive;
+.void (entity this, int act_state) setactive;
 .entity realowner;
 
 //float serverflags;
index 208ae62e59365a347c18e3477c863bca8f506d06..675b794ecdb902b73e018f3ccaad6356e4feeb42 100644 (file)
@@ -328,7 +328,8 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                        return;
                }
                LogDeath("suicide", deathtype, targ, targ);
-               GiveFrags(attacker, targ, -1, deathtype);
+               if(deathtype != DEATH_AUTOTEAMCHANGE.m_id) // special case: don't negate frags if auto switched
+                       GiveFrags(attacker, targ, -1, deathtype);
        }
 
        // ======
@@ -873,6 +874,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
        setself(this);
 
        // apply mirror damage if any
+       if(!autocvar_g_mirrordamage_onlyweapons || DEATH_WEAPONOF(deathtype) != WEP_Null)
        if(mirrordamage > 0 || mirrorforce > 0)
        {
                attacker = attacker_save;
index 5e9273f7cd43702f62592c461ea8ecabefe9ab66..352f0be430469aa3c10fa698918ee0f91b9f92dc 100644 (file)
@@ -82,13 +82,12 @@ void dynlight_find_target(entity this)
        self.think = dynlight_think;
        self.nextthink = time + 0.1;
 }
-void dynlight_use()
+void dynlight_use(entity this, entity actor, entity trigger)
 {
-    SELFPARAM();
-       if (self.light_lev == 0)
-               self.light_lev = self.lefty;
+       if (this.light_lev == 0)
+               this.light_lev = this.lefty;
        else
-               self.light_lev = 0;
+               this.light_lev = 0;
 }
 spawnfunc(dynlight)
 {
index baca561786a00bcf9da35e7883100fd622242951..6623a0778e7c41be3db9d3677dd696b19c8c2e96 100644 (file)
@@ -16,39 +16,39 @@ class(BGMScript) .float bgmscriptrelease;
 
 .float modelscale;
 
-void g_model_setcolormaptoactivator ()
-{SELFPARAM();
+void g_model_setcolormaptoactivator(entity this, entity actor, entity trigger)
+{
        if(teamplay)
        {
-               if(activator.team)
-                       self.colormap = (activator.team - 1) * 0x11;
+               if(actor.team)
+                       this.colormap = (actor.team - 1) * 0x11;
                else
-                       self.colormap = 0x00;
+                       this.colormap = 0x00;
        }
        else
-               self.colormap = floor(random() * 256);
-       self.colormap |= BIT(10); // RENDER_COLORMAPPED
+               this.colormap = floor(random() * 256);
+       this.colormap |= BIT(10); // RENDER_COLORMAPPED
 }
 
-void g_clientmodel_setcolormaptoactivator ()
-{SELFPARAM();
-       g_model_setcolormaptoactivator();
-       self.SendFlags |= (BIT(3) | BIT(0));
+void g_clientmodel_setcolormaptoactivator(entity this, entity actor, entity trigger)
+{
+       g_model_setcolormaptoactivator(this, actor, trigger);
+       this.SendFlags |= (BIT(3) | BIT(0));
 }
 
-void g_clientmodel_use()
-{SELFPARAM();
-       if (self.antiwall_flag == 1)
+void g_clientmodel_use(entity this, entity actor, entity trigger)
+{
+       if (this.antiwall_flag == 1)
        {
-               self.inactive = 1;
-               self.solid = SOLID_NOT;
+               this.inactive = 1;
+               this.solid = SOLID_NOT;
        }
-       else if (self.antiwall_flag == 2)
+       else if (this.antiwall_flag == 2)
        {
-               self.inactive = 0;
-               self.solid = self.default_solid;
+               this.inactive = 0;
+               this.solid = this.default_solid;
        }
-       g_clientmodel_setcolormaptoactivator();
+       g_clientmodel_setcolormaptoactivator(this, actor, trigger);
 }
 
 void g_model_dropbyspawnflags(entity this)
index 49bcd8904f86e7bf07a9e791d9835a4ef145aa4f..dc8ffe8c0dc875a4004cd99b7a568f2334fdf437 100644 (file)
@@ -4,7 +4,6 @@ void SUB_NullThink();
 
 void()  SUB_CalcMoveDone;
 void() SUB_CalcAngleMoveDone;
-//void() SUB_UseTargets;
 
 spawnfunc(info_null);
 
index d4bc83b681d2c63193ce9a71f4b5374fb1380901..054e19d7466589c9ae0b3146843b9329d21157b9 100644 (file)
@@ -413,6 +413,7 @@ void cvar_changes_init()
                BADCVAR("sv_autotaunt");
                BADCVAR("sv_curl_defaulturl");
                BADCVAR("sv_defaultcharacter");
+               BADCVAR("sv_defaultcharacterskin");
                BADCVAR("sv_defaultplayercolors");
                BADCVAR("sv_defaultplayermodel");
                BADCVAR("sv_defaultplayerskin");
@@ -562,6 +563,18 @@ void __init_dedicated_server_shutdown() {
        MapInfo_Shutdown();
 }
 
+void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_override, float qualifying_override)
+{
+       if(!autocvar_g_campaign)
+       {
+               if(fraglimit_override >= 0) cvar_set("fraglimit", ftos(fraglimit_override));
+               if(timelimit_override >= 0) cvar_set("timelimit", ftos(timelimit_override));
+               if(leadlimit_override >= 0) cvar_set("leadlimit", ftos(leadlimit_override));
+               if(qualifying_override >= 0) cvar_set("g_race_qualifying_timelimit", ftos(qualifying_override));
+       }
+       limits_are_set = true;
+}
+
 void Map_MarkAsRecent(string m);
 float world_already_spawned;
 void Nagger_Init();
@@ -572,9 +585,8 @@ spawnfunc(worldspawn)
 {
        server_is_dedicated = boolean(stof(cvar_defstring("is_dedicated")));
 
+    bool wantrestart = false;
        {
-               bool wantrestart = false;
-
                if (!server_is_dedicated)
                {
                        // force unloading of server pk3 files when starting a listen server
@@ -718,6 +730,12 @@ spawnfunc(worldspawn)
        readlevelcvars();
        GrappleHookInit();
 
+       if(!limits_are_set)
+               SetLimits(autocvar_fraglimit_override, autocvar_leadlimit_override, autocvar_timelimit_override, -1);
+
+       if(warmup_limit == 0)
+               warmup_limit = (autocvar_timelimit > 0) ? autocvar_timelimit * 60 : autocvar_timelimit;
+
        player_count = 0;
        bot_waypoints_for_items = autocvar_g_waypoints_for_items;
        if(bot_waypoints_for_items == 1)
@@ -849,7 +867,7 @@ spawnfunc(worldspawn)
 
        CheatInit();
 
-       localcmd("\n_sv_hook_gamestart ", GetGametype(), "\n");
+       if (!wantrestart) localcmd("\n_sv_hook_gamestart ", GetGametype(), "\n");
 
        // fill sv_curl_serverpackages from .serverpackage files
        if (autocvar_sv_curl_serverpackages_auto)
index cd1cafd36a2fd0a5ca60ab1b011391a8a740c559..5366d0a782129ff2cce3e1064a76c14fb877f337 100644 (file)
@@ -10,6 +10,9 @@ const int WINNING_YES = 1; // winner found
 const int WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached
 const int WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath overtime NOW
 
+bool limits_are_set = false;
+void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_override, float qualifying_override);
+
 float WinningCondition_Scores(float limit, float leadlimit);
 void SetWinners(.float field, float value);
 void CheckRules_Player();
index 0230a21cbb4cb6dcef915e62e2436bead1c9942f..9688d51db107977f3e2fd42c6f8df036a33a6a81 100644 (file)
@@ -84,8 +84,7 @@ void item_key_touch()
 
        string oldmsg = self.message;
        self.message = "";
-       activator = other;
-       SUB_UseTargets();
+       SUB_UseTargets(self, other, other); // TODO: should we be using other for the trigger here?
        self.message = oldmsg;
 };
 
diff --git a/qcsrc/server/matrix.qc b/qcsrc/server/matrix.qc
new file mode 100644 (file)
index 0000000..b7d26de
--- /dev/null
@@ -0,0 +1,22 @@
+#include "matrix.qh"
+
+#include "cl_player.qh"
+
+var void MX_Handle(int buf, string ancestor)
+{
+    string type = json_get(buf, strcat(ancestor, ".type"));
+    switch (type) {
+        case "m.room.message": {
+            string msgtype = json_get(buf, strcat(ancestor, ".content.msgtype"));
+            switch (msgtype) {
+                case "m.text": {
+                    string sender = json_get(buf, strcat(ancestor, ".sender"));
+                    string body = json_get(buf, strcat(ancestor, ".content.body"));
+                    if (sender != matrix_user && body) Say(NULL, false, NULL, body, false);
+                    break;
+                }
+            }
+            break;
+        }
+    }
+}
diff --git a/qcsrc/server/matrix.qh b/qcsrc/server/matrix.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
index 72747037dee0c8739223fe5f2ca1744351138841..95ec703dbd873ebfe51dfe838bf7bfbb533e4b60 100644 (file)
@@ -969,21 +969,15 @@ void adaptor_think2touch()
 
 void adaptor_think2use()
 {SELFPARAM();
-    entity o, a;
-    o = other;
-    a = activator;
-    activator = world;
-    other = world;
-    self.use();
-    other = o;
-    activator = a;
+       if(this.use)
+       this.use(this, NULL, NULL);
 }
 
 void adaptor_think2use_hittype_splash() // for timed projectile detonation
 {SELFPARAM();
-       if(!(IS_ONGROUND(self))) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
-               self.projectiledeathtype |= HITTYPE_SPLASH;
-       adaptor_think2use();
+       if(!(IS_ONGROUND(this))) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
+               this.projectiledeathtype |= HITTYPE_SPLASH;
+       WITHSELF(this, adaptor_think2use());
 }
 
 // deferred dropping
@@ -1421,9 +1415,6 @@ bool isPushable(entity e)
        {
                case "body":
                case "droppedweapon":
-               case "keepawayball":
-               case "nexball_basketball":
-               case "nexball_football":
                        return true;
                case "bullet": // antilagged bullets can't hit this either
                        return false;
index 04221e439ef8f85fef2017e998cc26481e6b0c62..2e947f29db24ca9bae03343c332df2c69c97a2a2 100644 (file)
@@ -116,6 +116,8 @@ void WarpZone_crosshair_trace(entity pl);
 
 void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag);
 
+void adaptor_think2use();
+
 #define IS_DEAD(s) ((s).deadflag != DEAD_NO)
 
 
@@ -262,8 +264,6 @@ void readlevelcvars()
 
        warmup_stage = cvar("g_warmup");
        warmup_limit = cvar("g_warmup_limit");
-       if(warmup_limit == 0)
-               warmup_limit = (autocvar_timelimit > 0) ? autocvar_timelimit * 60 : autocvar_timelimit;
        g_warmup_allguns = cvar("g_warmup_allguns");
        g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
 
index 254d13d7e204d0d694503f89d5e0b1e4b6cdd133..3d2321896cb5374a8e045bb256c8c4ceba909b50 100644 (file)
@@ -1,2 +1,2 @@
 // generated file; do not modify
-#include "all.qc"
+#include <server/mutators/all.qc>
diff --git a/qcsrc/server/mutators/_mod.qh b/qcsrc/server/mutators/_mod.qh
new file mode 100644 (file)
index 0000000..8feb1f3
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include <server/mutators/all.qh>
index c56c2db5abf08ae659dbeac38c81ff77dfab928f..6835f5d560b9a325a96e671c21ec17348915ff2a 100644 (file)
@@ -1,14 +1,14 @@
 // generated file; do not modify
-#include "gamemode_assault.qc"
-#include "gamemode_ca.qc"
-#include "gamemode_ctf.qc"
-#include "gamemode_cts.qc"
-#include "gamemode_deathmatch.qc"
-#include "gamemode_domination.qc"
-#include "gamemode_freezetag.qc"
-#include "gamemode_invasion.qc"
-#include "gamemode_keepaway.qc"
-#include "gamemode_keyhunt.qc"
-#include "gamemode_lms.qc"
-#include "gamemode_race.qc"
-#include "gamemode_tdm.qc"
+#include <server/mutators/mutator/gamemode_assault.qc>
+#include <server/mutators/mutator/gamemode_ca.qc>
+#include <server/mutators/mutator/gamemode_ctf.qc>
+#include <server/mutators/mutator/gamemode_cts.qc>
+#include <server/mutators/mutator/gamemode_deathmatch.qc>
+#include <server/mutators/mutator/gamemode_domination.qc>
+#include <server/mutators/mutator/gamemode_freezetag.qc>
+#include <server/mutators/mutator/gamemode_invasion.qc>
+#include <server/mutators/mutator/gamemode_keepaway.qc>
+#include <server/mutators/mutator/gamemode_keyhunt.qc>
+#include <server/mutators/mutator/gamemode_lms.qc>
+#include <server/mutators/mutator/gamemode_race.qc>
+#include <server/mutators/mutator/gamemode_tdm.qc>
diff --git a/qcsrc/server/mutators/mutator/_mod.qh b/qcsrc/server/mutators/mutator/_mod.qh
new file mode 100644 (file)
index 0000000..aef0b33
--- /dev/null
@@ -0,0 +1,14 @@
+// generated file; do not modify
+#include <server/mutators/mutator/gamemode_assault.qh>
+#include <server/mutators/mutator/gamemode_ca.qh>
+#include <server/mutators/mutator/gamemode_ctf.qh>
+#include <server/mutators/mutator/gamemode_cts.qh>
+#include <server/mutators/mutator/gamemode_deathmatch.qh>
+#include <server/mutators/mutator/gamemode_domination.qh>
+#include <server/mutators/mutator/gamemode_freezetag.qh>
+#include <server/mutators/mutator/gamemode_invasion.qh>
+#include <server/mutators/mutator/gamemode_keepaway.qh>
+#include <server/mutators/mutator/gamemode_keyhunt.qh>
+#include <server/mutators/mutator/gamemode_lms.qh>
+#include <server/mutators/mutator/gamemode_race.qh>
+#include <server/mutators/mutator/gamemode_tdm.qh>
index 34c19d425178a0d9c02e3f844d1aa6edb6730034..e7785c7d0a907e8e2d66f5c43eab081c19cd9b3b 100644 (file)
@@ -62,29 +62,27 @@ const float ST_ASSAULT_OBJECTIVES = 1;
 const float SP_ASSAULT_OBJECTIVES = 4;
 
 // predefined spawnfuncs
-void target_objective_decrease_activate();
+void target_objective_decrease_activate(entity this);
 #endif
 
 #ifdef IMPLEMENTATION
 .entity sprite;
 
 // random functions
-void assault_objective_use()
-{SELFPARAM();
+void assault_objective_use(entity this, entity actor, entity trigger)
+{
        // activate objective
-       self.health = 100;
-       //print("^2Activated objective ", self.targetname, "=", etos(self), "\n");
-       //print("Activator is ", activator.classname, "\n");
+       this.health = 100;
+       //print("^2Activated objective ", this.targetname, "=", etos(this), "\n");
+       //print("Activator is ", actor.classname, "\n");
 
        for (entity e = world; (e = find(e, target, this.targetname)); )
        {
                if (e.classname == "target_objective_decrease")
                {
-                       WITHSELF(e, target_objective_decrease_activate());
+                       target_objective_decrease_activate(e);
                }
        }
-
-       setself(this);
 }
 
 vector target_objective_spawn_evalfunc(entity player, entity spot, vector current)
@@ -102,47 +100,40 @@ void assault_objective_reset(entity this)
 }
 
 // decrease the health of targeted objectives
-void assault_objective_decrease_use()
-{SELFPARAM();
-       if(activator.team != assault_attacker_team)
+void assault_objective_decrease_use(entity this, entity actor, entity trigger)
+{
+       if(actor.team != assault_attacker_team)
        {
                // wrong team triggered decrease
                return;
        }
 
-       if(other.assault_sprite)
+       if(trigger.assault_sprite)
        {
-               WaypointSprite_Disown(other.assault_sprite, waypointsprite_deadlifetime);
-               if(other.classname == "func_assault_destructible")
-                       other.sprite = world;
+               WaypointSprite_Disown(trigger.assault_sprite, waypointsprite_deadlifetime);
+               if(trigger.classname == "func_assault_destructible")
+                       trigger.sprite = world; // TODO: just unsetting it?!
        }
        else
                return; // already activated! cannot activate again!
 
-       if(self.enemy.health < ASSAULT_VALUE_INACTIVE)
+       if(this.enemy.health < ASSAULT_VALUE_INACTIVE)
        {
-               if(self.enemy.health - self.dmg > 0.5)
+               if(this.enemy.health - this.dmg > 0.5)
                {
-                       PlayerTeamScore_Add(activator, SP_SCORE, ST_SCORE, self.dmg);
-                       self.enemy.health = self.enemy.health - self.dmg;
+                       PlayerTeamScore_Add(actor, SP_SCORE, ST_SCORE, this.dmg);
+                       this.enemy.health = this.enemy.health - this.dmg;
                }
                else
                {
-                       PlayerTeamScore_Add(activator, SP_SCORE, ST_SCORE, self.enemy.health);
-                       PlayerTeamScore_Add(activator, SP_ASSAULT_OBJECTIVES, ST_ASSAULT_OBJECTIVES, 1);
-                       self.enemy.health = -1;
-
-                       entity oldactivator;
+                       PlayerTeamScore_Add(actor, SP_SCORE, ST_SCORE, this.enemy.health);
+                       PlayerTeamScore_Add(actor, SP_ASSAULT_OBJECTIVES, ST_ASSAULT_OBJECTIVES, 1);
+                       this.enemy.health = -1;
 
-                       setself(this.enemy);
-                       if(self.message)
-                               FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(centerprint(it, self.message)));
+                       if(this.enemy.message)
+                               FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(centerprint(it, this.enemy.message)));
 
-                       oldactivator = activator;
-                       activator = this;
-                       SUB_UseTargets();
-                       activator = oldactivator;
-                       setself(this);
+                       SUB_UseTargets(this.enemy, this, trigger);
                }
        }
 }
@@ -150,19 +141,19 @@ void assault_objective_decrease_use()
 void assault_setenemytoobjective(entity this)
 {
        entity objective;
-       for(objective = world; (objective = find(objective, targetname, self.target)); )
+       for(objective = world; (objective = find(objective, targetname, this.target)); )
        {
                if(objective.classname == "target_objective")
                {
-                       if(self.enemy == world)
-                               self.enemy = objective;
+                       if(this.enemy == world)
+                               this.enemy = objective;
                        else
                                objerror("more than one objective as target - fix the map!");
                        break;
                }
        }
 
-       if(self.enemy == world)
+       if(this.enemy == world)
                objerror("no objective as target - fix the map!");
 }
 
@@ -178,21 +169,21 @@ float assault_decreaser_sprite_visible(entity e)
        return true;
 }
 
-void target_objective_decrease_activate()
-{SELFPARAM();
+void target_objective_decrease_activate(entity this)
+{
        entity ent, spr;
-       self.owner = world;
-       for(ent = world; (ent = find(ent, target, self.targetname)); )
+       this.owner = world;
+       for(ent = world; (ent = find(ent, target, this.targetname)); )
        {
                if(ent.assault_sprite != world)
                {
                        WaypointSprite_Disown(ent.assault_sprite, waypointsprite_deadlifetime);
                        if(ent.classname == "func_assault_destructible")
-                               ent.sprite = world;
+                               ent.sprite = world; // TODO: just unsetting it?!
                }
 
                spr = WaypointSprite_SpawnFixed(WP_Assault, 0.5 * (ent.absmin + ent.absmax), ent, assault_sprite, RADARICON_OBJECTIVE);
-               spr.assault_decreaser = self;
+               spr.assault_decreaser = this;
                spr.waypointsprite_visible_for_player = assault_decreaser_sprite_visible;
                spr.classname = "sprite_waypoint";
                WaypointSprite_UpdateRule(spr, assault_attacker_team, SPRITERULE_TEAMPLAY);
@@ -220,15 +211,14 @@ void target_assault_roundend_reset(entity this)
        this.winning = false; // up round
 }
 
-void target_assault_roundend_use()
-{SELFPARAM();
-       self.winning = 1; // round has been won by attackers
+void target_assault_roundend_use(entity this, entity actor, entity trigger)
+{
+       this.winning = 1; // round has been won by attackers
 }
 
-void assault_roundstart_use(entity this)
+void assault_roundstart_use(entity this, entity actor, entity trigger)
 {
-       activator = self;
-       SUB_UseTargets();
+       SUB_UseTargets(this, this, trigger);
 
        //(Re)spawn all turrets
        FOREACH_ENTITY_CLASS("turret_main", true, LAMBDA(
@@ -242,10 +232,14 @@ void assault_roundstart_use(entity this)
                WITHSELF(it, turret_respawn());
        ));
 }
+void assault_roundstart_use_this(entity this)
+{
+       assault_roundstart_use(this, NULL, NULL);
+}
 void assault_roundstart_use_self()
 {
     SELFPARAM();
-    assault_roundstart_use(this);
+    assault_roundstart_use(this, NULL, NULL);
 }
 
 void assault_wall_think()
@@ -276,13 +270,10 @@ void assault_new_round()
     FOREACH_CLIENT(IS_PLAYER(it) && it.vehicle, WITHSELF(it, vehicles_exit(VHEF_RELEASE)));
 
     FOREACH_ENTITY_FLAGS(vehicle_flags, VHF_ISVEHICLE, LAMBDA(
-       setself(it);
-        vehicles_clearreturn(self);
-        vehicles_spawn();
+        vehicles_clearreturn(it);
+        WITHSELF(it, vehicles_spawn());
     ));
 
-    setself(this);
-
        // up round counter
        self.winning = self.winning + 1;
 
@@ -348,17 +339,17 @@ int WinningCondition_Assault()
 // spawnfuncs
 spawnfunc(info_player_attacker)
 {
-       if (!g_assault) { remove(self); return; }
+       if (!g_assault) { remove(this); return; }
 
-       self.team = NUM_TEAM_1; // red, gets swapped every round
+       this.team = NUM_TEAM_1; // red, gets swapped every round
        spawnfunc_info_player_deathmatch(this);
 }
 
 spawnfunc(info_player_defender)
 {
-       if (!g_assault) { remove(self); return; }
+       if (!g_assault) { remove(this); return; }
 
-       self.team = NUM_TEAM_2; // blue, gets swapped every round
+       this.team = NUM_TEAM_2; // blue, gets swapped every round
        spawnfunc_info_player_deathmatch(this);
 }
 
@@ -375,71 +366,71 @@ spawnfunc(target_objective)
 
 spawnfunc(target_objective_decrease)
 {
-       if (!g_assault) { remove(self); return; }
+       if (!g_assault) { remove(this); return; }
 
-       self.classname = "target_objective_decrease";
+       this.classname = "target_objective_decrease";
 
-       if(!self.dmg)
-               self.dmg = 101;
+       if(!this.dmg)
+               this.dmg = 101;
 
-       self.use = assault_objective_decrease_use;
-       self.health = ASSAULT_VALUE_INACTIVE;
-       self.max_health = ASSAULT_VALUE_INACTIVE;
-       self.enemy = world;
+       this.use = assault_objective_decrease_use;
+       this.health = ASSAULT_VALUE_INACTIVE;
+       this.max_health = ASSAULT_VALUE_INACTIVE;
+       this.enemy = world;
 
-       InitializeEntity(self, target_objective_decrease_findtarget, INITPRIO_FINDTARGET);
+       InitializeEntity(this, target_objective_decrease_findtarget, INITPRIO_FINDTARGET);
 }
 
 // destructible walls that can be used to trigger target_objective_decrease
 spawnfunc(func_breakable);
 spawnfunc(func_assault_destructible)
 {
-       if (!g_assault) { remove(self); return; }
+       if (!g_assault) { remove(this); return; }
 
-       self.spawnflags = 3;
-       self.classname = "func_assault_destructible";
+       this.spawnflags = 3;
+       this.classname = "func_assault_destructible";
 
        if(assault_attacker_team == NUM_TEAM_1)
-               self.team = NUM_TEAM_2;
+               this.team = NUM_TEAM_2;
        else
-               self.team = NUM_TEAM_1;
+               this.team = NUM_TEAM_1;
 
        spawnfunc_func_breakable(this);
 }
 
 spawnfunc(func_assault_wall)
 {
-       if (!g_assault) { remove(self); return; }
+       if (!g_assault) { remove(this); return; }
 
-       self.classname = "func_assault_wall";
-       self.mdl = self.model;
-       _setmodel(self, self.mdl);
-       self.solid = SOLID_BSP;
-       self.think = assault_wall_think;
-       self.nextthink = time;
-       InitializeEntity(self, assault_setenemytoobjective, INITPRIO_FINDTARGET);
+       this.classname = "func_assault_wall";
+       this.mdl = this.model;
+       _setmodel(this, this.mdl);
+       this.solid = SOLID_BSP;
+       this.think = assault_wall_think;
+       this.nextthink = time;
+       InitializeEntity(this, assault_setenemytoobjective, INITPRIO_FINDTARGET);
 }
 
 spawnfunc(target_assault_roundend)
 {
-       if (!g_assault) { remove(self); return; }
+       if (!g_assault) { remove(this); return; }
 
-       self.winning = 0; // round not yet won by attackers
-       self.classname = "target_assault_roundend";
-       self.use = target_assault_roundend_use;
-       self.cnt = 0; // first round
-       self.reset = target_assault_roundend_reset;
+       this.winning = 0; // round not yet won by attackers
+       this.classname = "target_assault_roundend";
+       this.use = target_assault_roundend_use;
+       this.cnt = 0; // first round
+       this.reset = target_assault_roundend_reset;
 }
 
 spawnfunc(target_assault_roundstart)
 {
-       if (!g_assault) { remove(self); return; }
+       if (!g_assault) { remove(this); return; }
 
        assault_attacker_team = NUM_TEAM_1;
-       self.classname = "target_assault_roundstart";
-       self.use = assault_roundstart_use_self;
-       self.reset2 = assault_roundstart_use_self;
-       InitializeEntity(self, assault_roundstart_use, INITPRIO_FINDTARGET);
+       this.classname = "target_assault_roundstart";
+       this.use = assault_roundstart_use;
+       this.reset2 = assault_roundstart_use_self;
+       InitializeEntity(this, assault_roundstart_use_this, INITPRIO_FINDTARGET);
 }
 
 // legacy bot code
index 7f0eafe868d3a7d517a67966bd0c4d52ccdff2ca..072fe90ddee9566093d39bd2de0577a8c7fdc3c1 100644 (file)
@@ -47,7 +47,7 @@ REGISTER_MUTATOR(ca, false)
                EliminatedPlayers_Init(ca_isEliminated);
 
                ActivateTeamplay();
-               SetLimits(autocvar_g_ca_point_limit, autocvar_g_ca_point_leadlimit, -1, -1);
+               SetLimits(autocvar_g_ca_point_limit, autocvar_g_ca_point_leadlimit, autocvar_timelimit_override, -1);
 
                if (autocvar_g_ca_team_spawns)
                        have_team_spawns = -1; // request team spawns
@@ -331,7 +331,7 @@ MUTATOR_HOOKFUNCTION(ca, ForbidPlayerScore_Clear)
 MUTATOR_HOOKFUNCTION(ca, MakePlayerObserver)
 {
     SELFPARAM();
-       if (this.caplayer == 1)
+       if (!IS_DEAD(this))
                ca_LastPlayerForTeam_Notify();
        if (this.killindicator_teamchange == -2)
                this.caplayer = 0;
index a7d6fb2a1b26f7e6d1376b259ca5a5d91323ed93..702ff45743214da4efcfc61623802c22a9a1f611 100644 (file)
@@ -13,7 +13,7 @@ REGISTER_MUTATOR(ctf, false)
                ctf_Initialize();
 
                ActivateTeamplay();
-               SetLimits(autocvar_capturelimit_override, autocvar_captureleadlimit_override, -1, -1);
+               SetLimits(autocvar_capturelimit_override, autocvar_captureleadlimit_override, autocvar_timelimit_override, -1);
                have_team_spawns = -1; // request team spawns
        }
 
@@ -1231,16 +1231,18 @@ void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag e
        if (flag.capeffect == "")       { flag.capeffect = EFFECT_CAP(teamnumber).eent_eff_name; }
 
        // sounds
-       flag.snd_flag_taken = strzone(SND(CTF_TAKEN(teamnumber)));
-       flag.snd_flag_returned = strzone(SND(CTF_RETURNED(teamnumber)));
-       flag.snd_flag_capture = strzone(SND(CTF_CAPTURE(teamnumber)));
-       flag.snd_flag_dropped = strzone(SND(CTF_DROPPED(teamnumber)));
-       if (flag.snd_flag_respawn == "") flag.snd_flag_respawn = strzone(SND(CTF_RESPAWN)); // if there is ever a team-based sound for this, update the code to match.
-       precache_sound(flag.snd_flag_respawn);
-       if (flag.snd_flag_touch == "") flag.snd_flag_touch = strzone(SND(CTF_TOUCH)); // again has no team-based sound
-       precache_sound(flag.snd_flag_touch);
-       if (flag.snd_flag_pass == "") flag.snd_flag_pass = strzone(SND(CTF_PASS)); // same story here
-       precache_sound(flag.snd_flag_pass);
+#define X(s,b) \
+               if(flag.s == "") flag.s = b; \
+               precache_sound(flag.s);
+
+       X(snd_flag_taken,               strzone(SND(CTF_TAKEN(teamnumber))))
+       X(snd_flag_returned,    strzone(SND(CTF_RETURNED(teamnumber))))
+       X(snd_flag_capture,     strzone(SND(CTF_CAPTURE(teamnumber))))
+       X(snd_flag_dropped,     strzone(SND(CTF_DROPPED(teamnumber))))
+       X(snd_flag_respawn,     strzone(SND(CTF_RESPAWN)))
+       X(snd_flag_touch,               strzone(SND(CTF_TOUCH)))
+       X(snd_flag_pass,                strzone(SND(CTF_PASS)))
+#undef X
 
        // precache
        precache_model(flag.model);
index 1f99c938de021984872d4416b6167dab6c0e232a..f05b53ce8cbc6998407f91ac71998a0d13c9a5bf 100644 (file)
@@ -15,7 +15,7 @@ REGISTER_MUTATOR(cts, false)
 
                g_race_qualifying = true;
                independent_players = 1;
-               SetLimits(0, 0, -1, -1);
+               SetLimits(0, 0, autocvar_timelimit_override, -1);
 
                cts_Initialize();
        }
index 01f17ec9feee1d09cd86b2e02bf000eba020b89d..141837c260071c9e71f3ce928fb1a10d82a98b10 100644 (file)
@@ -22,7 +22,7 @@ REGISTER_MUTATOR(dom, false)
                        fraglimit_override = autocvar_g_domination_roundbased_point_limit;
 
                ActivateTeamplay();
-               SetLimits(fraglimit_override, autocvar_g_domination_point_leadlimit, -1, -1);
+               SetLimits(fraglimit_override, autocvar_g_domination_point_leadlimit, autocvar_timelimit_override, -1);
                have_team_spawns = -1; // request team spawns
        }
 
@@ -150,8 +150,7 @@ void dompoint_captured ()
        old_team = self.team;
        self.team = real_team;
        self.delay = 0;
-       activator = self;
-       SUB_UseTargets ();
+       SUB_UseTargets (self, self, NULL);
        self.delay = old_delay;
        self.team = old_team;
 
index 8482e258e9d0f8fdf2e64579e53246a766e21bdc..f57661fba9617c1fb2d27683bdeb55e59eebeb4a 100644 (file)
@@ -16,7 +16,7 @@ REGISTER_MUTATOR(ft, false)
                freezetag_Initialize();
 
                ActivateTeamplay();
-               SetLimits(autocvar_g_freezetag_point_limit, autocvar_g_freezetag_point_leadlimit, -1, -1);
+               SetLimits(autocvar_g_freezetag_point_limit, autocvar_g_freezetag_point_leadlimit, autocvar_timelimit_override, -1);
 
                if (autocvar_g_freezetag_team_spawns)
                        have_team_spawns = -1; // request team spawns
index efb6842e5dedb8137e9c6201f7d5e8f83e1c1d5f..e49bf3d546e2d726c3b3cff23075b19e2d268bf5 100644 (file)
@@ -19,7 +19,7 @@ REGISTER_MUTATOR(inv, false)
 
                cvar_settemp("g_monsters", "1");
 
-               SetLimits(autocvar_g_invasion_point_limit, -1, -1, -1);
+               SetLimits(autocvar_g_invasion_point_limit, autocvar_leadlimit_override, autocvar_timelimit_override, -1);
                if (autocvar_g_invasion_teams >= 2)
                {
                        ActivateTeamplay();
index 66ac8a80e38619e61012ce18b3185cda04556926..a3960066c16c228dd1a30f9904a3a230cc0fee8c 100644 (file)
@@ -476,6 +476,7 @@ void ka_SpawnBall() // loads various values for the ball, runs only once at star
        e.glow_color = autocvar_g_keepawayball_trail_color;
        e.glow_trail = true;
        e.flags = FL_ITEM;
+       e.pushable = true;
        e.reset = ka_Reset;
        e.touch = ka_TouchEvent;
        e.owner = world;
index dbcaa5f898362a082be5f916222151c0c1e30e7d..e311f72c1303830f49535beda0c59b242c6eaa6e 100644 (file)
@@ -16,7 +16,7 @@ REGISTER_MUTATOR(kh, false)
                kh_Initialize();
 
                ActivateTeamplay();
-               SetLimits(autocvar_g_keyhunt_point_limit, autocvar_g_keyhunt_point_leadlimit, -1, -1);
+               SetLimits(autocvar_g_keyhunt_point_limit, autocvar_g_keyhunt_point_leadlimit, autocvar_timelimit_override, -1);
                if (autocvar_g_keyhunt_team_spawns)
                        have_team_spawns = -1; // request team spawns
        }
index a2f1f2507ed2bdf4d9da74d58dddc89b5bf2730f..22850d8b8be9221dbae26169b3a2bed7a2632539 100644 (file)
@@ -13,7 +13,7 @@ REGISTER_MUTATOR(lms, false)
                        error("This is a game type and it cannot be added at runtime.");
                lms_Initialize();
 
-               SetLimits(((!autocvar_g_lms_lives_override) ? -1 : autocvar_g_lms_lives_override), 0, -1, -1);
+               SetLimits(((!autocvar_g_lms_lives_override) ? -1 : autocvar_g_lms_lives_override), 0, autocvar_timelimit_override, -1);
        }
 
        MUTATOR_ONROLLBACK_OR_REMOVE
index 3f6a8a85603f6c95dbb7361472d1e457ee5e3b3f..7b769e29ff152f193fd1573c09697da7dede3dd6 100644 (file)
@@ -424,7 +424,7 @@ MUTATOR_HOOKFUNCTION(rc, CheckRules_World)
        {
                if(!g_race_qualifying)
                {
-                       ret_float = WinningCondition_QualifyingThenRace(checkrules_fraglimit);
+                       ret_float = WinningCondition_Race(checkrules_fraglimit);
                        return true;
                }
                else if(g_race_qualifying == 2)
@@ -468,9 +468,8 @@ void rc_SetLimits()
        qualifying_override = autocvar_g_race_qualifying_timelimit_override;
        fraglimit_override = autocvar_g_race_laps_limit;
        leadlimit_override = 0; // currently not supported by race
-       timelimit_override = -1; // use default if we don't set it below
+       timelimit_override = autocvar_timelimit_override;
 
-       // we need to find out the correct value for g_race_qualifying
        float want_qualifying = ((qualifying_override >= 0) ? qualifying_override : autocvar_g_race_qualifying_timelimit) > 0;
 
        if(autocvar_g_campaign)
@@ -478,20 +477,20 @@ void rc_SetLimits()
                g_race_qualifying = 1;
                independent_players = 1;
        }
-       else if(!autocvar_g_campaign && want_qualifying)
+       else if(want_qualifying)
        {
                g_race_qualifying = 2;
                independent_players = 1;
-               race_fraglimit = (race_fraglimit >= 0) ? fraglimit_override : autocvar_fraglimit;
-               race_leadlimit = (race_leadlimit >= 0) ? leadlimit_override : autocvar_leadlimit;
-               race_timelimit = (race_timelimit >= 0) ? timelimit_override : autocvar_timelimit;
+               race_fraglimit = (fraglimit_override >= 0) ? fraglimit_override : autocvar_fraglimit;
+               race_leadlimit = (leadlimit_override >= 0) ? leadlimit_override : autocvar_leadlimit;
+               race_timelimit = (timelimit_override >= 0) ? timelimit_override : autocvar_timelimit;
+               qualifying_override = (qualifying_override >= 0) ? qualifying_override : autocvar_g_race_qualifying_timelimit;
                fraglimit_override = 0;
                leadlimit_override = 0;
-               timelimit_override = autocvar_g_race_qualifying_timelimit;
+               timelimit_override = qualifying_override;
        }
        else
                g_race_qualifying = 0;
-
        SetLimits(fraglimit_override, leadlimit_override, timelimit_override, qualifying_override);
 }
 
index 078e3517d08bb5dcfdc42eee5db23236a657077c..6c22a8e198fceaace9cf96812449f5d216a19497 100644 (file)
@@ -16,7 +16,7 @@ REGISTER_MUTATOR(tdm, false)
                InitializeEntity(world, tdm_DelayedInit, INITPRIO_GAMETYPE);
 
                ActivateTeamplay();
-               SetLimits(autocvar_g_tdm_point_limit, autocvar_g_tdm_point_leadlimit, -1, -1);
+               SetLimits(autocvar_g_tdm_point_limit, autocvar_g_tdm_point_leadlimit, autocvar_timelimit_override, -1);
                if (autocvar_g_tdm_team_spawns)
                        have_team_spawns = -1; // request team spawns
        }
index c737f2440ee3cad78b33c61f65520f623799a2fc..88ce7fc19bf896cc57a370109a7d2bfcd3509a95 100644 (file)
@@ -1,8 +1,8 @@
 // generated file; do not modify
-#include "costs.qc"
-#include "debug.qc"
-#include "expandnode.qc"
-#include "main.qc"
-#include "movenode.qc"
-#include "path_waypoint.qc"
-#include "utility.qc"
+#include <server/pathlib/costs.qc>
+#include <server/pathlib/debug.qc>
+#include <server/pathlib/expandnode.qc>
+#include <server/pathlib/main.qc>
+#include <server/pathlib/movenode.qc>
+#include <server/pathlib/path_waypoint.qc>
+#include <server/pathlib/utility.qc>
diff --git a/qcsrc/server/pathlib/_mod.qh b/qcsrc/server/pathlib/_mod.qh
new file mode 100644 (file)
index 0000000..6fe0472
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include <server/pathlib/costs.qh>
+#include <server/pathlib/debug.qh>
+#include <server/pathlib/expandnode.qh>
+#include <server/pathlib/main.qh>
+#include <server/pathlib/movenode.qh>
+#include <server/pathlib/path_waypoint.qh>
+#include <server/pathlib/utility.qh>
index 2c7eb92536fe73e2255453d417caecc539642982..0396dee6cd249862d3bbfad5329cf7bff204280b 100644 (file)
@@ -5,7 +5,7 @@
 #include <lib/_all.inc>
 #include "_all.qh"
 
-#include "_mod.inc"
+#include "../server/_mod.inc"
 #include "bot/_mod.inc"
 #include "bot/havocbot/_mod.inc"
 #include "command/_mod.inc"
index 9fd6ca7b3f9d2f0db732ebcd6a673d7c9b0ea30a..d24a0769b5a4b1b7834c76ca04fca34d588c63ab 100644 (file)
@@ -580,10 +580,9 @@ void checkpoint_passed()
         */
        if (!((self.spawnflags & 2) && (IS_PLAYER(other))))
        {
-               activator = other;
                oldmsg = self.message;
                self.message = "";
-               SUB_UseTargets();
+               SUB_UseTargets(self, other, other); // TODO: should we be using other for the trigger here?
                self.message = oldmsg;
        }
 
@@ -652,10 +651,9 @@ void checkpoint_passed()
                 */
                if(self.spawnflags & 2)
                {
-                       activator = other;
                        oldmsg = self.message;
                        self.message = "";
-                       SUB_UseTargets();
+                       SUB_UseTargets(self, other, other); // TODO: should we be using other for the trigger here?
                        self.message = oldmsg;
                }
 
@@ -707,12 +705,12 @@ void checkpoint_touch()
        checkpoint_passed();
 }
 
-void checkpoint_use()
+void checkpoint_use(entity this, entity actor, entity trigger)
 {
-       if(other.classname == "info_player_deathmatch") // a spawn, a spawn
+       if(trigger.classname == "info_player_deathmatch") // a spawn, a spawn
                return;
 
-       other = activator;
+       other = actor;
        checkpoint_passed();
 }
 
@@ -1107,9 +1105,9 @@ void penalty_touch()
        }
 }
 
-void penalty_use()
-{SELFPARAM();
-       race_ImposePenaltyTime(activator, self.race_penalty, self.race_penalty_reason);
+void penalty_use(entity this, entity actor, entity trigger)
+{
+       race_ImposePenaltyTime(actor, this.race_penalty, this.race_penalty_reason);
 }
 
 spawnfunc(trigger_race_penalty)
index 51af4d16e311e4857e84e1572f2acd6acc2e8c39..711b15df560536d11057ff34b19ef5b506253559 100644 (file)
@@ -58,12 +58,12 @@ void spawnpoint_think()
        }
 }
 
-void spawnpoint_use()
-{SELFPARAM();
+void spawnpoint_use(entity this, entity actor, entity trigger)
+{
        if(teamplay)
        if(have_team_spawns > 0)
        {
-               self.team = activator.team;
+               this.team = actor.team;
                some_spawn_has_been_used = 1;
        }
        //LOG_INFO("spawnpoint was used!\n");
index b010350908550a976d0bf4ec3398e03cb90a11af..a22ebb60c82323c89b018d40447ccef70bd0710a 100644 (file)
@@ -6,4 +6,4 @@ bool SpawnEvent_Send(entity this, entity to, int sf);
 entity Spawn_FilterOutBadSpots(entity firstspot, float mindist, float teamcheck);
 entity SelectSpawnPoint (float anypoint);
 spawnfunc(info_player_deathmatch);
-void spawnpoint_use();
+void spawnpoint_use(entity this, entity actor, entity trigger);
index 8dd4667117e8d745d12cc62e19fb2fef1add64ff..c275faa7c300b3d97c1115f47603f06317108388 100644 (file)
@@ -44,23 +44,6 @@ void ActivateTeamplay()
        cvar_set("teamplay", "2");  // DP needs this for sending proper getstatus replies.
 }
 
-void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_override, float qualifying_override)
-{
-       // enforce the server's universal frag/time limits
-       // set to -1 to not change value
-       if(!autocvar_g_campaign)
-       {
-               if(fraglimit_override >= 0)
-                       cvar_set("fraglimit", ftos(fraglimit_override));
-               if(timelimit_override >= 0)
-                       cvar_set("timelimit", ftos(timelimit_override));
-               if(leadlimit_override >= 0)
-                       cvar_set("leadlimit", ftos(leadlimit_override));
-               if(qualifying_override >= 0)
-                       cvar_set("g_race_qualifying_timelimit", ftos(qualifying_override));
-       }
-}
-
 void InitGameplayMode()
 {
        VoteReset();
@@ -89,8 +72,6 @@ void InitGameplayMode()
 
        MapInfo_ClearTemps();
 
-       // set both here, gamemode can override it later
-       SetLimits(autocvar_fraglimit_override, autocvar_leadlimit_override, autocvar_timelimit_override, -1);
        gamemode_name = MapInfo_Type_ToText(MapInfo_LoadedGametype);
 
        cache_mutatormsg = strzone("");
index 2a3a528fea537dd16a59c839f5e6b373415c84e6..df82a9cae6040e830e077a22bee2f13db963db9d 100644 (file)
@@ -20,8 +20,6 @@ void default_delayedinit(entity this);
 
 void ActivateTeamplay();
 
-void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_override, float qualifying_override);
-
 void InitGameplayMode();
 
 string GetClientVersionMessage();
index cb24b279d12c9c500f53bb87234692ba480abc76..b8954f293ae7cb6819db5ae4bfe3185ec90e7612 100644 (file)
@@ -1,11 +1,11 @@
 // generated file; do not modify
-#include "accuracy.qc"
-#include "common.qc"
-#include "csqcprojectile.qc"
-#include "hitplot.qc"
-#include "selection.qc"
-#include "spawning.qc"
-#include "throwing.qc"
-#include "tracing.qc"
-#include "weaponstats.qc"
-#include "weaponsystem.qc"
+#include <server/weapons/accuracy.qc>
+#include <server/weapons/common.qc>
+#include <server/weapons/csqcprojectile.qc>
+#include <server/weapons/hitplot.qc>
+#include <server/weapons/selection.qc>
+#include <server/weapons/spawning.qc>
+#include <server/weapons/throwing.qc>
+#include <server/weapons/tracing.qc>
+#include <server/weapons/weaponstats.qc>
+#include <server/weapons/weaponsystem.qc>
diff --git a/qcsrc/server/weapons/_mod.qh b/qcsrc/server/weapons/_mod.qh
new file mode 100644 (file)
index 0000000..dfa2cbf
--- /dev/null
@@ -0,0 +1,11 @@
+// generated file; do not modify
+#include <server/weapons/accuracy.qh>
+#include <server/weapons/common.qh>
+#include <server/weapons/csqcprojectile.qh>
+#include <server/weapons/hitplot.qh>
+#include <server/weapons/selection.qh>
+#include <server/weapons/spawning.qh>
+#include <server/weapons/throwing.qh>
+#include <server/weapons/tracing.qh>
+#include <server/weapons/weaponstats.qh>
+#include <server/weapons/weaponsystem.qh>
index 2a439f3d9eeb26d5763b85349995a12937f65f63..4a06e16661027b650be469a327af68badd70b93d 100644 (file)
@@ -73,21 +73,21 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype,
        return true; // if none of these return, then allow damage anyway.
 }
 
-void W_PrepareExplosionByDamage(entity attacker, void() explode)
-{SELFPARAM();
-       self.takedamage = DAMAGE_NO;
-       self.event_damage = func_null;
+void W_PrepareExplosionByDamage(entity this, entity attacker, void() explode)
+{
+       this.takedamage = DAMAGE_NO;
+       this.event_damage = func_null;
 
        if(IS_CLIENT(attacker) && !autocvar_g_projectiles_keep_owner)
        {
-               self.owner = attacker;
-               self.realowner = attacker;
+               this.owner = attacker;
+               this.realowner = attacker;
        }
 
-       MUTATOR_CALLHOOK(PrepareExplosionByDamage, self, attacker);
+       MUTATOR_CALLHOOK(PrepareExplosionByDamage, this, attacker);
 
        // do not explode NOW but in the NEXT FRAME!
        // because recursive calls to RadiusDamage are not allowed
-       self.nextthink = time;
-       self.think = explode;
+       this.nextthink = time;
+       this.think = explode;
 }
index 7633c386e77c247092350bcdff51be40f5400f63..2ab8ea5acca6832f9eda13b257ff006cf0f8cbee 100644 (file)
@@ -5,4 +5,4 @@ void W_GiveWeapon (entity e, float wep);
 .float prevstrengthsoundattempt;
 void W_PlayStrengthSound(entity player);
 float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception);
-void W_PrepareExplosionByDamage(entity attacker, void() explode);
+void W_PrepareExplosionByDamage(entity this, entity attacker, void() explode);
index 269c631f7800987dd3ab30357de1340082b3f058..b4c4fc3048ceea24877006057e5749bc7e314a7c 100755 (executable)
@@ -2,13 +2,26 @@
 set -eu
 cd "$(dirname "$0")"
 cd ..
+ROOT=$PWD/
 
-MOD=_mod.inc
+MOD=_mod
 
 function genmod() {
-    echo '// generated file; do not modify' > ${MOD}
+    # use context to work around cmake issue #12619
+    CTX="${PWD#$ROOT}/"
+    echo '// generated file; do not modify' > ${MOD}.inc
+    echo '// generated file; do not modify' > ${MOD}.qh
     for f in $(ls | sort -k 1,1 -t .); do
-        if [[ "$f" == *.qc ]]; then echo "#include \"$f\"" >> ${MOD}; fi
+        if [[ "$f" == cl_* ]]; then if [[ -f "${f#cl_}" ]]; then continue; fi; fi
+        if [[ "$f" == sv_* ]]; then if [[ -f "${f#sv_}" ]]; then continue; fi; fi
+        if [[ "$f" == ui_* ]]; then if [[ -f "${f#ui_}" ]]; then continue; fi; fi
+        if [[ "$f" == *.qc ]]; then
+            echo "#include <${CTX}$f>" >> ${MOD}.inc
+            echo "#include <${CTX}${f%.qc}.qh>" >> ${MOD}.qh
+            if [[ -f "cl_$f" ]]; then echo -e "#ifdef CSQC\n    #include <${CTX}cl_$f>\n#endif" >> ${MOD}.inc; fi
+            if [[ -f "sv_$f" ]]; then echo -e "#ifdef SVQC\n    #include <${CTX}sv_$f>\n#endif" >> ${MOD}.inc; fi
+            if [[ -f "ui_$f" ]]; then echo -e "#ifdef MENUQC\n    #include <${CTX}ui_$f>\n#endif" >> ${MOD}.inc; fi
+        fi
     done
     # echo >> ${MOD}
     for f in *; do if [ -d "$f" ]; then
index 39ada82f782b62bbeae93db7926f7be05f9f49d9..0dfad90ec964e6396afcc79dbfd51644a1c873c9 100644 (file)
@@ -18,6 +18,7 @@ sv_eventlog 1
 sv_logscores_bots 1
 g_weaponarena all
 g_weaponarena_random 2
+g_playerstats_gamereport_uri ""
 
 // Start!