Merge remote-tracking branch 'origin/master' into terencehill/menu_remove_tab_title
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 10 May 2015 03:41:57 +0000 (13:41 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 10 May 2015 03:41:57 +0000 (13:41 +1000)
# Conflicts:
# qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc
# qcsrc/menu/xonotic/dialog_settings_game_hud.qc
# qcsrc/menu/xonotic/dialog_settings_game_messages.qc
# qcsrc/menu/xonotic/dialog_settings_game_model.qc
# qcsrc/menu/xonotic/dialog_settings_game_view.qc
# qcsrc/menu/xonotic/dialog_settings_game_weapons.qc

446 files changed:
qcsrc/Makefile
qcsrc/client/_all.qh [new file with mode: 0644]
qcsrc/client/announcer.qc
qcsrc/client/announcer.qh [new file with mode: 0644]
qcsrc/client/bgmscript.qc
qcsrc/client/bgmscript.qh
qcsrc/client/casings.qc
qcsrc/client/casings.qh [new file with mode: 0644]
qcsrc/client/command/cl_cmd.qc
qcsrc/client/command/commands.qc [new file with mode: 0644]
qcsrc/client/command/commands.qh [new file with mode: 0644]
qcsrc/client/csqc_constants.qc [deleted file]
qcsrc/client/csqc_constants.qh [new file with mode: 0644]
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/csqcmodel_hooks.qh [new file with mode: 0644]
qcsrc/client/damage.qc
qcsrc/client/damage.qh
qcsrc/client/defs.qh
qcsrc/client/effects.qc
qcsrc/client/effects.qh [new file with mode: 0644]
qcsrc/client/gibs.qc
qcsrc/client/hook.qc
qcsrc/client/hook.qh [new file with mode: 0644]
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/hud_config.qc
qcsrc/client/hud_config.qh [new file with mode: 0644]
qcsrc/client/laser.qc
qcsrc/client/laser.qh [new file with mode: 0644]
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/client/mapvoting.qc
qcsrc/client/mapvoting.qh
qcsrc/client/miscfunctions.qc
qcsrc/client/modeleffects.qc
qcsrc/client/modeleffects.qh
qcsrc/client/movelib.qc [new file with mode: 0644]
qcsrc/client/movelib.qh [new file with mode: 0644]
qcsrc/client/movetypes.qc
qcsrc/client/noise.qc
qcsrc/client/particles.qc
qcsrc/client/particles.qh
qcsrc/client/player_skeleton.qc
qcsrc/client/player_skeleton.qh
qcsrc/client/prandom.qc
qcsrc/client/progs.src
qcsrc/client/rubble.qc
qcsrc/client/rubble.qh
qcsrc/client/scoreboard.qc
qcsrc/client/scoreboard.qh
qcsrc/client/shownames.qc
qcsrc/client/shownames.qh
qcsrc/client/sortlist.qh
qcsrc/client/t_items.qc [new file with mode: 0644]
qcsrc/client/t_items.qh [new file with mode: 0644]
qcsrc/client/target_music.qc
qcsrc/client/target_music.qh
qcsrc/client/teamradar.qc
qcsrc/client/teamradar.qh
qcsrc/client/tturrets.qc
qcsrc/client/tturrets.qh
qcsrc/client/tuba.qc
qcsrc/client/tuba.qh
qcsrc/client/vehicles/bumblebee.qc [new file with mode: 0644]
qcsrc/client/vehicles/bumblebee.qh [new file with mode: 0644]
qcsrc/client/vehicles/vehicles.qc
qcsrc/client/vehicles/vehicles.qh
qcsrc/client/view.qc
qcsrc/client/wall.qc
qcsrc/client/wall.qh
qcsrc/client/waypointsprites.qc
qcsrc/client/waypointsprites.qh
qcsrc/client/weapons/projectile.qc
qcsrc/client/weapons/projectile.qh
qcsrc/common/animdecide.qc
qcsrc/common/buffs.qh
qcsrc/common/command/command.qh [new file with mode: 0644]
qcsrc/common/command/commands.qc [new file with mode: 0644]
qcsrc/common/command/commands.qh [new file with mode: 0644]
qcsrc/common/command/generic.qc
qcsrc/common/command/generic.qh
qcsrc/common/command/markup.qc
qcsrc/common/command/markup.qh
qcsrc/common/command/rpn.qc
qcsrc/common/command/rpn.qh
qcsrc/common/command/shared_defs.qh [deleted file]
qcsrc/common/counting.qh
qcsrc/common/mapinfo.qh
qcsrc/common/monsters/all.inc [new file with mode: 0644]
qcsrc/common/monsters/all.qh [deleted file]
qcsrc/common/monsters/monsters.qc
qcsrc/common/monsters/monsters.qh
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/nades.qh
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/stats.qh
qcsrc/common/util-pre.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/common/weapons/all.inc [new file with mode: 0644]
qcsrc/common/weapons/all.qh [deleted file]
qcsrc/common/weapons/weapons.qc
qcsrc/common/weapons/weapons.qh
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/dpextensions.qh
qcsrc/dpdefs/keycodes.qh
qcsrc/dpdefs/menudefs.qh
qcsrc/dpdefs/progsdefs.qh
qcsrc/dpdefs/upstream/csprogsdefs.qc [new file with mode: 0644]
qcsrc/dpdefs/upstream/dpextensions.qc [new file with mode: 0644]
qcsrc/dpdefs/upstream/keycodes.qc [new file with mode: 0644]
qcsrc/dpdefs/upstream/menudefs.qc [new file with mode: 0644]
qcsrc/dpdefs/upstream/progsdefs.qc [new file with mode: 0644]
qcsrc/menu/_all.qh [new file with mode: 0644]
qcsrc/menu/anim/animation.qc
qcsrc/menu/anim/animhost.qc
qcsrc/menu/anim/easing.qc
qcsrc/menu/anim/keyframe.qc
qcsrc/menu/classes.inc [new file with mode: 0644]
qcsrc/menu/classes.qc [deleted file]
qcsrc/menu/command/commands.qc [new file with mode: 0644]
qcsrc/menu/command/commands.qh [new file with mode: 0644]
qcsrc/menu/command/menu_cmd.qc
qcsrc/menu/draw.qc
qcsrc/menu/item.qc
qcsrc/menu/item/borderimage.qc
qcsrc/menu/item/button.qc
qcsrc/menu/item/checkbox.qc
qcsrc/menu/item/container.qc
qcsrc/menu/item/dialog.qc
qcsrc/menu/item/image.qc
qcsrc/menu/item/inputbox.qc
qcsrc/menu/item/inputcontainer.qc
qcsrc/menu/item/label.qc
qcsrc/menu/item/listbox.qc
qcsrc/menu/item/modalcontroller.qc
qcsrc/menu/item/nexposee.qc
qcsrc/menu/item/radiobutton.qc
qcsrc/menu/item/slider.qc
qcsrc/menu/item/tab.qc
qcsrc/menu/item/textslider.qc
qcsrc/menu/menu.qc
qcsrc/menu/menu.qh
qcsrc/menu/oo/base.qh
qcsrc/menu/oo/classes.qc [new file with mode: 0644]
qcsrc/menu/oo/implementation.qh [deleted file]
qcsrc/menu/oo/interface.qh [deleted file]
qcsrc/menu/progs.src
qcsrc/menu/skin.qh
qcsrc/menu/xonotic/bigbutton.qc
qcsrc/menu/xonotic/bigcommandbutton.qc
qcsrc/menu/xonotic/button.qc
qcsrc/menu/xonotic/campaign.qc
qcsrc/menu/xonotic/charmap.qc
qcsrc/menu/xonotic/checkbox.qc
qcsrc/menu/xonotic/checkbox_slider_invalid.qc
qcsrc/menu/xonotic/checkbox_string.qc
qcsrc/menu/xonotic/colorbutton.qc
qcsrc/menu/xonotic/colorpicker.qc
qcsrc/menu/xonotic/colorpicker_string.qc
qcsrc/menu/xonotic/commandbutton.qc
qcsrc/menu/xonotic/credits.qc
qcsrc/menu/xonotic/crosshairbutton.qc
qcsrc/menu/xonotic/cvarlist.qc
qcsrc/menu/xonotic/demolist.qc
qcsrc/menu/xonotic/dialog.qc
qcsrc/menu/xonotic/dialog_credits.qc
qcsrc/menu/xonotic/dialog_firstrun.qc
qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc
qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc
qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc
qcsrc/menu/xonotic/dialog_hudpanel_chat.qc
qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc
qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc
qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc
qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc
qcsrc/menu/xonotic/dialog_hudpanel_notification.qc
qcsrc/menu/xonotic/dialog_hudpanel_physics.qc
qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc
qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc
qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc
qcsrc/menu/xonotic/dialog_hudpanel_radar.qc
qcsrc/menu/xonotic/dialog_hudpanel_score.qc
qcsrc/menu/xonotic/dialog_hudpanel_timer.qc
qcsrc/menu/xonotic/dialog_hudpanel_vote.qc
qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc
qcsrc/menu/xonotic/dialog_hudsetup_exit.qc
qcsrc/menu/xonotic/dialog_monstertools.qc
qcsrc/menu/xonotic/dialog_multiplayer.qc
qcsrc/menu/xonotic/dialog_multiplayer_create.qc
qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.qc
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc
qcsrc/menu/xonotic/dialog_multiplayer_join.qc
qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc
qcsrc/menu/xonotic/dialog_multiplayer_media.qc
qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc
qcsrc/menu/xonotic/dialog_multiplayer_media_demo_startconfirm.qc
qcsrc/menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc
qcsrc/menu/xonotic/dialog_multiplayer_media_musicplayer.qc
qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc
qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc
qcsrc/menu/xonotic/dialog_multiplayer_profile.qc
qcsrc/menu/xonotic/dialog_quit.qc
qcsrc/menu/xonotic/dialog_sandboxtools.qc
qcsrc/menu/xonotic/dialog_settings.qc
qcsrc/menu/xonotic/dialog_settings_audio.qc
qcsrc/menu/xonotic/dialog_settings_effects.qc
qcsrc/menu/xonotic/dialog_settings_game.qc
qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc
qcsrc/menu/xonotic/dialog_settings_game_hud.qc
qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc
qcsrc/menu/xonotic/dialog_settings_game_messages.qc
qcsrc/menu/xonotic/dialog_settings_game_model.qc
qcsrc/menu/xonotic/dialog_settings_game_view.qc
qcsrc/menu/xonotic/dialog_settings_game_weapons.qc
qcsrc/menu/xonotic/dialog_settings_input.qc
qcsrc/menu/xonotic/dialog_settings_input_userbind.qc
qcsrc/menu/xonotic/dialog_settings_misc.qc
qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc
qcsrc/menu/xonotic/dialog_settings_misc_reset.qc
qcsrc/menu/xonotic/dialog_settings_user.qc
qcsrc/menu/xonotic/dialog_settings_user_languagewarning.qc
qcsrc/menu/xonotic/dialog_settings_video.qc
qcsrc/menu/xonotic/dialog_singleplayer.qc
qcsrc/menu/xonotic/dialog_singleplayer_winner.qc
qcsrc/menu/xonotic/dialog_teamselect.qc
qcsrc/menu/xonotic/gametypebutton.qc
qcsrc/menu/xonotic/gametypelist.qc
qcsrc/menu/xonotic/image.qc
qcsrc/menu/xonotic/inputbox.qc
qcsrc/menu/xonotic/keybinder.qc
qcsrc/menu/xonotic/languagelist.qc
qcsrc/menu/xonotic/listbox.qc
qcsrc/menu/xonotic/mainwindow.qc
qcsrc/menu/xonotic/maplist.qc
qcsrc/menu/xonotic/nexposee.qc
qcsrc/menu/xonotic/playerlist.qc
qcsrc/menu/xonotic/playermodel.qc
qcsrc/menu/xonotic/playlist.qc
qcsrc/menu/xonotic/radiobutton.qc
qcsrc/menu/xonotic/rootdialog.qc
qcsrc/menu/xonotic/screenshotimage.qc
qcsrc/menu/xonotic/screenshotlist.qc
qcsrc/menu/xonotic/serverlist.qc
qcsrc/menu/xonotic/skinlist.qc
qcsrc/menu/xonotic/slider.qc
qcsrc/menu/xonotic/slider_decibels.qc
qcsrc/menu/xonotic/slider_particles.qc
qcsrc/menu/xonotic/slider_picmip.qc
qcsrc/menu/xonotic/slider_resolution.qc
qcsrc/menu/xonotic/slider_sbfadetime.qc
qcsrc/menu/xonotic/soundlist.qc
qcsrc/menu/xonotic/statslist.qc
qcsrc/menu/xonotic/tab.qc
qcsrc/menu/xonotic/tabcontroller.qc
qcsrc/menu/xonotic/textlabel.qc
qcsrc/menu/xonotic/textslider.qc
qcsrc/menu/xonotic/util.qc
qcsrc/menu/xonotic/weaponarenacheckbox.qc
qcsrc/menu/xonotic/weaponslist.qc
qcsrc/server/_all.qh [new file with mode: 0644]
qcsrc/server/anticheat.qc
qcsrc/server/antilag.qc
qcsrc/server/bot/aim.qc
qcsrc/server/bot/aim.qh
qcsrc/server/bot/bot.qc
qcsrc/server/bot/bot.qh
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/havocbot/role_keyhunt.qc
qcsrc/server/bot/havocbot/role_keyhunt.qh [new file with mode: 0644]
qcsrc/server/bot/havocbot/role_onslaught.qc
qcsrc/server/bot/havocbot/role_onslaught.qh [new file with mode: 0644]
qcsrc/server/bot/havocbot/roles.qc
qcsrc/server/bot/havocbot/roles.qh [new file with mode: 0644]
qcsrc/server/bot/havocbot/scripting.qh [new file with mode: 0644]
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/navigation.qh
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/scripting.qh [new file with mode: 0644]
qcsrc/server/bot/waypoints.qc
qcsrc/server/cheats.qc
qcsrc/server/cheats.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_client.qh [new file with mode: 0644]
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/banning.qc
qcsrc/server/command/banning.qh
qcsrc/server/command/cmd.qc
qcsrc/server/command/commands.qc [new file with mode: 0644]
qcsrc/server/command/commands.qh [new file with mode: 0644]
qcsrc/server/command/common.qc
qcsrc/server/command/common.qh
qcsrc/server/command/getreplies.qc
qcsrc/server/command/radarmap.qc
qcsrc/server/command/radarmap.qh
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/command/vote.qh
qcsrc/server/csqceffects.qh [new file with mode: 0644]
qcsrc/server/defs.qh
qcsrc/server/ent_cs.qc
qcsrc/server/func_breakable.qc
qcsrc/server/g_casings.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_damage.qh
qcsrc/server/g_hook.qc
qcsrc/server/g_lights.qc
qcsrc/server/g_models.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_tetris.qc
qcsrc/server/g_triggers.qc
qcsrc/server/g_violence.qc
qcsrc/server/g_world.qc
qcsrc/server/g_world.qh
qcsrc/server/ipban.qc
qcsrc/server/item_key.qc
qcsrc/server/mapvoting.qc
qcsrc/server/mapvoting.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/mutators/base.qc
qcsrc/server/mutators/gamemode.qh [new file with mode: 0644]
qcsrc/server/mutators/gamemode_assault.qc
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_ctf.qh
qcsrc/server/mutators/gamemode_cts.qc
qcsrc/server/mutators/gamemode_domination.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/mutators/gamemode_freezetag.qh [new file with mode: 0644]
qcsrc/server/mutators/gamemode_invasion.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keepaway.qh
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/gamemode_keyhunt.qh
qcsrc/server/mutators/gamemode_lms.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/gamemode_race.qc
qcsrc/server/mutators/gamemode_tdm.qc
qcsrc/server/mutators/mutator.qh [new file with mode: 0644]
qcsrc/server/mutators/mutator_bloodloss.qc
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/mutators/mutator_campcheck.qc
qcsrc/server/mutators/mutator_dodging.qc
qcsrc/server/mutators/mutator_instagib.qc
qcsrc/server/mutators/mutator_invincibleproj.qc
qcsrc/server/mutators/mutator_melee_only.qc
qcsrc/server/mutators/mutator_midair.qc
qcsrc/server/mutators/mutator_multijump.qc
qcsrc/server/mutators/mutator_nades.qc
qcsrc/server/mutators/mutator_new_toys.qc
qcsrc/server/mutators/mutator_nix.qc
qcsrc/server/mutators/mutator_overkill.qc
qcsrc/server/mutators/mutator_physical_items.qc
qcsrc/server/mutators/mutator_pinata.qc
qcsrc/server/mutators/mutator_random_gravity.qc
qcsrc/server/mutators/mutator_rocketflying.qc
qcsrc/server/mutators/mutator_spawn_near_teammate.qc
qcsrc/server/mutators/mutator_superspec.qc
qcsrc/server/mutators/mutator_touchexplode.qc
qcsrc/server/mutators/mutator_vampire.qc
qcsrc/server/mutators/mutators_include.qc
qcsrc/server/mutators/sandbox.qc
qcsrc/server/pathlib.qc
qcsrc/server/pathlib.qh [new file with mode: 0644]
qcsrc/server/pathlib/costs.qc
qcsrc/server/pathlib/debug.qc
qcsrc/server/pathlib/expandnode.qc
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/main.qh [new file with mode: 0644]
qcsrc/server/pathlib/movenode.qc
qcsrc/server/pathlib/path_waypoint.qc
qcsrc/server/pathlib/pathlib.qh
qcsrc/server/pathlib/utility.qc
qcsrc/server/pathlib/utility.qh [new file with mode: 0644]
qcsrc/server/playerdemo.qc
qcsrc/server/portals.qc
qcsrc/server/progs.src
qcsrc/server/race.qc
qcsrc/server/race.qh
qcsrc/server/round_handler.qc
qcsrc/server/scores.qc
qcsrc/server/scores.qh
qcsrc/server/scores_rules.qc
qcsrc/server/scores_rules.qh [new file with mode: 0644]
qcsrc/server/secret.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/steerlib.qc
qcsrc/server/steerlib.qh [new file with mode: 0644]
qcsrc/server/sv_main.qc
qcsrc/server/t_halflife.qc
qcsrc/server/t_items.qc
qcsrc/server/t_items.qh
qcsrc/server/t_jumppads.qc
qcsrc/server/t_plats.qc
qcsrc/server/t_quake.qc
qcsrc/server/t_quake3.qc
qcsrc/server/t_swamp.qc
qcsrc/server/t_teleporters.qc
qcsrc/server/target_music.qc
qcsrc/server/target_spawn.qc
qcsrc/server/teamplay.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/units/unit_ewheel.qc
qcsrc/server/tturrets/units/unit_machinegun.qc
qcsrc/server/tturrets/units/unit_phaser.qc
qcsrc/server/tturrets/units/unit_targettrigger.qc
qcsrc/server/tturrets/units/unit_tessla.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/all.qc [new file with mode: 0644]
qcsrc/server/vehicles/all.qh [new file with mode: 0644]
qcsrc/server/vehicles/bumblebee.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/racer.qh [new file with mode: 0644]
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/raptor.qh [new file with mode: 0644]
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/spiderbot.qh [new file with mode: 0644]
qcsrc/server/vehicles/vehicle.qc [new file with mode: 0644]
qcsrc/server/vehicles/vehicle.qh [new file with mode: 0644]
qcsrc/server/vehicles/vehicles.qc [deleted file]
qcsrc/server/vehicles/vehicles.qh [deleted file]
qcsrc/server/vehicles/vehicles_def.qh [deleted file]
qcsrc/server/waypointsprites.qc
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/common.qc
qcsrc/server/weapons/csqcprojectile.qc
qcsrc/server/weapons/hitplot.qc
qcsrc/server/weapons/selection.qc
qcsrc/server/weapons/spawning.qc
qcsrc/server/weapons/throwing.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/weaponstats.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/test/compilationunit.sh [new file with mode: 0755]
qcsrc/warpzonelib/anglestransform.qc
qcsrc/warpzonelib/client.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/mathlib.qc
qcsrc/warpzonelib/mathlib.qh
qcsrc/warpzonelib/server.qc
qcsrc/warpzonelib/util_server.qc

index abbd25f..f53707e 100644 (file)
@@ -15,8 +15,13 @@ QCCFLAGS ?= \
        -Werror -fno-bail-on-werror -Wall \
        -fftepp -fftepp-predefs -Wcpp -futf8 \
        $(QCCFLAGS_WTFS) \
+       $(QCCFLAGS_FEATURES) \
        $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
 
+QCCFLAGS_FEATURES ?= \
+       -DVEHICLES_ENABLED=1 \
+       -DVEHICLES_USE_ODE=0
+
 # xonotic build system overrides this by command line argument to turn off the update-cvarcount step
 XON_BUILDSYSTEM =
 
diff --git a/qcsrc/client/_all.qh b/qcsrc/client/_all.qh
new file mode 100644 (file)
index 0000000..c8ff79d
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef CLIENT___H
+#define CLIENT___H
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
+
+#include "../dpdefs/csprogsdefs.qh"
+
+#endif
index 116dba7..19e51ce 100644 (file)
@@ -1,13 +1,9 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-    #include "../common/stats.qh"
-    #include "../common/util.qh"
-    #include "autocvars.qh"
-    #include "../common/notifications.qh"
-    #include "main.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "announcer.qh"
+#include "_all.qh"
+
+#include "../common/notifications.qh"
+#include "../common/stats.qh"
+#include "../common/util.qh"
 
 bool announcer_1min;
 bool announcer_5min;
diff --git a/qcsrc/client/announcer.qh b/qcsrc/client/announcer.qh
new file mode 100644 (file)
index 0000000..620b845
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef ANNOUNCER_H
+#define ANNOUNCER_H
+
+void Announcer();
+
+#endif
index b567190..697cae9 100644 (file)
@@ -1,13 +1,7 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/util.qh"
-       #include "autocvars.qh"
-       #include "bgmscript.qh"
-       #include "main.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "bgmscript.qh"
+#include "_all.qh"
+
+#include "../common/util.qh"
 
 #define CONSTANT_SPEED_DECAY
 
@@ -15,12 +9,12 @@ float bgmscriptbuf;
 float bgmscriptbufsize;
 float bgmscriptbufloaded;
 
-.float bgmscriptline;
-.float bgmscriptline0;
-.float bgmscriptvolume;
-.float bgmscripttime;
-.float bgmscriptstate;
-.float bgmscriptstatetime;
+class(BGMScript) .float bgmscriptline;
+class(BGMScript) .float bgmscriptline0;
+class(BGMScript) .float bgmscriptvolume;
+class(BGMScript) .float bgmscripttime;
+class(BGMScript) .float bgmscriptstate;
+class(BGMScript) .float bgmscriptstatetime;
 
 float GetAttackDecaySustainAmplitude(float a, float d, float s, float t)
 {
@@ -177,7 +171,7 @@ float GetTimeForAmplitude(entity e, float amp)
        }
 }
 
-float BGMScript(entity e)
+float doBGMScript(entity e)
 {
        float amp, vel;
 
index 910ef6b..cd70955 100644 (file)
@@ -1,14 +1,15 @@
 #ifndef BGMSCRIPT_H
 #define BGMSCRIPT_H
 
-.string bgmscript;
-.float bgmscriptattack;
-.float bgmscriptdecay;
-.float bgmscriptsustain;
-.float bgmscriptrelease;
+entityclass(BGMScript);
+class(BGMScript) .string bgmscript;
+class(BGMScript) .float bgmscriptattack;
+class(BGMScript) .float bgmscriptdecay;
+class(BGMScript) .float bgmscriptsustain;
+class(BGMScript) .float bgmscriptrelease;
 
-.float just_toggled;
+class(BGMScript) .float just_toggled;
 
 void BGMScript_InitEntity(entity e);
-float BGMScript(entity e);
+float doBGMScript(entity e);
 #endif
index 6068a79..f9c5895 100644 (file)
@@ -1,17 +1,18 @@
-#if defined(CSQC)
-       #include "movetypes.qh"
-       #include "prandom.qh"
-       #include "rubble.qh"
+#include "casings.qh"
+#include "_all.qh"
 
-       .float cnt;
-       .float alpha;
-       .int state;
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "rubble.qh"
 
+#include "../common/util.qh"
 
-.bool silent;
+.float cnt;
+.float alpha;
+.int state;
+
+entityclass(Casing);
+class(Casing) .bool silent;
 
 void Casing_Delete()
 {
diff --git a/qcsrc/client/casings.qh b/qcsrc/client/casings.qh
new file mode 100644 (file)
index 0000000..dafe66a
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef CASINGS_H
+#define CASINGS_H
+
+void Casings_Precache();
+
+void Ent_Casing(float isNew);
+
+#endif
index 7b74d2d..18fcfd1 100644 (file)
@@ -3,8 +3,20 @@
 //  Last updated: December 28th, 2011
 // ==============================================
 
+#include "../../common/command/command.qh"
+#include "cl_cmd.qh"
+
+#include "../autocvars.qh"
+#include "../defs.qh"
+#include "../hud.qh"
+#include "../hud_config.qh"
+#include "../main.qh"
+#include "../mapvoting.qh"
+#include "../miscfunctions.qh"
+
+#include "../../common/mapinfo.qh"
+
 #include "../../common/command/generic.qh"
-#include "../../common/command/shared_defs.qh"
 
 void DrawDebugModel()
 {
diff --git a/qcsrc/client/command/commands.qc b/qcsrc/client/command/commands.qc
new file mode 100644 (file)
index 0000000..dabf8f3
--- /dev/null
@@ -0,0 +1,5 @@
+#include "../_all.qh"
+
+#include "../../common/command/commands.qc"
+
+#include "cl_cmd.qc"
diff --git a/qcsrc/client/command/commands.qh b/qcsrc/client/command/commands.qh
new file mode 100644 (file)
index 0000000..65bf3da
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef CLIENT_COMMANDS_H
+#define CLIENT_COMMANDS_H
+
+#include "../../common/command/commands.qh"
+
+#include "cl_cmd.qh"
+
+#endif
diff --git a/qcsrc/client/csqc_constants.qc b/qcsrc/client/csqc_constants.qc
deleted file mode 100644 (file)
index f11c31c..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-// MenuQC redefines world, change define it here to be safe
-#define world world
-
-// Mask Constants (set .drawmask on entities; use R_AddEntities to add all entities based on mask)
-const int              MASK_ENGINE                                             = 1;
-const int              MASK_ENGINEVIEWMODELS                   = 2;
-const int              MASK_NORMAL                                             = 4;
-
-// Renderflag Constants (used for CSQC entities)
-const int              RF_VIEWMODEL                                    = 1;
-const int              RF_EXTERNALMODEL                                = 2;
-const int              RF_DEPTHHACK                                    = 4;
-const int              RF_ADDITIVE                                             = 8;
-const int              RF_USEAXIS                                              = 16;
-
-// Viewflag Constants (use with R_SetView)
-const int              VF_MIN                                                  = 1;    //(vector)
-const int              VF_MIN_X                                                = 2;    //(float)
-const int              VF_MIN_Y                                                = 3;    //(float)
-const int              VF_SIZE                                                 = 4;    //(vector) (viewport size)
-const int              VF_SIZE_Y                                               = 5;    //(float)
-const int              VF_SIZE_X                                               = 6;    //(float)
-const int              VF_VIEWPORT                                             = 7;    //(vector, vector)
-const int              VF_FOV                                                  = 8;    //(vector)
-const int              VF_FOVX                                                 = 9;    //(float)
-const int              VF_FOVY                                                 = 10;   //(float)
-const int              VF_ORIGIN                                               = 11;   //(vector)
-const int              VF_ORIGIN_X                                             = 12;   //(float)
-const int              VF_ORIGIN_Y                                             = 13;   //(float)
-const int              VF_ORIGIN_Z                                             = 14;   //(float)
-const int              VF_ANGLES                                               = 15;   //(vector)
-const int              VF_ANGLES_X                                             = 16;   //(float)
-const int              VF_ANGLES_Y                                             = 17;   //(float)
-const int              VF_ANGLES_Z                                             = 18;   //(float)
-const int              VF_DRAWWORLD                                    = 19;   //(float)
-const int              VF_DRAWENGINEHUD                                = 20;   //(float)
-const int              VF_DRAWCROSSHAIR                                = 21;   //(float)
-const int              VF_PERSPECTIVE                                  = 200;  //(float)
-
-const int              VF_CL_VIEWANGLES                                = 33;   //(vector)
-const int              VF_CL_VIEWANGLES_X                              = 34;   //(float)
-const int              VF_CL_VIEWANGLES_Y                              = 35;   //(float)
-const int              VF_CL_VIEWANGLES_Z                              = 36;   //(float)
-
-// Quake-style Point Contents
-const int              CONTENT_EMPTY                                   = -1;
-const int              CONTENT_SOLID                                   = -2;
-const int              CONTENT_WATER                                   = -3;
-const int              CONTENT_SLIME                                   = -4;
-const int              CONTENT_LAVA                                    = -5;
-const int              CONTENT_SKY                                             = -6;
-
-// Vector / Hull Constants
-const vector   VEC_1                                                   = '1 1 1';
-const vector   VEC_0                                                   = '0 0 0';
-const vector   VEC_M1                                                  = '-1 -1 -1';
-
-const vector   VEC_HULL_MIN                                    = '-16 -16 -24';
-const vector   VEC_HULL_MAX                                    = '16 16 32';
-
-// Effect Constants
-const int      EF_NODRAW                                               = 16;
-const int      EF_ADDITIVE                                             = 32;
-const int      EF_BLUE                                                 = 64;
-const int      EF_RED                                                  = 128;
-const int      EF_FULLBRIGHT                                   = 512;
-const int      EF_FLAME                                                = 1024;
-const int      EF_STARDUST                                             = 2048;
-const int      EF_NOSHADOW                                             = 4096;
-const int      EF_NODEPTHTEST                                  = 8192;
-
-// Quake Player Flag Constants
-const int      PFL_ONGROUND                                    = 1;
-const int      PFL_CROUCH                                              = 2;
-const int      PFL_DEAD                                                = 4;
-const int      PFL_GIBBED                                              = 8;
-
-// Quake Temporary Entity Constants
-const int              TE_SPIKE                                                = 0;
-const int              TE_SUPERSPIKE                                   = 1;
-const int              TE_GUNSHOT                                              = 2;
-const int              TE_EXPLOSION                                    = 3;
-const int              TE_TAREXPLOSION                                 = 4;
-const int              TE_LIGHTNING1                                   = 5;
-const int              TE_LIGHTNING2                                   = 6;
-const int              TE_WIZSPIKE                                             = 7;
-const int              TE_KNIGHTSPIKE                                  = 8;
-const int              TE_LIGHTNING3                                   = 9;
-const int              TE_LAVASPLASH                                   = 10;
-const int              TE_TELEPORT                                             = 11;
-const int      TE_EXPLOSION2                                   = 12;
-// Darkplaces Additions
-const int      TE_EXPLOSIONRGB                                 = 53;
-const int              TE_GUNSHOTQUAD                                  = 57;
-const int              TE_EXPLOSIONQUAD                                = 70;
-
-// Math Constants
-const int      EXTRA_LOW                                               = -99999999;
-const int      EXTRA_HIGH                                              = 99999999;
-
-// Frik File Constants
-const int              FILE_READ                                               = 0;
-const int              FILE_APPEND                                             = 1;
-const int              FILE_WRITE                                              = 2;
-
-// Button values used by input_buttons
-const int BUTTON_ATTACK = 1;
-const int BUTTON_JUMP = 2;
-const int BUTTON_3 = 4;
-const int BUTTON_4 = 8;
-const int BUTTON_5 = 16;
-const int BUTTON_6 = 32;
-const int BUTTON7 = 64;
-const int BUTTON8 = 128;
-const int BUTTON_USE = 256;
-const int BUTTON_CHAT = 512;
-const int BUTTON_PRYDONCURSOR = 1024;
-const int BUTTON_9 = 2048;
-const int BUTTON_10 = 4096;
-const int BUTTON_11 = 8192;
-const int BUTTON_12 = 16384;
-const int BUTTON_13 = 32768;
-const int BUTTON_14 = 65536;
-const int BUTTON_15 = 131072;
-const int BUTTON_16 = 262144;
-
-const int SOLID_NOT            = 0; // no interaction with other objects
-const int SOLID_TRIGGER        = 1; // touch on edge, but not blocking
-const int SOLID_BBOX           = 2; // touch on edge, block
-const int SOLID_SLIDEBOX       = 3; // touch on edge, but not an onground
-const int SOLID_BSP            = 4; // bsp clip, touch on edge, block
-const int SOLID_CORPSE         = 5; // same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters)
-
-const int MOVE_NORMAL = 0; // same as false
-const int MOVE_NOMONSTERS = 1; // same as true
-const int MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE
-const int MOVE_HITMODEL = 4;
-const int MOVE_WORLDONLY = 3;
-
-const int CAMERA_FREE = 1;
-const int CAMERA_CHASE = 2;
-
-const int EF_NOMODELFLAGS = 8388608;
diff --git a/qcsrc/client/csqc_constants.qh b/qcsrc/client/csqc_constants.qh
new file mode 100644 (file)
index 0000000..09d217b
--- /dev/null
@@ -0,0 +1,148 @@
+#ifndef CSQC_CONSTANTS
+#define CSQC_CONSTANTS
+
+// MenuQC redefines world, change define it here to be safe
+#define world world
+
+// Mask Constants (set .drawmask on entities; use R_AddEntities to add all entities based on mask)
+const int              MASK_ENGINE                                             = 1;
+const int              MASK_ENGINEVIEWMODELS                   = 2;
+const int              MASK_NORMAL                                             = 4;
+
+// Renderflag Constants (used for CSQC entities)
+const int              RF_VIEWMODEL                                    = 1;
+const int              RF_EXTERNALMODEL                                = 2;
+const int              RF_DEPTHHACK                                    = 4;
+const int              RF_ADDITIVE                                             = 8;
+const int              RF_USEAXIS                                              = 16;
+
+// Viewflag Constants (use with R_SetView)
+const int              VF_MIN                                                  = 1;    //(vector)
+const int              VF_MIN_X                                                = 2;    //(float)
+const int              VF_MIN_Y                                                = 3;    //(float)
+const int              VF_SIZE                                                 = 4;    //(vector) (viewport size)
+const int              VF_SIZE_Y                                               = 5;    //(float)
+const int              VF_SIZE_X                                               = 6;    //(float)
+const int              VF_VIEWPORT                                             = 7;    //(vector, vector)
+const int              VF_FOV                                                  = 8;    //(vector)
+const int              VF_FOVX                                                 = 9;    //(float)
+const int              VF_FOVY                                                 = 10;   //(float)
+const int              VF_ORIGIN                                               = 11;   //(vector)
+const int              VF_ORIGIN_X                                             = 12;   //(float)
+const int              VF_ORIGIN_Y                                             = 13;   //(float)
+const int              VF_ORIGIN_Z                                             = 14;   //(float)
+const int              VF_ANGLES                                               = 15;   //(vector)
+const int              VF_ANGLES_X                                             = 16;   //(float)
+const int              VF_ANGLES_Y                                             = 17;   //(float)
+const int              VF_ANGLES_Z                                             = 18;   //(float)
+const int              VF_DRAWWORLD                                    = 19;   //(float)
+const int              VF_DRAWENGINEHUD                                = 20;   //(float)
+const int              VF_DRAWCROSSHAIR                                = 21;   //(float)
+const int              VF_PERSPECTIVE                                  = 200;  //(float)
+
+const int              VF_CL_VIEWANGLES                                = 33;   //(vector)
+const int              VF_CL_VIEWANGLES_X                              = 34;   //(float)
+const int              VF_CL_VIEWANGLES_Y                              = 35;   //(float)
+const int              VF_CL_VIEWANGLES_Z                              = 36;   //(float)
+
+// Quake-style Point Contents
+const int              CONTENT_EMPTY                                   = -1;
+const int              CONTENT_SOLID                                   = -2;
+const int              CONTENT_WATER                                   = -3;
+const int              CONTENT_SLIME                                   = -4;
+const int              CONTENT_LAVA                                    = -5;
+const int              CONTENT_SKY                                             = -6;
+
+// Vector / Hull Constants
+const vector   VEC_1                                                   = '1 1 1';
+const vector   VEC_0                                                   = '0 0 0';
+const vector   VEC_M1                                                  = '-1 -1 -1';
+
+const vector   VEC_HULL_MIN                                    = '-16 -16 -24';
+const vector   VEC_HULL_MAX                                    = '16 16 32';
+
+// Effect Constants
+const int      EF_NODRAW                                               = 16;
+const int      EF_ADDITIVE                                             = 32;
+const int      EF_BLUE                                                 = 64;
+const int      EF_RED                                                  = 128;
+const int      EF_FULLBRIGHT                                   = 512;
+const int      EF_FLAME                                                = 1024;
+const int      EF_STARDUST                                             = 2048;
+const int      EF_NOSHADOW                                             = 4096;
+const int      EF_NODEPTHTEST                                  = 8192;
+
+// Quake Player Flag Constants
+const int      PFL_ONGROUND                                    = 1;
+const int      PFL_CROUCH                                              = 2;
+const int      PFL_DEAD                                                = 4;
+const int      PFL_GIBBED                                              = 8;
+
+// Quake Temporary Entity Constants
+const int              TE_SPIKE                                                = 0;
+const int              TE_SUPERSPIKE                                   = 1;
+const int              TE_GUNSHOT                                              = 2;
+const int              TE_EXPLOSION                                    = 3;
+const int              TE_TAREXPLOSION                                 = 4;
+const int              TE_LIGHTNING1                                   = 5;
+const int              TE_LIGHTNING2                                   = 6;
+const int              TE_WIZSPIKE                                             = 7;
+const int              TE_KNIGHTSPIKE                                  = 8;
+const int              TE_LIGHTNING3                                   = 9;
+const int              TE_LAVASPLASH                                   = 10;
+const int              TE_TELEPORT                                             = 11;
+const int      TE_EXPLOSION2                                   = 12;
+// Darkplaces Additions
+const int      TE_EXPLOSIONRGB                                 = 53;
+const int              TE_GUNSHOTQUAD                                  = 57;
+const int              TE_EXPLOSIONQUAD                                = 70;
+
+// Math Constants
+const int      EXTRA_LOW                                               = -99999999;
+const int      EXTRA_HIGH                                              = 99999999;
+
+// Frik File Constants
+const int              FILE_READ                                               = 0;
+const int              FILE_APPEND                                             = 1;
+const int              FILE_WRITE                                              = 2;
+
+// Button values used by input_buttons
+const int BUTTON_ATTACK = 1;
+const int BUTTON_JUMP = 2;
+const int BUTTON_3 = 4;
+const int BUTTON_4 = 8;
+const int BUTTON_5 = 16;
+const int BUTTON_6 = 32;
+const int BUTTON7 = 64;
+const int BUTTON8 = 128;
+const int BUTTON_USE = 256;
+const int BUTTON_CHAT = 512;
+const int BUTTON_PRYDONCURSOR = 1024;
+const int BUTTON_9 = 2048;
+const int BUTTON_10 = 4096;
+const int BUTTON_11 = 8192;
+const int BUTTON_12 = 16384;
+const int BUTTON_13 = 32768;
+const int BUTTON_14 = 65536;
+const int BUTTON_15 = 131072;
+const int BUTTON_16 = 262144;
+
+const int SOLID_NOT            = 0; // no interaction with other objects
+const int SOLID_TRIGGER        = 1; // touch on edge, but not blocking
+const int SOLID_BBOX           = 2; // touch on edge, block
+const int SOLID_SLIDEBOX       = 3; // touch on edge, but not an onground
+const int SOLID_BSP            = 4; // bsp clip, touch on edge, block
+const int SOLID_CORPSE         = 5; // same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters)
+
+const int MOVE_NORMAL = 0; // same as false
+const int MOVE_NOMONSTERS = 1; // same as true
+const int MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE
+const int MOVE_HITMODEL = 4;
+const int MOVE_WORLDONLY = 3;
+
+const int CAMERA_FREE = 1;
+const int CAMERA_CHASE = 2;
+
+const int EF_NOMODELFLAGS = 8388608;
+
+#endif
index dde4461..dbe999f 100644 (file)
@@ -1,26 +1,24 @@
-#if defined(CSQC)
-       #include "gibs.qh"
-       #include "miscfunctions.qh"
-       #include "player_skeleton.qh"
-       #include "sortlist.qh"
+#include "csqcmodel_hooks.qh"
+#include "_all.qh"
 
-       #include "../client/weapons/projectile.qh"
+#include "gibs.qh"
+#include "player_skeleton.qh"
+#include "sortlist.qh"
 
-       #include "../common/animdecide.qh"
-       #include "../common/csqcmodel_settings.qh"
+#include "weapons/projectile.qh"
 
-       #include "../csqcmodellib/cl_model.qh"
-       #include "../csqcmodellib/cl_player.qh"
-       #include "../csqcmodellib/interpolate.qh"
+#include "../common/animdecide.qh"
+#include "../common/csqcmodel_settings.qh"
+#include "../common/teams.qh"
 
-       #include "../warpzonelib/mathlib.qh"
+#include "../csqcmodellib/cl_model.qh"
+#include "../csqcmodellib/cl_player.qh"
+#include "../csqcmodellib/interpolate.qh"
 
-       .float death_time;
-       .int modelflags;
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "../warpzonelib/mathlib.qh"
 
+.float death_time;
+.int modelflags;
 
 void CSQCModel_Hook_PreDraw(bool isplayer);
 
diff --git a/qcsrc/client/csqcmodel_hooks.qh b/qcsrc/client/csqcmodel_hooks.qh
new file mode 100644 (file)
index 0000000..8995880
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef CSQCMODEL_HOOKS
+#define CSQCMODEL_HOOKS
+
+void CSQCPlayer_Precache();
+
+#endif
index 000ef8b..9241621 100644 (file)
@@ -1,18 +1,23 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../common/util.qh"
-       #include "../common/weapons/weapons.qh"
-       #include "autocvars.qh"
-       #include "../common/deathtypes.qh"
-       #include "damage.qh"
-       #include "movetypes.qh"
-       #include "prandom.qh"
-       #include "vehicles/vehicles.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "damage.qh"
+#include "_all.qh"
+
+#include "gibs.qh"
+#include "movetypes.qh"
+#include "prandom.qh"
+
+#include "vehicles/vehicles.qh"
+
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/util.qh"
+
+#include "../common/weapons/weapons.qh"
+
+.entity tag_entity;
+
+.float cnt;
+.int state;
+.bool isplayermodel;
 
 void DamageEffect_Think()
 {
index 7c5c741..0de69a0 100644 (file)
@@ -2,4 +2,7 @@
 #define DAMAGE_H
 
 .float total_damages; // number of effects which currently are attached to a player
+
+void Ent_DamageInfo(float isNew);
+
 #endif
index 82c43e2..6325a8a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef DEFS_H
-#define DEFS_H
+#ifndef CLIENT_DEFS_H
+#define CLIENT_DEFS_H
 
 // Additional OPTIONAL Fields and Globals
 //float                intermission;
index 9562350..99a9944 100644 (file)
@@ -1,9 +1,5 @@
-#if defined(CSQC)
-    #include "../dpdefs/csprogsdefs.qh"
-    #include "autocvars.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "effects.qh"
+#include "_all.qh"
 
 /*
 .vector fx_start;
diff --git a/qcsrc/client/effects.qh b/qcsrc/client/effects.qh
new file mode 100644 (file)
index 0000000..0bebdb9
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef EFFECTS_H
+#define EFFECTS_H
+
+void Net_ReadArc();
+
+#endif
index eb7d478..c617106 100644 (file)
@@ -1,4 +1,17 @@
 #include "gibs.qh"
+#include "_all.qh"
+
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "rubble.qh"
+
+#include "../common/constants.qh"
+#include "../common/util.qh"
+
+.float scale;
+.float alpha;
+.float cnt;
+.float gravity;
 
 void Gib_Delete()
 {
index 8436ff6..2a9be2e 100644 (file)
@@ -1,12 +1,22 @@
+#include "hook.qh"
+#include "_all.qh"
+
 #include "hud.qh"
 #include "noise.qh"
+
+#include "../common/teams.qh"
+
+#include "../csqcmodellib/interpolate.qh"
+
 #include "../warpzonelib/common.qh"
+#include "../warpzonelib/mathlib.qh"
 
-.float HookType; // ENT_CLIENT_*
-.vector origin;
-.vector velocity;
-.float HookSilent;
-.float HookRange;
+entityclass(Hook);
+class(Hook) .float HookType; // ENT_CLIENT_*
+class(Hook) .vector origin;
+class(Hook) .vector velocity;
+class(Hook) .float HookSilent;
+class(Hook) .float HookRange;
 
 void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg)
 {
@@ -49,7 +59,7 @@ void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end)
        Draw_GrapplingHook_trace_callback_rnd += 0.25 * vlen(hit - start) / 8;
 }
 
-.float teleport_time;
+class(Hook) .float teleport_time;
 void Draw_GrapplingHook()
 {
        vector a, b, atrans;
diff --git a/qcsrc/client/hook.qh b/qcsrc/client/hook.qh
new file mode 100644 (file)
index 0000000..8401dce
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef HOOK_H
+#define HOOK_H
+
+void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg);
+void Hook_Precache();
+
+void Ent_ReadHook(float bIsNew, float type);
+
+#endif
index 0da1b69..33e9cb5 100644 (file)
@@ -1,10 +1,23 @@
+#include "hud.qh"
+#include "_all.qh"
+
+#include "hud_config.qh"
 #include "scoreboard.qh"
+#include "sortlist.qh"
 #include "teamradar.qh"
+#include "t_items.qh"
+
 #include "../common/buffs.qh"
+#include "../common/constants.qh"
 #include "../common/counting.qh"
+#include "../common/deathtypes.qh"
 #include "../common/mapinfo.qh"
 #include "../common/nades.qh"
-#include "../server/t_items.qh"
+#include "../common/stats.qh"
+
+#include "../csqcmodellib/cl_player.qh"
+
+#include "../warpzonelib/mathlib.qh"
 
 /*
 ==================
@@ -1485,17 +1498,6 @@ void HUD_Powerups(void)
 // Health/armor (#3)
 //
 
-// prev_* vars contain the health/armor at the previous FRAME
-// set to -1 when player is dead or was not playing
-int prev_health, prev_armor;
-float health_damagetime, armor_damagetime;
-int health_beforedamage, armor_beforedamage;
-// old_p_* vars keep track of previous values when smoothing value changes of the progressbar
-int old_p_health, old_p_armor;
-float old_p_healthtime, old_p_armortime;
-// prev_p_* vars contain the health/armor progressbar value at the previous FRAME
-// set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
-int prev_p_health, prev_p_armor;
 
 void HUD_HealthArmor(void)
 {
@@ -2624,15 +2626,6 @@ void HUD_RaceTimer (void)
 
 // Vote window (#9)
 //
-int vote_yescount;
-int vote_nocount;
-int vote_needed;
-int vote_highlighted; // currently selected vote
-
-int vote_active; // is there an active vote?
-int vote_prev; // previous state of vote_active to check for a change
-float vote_alpha;
-float vote_change; // "time" when vote_active changed
 
 void HUD_Vote(void)
 {
index 16a7645..f880a81 100644 (file)
@@ -12,6 +12,19 @@ int HUD_PANEL_LAST;
 int panel_order[HUD_PANEL_MAX];
 string hud_panelorder_prev;
 
+void HUD_Reset (void);
+void HUD_Main (void);
+
+int vote_yescount;
+int vote_nocount;
+int vote_needed;
+int vote_highlighted; // currently selected vote
+
+int vote_active; // is there an active vote?
+int vote_prev; // previous state of vote_active to check for a change
+float vote_alpha;
+float vote_change; // "time" when vote_active changed
+
 float hud_draw_maximized;
 float hud_panel_radar_maximized;
 float chat_panel_modified;
@@ -69,18 +82,19 @@ vector panel_size_backup;
 vector panel_size_copied;
 
 entity panel;
-.string panel_name;
-.int panel_id;
-.vector current_panel_pos;
-.vector current_panel_size;
-.string current_panel_bg;
-.float current_panel_bg_alpha;
-.float current_panel_bg_border;
-.vector current_panel_bg_color;
-.float current_panel_bg_color_team;
-.float current_panel_bg_padding;
-.float current_panel_fg_alpha;
-.float update_time;
+entityclass(HUDPanel);
+class(HUDPanel) .string panel_name;
+class(HUDPanel) .int panel_id;
+class(HUDPanel) .vector current_panel_pos;
+class(HUDPanel) .vector current_panel_size;
+class(HUDPanel) .string current_panel_bg;
+class(HUDPanel) .float current_panel_bg_alpha;
+class(HUDPanel) .float current_panel_bg_border;
+class(HUDPanel) .vector current_panel_bg_color;
+class(HUDPanel) .float current_panel_bg_color_team;
+class(HUDPanel) .float current_panel_bg_padding;
+class(HUDPanel) .float current_panel_fg_alpha;
+class(HUDPanel) .float update_time;
 float panel_enabled;
 vector panel_pos;
 vector panel_size;
@@ -97,12 +111,31 @@ string panel_bg_border_str;
 float panel_bg_padding;
 string panel_bg_padding_str;
 
-.void() panel_draw;
+class(HUDPanel) .void() panel_draw;
 
 float current_player;
 
 float GetPlayerColorForce(int i);
 
+float stringwidth_colors(string s, vector theSize);
+int GetPlayerColor(int i);
+string GetPlayerName(int i);
+float stringwidth_nocolors(string s, vector theSize);
+void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag);
+
+
+// prev_* vars contain the health/armor at the previous FRAME
+// set to -1 when player is dead or was not playing
+int prev_health, prev_armor;
+float health_damagetime, armor_damagetime;
+int health_beforedamage, armor_beforedamage;
+// old_p_* vars keep track of previous values when smoothing value changes of the progressbar
+int old_p_health, old_p_armor;
+float old_p_healthtime, old_p_armortime;
+// prev_p_* vars contain the health/armor progressbar value at the previous FRAME
+// set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
+int prev_p_health, prev_p_armor;
+
 
 #define HUD_PANELS(HUD_PANEL)                                                                                                                                                                          \
        HUD_PANEL(WEAPONS      , HUD_Weapons      , weapons)                                                                                                                    \
index 4ddc049..3352e64 100644 (file)
@@ -1,13 +1,11 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../dpdefs/keycodes.qh"
-       #include "../common/constants.qh"
-       #include "autocvars.qh"
-       #include "hud.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "hud_config.qh"
+#include "_all.qh"
+
+#include "hud.qh"
+
+#include "../common/constants.qh"
+
+#include "../dpdefs/keycodes.qh"
 
 
 #define HUD_Write(s) fputs(fh, s)
diff --git a/qcsrc/client/hud_config.qh b/qcsrc/client/hud_config.qh
new file mode 100644 (file)
index 0000000..cc1d4d5
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef HUD_CONFIG_H
+#define HUD_CONFIG_H
+
+void HUD_Panel_ExportCfg(string cfgname);
+
+void HUD_Panel_Mouse();
+
+void HUD_Configure_Frame();
+
+void HUD_Configure_PostDraw();
+
+float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary);
+
+#endif
index a74c668..f5b6d54 100644 (file)
@@ -1,25 +1,25 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "../common/buffs.qh"
-       #include "../csqcmodellib/interpolate.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "laser.qh"
+#include "_all.qh"
 
+#include "hook.qh"
+
+#include "../common/buffs.qh"
+
+#include "../csqcmodellib/cl_model.qh"
+#include "../csqcmodellib/interpolate.qh"
 
 // a laser goes from origin in direction angles
 // it has color 'colormod'
 // and stops when something is in the way
-.int cnt; // end effect
-.vector colormod;
-.int state; // on-off
-.int count; // flags for the laser
-.vector velocity;
-.float alpha;
-.float scale; // scaling factor of the thickness
-.float modelscale; // scaling factor of the dlight
+entityclass(Laser);
+class(Laser) .int cnt; // end effect
+class(Laser) .vector colormod;
+class(Laser) .int state; // on-off
+class(Laser) .int count; // flags for the laser
+class(Laser) .vector velocity;
+class(Laser) .float alpha;
+class(Laser) .float scale; // scaling factor of the thickness
+class(Laser) .float modelscale; // scaling factor of the dlight
 
 void Draw_Laser()
 {
diff --git a/qcsrc/client/laser.qh b/qcsrc/client/laser.qh
new file mode 100644 (file)
index 0000000..86210ee
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef LASER_H
+#define LASER_H
+
+void Ent_Laser();
+
+#endif
index 36ec4f7..5343c18 100644 (file)
@@ -1,21 +1,48 @@
+#include "main.qh"
+#include "_all.qh"
+
+#include "casings.qh"
+#include "csqcmodel_hooks.qh"
+#include "damage.qh"
+#include "effects.qh"
+#include "gibs.qh"
+#include "hook.qh"
+#include "hud.qh"
+#include "hud_config.qh"
+#include "laser.qh"
 #include "mapvoting.qh"
 #include "modeleffects.qh"
 #include "particles.qh"
+#include "prandom.qh"
 #include "scoreboard.qh"
 #include "shownames.qh"
+#include "sortlist.qh"
 #include "target_music.qh"
 #include "tturrets.qh"
 #include "tuba.qh"
+#include "t_items.qh"
 #include "wall.qh"
 #include "waypointsprites.qh"
 
+#include "vehicles/bumblebee.qh"
 #include "vehicles/vehicles.qh"
 
-#include "../server/vehicles/bumblebee.qh"
+#include "weapons/projectile.qh"
 
+#include "../common/buffs.qh"
+#include "../common/deathtypes.qh"
+#include "../common/mapinfo.qh"
+#include "../common/monsters/monsters.qh"
+#include "../common/nades.qh"
 #include "../common/net_notice.qh"
+#include "../common/notifications.qh"
+#include "../common/stats.qh"
+#include "../common/teams.qh"
 
-#include "../common/monsters/monsters.qh"
+#include "../common/weapons/weapons.qh"
+
+#include "../csqcmodellib/cl_model.qh"
+#include "../csqcmodellib/interpolate.qh"
 
 #include "../warpzonelib/client.qh"
 
index b8823e6..0bc85a4 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MAIN_H
 #define MAIN_H
 
+#include "../common/constants.qh"
+
 // --------------------------------------------------------------------------
 // MENU Functionality
 
@@ -106,6 +108,8 @@ float current_viewzoom;
 float zoomin_effect;
 float warmup_stage;
 
+void Fog_Force();
+
 string getcommandkey(string text, string command);
 
 string vote_called_vote;
index 28b81fc..665f1b8 100644 (file)
@@ -1,6 +1,14 @@
 #include "mapvoting.qh"
+#include "_all.qh"
+
+#include "hud.qh"
 #include "scoreboard.qh"
 
+#include "../common/mapinfo.qh"
+#include "../common/util.qh"
+
+#include "../dpdefs/keycodes.qh"
+
 string MapVote_FormatMapItem(int id, string map, float _count, float maxwidth, vector fontsize)
 {
        string pre, post;
index 8a4133e..cb7b4c6 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MAPVOTING_H
 #define MAPVOTING_H
 
+#include "../common/constants.qh"
+
 int mv_num_maps;
 
 float mv_active;
index d74a24a..f9e9705 100644 (file)
@@ -1,9 +1,19 @@
 #include "miscfunctions.qh"
+#include "_all.qh"
 
-#include "../common/urllib.qh"
+#include "hud.qh"
+#include "sortlist.qh"
 
 #include "../common/command/generic.qh"
 
+#include "../common/teams.qh"
+#include "../common/urllib.qh"
+#include "../common/util.qh"
+
+#include "../csqcmodellib/cl_model.qh"
+
+#include "../warpzonelib/mathlib.qh"
+
 void AuditLists()
 {
        entity e;
index c376085..c44fbe4 100644 (file)
@@ -1,4 +1,9 @@
 #include "modeleffects.qh"
+#include "_all.qh"
+
+.float cnt;
+.float scale;
+.float alpha;
 
 void ModelEffect_Draw()
 {
index f40cfef..22998f0 100644 (file)
@@ -1,10 +1,11 @@
 #ifndef MODELEFFECTS_H
 #define MODELEFFECTS_H
 
-.float frame1time;
-.float lifetime, fadetime;
-.float teleport_time;
-.float scale1, scale2;
+entityclass(ModelEffect);
+class(ModelEffect) .float frame1time;
+class(ModelEffect) .float lifetime, fadetime;
+class(ModelEffect) .float teleport_time;
+class(ModelEffect) .float scale1, scale2;
 
 void ModelEffect_Draw();
 
diff --git a/qcsrc/client/movelib.qc b/qcsrc/client/movelib.qc
new file mode 100644 (file)
index 0000000..074f146
--- /dev/null
@@ -0,0 +1 @@
+#include "../server/movelib.qc"
diff --git a/qcsrc/client/movelib.qh b/qcsrc/client/movelib.qh
new file mode 100644 (file)
index 0000000..a0634f6
--- /dev/null
@@ -0,0 +1 @@
+#include "../server/movelib.qh"
index 2f62ae6..beb6230 100644 (file)
@@ -1,14 +1,12 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/stats.qh"
-       #include "../common/util.qh"
-       #include "movetypes.qh"
-       #include "../csqcmodellib/common.qh"
-       #include "../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "movetypes.qh"
+#include "_all.qh"
+
+#include "t_items.qh"
+
+#include "../common/stats.qh"
+#include "../common/util.qh"
+
+#include "../csqcmodellib/common.qh"
 
 
 const int MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = 4;
index 5635f3f..2047410 100644 (file)
@@ -1,15 +1,13 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "noise.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "noise.qh"
+#include "_all.qh"
+
+entityclass(Noise);
+class(Noise) .float noise_baccum;
+class(Noise) .float noise_paccum;
+class(Noise) .float noise_paccum2;
+class(Noise) .float noise_paccum3;
+class(Noise) .float noise_bstate;
 
-.float noise_baccum;
-.float noise_paccum;
-.float noise_paccum2;
-.float noise_paccum3;
-.float noise_bstate;
 float Noise_Brown(entity e, float dt)
 {
        e.noise_baccum += random() * sqrt(dt); // same stddev for all dt
index 6d2ddf8..e610711 100644 (file)
@@ -1,4 +1,12 @@
 #include "particles.qh"
+#include "_all.qh"
+
+#include "bgmscript.qh"
+
+#include "../common/stats.qh"
+#include "../common/util.qh"
+
+#include "../warpzonelib/common.qh"
 
 void Draw_PointParticles()
 {
@@ -8,7 +16,7 @@ void Draw_PointParticles()
        vector o;
        o = self.origin;
        sz = self.maxs - self.mins;
-       n = BGMScript(self);
+       n = doBGMScript(self);
        if(self.absolute == 2)
        {
                if(n >= 0)
index 12c999b..586f3f0 100644 (file)
@@ -3,16 +3,17 @@
 
 .int dphitcontentsmask;
 
-.int cnt; // effect number
-.vector velocity; // particle velocity
-.float waterlevel; // direction jitter
-.int count; // count multiplier
-.int impulse; // density
-.string noise; // sound
-.float atten;
-.float volume;
-.float absolute; // 1 = count per second is absolute, 2 = only spawn at toggle
-.vector movedir; // trace direction
+entityclass(PointParticles);
+class(PointParticles) .int cnt; // effect number
+class(PointParticles) .vector velocity; // particle velocity
+class(PointParticles) .float waterlevel; // direction jitter
+class(PointParticles) .int count; // count multiplier
+class(PointParticles) .int impulse; // density
+class(PointParticles) .string noise; // sound
+class(PointParticles) .float atten;
+class(PointParticles) .float volume;
+class(PointParticles) .float absolute; // 1 = count per second is absolute, 2 = only spawn at toggle
+class(PointParticles) .vector movedir; // trace direction
 
 void Draw_PointParticles();
 
@@ -20,7 +21,7 @@ void Ent_PointParticles_Remove();
 
 void Ent_PointParticles();
 
-.float glow_color; // palette index
+class(PointParticles) .float glow_color; // palette index
 
 void Draw_Rain();
 
index 0a9ac8c..9df8372 100644 (file)
@@ -1,14 +1,16 @@
 #include "player_skeleton.qh"
 
+#include "../common/csqcmodel_settings.qh"
+
 #include "../warpzonelib/anglestransform.qh"
 
-.float skeleton_info_modelindex;
-.float skeleton_info_skin;
+class(Skeleton) .float skeleton_info_modelindex;
+class(Skeleton) .float skeleton_info_skin;
 const int BONETYPE_LOWER = 0;
 const int BONETYPE_UPPER = 1;
 const int MAX_BONES = 128;
-.float skeleton_bonetype[MAX_BONES];
-.float skeleton_numbones;
+class(Skeleton) .float skeleton_bonetype[MAX_BONES];
+class(Skeleton) .float skeleton_numbones;
 
 void skeleton_loadinfo(entity e)
 {
index 6c95ce2..4a37df5 100644 (file)
@@ -1,13 +1,16 @@
 #ifndef PLAYER_SKELETON
 #define PLAYER_SKELETON
 
+#include "../common/util.qh"
+
 void free_skeleton_from_frames(entity e);
 void skeleton_from_frames(entity e, float is_dead);
 void skeleton_loadinfo(entity e);
 
-.float bone_upperbody;
-.int bone_weapon;
-.float bone_aim[MAX_AIM_BONES];
-.float bone_aimweight[MAX_AIM_BONES];
-.float fixbone;
+entityclass(Skeleton);
+class(Skeleton) .float bone_upperbody;
+class(Skeleton) .int bone_weapon;
+class(Skeleton) .float bone_aim[MAX_AIM_BONES];
+class(Skeleton) .float bone_aimweight[MAX_AIM_BONES];
+class(Skeleton) .float fixbone;
 #endif
index 935f142..12e4e0e 100644 (file)
@@ -1,10 +1,7 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "../warpzonelib/mathlib.qh"
-       #include "prandom.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "prandom.qh"
+#include "_all.qh"
+
+#include "../warpzonelib/mathlib.qh"
 
 // prandom - PREDICTABLE random number generator (not seeded yet)
 
index f80da18..36d159c 100644 (file)
@@ -11,13 +11,14 @@ damage.qc
 effects.qc
 gibs.qc
 hook.qc
-hud_config.qc
 hud.qc
+hud_config.qc
 laser.qc
 main.qc
 mapvoting.qc
 miscfunctions.qc
 modeleffects.qc
+movelib.qc
 movetypes.qc
 noise.qc
 particles.qc
@@ -31,12 +32,15 @@ target_music.qc
 teamradar.qc
 tturrets.qc
 tuba.qc
-vehicles/vehicles.qc
+t_items.qc
 view.qc
 wall.qc
 waypointsprites.qc
 
-command/cl_cmd.qc
+command/commands.qc
+
+vehicles/bumblebee.qc
+vehicles/vehicles.qc
 
 weapons/projectile.qc // TODO
 
@@ -51,10 +55,6 @@ weapons/projectile.qc // TODO
 ../common/urllib.qc
 ../common/util.qc
 
-../common/command/generic.qc
-../common/command/markup.qc
-../common/command/rpn.qc
-
 ../common/monsters/monsters.qc
 
 ../common/weapons/weapons.qc // TODO
@@ -63,10 +63,6 @@ weapons/projectile.qc // TODO
 ../csqcmodellib/cl_player.qc
 ../csqcmodellib/interpolate.qc
 
-../server/movelib.qc
-../server/t_items.qc
-../server/vehicles/bumblebee.qc
-
 ../warpzonelib/anglestransform.qc
 ../warpzonelib/client.qc
 ../warpzonelib/common.qc
index c09dd18..4e32c0c 100644 (file)
@@ -1,8 +1,4 @@
-#if defined(CSQC)
-       #include "rubble.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "rubble.qh"
 
 // LordHavoc: rewrote this file, it was really bad code
 
index 5ff1b55..b19406c 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef RUBBLE_H
 #define RUBBLE_H
-.float creationtime;
+entityclass(Rubble);
+class(Rubble) .float creationtime;
 void RubbleLimit(string cname, float limit, void() deleteproc);
 entity RubbleNew(string cname);
 #endif
index c6d8718..905c66c 100644 (file)
@@ -1,4 +1,15 @@
 #include "scoreboard.qh"
+#include "_all.qh"
+
+#include "hud.qh"
+#include "sortlist.qh"
+
+#include "../common/constants.qh"
+#include "../common/counting.qh"
+#include "../common/mapinfo.qh"
+#include "../common/stats.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
 
 float scoreboard_alpha_bg;
 float scoreboard_alpha_fg;
index c0326eb..e1c5add 100644 (file)
@@ -7,6 +7,7 @@ float scoreboard_active;
 float scoreboard_fade_alpha;
 
 void Cmd_HUD_SetFields(float argc);
+void HUD_DrawScoreboard();
 void HUD_InitScores();
 void HUD_UpdatePlayerPos(entity pl);
 void HUD_UpdateTeamPos(entity Team);
index c6edf50..fc46495 100644 (file)
@@ -1,18 +1,14 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../common/teams.qh"
-       #include "../common/util.qh"
-       #include "../common/mapinfo.qh"
-       #include "autocvars.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_model.qh"
-       #include "shownames.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "shownames.qh"
+#include "_all.qh"
 
+#include "hud.qh"
+
+#include "../common/constants.qh"
+#include "../common/mapinfo.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
+
+#include "../csqcmodellib/cl_model.qh"
 
 // self.isactive = player is in range and coordinates/status (health and armor) are up to date
 // self.origin = player origin TODO: should maybe move this so it's the origin of the shownames tag already in SSQC for culling?
index f196f8f..63fd92e 100644 (file)
@@ -1,9 +1,13 @@
 #ifndef SHOWNAMES_H
 #define SHOWNAMES_H
 
-.float healthvalue;
-.float armorvalue;
-.float sameteam;
-.float fadedelay;
-.float pointtime;
+entityclass(ShowNames);
+class(ShowNames) .float healthvalue;
+class(ShowNames) .float armorvalue;
+class(ShowNames) .float sameteam;
+class(ShowNames) .float fadedelay;
+class(ShowNames) .float pointtime;
+
+void Draw_ShowNames_All();
+
 #endif
index 1b84287..2983148 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef SORTLIST_H
 #define SORTLIST_H
 
+entityclass(Sort);
 //.float(entity,entity) sort_cmp;
-.entity sort_next, sort_prev;
+class(Sort) .entity sort_next, sort_prev;
 
 entity Sort_Spawn();
 
diff --git a/qcsrc/client/t_items.qc b/qcsrc/client/t_items.qc
new file mode 100644 (file)
index 0000000..f9ebb97
--- /dev/null
@@ -0,0 +1,10 @@
+#include "_all.qh"
+
+#include "movetypes.qh"
+#include "../common/buffs.qh"
+#include "../common/util.qh"
+#include "../common/weapons/weapons.qh"
+#include "../csqcmodellib/cl_model.qh"
+#include "../csqcmodellib/common.qh"
+
+#include "../server/t_items.qc"
diff --git a/qcsrc/client/t_items.qh b/qcsrc/client/t_items.qh
new file mode 100644 (file)
index 0000000..eb01624
--- /dev/null
@@ -0,0 +1 @@
+#include "../server/t_items.qh"
index 662a673..7711c25 100644 (file)
@@ -1,4 +1,18 @@
 #include "target_music.qh"
+#include "_all.qh"
+
+#include "../common/constants.qh"
+#include "../common/util.qh"
+
+#include "../warpzonelib/common.qh"
+
+.string noise;
+.float cnt;
+.float count;
+.float fade_time;
+.float fade_rate;
+.float lifetime;
+.float volume;
 
 void TargetMusic_Advance()
 {
index c685214..182e1f4 100644 (file)
@@ -7,8 +7,9 @@ entity music_target;
 entity music_trigger;
 // FIXME also control bgmvolume here, to not require a target_music for the default track.
 
-.int state;
-.float lastvol;
+entityclass(TargetMusic);
+class(TargetMusic) .int state;
+class(TargetMusic) .float lastvol;
 
 void TargetMusic_Advance();
 
index 1822acb..aa7923b 100644 (file)
@@ -1,8 +1,11 @@
-#if defined(CSQC)
-       #include "teamradar.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "teamradar.qh"
+#include "_all.qh"
+
+#include "hud.qh"
+
+#include "../common/util.qh"
+
+#include "../csqcmodellib/interpolate.qh"
 
 float vlen2d(vector v)
 {
index 31defc8..f7c186a 100644 (file)
@@ -3,11 +3,12 @@
 
 const int MAX_TEAMRADAR_TIMES = 32;
 
+entityclass(TeamRadar);
 // to make entities have dots on the team radar
-.float teamradar_icon;
-.float teamradar_times[MAX_TEAMRADAR_TIMES];
-.int teamradar_time_index;
-.vector teamradar_color;
+class(TeamRadar) .float teamradar_icon;
+class(TeamRadar) .float teamradar_times[MAX_TEAMRADAR_TIMES];
+class(TeamRadar) .int teamradar_time_index;
+class(TeamRadar) .vector teamradar_color;
 
 float teamradar_angle; // player yaw angle
 vector teamradar_origin3d_in_texcoord; // player origin
index 24506be..b74024d 100644 (file)
@@ -1,7 +1,24 @@
 #include "tturrets.qh"
+#include "_all.qh"
+
+#include "hud.qh"
+#include "movelib.qh"
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "teamradar.qh"
 #include "waypointsprites.qh"
 
-#include "../server/movelib.qh"
+#include "../common/teams.qh"
+
+#include "../server/tturrets/include/turrets_early.qh"
+
+#include "../warpzonelib/anglestransform.qh"
+#include "../warpzonelib/mathlib.qh"
+
+.vector colormod;
+.float cnt;
+.float alpha;
+.float gravity;
 
 string tid2info_base;
 string tid2info_head;
@@ -162,7 +179,7 @@ void turret_remove()
     self.tur_head = world;
 }
 
-.vector glowmod;
+class(Turret) .vector glowmod;
 void turret_changeteam()
 {
        switch(self.team - 1)
index 6316d79..4cf9854 100644 (file)
@@ -1,9 +1,8 @@
 #ifndef TTURRETS_H
 #define TTURRETS_H
 
-#include "../server/tturrets/include/turrets_early.qh"
-
 void ent_turret();
 void turrets_precache();
-.entity tur_head;
+entityclass(Turret);
+class(Turret) .entity tur_head;
 #endif
index cd518e0..b9f372d 100644 (file)
@@ -1,4 +1,10 @@
 #include "tuba.qh"
+#include "_all.qh"
+
+#include "../common/constants.qh"
+#include "../common/util.qh"
+
+#include "../warpzonelib/mathlib.qh"
 
 #define TUBA_STARTNOTE(i, n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
 
@@ -6,11 +12,11 @@ const int TUBA_MIN = -18;
 const int TUBA_MAX = 27;
 const int TUBA_INSTRUMENTS = 3;
 
-.int note;
-.bool tuba_attenuate;
-.float tuba_volume;
-.float tuba_volume_initial;
-.int tuba_instrument;
+class(Tuba) .int note;
+class(Tuba) .bool tuba_attenuate;
+class(Tuba) .float tuba_volume;
+class(Tuba) .float tuba_volume_initial;
+class(Tuba) .int tuba_instrument;
 
 int Tuba_PitchStep;
 
index bdc1386..6fe103f 100644 (file)
@@ -2,4 +2,7 @@
 #define TUBA_H
 void Ent_TubaNote(bool isNew);
 void Tuba_Precache();
+
+entityclass(Tuba);
+
 #endif
diff --git a/qcsrc/client/vehicles/bumblebee.qc b/qcsrc/client/vehicles/bumblebee.qc
new file mode 100644 (file)
index 0000000..8430668
--- /dev/null
@@ -0,0 +1,11 @@
+#include "../damage.qh"
+#include "../defs.qh"
+#include "../gibs.qh"
+#include "../hook.qh"
+#include "../main.qh"
+#include "../movetypes.qh"
+#include "../wall.qh"
+
+#include "../weapons/projectile.qh"
+
+#include "../../server/vehicles/bumblebee.qc"
diff --git a/qcsrc/client/vehicles/bumblebee.qh b/qcsrc/client/vehicles/bumblebee.qh
new file mode 100644 (file)
index 0000000..411eb36
--- /dev/null
@@ -0,0 +1 @@
+#include "../../server/vehicles/bumblebee.qh"
index 290385e..1582ecf 100644 (file)
@@ -1,20 +1,20 @@
-#if defined(CSQC)
-    #include "../../dpdefs/csprogsdefs.qh"
-    #include "../defs.qh"
-    #include "../../common/constants.qh"
-    #include "../../common/stats.qh"
-    #include "../../common/util.qh"
-    #include "../../common/buffs.qh"
-    #include "../autocvars.qh"
-    #include "../movetypes.qh"
-    #include "../prandom.qh"
-    #include "../main.qh"
-    #include "vehicles.qh"
-    #include "../../csqcmodellib/cl_model.qh"
-    #include "../../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "vehicles.qh"
+#include "../_all.qh"
+
+#include "../movetypes.qh"
+#include "../movetypes.qh"
+#include "../prandom.qh"
+#include "../scoreboard.qh"
+#include "../t_items.qh"
+
+#include "../../common/buffs.qh"
+#include "../../common/constants.qh"
+#include "../../common/stats.qh"
+#include "../../common/util.qh"
+
+#include "../../csqcmodellib/cl_model.qh"
+
+.float cnt;
 
 const string hud_bg = "gfx/vehicles/frame.tga";
 const string hud_sh = "gfx/vehicles/vh-shield.tga";
@@ -51,19 +51,16 @@ const string raptor_bomb = "gfx/vehicles/raptor_bombs.tga";
 const string raptor_drop = "gfx/vehicles/axh-dropcross.tga";
 string raptor_xhair;
 
-void CSQC_WAKIZASHI_HUD();
-void CSQC_SPIDER_HUD();
-void CSQC_RAPTOR_HUD();
-void CSQC_BUMBLE_HUD();
-void CSQC_BUMBLE_GUN_HUD();
+
 
 const int MAX_AXH = 4;
-entity AuxiliaryXhair[MAX_AXH];
+entity AuxiliaryXhairs[MAX_AXH];
 
-.string axh_image;
-.float  axh_fadetime;
-.float  axh_drawflag;
-.float  axh_scale;
+entityclass(AuxiliaryXhair);
+class(AuxiliaryXhair) .string axh_image;
+class(AuxiliaryXhair) .float  axh_fadetime;
+class(AuxiliaryXhair) .float  axh_drawflag;
+class(AuxiliaryXhair) .float  axh_scale;
 
 const string bumb_ico =  "gfx/vehicles/bumb.tga";
 const string bumb_lgun =  "gfx/vehicles/bumb_lgun.tga";
@@ -107,7 +104,7 @@ void AuxiliaryXhair_Draw2D()
 void Net_AuXair2(bool bIsNew)
 {
     int axh_id = bound(0, ReadByte(), MAX_AXH);
-    entity axh                 = AuxiliaryXhair[axh_id];
+    entity axh                 = AuxiliaryXhairs[axh_id];
 
     if(axh == world || wasfreed(axh))  // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
     {
@@ -119,7 +116,7 @@ void Net_AuXair2(bool bIsNew)
                axh.axh_image           = "gfx/vehicles/axh-ring.tga";
                axh.axh_scale           = 1;
         axh.alpha                      = 1;
-               AuxiliaryXhair[axh_id] = axh;
+               AuxiliaryXhairs[axh_id] = axh;
     }
 
        axh.move_origin_x = ReadCoord();
@@ -157,7 +154,7 @@ void Net_VehicleSetup()
     int i;
     for(i = 0; i < MAX_AXH; ++i)
     {
-        entity axh = AuxiliaryXhair[i];
+        entity axh = AuxiliaryXhairs[i];
         if(axh != world && !wasfreed(axh))  // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
             remove(axh);
 
@@ -169,59 +166,59 @@ void Net_VehicleSetup()
                axh.axh_image           = "gfx/vehicles/axh-ring.tga";
                axh.axh_scale           = 1;
         axh.alpha                      = 1;
-               AuxiliaryXhair[i]       = axh;
+               AuxiliaryXhairs[i]      = axh;
     }
 
     switch(hud_id)
     {
         case HUD_SPIDERBOT:
             // Minigun1
-            AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-ring.tga";
-            AuxiliaryXhair[0].axh_scale   = 0.25;
+            AuxiliaryXhairs[0].axh_image   = "gfx/vehicles/axh-ring.tga";
+            AuxiliaryXhairs[0].axh_scale   = 0.25;
             // Minigun2
-            AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-ring.tga";
-            AuxiliaryXhair[1].axh_scale   = 0.25;
+            AuxiliaryXhairs[1].axh_image   = "gfx/vehicles/axh-ring.tga";
+            AuxiliaryXhairs[1].axh_scale   = 0.25;
             // Rocket
-            AuxiliaryXhair[2].axh_image   = "gfx/vehicles/axh-special1.tga";
-            AuxiliaryXhair[2].axh_scale   = 0.5;
+            AuxiliaryXhairs[2].axh_image   = "gfx/vehicles/axh-special1.tga";
+            AuxiliaryXhairs[2].axh_scale   = 0.5;
             break;
 
         case HUD_WAKIZASHI:
-            AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
-            AuxiliaryXhair[0].axh_scale   = 0.25;
+            AuxiliaryXhairs[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
+            AuxiliaryXhairs[0].axh_scale   = 0.25;
             break;
 
         case HUD_RAPTOR:
-            AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-special2.tga";
-            AuxiliaryXhair[0].axh_scale   = 0.5;
+            AuxiliaryXhairs[0].axh_image   = "gfx/vehicles/axh-special2.tga";
+            AuxiliaryXhairs[0].axh_scale   = 0.5;
             //AuxiliaryXhair[0].alpha       = 0.5;
 
-            AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-bracket.tga";
-            AuxiliaryXhair[1].axh_scale   = 0.25;
+            AuxiliaryXhairs[1].axh_image   = "gfx/vehicles/axh-bracket.tga";
+            AuxiliaryXhairs[1].axh_scale   = 0.25;
             //AuxiliaryXhair[1].alpha       = 0.75;
             //AuxiliaryXhair[1].axh_drawflag  = DRAWFLAG_NORMAL;
             break;
 
         case HUD_BUMBLEBEE:
             // Raygun-locked
-            AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
-            AuxiliaryXhair[0].axh_scale   = 0.5;
+            AuxiliaryXhairs[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
+            AuxiliaryXhairs[0].axh_scale   = 0.5;
 
             // Gunner1
-            AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-target.tga";
-            AuxiliaryXhair[1].axh_scale   = 0.75;
+            AuxiliaryXhairs[1].axh_image   = "gfx/vehicles/axh-target.tga";
+            AuxiliaryXhairs[1].axh_scale   = 0.75;
 
             // Gunner2
-            AuxiliaryXhair[2].axh_image   = "gfx/vehicles/axh-target.tga";
-            AuxiliaryXhair[2].axh_scale   = 0.75;
+            AuxiliaryXhairs[2].axh_image   = "gfx/vehicles/axh-target.tga";
+            AuxiliaryXhairs[2].axh_scale   = 0.75;
             break;
         case HUD_BUMBLEBEE_GUN:
             // Plasma cannons
-            AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
-            AuxiliaryXhair[0].axh_scale   = 0.25;
+            AuxiliaryXhairs[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
+            AuxiliaryXhairs[0].axh_scale   = 0.25;
             // Raygun
-            AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-bracket.tga";
-            AuxiliaryXhair[1].axh_scale   = 0.25;
+            AuxiliaryXhairs[1].axh_image   = "gfx/vehicles/axh-bracket.tga";
+            AuxiliaryXhairs[1].axh_scale   = 0.25;
             break;
     }
 }
@@ -341,7 +338,7 @@ void CSQC_BUMBLE_HUD()
     drawresetcliparea();
 
 // Right gunner slot occupied?
-       if(!AuxiliaryXhair[1].draw2d)
+       if(!AuxiliaryXhairs[1].draw2d)
        {
                shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No right gunner!"), false, '1 0 0' * picsize.y + '0 1 0' * picsize.y));
                drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL);
@@ -363,7 +360,7 @@ void CSQC_BUMBLE_HUD()
     drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
     drawresetcliparea();
 // Left gunner slot occupied?
-       if(!AuxiliaryXhair[2].draw2d)
+       if(!AuxiliaryXhairs[2].draw2d)
        {
                shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No left gunner!"), false, '1 0 0' * picsize.y + '0 1 0' * picsize.y));
                drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL);
index 7e509e9..e8d3ddb 100644 (file)
@@ -6,4 +6,11 @@ void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang);
 void Vehicles_Precache();
 void Net_AuXair2(bool bIsNew);
 void Net_VehicleSetup();
+
+void CSQC_WAKIZASHI_HUD();
+void CSQC_SPIDER_HUD();
+void CSQC_RAPTOR_HUD();
+void CSQC_BUMBLE_HUD();
+void CSQC_BUMBLE_GUN_HUD();
+
 #endif
index 26e7093..3ffb406 100644 (file)
@@ -1,25 +1,31 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/constants.qh"
-       #include "../common/stats.qh"
-       #include "../warpzonelib/mathlib.qh"
-       #include "../warpzonelib/common.qh"
-       #include "../warpzonelib/client.qh"
-       #include "../common/teams.qh"
-       #include "../common/util.qh"
-       #include "../common/nades.qh"
-       #include "../common/weapons/weapons.qh"
-       #include "../common/mapinfo.qh"
-       #include "autocvars.qh"
-       #include "hud.qh"
-       #include "scoreboard.qh"
-       #include "noise.qh"
-       #include "main.qh"
-       #include "../csqcmodellib/cl_player.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "_all.qh"
+
+#include "announcer.qh"
+#include "hook.qh"
+#include "hud.qh"
+#include "hud_config.qh"
+#include "mapvoting.qh"
+#include "noise.qh"
+#include "scoreboard.qh"
+#include "shownames.qh"
+#include "target_music.qh"
+#include "vehicles/vehicles.qh"
+#include "waypointsprites.qh"
+
+#include "../common/constants.qh"
+#include "../common/mapinfo.qh"
+#include "../common/nades.qh"
+#include "../common/stats.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
+
+#include "../common/weapons/weapons.qh"
+
+#include "../csqcmodellib/cl_player.qh"
+
+#include "../warpzonelib/client.qh"
+#include "../warpzonelib/common.qh"
+#include "../warpzonelib/mathlib.qh"
 
 entity porto;
 vector polyline[16];
index 1ae8fa8..f591268 100644 (file)
@@ -1,4 +1,15 @@
 #include "wall.qh"
+#include "_all.qh"
+
+#include "bgmscript.qh"
+
+#include "../common/util.qh"
+
+#include "../csqcmodellib/interpolate.qh"
+
+.float alpha;
+.float scale;
+.vector movedir;
 
 void Ent_Wall_Draw()
 {
@@ -9,7 +20,7 @@ void Ent_Wall_Draw()
                fld = angles;
        else
                fld = origin;
-       self.fld = self.saved;
+       self.(fld) = self.saved;
 
        if(self.lodmodelindex1)
        {
@@ -38,16 +49,16 @@ void Ent_Wall_Draw()
 
        InterpolateOrigin_Do();
 
-       self.saved = self.fld;
+       self.saved = self.(fld);
 
-       f = BGMScript(self);
+       f = doBGMScript(self);
        if(f >= 0)
        {
                if(self.lip < 0) // < 0: alpha goes from 1 to 1-|lip| when toggled (toggling subtracts lip)
                        self.alpha = 1 + self.lip * f;
                else // > 0: alpha goes from 1-|lip| to 1 when toggled (toggling adds lip)
                        self.alpha = 1 - self.lip * (1 - f);
-               self.fld = self.fld + self.movedir * f;
+               self.(fld) = self.(fld) + self.movedir * f;
        }
        else
                self.alpha = 1;
@@ -77,7 +88,7 @@ void Ent_Wall()
                fld = angles;
        else
                fld = origin;
-       self.fld = self.saved;
+       self.(fld) = self.saved;
 
        f = ReadByte();
 
@@ -169,7 +180,7 @@ void Ent_Wall()
 
        InterpolateOrigin_Note();
 
-       self.saved = self.fld;
+       self.saved = self.(fld);
 
        self.entremove = Ent_Wall_Remove;
        self.draw = Ent_Wall_Draw;
index 984b54c..57aef7e 100644 (file)
@@ -1,11 +1,12 @@
 #ifndef WALL_H
 #define WALL_H
 
-.float lip;
-.float bgmscriptangular;
-.int lodmodelindex0, lodmodelindex1, lodmodelindex2;
-.float loddistance1, loddistance2;
-.vector saved;
+entityclass(Wall);
+class(Wall) .float lip;
+class(Wall) .float bgmscriptangular;
+class(Wall) .int lodmodelindex0, lodmodelindex1, lodmodelindex2;
+class(Wall) .float loddistance1, loddistance2;
+class(Wall) .vector saved;
 
 void Ent_Wall_Draw();
 
index 788dd87..dc38219 100644 (file)
@@ -1,4 +1,20 @@
 #include "waypointsprites.qh"
+#include "_all.qh"
+
+#include "hud.qh"
+#include "teamradar.qh"
+
+#include "../common/buffs.qh"
+#include "../common/constants.qh"
+#include "../common/teams.qh"
+
+#include "../common/weapons/weapons.qh"
+
+#include "../csqcmodellib/interpolate.qh"
+
+#include "../warpzonelib/mathlib.qh"
+
+.float alpha;
 
 void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, vector rgb, float a, float f)
 {
index 3822793..adea76c 100644 (file)
@@ -26,21 +26,22 @@ float waypointsprite_distancefadescale;
 float waypointsprite_distancefadedistance;
 float waypointsprite_alpha;
 
-.float helpme;
-.float rule;
-.string netname; // primary picture
-.string netname2; // secondary picture
-.string netname3; // tertiary picture
-.float team; // team that gets netname2
-.float lifetime;
-.float fadetime;
-.float maxdistance;
-.int hideflags;
-.float spawntime;
-.float health;
-.float build_started;
-.float build_starthealth;
-.float build_finished;
+entityclass(WaypointSprite);
+class(WaypointSprite) .float helpme;
+class(WaypointSprite) .float rule;
+class(WaypointSprite) .string netname; // primary picture
+class(WaypointSprite) .string netname2; // secondary picture
+class(WaypointSprite) .string netname3; // tertiary picture
+class(WaypointSprite) .int team; // team that gets netname2
+class(WaypointSprite) .float lifetime;
+class(WaypointSprite) .float fadetime;
+class(WaypointSprite) .float maxdistance;
+class(WaypointSprite) .int hideflags;
+class(WaypointSprite) .float spawntime;
+class(WaypointSprite) .float health;
+class(WaypointSprite) .float build_started;
+class(WaypointSprite) .float build_starthealth;
+class(WaypointSprite) .float build_finished;
 
 const float SPRITE_HEALTHBAR_WIDTH = 144;
 const float SPRITE_HEALTHBAR_HEIGHT = 9;
index 1d306fe..cd4f9b7 100644 (file)
@@ -1,5 +1,22 @@
 #include "projectile.qh"
 
+#include "../autocvars.qh"
+#include "../defs.qh"
+#include "../main.qh"
+#include "../movetypes.qh"
+
+#include "../../common/constants.qh"
+#include "../../common/nades.qh"
+#include "../../common/util.qh"
+
+#include "../../csqcmodellib/interpolate.qh"
+
+#include "../../warpzonelib/anglestransform.qh"
+
+.float alpha;
+.float scale;
+.vector colormod;
+
 void SUB_Stop()
 {
        self.move_velocity = self.move_avelocity = '0 0 0';
index 3a4cdcb..67e08c2 100644 (file)
@@ -1,20 +1,21 @@
 #ifndef PROJECTILE_H
 #define PROJECTILE_H
 
-.int traileffect;
-
-.vector iorigin1, iorigin2;
-.float spawntime;
-.vector trail_oldorigin;
-.float trail_oldtime;
-.float fade_time, fade_rate;
-
-.float alphamod;
-.int count; // set if clientside projectile
-.int cnt; // sound index
-.float gravity;
-.int snd_looping;
-.bool silent;
+entityclass(Projectile);
+class(Projectile) .int traileffect;
+
+class(Projectile) .vector iorigin1, iorigin2;
+class(Projectile) .float spawntime;
+class(Projectile) .vector trail_oldorigin;
+class(Projectile) .float trail_oldtime;
+class(Projectile) .float fade_time, fade_rate;
+
+class(Projectile) .float alphamod;
+class(Projectile) .int count; // set if clientside projectile
+class(Projectile) .int cnt; // sound index
+class(Projectile) .float gravity;
+class(Projectile) .int snd_looping;
+class(Projectile) .bool silent;
 
 void SUB_Stop();
 
index ecc840f..0cba5d7 100644 (file)
@@ -295,10 +295,10 @@ void animdecide_setframes(entity e, float support_blending, .float fld_frame, .f
                        upper = lower;
                if(e.frame1time != upper.y || e.frame2time != lower.y)
                        BITXOR_ASSIGN(e.effects, EF_RESTARTANIM_BIT);
-               e.fld_frame = upper.x;
-               e.fld_frame1time = upper.y;
-               e.fld_frame2 = lower.x;
-               e.fld_frame2time = lower.y;
+               e.(fld_frame) = upper.x;
+               e.(fld_frame1time) = upper.y;
+               e.(fld_frame2) = lower.x;
+               e.(fld_frame2time) = lower.y;
        }
        else
        {
@@ -308,8 +308,8 @@ void animdecide_setframes(entity e, float support_blending, .float fld_frame, .f
                        upper = lower;
                if(e.frame1time != upper.y)
                        BITXOR_ASSIGN(e.effects, EF_RESTARTANIM_BIT);
-               e.fld_frame = upper.x;
-               e.fld_frame1time = upper.y;
+               e.(fld_frame) = upper.x;
+               e.(fld_frame1time) = upper.y;
        }
 }
 
index a629de6..f343732 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef BUFFS_H
 #define BUFFS_H
 
+#include "teams.qh"
+#include "util.qh"
+
 entity Buff_Type_first;
 entity Buff_Type_last;
 .entity enemy; // internal next pointer
diff --git a/qcsrc/common/command/command.qh b/qcsrc/common/command/command.qh
new file mode 100644 (file)
index 0000000..fa310fd
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef COMMAND_H
+#define COMMAND_H
+
+// =========================================================
+//  Shared declarations for all commands, written by Samual
+//  Last updated: December 13th, 2011
+// =========================================================
+
+// identifiers for subfunction requests by the command code structure
+const int CMD_REQUEST_COMMAND = 1;
+const int CMD_REQUEST_USAGE = 2;
+#endif
diff --git a/qcsrc/common/command/commands.qc b/qcsrc/common/command/commands.qc
new file mode 100644 (file)
index 0000000..dc1c044
--- /dev/null
@@ -0,0 +1,3 @@
+#include "generic.qc"
+#include "markup.qc"
+#include "rpn.qc"
diff --git a/qcsrc/common/command/commands.qh b/qcsrc/common/command/commands.qh
new file mode 100644 (file)
index 0000000..d434a86
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef COMMON_COMMANDS_H
+#define COMMON_COMMANDS_H
+
+#include "generic.qh"
+#include "markup.qh"
+#include "rpn.qh"
+
+#endif
index 7f302e0..f0b6d0d 100644 (file)
@@ -1,5 +1,28 @@
+#include "command.qh"
 #include "generic.qh"
-#include "shared_defs.qh"
+
+#include "markup.qh"
+#include "rpn.qh"
+
+#include "../mapinfo.qh"
+#include "../test.qh"
+
+#ifndef MENUQC
+       #include "../notifications.qh"
+#endif
+
+#ifdef CSQC
+       #include "../../client/command/cl_cmd.qh"
+#endif
+
+#ifdef SVQC
+       #include "../../server/command/banning.qh"
+       #include "../../server/command/cmd.qh"
+       #include "../../server/command/common.qh"
+       #include "../../server/command/sv_cmd.qh"
+
+       #include "../../common/weapons/config.qh"
+#endif
 
 // =========================================================
 //  Generic program common command code, written by Samual
index 0bb09b4..e419824 100644 (file)
@@ -1,8 +1,7 @@
-#ifndef GENERIC_H
-#define GENERIC_H
+#ifndef COMMAND_GENERIC_H
+#define COMMAND_GENERIC_H
 
-#include "markup.qh"
-#include "rpn.qh"
+#include "../constants.qh"
 
 // =========================================================
 //  Declarations for common command code, written by Samual
index 8030f9e..9f0883b 100644 (file)
@@ -1,3 +1,4 @@
+#include "command.qh"
 #include "markup.qh"
 
 // =========================================================
index e6ac7cf..bccc78d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef MARKUP_H
-#define MARKUP_H
+#ifndef COMMAND_MARKUP_H
+#define COMMAND_MARKUP_H
 
 // ==========================================================
 //  Declarations for markup command code, reworked by Samual
index bb920d6..700ceb4 100644 (file)
@@ -1,5 +1,8 @@
+#include "command.qh"
 #include "rpn.qh"
 
+#include "../../warpzonelib/mathlib.qh"
+
 // ========================================
 //  RPN command code, written by divVerent
 //  Last updated: December 28th, 2011
index a28f294..3c5a801 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef RPN_H
-#define RPN_H
+#ifndef COMMAND_RPN_H
+#define COMMAND_RPN_H
 
 // =========================================================
 //  Declarations for RPN command code, written by divVerent
diff --git a/qcsrc/common/command/shared_defs.qh b/qcsrc/common/command/shared_defs.qh
deleted file mode 100644 (file)
index 0056565..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef SHARED_DEFS_H
-#define SHARED_DEFS_H
-
-// =========================================================
-//  Shared declarations for all commands, written by Samual
-//  Last updated: December 13th, 2011
-// =========================================================
-
-// identifiers for subfunction requests by the command code structure
-const int CMD_REQUEST_COMMAND = 1;
-const int CMD_REQUEST_USAGE = 2;
-#endif
index 17c5f89..f464cdc 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef COUNTING_H
 #define COUNTING_H
 
+#include "util.qh"
+
 // ===============================================
 //  Time processing and counting functions/macros
 // ===============================================
index 54255ec..134103b 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MAPINFO_H
 #define MAPINFO_H
 
+#include "util.qh"
+
 int MAPINFO_TYPE_ALL;
 entity MapInfo_Type_first;
 entity MapInfo_Type_last;
@@ -10,7 +12,7 @@ entity MapInfo_Type_last;
 .string netname; // game type name as in cvar (with g_ prefix)
 .string mdl; // game type short name
 .string message; // human readable name
-.float team; // does this gametype support teamplay?
+.int team; // does this gametype support teamplay?
 .string model2; // game type defaults
 .string gametype_description; // game type description
 
diff --git a/qcsrc/common/monsters/all.inc b/qcsrc/common/monsters/all.inc
new file mode 100644 (file)
index 0000000..d30f298
--- /dev/null
@@ -0,0 +1,5 @@
+#include "monster/zombie.qc"
+#include "monster/spider.qc"
+#include "monster/mage.qc"
+#include "monster/wyvern.qc"
+#include "monster/shambler.qc"
diff --git a/qcsrc/common/monsters/all.qh b/qcsrc/common/monsters/all.qh
deleted file mode 100644 (file)
index c79a4e6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// TODO: include once
-//#ifndef MONSTERS_ALL_H
-//#define MONSTERS_ALL_H
-
-#include "monster/zombie.qc"
-#include "monster/spider.qc"
-#include "monster/mage.qc"
-#include "monster/wyvern.qc"
-#include "monster/shambler.qc"
-
-//#endif
index 096c2e5..72c5ea8 100644 (file)
@@ -1,6 +1,6 @@
 #include "monsters.qh"
 
-#include "all.qh"
+#include "all.inc"
 
 // MONSTER PLUGIN SYSTEM
 entity monster_info[MON_MAXCOUNT];
index 6fa9dfa..4aa1f7e 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MONSTERS_H
 #define MONSTERS_H
 
+#include "../util.qh"
+
 // monster requests
 const int MR_SETUP = 1; // (SERVER) setup monster data
 const int MR_THINK = 2; // (SERVER) logic to run every frame
@@ -64,7 +66,7 @@ int MON_LAST;
        REGISTER_MONSTER_2(MON_##id,func,monsterflags,min_s,max_s,modelname,shortname,mname)
 #endif
 
-#include "all.qh"
+#include "all.inc"
 
 #undef REGISTER_MONSTER
 ACCUMULATE_FUNCTION(RegisterMonsters, register_monsters_done);
index 24ea1b9..3ff926b 100644 (file)
@@ -15,7 +15,7 @@
     #include "../deathtypes.qh"
     #include "../../server/mutators/mutators_include.qh"
     #include "../../server/tturrets/include/turrets_early.qh"
-    #include "../../server/vehicles/vehicles_def.qh"
+    #include "../../server/vehicles/vehicle.qh"
     #include "../../server/campaign.qh"
     #include "../../server/command/common.qh"
     #include "../../server/command/cmd.qh"
@@ -275,9 +275,9 @@ float LoadMonsterSounds(string f, float first)
                field = GetMonsterSoundSampleField(argv(0));
                if(GetMonsterSoundSampleField_notFound)
                        continue;
-               if(self.field)
-                       strunzone(self.field);
-               self.field = strzone(strcat(argv(1), " ", argv(2)));
+               if (self.(field))
+                       strunzone(self.(field));
+               self.(field) = strzone(strcat(argv(1), " ", argv(2)));
        }
        fclose(fh);
        return 1;
@@ -305,7 +305,7 @@ void MonsterSound(.string samplefield, float sound_delay, float delaytoo, float
        if(delaytoo)
        if(time < self.msound_delay)
                return; // too early
-       GlobalSound(self.samplefield, chan, VOICETYPE_PLAYERSOUND);
+       GlobalSound(self.(samplefield), chan, VOICETYPE_PLAYERSOUND);
 
        self.msound_delay = time + sound_delay;
 }
index 505e2e2..2b2aa85 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef NADES_H
 #define NADES_H
 
+#include "teams.qh"
+
 .float healer_lifetime;
 .float healer_radius;
 
index 7470cb8..a406df5 100644 (file)
@@ -946,8 +946,7 @@ void Create_Notification_Entity(
 #ifdef SVQC
 void Notification_GetCvars(void)
 {
-       float i;
-       for(i = 0; i <= NOTIF_CHOICE_COUNT; ++i)
+       for(int i = 0; i <= NOTIF_CHOICE_COUNT; ++i)
        {
                GetCvars_handleFloat(
                        get_cvars_s,
@@ -1763,8 +1762,7 @@ void Net_Notification_Remove()
        ));
        #endif
 
-       float i;
-       for(i = 0; i < 4; ++i) { if(self.nent_strings[i]) { strunzone(self.nent_strings[i]); } }
+       for(int i = 0; i < 4; ++i) { if(self.nent_strings[i]) { strunzone(self.nent_strings[i]); } }
        remove(self);
 }
 
@@ -1772,12 +1770,11 @@ float Net_Write_Notification(entity client, int sf)
 {
        if(Notification_ShouldSend(self.nent_broadcast, client, self.nent_client))
        {
-               float i;
                WriteByte(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);
                WriteByte(MSG_ENTITY, self.nent_net_type);
                WriteShort(MSG_ENTITY, self.nent_net_name);
-               for(i = 0; i < self.nent_stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); }
-               for(i = 0; i < self.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[i]); }
+               for(int i = 0; i < self.nent_stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); }
+               for(int i = 0; i < self.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[i]); }
                return true;
        }
        else { return false; }
@@ -2098,10 +2095,9 @@ void Send_Notification(
                net_notif.nent_stringcount = notif.nent_stringcount;
                net_notif.nent_floatcount = notif.nent_floatcount;
 
-               float i;
-               for(i = 0; i < net_notif.nent_stringcount; ++i)
+               for(int i = 0; i < net_notif.nent_stringcount; ++i)
                        { net_notif.nent_strings[i] = strzone(...(i, string)); }
-               for(i = 0; i < net_notif.nent_floatcount; ++i)
+               for(int i = 0; i < net_notif.nent_floatcount; ++i)
                        { net_notif.nent_floats[i] = ...((net_notif.nent_stringcount + i), float); }
 
                net_notif.think = Net_Notification_Remove;
index 1cb1adf..8352661 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "constants.qh"
 #include "teams.qh"
+#include "util.qh"
 
 // ================================================
 //  Unified notification system, written by Samual
index 481713c..f888e1b 100644 (file)
@@ -5,23 +5,38 @@
 // 255 is the current limit (MAX_CL_STATS - 1), engine will need to be modified if you wish to add more stats
 
 const int MAX_CL_STATS                = 256;
-const int STAT_HEALTH                 = 0;
+// -Wdouble-declaration
+// const int STAT_HEALTH                 = 0;
 // 1 empty?
 const int STAT_WEAPON                 = 2;
-const int STAT_AMMO                   = 3;
-const int STAT_ARMOR                  = 4;
-const int STAT_WEAPONFRAME            = 5;
-const int STAT_SHELLS                 = 6;
-const int STAT_NAILS                  = 7;
-const int STAT_ROCKETS                = 8;
-const int STAT_CELLS                  = 9;
-const int STAT_ACTIVEWEAPON           = 10;
-const int STAT_TOTALSECRETS           = 11;
-const int STAT_TOTALMONSTERS          = 12;
-const int STAT_SECRETS                = 13;
-const int STAT_MONSTERS               = 14;
-const int STAT_ITEMS                  = 15;
-const int STAT_VIEWHEIGHT             = 16;
+// -Wdouble-declaration
+// const int STAT_AMMO                   = 3;
+// -Wdouble-declaration
+// const int STAT_ARMOR                  = 4;
+// -Wdouble-declaration
+// const int STAT_WEAPONFRAME            = 5;
+// -Wdouble-declaration
+// const int STAT_SHELLS                 = 6;
+// -Wdouble-declaration
+// const int STAT_NAILS                  = 7;
+// -Wdouble-declaration
+// const int STAT_ROCKETS                = 8;
+// -Wdouble-declaration
+// const int STAT_CELLS                  = 9;
+// -Wdouble-declaration
+// const int STAT_ACTIVEWEAPON           = 10;
+// -Wdouble-declaration
+// const int STAT_TOTALSECRETS           = 11;
+// -Wdouble-declaration
+// const int STAT_TOTALMONSTERS          = 12;
+// -Wdouble-declaration
+// const int STAT_SECRETS                = 13;
+// -Wdouble-declaration
+// const int STAT_MONSTERS               = 14;
+// -Wdouble-declaration
+// const int STAT_ITEMS                  = 15;
+// -Wdouble-declaration
+// const int STAT_VIEWHEIGHT             = 16;
 // 17 empty?
 // 18 empty?
 // 19 empty?
@@ -270,14 +285,19 @@ const int STAT_MOVEVARS_AIRSTOPACCELERATE             = 231;
 const int STAT_MOVEVARS_AIRSTRAFEACCELERATE           = 232;
 const int STAT_MOVEVARS_MAXAIRSTRAFESPEED             = 233;
 const int STAT_MOVEVARS_AIRCONTROL                    = 234;
-const int STAT_FRAGLIMIT                              = 235;
-const int STAT_TIMELIMIT                              = 236;
+// -Wdouble-declaration
+// const int STAT_FRAGLIMIT                              = 235;
+// -Wdouble-declaration
+// const int STAT_TIMELIMIT                              = 236;
 const int STAT_MOVEVARS_WALLFRICTION                  = 237;
 const int STAT_MOVEVARS_FRICTION                      = 238;
 const int STAT_MOVEVARS_WATERFRICTION                 = 239;
-const int STAT_MOVEVARS_TICRATE                       = 240;
-const int STAT_MOVEVARS_TIMESCALE                     = 241;
-const int STAT_MOVEVARS_GRAVITY                       = 242;
+// -Wdouble-declaration
+// const int STAT_MOVEVARS_TICRATE                       = 240;
+// -Wdouble-declaration
+// const int STAT_MOVEVARS_TIMESCALE                     = 241;
+// -Wdouble-declaration
+// const int STAT_MOVEVARS_GRAVITY                       = 242;
 const int STAT_MOVEVARS_STOPSPEED                     = 243;
 const int STAT_MOVEVARS_MAXSPEED                      = 244;
 const int STAT_MOVEVARS_SPECTATORMAXSPEED             = 245;
index f246200..a1ac7dc 100644 (file)
     const int false = 0;
 #endif
 
+#ifndef QCC_SUPPORT_ENTITYCLASS
+    #define entityclass(name) typedef entity name
+    #define class(name)
+    #define new(class) spawn()
+#else
+    #define entityclass(name) entityclass name {}
+    #define class(name) [[class(name)]]
+    #define new(class) ((class) spawn())
+#endif
+
 // Transitional aliases
 [[deprecated("use true")]] [[alias("true")]] const bool TRUE;
 [[deprecated("use false")]] [[alias("false")]] const bool FALSE;
 
+#define BIT(n) (1 << (n))
+#define BITSET(var, mask, flag) (flag ? (var) | (mask) : (var) &~ (mask))
+
 #endif
index f47bcf1..4a3b2db 100644 (file)
@@ -184,26 +184,26 @@ void depthfirst(entity start, .entity up, .entity downleft, .entity right, void(
        entity e;
        e = start;
        funcPre(pass, e);
-       while(e.downleft)
+       while (e.(downleft))
        {
-               e = e.downleft;
+               e = e.(downleft);
                funcPre(pass, e);
        }
        funcPost(pass, e);
        while(e != start)
        {
-               if(e.right)
+               if (e.(right))
                {
-                       e = e.right;
+                       e = e.(right);
                        funcPre(pass, e);
-                       while(e.downleft)
+                       while (e.(downleft))
                        {
-                               e = e.downleft;
+                               e = e.(downleft);
                                funcPre(pass, e);
                        }
                }
                else
-                       e = e.up;
+                       e = e.(up);
                funcPost(pass, e);
        }
 }
@@ -2294,7 +2294,7 @@ float xdecode(string s)
        return ((a * 22 + b) * 22 + c) * 22 + d;
 }
 
-float lowestbit(int f)
+int lowestbit(int f)
 {
        f &= ~(f * 2);
        f &= ~(f * 4);
@@ -2539,11 +2539,11 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
 
        // start with a 1-element queue
        queue_start = queue_end = e;
-       queue_end.fld = world;
+       queue_end.(fld) = world;
        queue_end.FindConnectedComponent_processing = 1;
 
        // for each queued item:
-       for (; queue_start; queue_start = queue_start.fld)
+       for (; queue_start; queue_start = queue_start.(fld))
        {
                // find all neighbors of queue_start
                entity t;
@@ -2554,16 +2554,16 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
                        if(iscon(t, queue_start, pass))
                        {
                                // it is connected? ADD IT. It will look for neighbors soon too.
-                               queue_end.fld = t;
+                               queue_end.(fld) = t;
                                queue_end = t;
-                               queue_end.fld = world;
+                               queue_end.(fld) = world;
                                queue_end.FindConnectedComponent_processing = 1;
                        }
                }
        }
 
        // unmark
-       for(queue_start = e; queue_start; queue_start = queue_start.fld)
+       for (queue_start = e; queue_start; queue_start = queue_start.(fld))
                queue_start.FindConnectedComponent_processing = 0;
 }
 
index a59d31c..2e41ce7 100644 (file)
@@ -296,7 +296,7 @@ float xdecode(string s);
 // Otherwise, channels 8 to 15 would be blocked for a weird QW feature.
 #define sound(e,c,s,v,a) sound7(e,c,s,v,a,0,0)
 
-float lowestbit(float f);
+int lowestbit(float f);
 
 #ifdef CSQC
 entity ReadCSQCEntity();
@@ -385,12 +385,12 @@ string autocvar_hud_colorset_background = "7"; // BG - White // neutral/unimport
 string CCR(string input);
 
 #ifndef MENUQC
-#ifdef CSQC
-#define GENTLE (autocvar_cl_gentle || autocvar_cl_gentle_messages)
-#else
-#define GENTLE autocvar_sv_gentle
-#endif
-#define normal_or_gentle(normal,gentle) (GENTLE ? ((gentle != "") ? gentle : normal) : normal)
+       #ifdef CSQC
+               #define GENTLE (autocvar_cl_gentle || autocvar_cl_gentle_messages)
+       #else
+               #define GENTLE autocvar_sv_gentle
+       #endif
+       #define normal_or_gentle(normal, gentle) (GENTLE ? ((gentle != "") ? gentle : normal) : normal)
 #endif
 
 // allow writing to also pass through to spectators (like so spectators see the same centerprints as players for example)
diff --git a/qcsrc/common/weapons/all.inc b/qcsrc/common/weapons/all.inc
new file mode 100644 (file)
index 0000000..4f4cd2b
--- /dev/null
@@ -0,0 +1,29 @@
+// ONLY EVER ADD NEW WEAPONS AT THE END. IF YOU REMOVE ONE, PUT THE LAST ONE ON
+// ITS PLACE. THIS IS TO AVOID UNNECESSARY RENUMBERING OF WEAPON IMPULSES.
+// IF YOU DISREGARD THIS NOTICE, I'LL KILL YOU WITH THE @!#%'N TUBA
+
+// core weapons
+#include "w_blaster.qc"
+#include "w_shotgun.qc"
+#include "w_machinegun.qc"
+#include "w_mortar.qc"
+#include "w_minelayer.qc"
+#include "w_electro.qc"
+#include "w_crylink.qc"
+#include "w_vortex.qc"
+#include "w_hagar.qc"
+#include "w_devastator.qc"
+
+// other weapons
+#include "w_porto.qc"
+#include "w_vaporizer.qc"
+#include "w_hook.qc"
+#include "w_hlac.qc"
+#include "w_tuba.qc"
+#include "w_rifle.qc"
+#include "w_fireball.qc"
+#include "w_seeker.qc"
+#include "w_shockwave.qc"
+#include "w_arc.qc"
+#include "w_hmg.qc"
+#include "w_rpc.qc"
diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh
deleted file mode 100644 (file)
index b4ee1e2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// TODO: include once
-//#ifndef WEAPONS_ALL_H
-//#define WEAPONS_ALL_H
-
-#include "../util.qh"
-
-#ifdef SVQC
-#   include "config.qh"
-#   include "../../server/bot/aim.qh"
-#endif
-
-// ONLY EVER ADD NEW WEAPONS AT THE END. IF YOU REMOVE ONE, PUT THE LAST ONE ON
-// ITS PLACE. THIS IS TO AVOID UNNECESSARY RENUMBERING OF WEAPON IMPULSES.
-// IF YOU DISREGARD THIS NOTICE, I'LL KILL YOU WITH THE @!#%'N TUBA
-
-// core weapons
-#include "w_blaster.qc"
-#include "w_shotgun.qc"
-#include "w_machinegun.qc"
-#include "w_mortar.qc"
-#include "w_minelayer.qc"
-#include "w_electro.qc"
-#include "w_crylink.qc"
-#include "w_vortex.qc"
-#include "w_hagar.qc"
-#include "w_devastator.qc"
-
-// other weapons
-#include "w_porto.qc"
-#include "w_vaporizer.qc"
-#include "w_hook.qc"
-#include "w_hlac.qc"
-#include "w_tuba.qc"
-#include "w_rifle.qc"
-#include "w_fireball.qc"
-#include "w_seeker.qc"
-#include "w_shockwave.qc"
-#include "w_arc.qc"
-#include "w_hmg.qc"
-#include "w_rpc.qc"
-
-//#endif
index 3ab584f..58fdbae 100644 (file)
@@ -54,7 +54,7 @@
 #ifndef MENUQC
 #include "calculations.qc"
 #endif
-#include "all.qh"
+#include "all.inc"
 
 // WEAPON PLUGIN SYSTEM
 entity weapon_info[WEP_MAXCOUNT];
index 593a40e..5f17ccb 100644 (file)
@@ -5,6 +5,10 @@
 #include "calculations.qh"
 #endif
 
+#include "../util.qh"
+#ifdef SVQC
+#include "../../server/bot/aim.qh"
+#endif
 const int MAX_SHOT_DISTANCE = 32768;
 
 // weapon pickup ratings for bot logic
@@ -199,7 +203,7 @@ void register_weapons_done();
        REGISTER_WEAPON_2(WEP_##id,WEPSET_##id,function,ammotype,impulse,flags,rating,color,modelname,simplemdl,crosshair,wepimg,refname,wepname)
 #endif
 
-#include "all.qh"
+#include "all.inc"
 
 #undef WEP_ADD_CVAR_MO_PRI
 #undef WEP_ADD_CVAR_MO_SEC
index 4effe64..c4d8c54 100644 (file)
 
 #pragma noref 1
 
-/*
-==============================================================================
+#define true _true
+#define false _false
+#define TRUE _TRUE
+#define FALSE _FALSE
 
-                       SOURCE FOR GLOBALVARS_T C STRUCTURE
-                       MUST NOT BE MODIFIED, OR CRC ERRORS WILL APPEAR
+#include "upstream/csprogsdefs.qc"
 
-==============================================================================
-*/
-
-//
-// system globals
-//
-entity         self;
-entity         other;
-entity         world;
-float          time;
-float          frametime;
-
-int            player_localentnum;     //the entnum
-int            player_localnum;        //the playernum
-float          maxclients;     //a constant filled in by the engine. gah, portability eh?
-
-float          clientcommandframe;     //player movement
-float          servercommandframe;     //clientframe echoed off the server
-
-string         mapname;
-
-//
-// global variables set by built in functions
-//
-vector         v_forward, v_up, v_right;       // set by makevectors()
-
-// set by traceline / tracebox
-float          trace_allsolid;
-float          trace_startsolid;
-float          trace_fraction;
-vector         trace_endpos;
-vector         trace_plane_normal;
-float          trace_plane_dist;
-entity         trace_ent;
-float          trace_inopen;
-float          trace_inwater;
-
-//
-// required prog functions
-//
-void()         CSQC_Init;
-void()         CSQC_Shutdown;
-float(float f, float t, float n)       CSQC_InputEvent;
-void(float w, float h)         CSQC_UpdateView;
-bool(string s) CSQC_ConsoleCommand;
-
-//these fields are read and set by the default player physics
-vector         pmove_org;
-vector         pmove_vel;
-vector         pmove_mins;
-vector         pmove_maxs;
-//retrieved from the current movement commands (read by player physics)
-float          input_timelength;
-vector         input_angles;
-vector         input_movevalues;       //forwards, right, up.
-int                    input_buttons;          //attack, use, jump (default physics only uses jump)
-
-float          movevar_gravity;
-float          movevar_stopspeed;
-float          movevar_maxspeed;
-float          movevar_spectatormaxspeed;      //used by NOCLIP movetypes.
-float          movevar_accelerate;
-float          movevar_airaccelerate;
-float          movevar_wateraccelerate;
-float          movevar_friction;
-float          movevar_waterfriction;
-float          movevar_entgravity;     //the local player's gravity field. Is a multiple (1 is the normal value)
-
-//================================================
-void           end_sys_globals;                // flag for structure dumping
-//================================================
-
-/*
-==============================================================================
-
-                       SOURCE FOR ENTVARS_T C STRUCTURE
-                       MUST NOT BE MODIFIED, OR CRC ERRORS WILL APPEAR
-
-==============================================================================
-*/
-
-//
-// system fields (*** = do not set in prog code, maintained by C code)
-//
-.int           modelindex;             // *** model index in the precached list
-.vector                absmin, absmax; // *** origin + mins / maxs
-
-.int           entnum; // *** the ent number as on the server
-.float         drawmask;
-.void()                predraw;
-
-.float         movetype;
-.float         solid;
-
-.vector                origin;                 // ***
-.vector                oldorigin;              // ***
-.vector                velocity;
-.vector                angles;
-.vector                avelocity;
-
-.string                classname;              // spawn function
-.string                model;
-.int           frame;
-.int           skin;
-.int           effects;
-
-.vector                mins, maxs;             // bounding box extents reletive to origin
-.vector                size;                   // maxs - mins
-
-.void()                touch;
-.void()                use;
-.void()                think;
-.void()                blocked;                // for doors or plats, called when can't push other
-
-.float         nextthink;
-
-.entity                chain;
-
-.string                netname;
-
-.entity        enemy;
-
-.int           flags;
-
-.int           colormap;
-
-.entity                owner;          // who launched a missile
-
-//================================================
-void           end_sys_fields;                 // flag for structure dumping
-//================================================
-
-/*
-==============================================================================
-
-                       OPTIONAL FIELDS AND GLOBALS
-
-==============================================================================
-*/
-
-// Additional OPTIONAL Fields and Globals
-float          intermission; // indicates intermission state (0 = normal, 1 = scores, 2 = finale text)
-
-vector         view_angles; // same as input_angles
-vector         view_punchangle; // from server
-vector         view_punchvector; // from server
-
-/*
-==============================================================================
-
-                       CONSTANT DEFINITIONS
-
-==============================================================================
-*/
-
-const int MASK_ENGINE                  = 1;
-const int MASK_ENGINEVIEWMODELS        = 2;
-const int MASK_NORMAL                  = 4;
-
-const int RF_VIEWMODEL                 = 1;
-const int RF_EXTERNALMODEL             = 2;
-const int RF_DEPTHHACK                 = 4;
-const int RF_ADDITIVE                  = 8;
-const int RF_USEAXIS                   = 16;
-
-const int VF_MIN                               = 1;    //(vector)
-const int VF_MIN_X                             = 2;    //(float)
-const int VF_MIN_Y                             = 3;    //(float)
-const int VF_SIZE                              = 4;    //(vector) (viewport size)
-const int VF_SIZE_Y                            = 5;    //(float)
-const int VF_SIZE_X                            = 6;    //(float)
-const int VF_VIEWPORT                  = 7;    //(vector, vector)
-const int VF_FOV                               = 8;    //(vector)
-const int VF_FOVX                              = 9;    //(float)
-const int VF_FOVY                              = 10;   //(float)
-const int VF_ORIGIN                            = 11;   //(vector)
-const int VF_ORIGIN_X                  = 12;   //(float)
-const int VF_ORIGIN_Y                  = 13;   //(float)
-const int VF_ORIGIN_Z                  = 14;   //(float)
-const int VF_ANGLES                            = 15;   //(vector)
-const int VF_ANGLES_X                  = 16;   //(float)
-const int VF_ANGLES_Y                  = 17;   //(float)
-const int VF_ANGLES_Z                  = 18;   //(float)
-const int VF_DRAWWORLD                 = 19;   //(float)
-const int VF_DRAWENGINESBAR            = 20;   //(float)
-const int VF_DRAWCROSSHAIR             = 21;   //(float)
-
-const int VF_CL_VIEWANGLES             = 33;   //(vector)
-const int VF_CL_VIEWANGLES_X   = 34;   //(float)
-const int VF_CL_VIEWANGLES_Y   = 35;   //(float)
-const int VF_CL_VIEWANGLES_Z   = 36;   //(float)
-
-const int VF_PERSPECTIVE       = 200;
-
-//const int STAT_HEALTH                        = 0;
-//const int STAT_WEAPONMODEL   = 2;
-//const int STAT_AMMO                  = 3;
-//const int STAT_ARMOR                 = 4;
-//const int STAT_WEAPONFRAME   = 5;
-//const int STAT_SHELLS                        = 6;
-//const int STAT_NAILS                 = 7;
-//const int STAT_ROCKETS               = 8;
-//const int STAT_CELLS                 = 9;
-//const int STAT_ACTIVEWEAPON  = 10;
-//const int STAT_TOTALSECRETS  = 11;
-//const int STAT_TOTALMONSTERS = 12;
-//const int STAT_SECRETS               = 13;
-//const int STAT_MONSTERS              = 14;
-//const int STAT_ITEMS                 = 15;
-//const int STAT_VIEWHEIGHT            = 16;
-
-// Quake Sound Constants
-const int CHAN_AUTO                            = 0;
-const int CHAN_WEAPON                  = 1;
-const int CHAN_VOICE                   = 2;
-const int CHAN_ITEM                            = 3;
-const int CHAN_BODY                            = 4;
-
-const int ATTN_NONE                            = 0;
-const int ATTN_NORM                            = 1;
-const int ATTN_IDLE                            = 2;
-const int ATTN_STATIC                  = 3;
-
-// Frik File Constants
-const int FILE_READ                            = 0;
-const int FILE_APPEND                  = 1;
-const int FILE_WRITE                   = 2;
-
-// Quake Point Contents
-const int CONTENT_EMPTY                        = -1;
-const int CONTENT_SOLID                        = -2;
-const int CONTENT_WATER                        = -3;
-const int CONTENT_SLIME                        = -4;
-const int CONTENT_LAVA                 = -5;
-const int CONTENT_SKY                  = -6;
-
-// Quake Solid Constants
-const int SOLID_NOT                            = 0;
-const int SOLID_TRIGGER                        = 1;
-const int SOLID_BBOX                   = 2;
-const int SOLID_SLIDEBOX               = 3;
-const int SOLID_BSP                            = 4;
-const int SOLID_CORPSE                 = 5;
-
-// Quake Move Constants
-const int MOVE_NORMAL                  = 0;
-const int MOVE_NOMONSTERS              = 1;
-const int MOVE_MISSILE                 = 2;
-
-const float EXTRA_LOW                  = -99999999;
-const float EXTRA_HIGH                 = 99999999;
-
-const vector VEC_1                             = '1 1 1';
-const vector VEC_0                             = '0 0 0';
-const vector VEC_M1                            = '-1 -1 -1';
-
-//const float M_PI                             = 3.14159265358979323846;
-
-vector VEC_HULL_MIN                            = '-16 -16 -24';
-vector VEC_HULL_MAX                            = '16 16 32';
-
-// Quake Temporary Entity Constants
-const int TE_SPIKE                             = 0;
-const int TE_SUPERSPIKE                        = 1;
-const int TE_GUNSHOT                   = 2;
-const int TE_EXPLOSION                 = 3;
-const int TE_TAREXPLOSION              = 4;
-const int TE_LIGHTNING1                        = 5;
-const int TE_LIGHTNING2                        = 6;
-const int TE_WIZSPIKE                  = 7;
-const int TE_KNIGHTSPIKE               = 8;
-const int TE_LIGHTNING3                        = 9;
-const int TE_LAVASPLASH                        = 10;
-const int TE_TELEPORT                  = 11;
-const int TE_EXPLOSION2                        = 12;
-
-// Darkplaces Additions
-const int TE_EXPLOSIONRGB              = 53;
-const int TE_GUNSHOTQUAD               = 57;
-const int TE_EXPLOSIONQUAD             = 70;
-const int TE_SPIKEQUAD                 = 58;
-const int TE_SUPERSPIKEQUAD            = 59;
-
-// PFlags for Dynamic Lights
-const int PFLAGS_NOSHADOW              = 1;
-const int PFLAGS_CORONA                        = 2;
-const int PFLAGS_FULLDYNAMIC   = 128;
-
-const int EF_ADDITIVE                  = 32;
-const int EF_BLUE                              = 64;
-const int EF_FLAME                             = 1024;
-const int EF_FULLBRIGHT                        = 512;
-const int EF_NODEPTHTEST               = 8192;
-const int EF_NODRAW                            = 16;
-const int EF_NOSHADOW                  = 4096;
-const int EF_RED                               = 128;
-const int EF_STARDUST                  = 2048;
-const int EF_SELECTABLE                = 16384;
-
-const int PFL_ONGROUND                 = 1;
-const int PFL_CROUCH                   = 2;
-const int PFL_DEAD                             = 4;
-const int PFL_GIBBED                   = 8;
-
-// draw flags
-const int DRAWFLAG_NORMAL              = 0;
-const int DRAWFLAG_ADDITIVE    = 1;
-const int DRAWFLAG_MODULATE    = 2;
-const int DRAWFLAG_2XMODULATE  = 3;
-const int DRAWFLAG_SCREEN              = 4;
-const int DRAWFLAG_MIPMAP              = 0x100; // only for R_BeginPolygon
-
-/*
-==============================================================================
-
-                       BUILTIN DEFINITIONS
-                       EXTENSIONS ARE NOT ADDED HERE, BUT BELOW!
-
-==============================================================================
-*/
-
-void(vector ang) makevectors = #1;
-void(entity e, vector o) setorigin = #2;
-void(entity e, string m) setmodel = #3;
-void(entity e, vector min, vector max) setsize = #4;
-
-void() break_to_debugger = #6;
-float() random = #7;
-void(entity e, float chan, string samp) sound = #8;
-vector(vector v) normalize = #9;
-void(string e) error = #10;
-void(string e) objerror = #11;
-float(vector v) vlen = #12;
-float(vector v) vectoyaw = #13;
-entity() spawn = #14;
-void(entity e) remove = #15;
-float(vector v1, vector v2, float tryents, entity ignoreentity) traceline = #16;
-
-entity(entity start, .string fld, string match) find = #18;
-void(string s) precache_sound = #19;
-void(string s) precache_model = #20;
-
-entity(vector org, float rad) findradius = #22;
-
-void(string s, ...) dprint = #25;
-string(float f) ftos = #26;
-string(vector v) vtos = #27;
-void() coredump = #28;
-void() traceon = #29;
-void() traceoff = #30;
-void(entity e) eprint = #31;
-// settrace optional
-float(float yaw, float dist, float settrace) walkmove = #32;
-
-float() droptofloor = #34;
-void(float style, string value) lightstyle = #35;
-int(float v) rint      = #36;
-int(float v) floor     = #37;
-int(float v) ceil      = #38;
-
-float(entity e) checkbottom = #40;
-float(vector v) pointcontents = #41;
-
-float(float f) fabs = #43;
-
-float(string s) cvar = #45;
-void(string s, ...) localcmd = #46;
-entity(entity e) nextent = #47;
-void(vector o, vector d, float color, float count) particle = #48;
-void() ChangeYaw = #49;
-
-vector(vector v) vectoangles = #51;
-vector(vector v, vector w) vectoangles2 = #51;
-
-float(float f) sin = #60;
-float(float f) cos = #61;
-float(float f) sqrt = #62;
-void(entity ent) changepitch = #63;
-void(entity e, entity ignore) tracetoss = #64;
-string(entity ent) etos = #65;
-
-string(string s) precache_file = #68;
-void(entity e) makestatic = #69;
-
-void(string name, string value) cvar_set = #72;
-
-void(vector pos, string samp, float vol, float atten) ambientsound = #74;
-string(string s) precache_model2 = #75;
-string(string s) precache_sound2 = #76;
-string(string s) precache_file2 = #77;
-
-float(string s) stof = #81;
-
-
-void(vector v1, vector min, vector max, vector v2, float nomonsters, entity forent) tracebox = #90;
-vector() randomvec = #91;
-vector(vector org) getlight = #92;
-vector(vector org, float lpflags) getlight2 = #92;
-vector getlight_dir;
-vector getlight_ambient;
-vector getlight_diffuse;
-const float LP_LIGHTMAP        = 1;
-const float LP_RTWORLD = 2;
-const float LP_DYNLIGHT = 4;
-const float LP_COMPLETE = 7;
-
-float(string name, string value) registercvar = #93;
-float( float a, ... ) min = #94;
-float( float b, ... ) max = #95;
-float(float minimum, float val, float maximum) bound = #96;
-float(float f, float f) pow = #97;
-entity(entity start, .float fld, float match) findfloat = #98;
-float(string s) checkextension = #99;
-// FrikaC and Telejano range #100-#199
-
-int(string filename, int mode) fopen = #110;
-void(float fhandle) fclose = #111;
-string(float fhandle) fgets = #112;
-void(float fhandle, string s) fputs = #113;
-float(string s) strlen = #114;
-string(...) strcat = #115;
-string(string s, float start, float length) substring = #116;
-vector(string) stov = #117;
-string(string s) strzone = #118;
-void(string s) strunzone = #119;
-
-// FTEQW range #200-#299
-
-float(float number, float quantity) bitshift = #218;
-
-//float(string str, string sub[, float startpos]) strstrofs = #221;
-int(string str, string sub, float startpos) strstrofs = #221;
-int(string str, float ofs) str2chr = #222;
-string(int c, ...) chr2str = #223;
-string(float ccase, float calpha, float cnum, string s, ...) strconv = #224;
-string(float chars, string s, ...) strpad = #225;
-string(string info, string key, string value, ...) infoadd = #226;
-string(string info, string key) infoget = #227;
-int(string s1, string s2) strcmp = #228;
-int(string s1, string s2, float len) strncmp = #228;
-int(string s1, string s2) strcasecmp = #229;
-int(string s1, string s2, float len) strncasecmp = #230;
-
-// CSQC range #300-#399
-void() clearscene = #300;
-void(float mask) addentities = #301;
-void(entity ent) addentity = #302;
-float(float property, ...) setproperty = #303;
-float(float property) getproperty = #309;
-vector(float property) getpropertyvec = #309;
-void() renderscene = #304;
-void(vector org, float radius, vector lightcolours) adddynamiclight = #305;
-void(vector org, float radius, vector lightcolours, float style, string cubemapname, float pflags) adddynamiclight2 = #305;
-//void(string texturename, float flag[, float is2d, float lines]) R_BeginPolygon = #306;
-void(string texturename, float flag, ...) R_BeginPolygon = #306;
-void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex = #307;
-void() R_EndPolygon = #308;
-vector (vector v) cs_unproject = #310;
-vector (vector v) cs_project = #311;
-
-void(float width, vector pos1, vector pos2, float flag) drawline = #315;
-float(string name) iscachedpic = #316;
-string(string name, ...) precache_pic = #317;
-string(string name) precache_cubemap = #317;
-vector(string picname) draw_getimagesize = #318;
-void(string name) freepic = #319;
-float(vector position, float character, vector scale, vector rgb, float alpha, float flag) drawcharacter = #320;
-float(vector position, string text, vector scale, vector rgb, float alpha, float flag) drawstring = #321;
-float(vector position, string pic, vector size, vector rgb, float alpha, float flag) drawpic = #322;
-float(vector position, vector size, vector rgb, float alpha, float flag) drawfill = #323;
-void(float x, float y, float width, float height) drawsetcliparea = #324;
-void(void) drawresetcliparea = #325;
-float(vector position, string text, vector scale, float alpha, float flag) drawcolorcodedstring = #326;
-vector(vector position, string text, vector scale, vector rgb, float alpha, float flag) drawcolorcodedstring2 = #326;
-
-float(int stnum) getstatf = #330;
-int(int stnum, ...) getstati = #331; // can optionally take first bit and count
-string(float firststnum) getstats = #332;
-void(entity e, float mdlindex) setmodelindex = #333;
-string(float mdlindex) modelnameforindex = #334;
-int(string effectname) particleeffectnum = #335;
-void(entity ent, float effectnum, vector start, vector end) trailparticles = #336;
-//void(float effectnum, vector origin [, vector dir, float count]) pointparticles = #337;
-void(float effectnum, vector origin , vector dir, float count) pointparticles = #337;
-void(string s, ...) centerprint = #338;
-void(string s, ...) print = #339;
-string(float keynum) keynumtostring = #340;
-float(string keyname) stringtokeynum = #341;
-string(float keynum) getkeybind = #342;
-void(float usecursor) setcursormode = #343;
-vector() getmousepos = #344;
-float(float framenum) getinputstate = #345;
-void(float sens) setsensitivityscale = #346;
-void(...) runstandardplayerphysics = #347; // this may or may not take a player ent
-string(float playernum, string keyname) getplayerkeyvalue = #348;
-float() isdemo = #349;
-float() isserver = #350;
-void(vector origin, vector forward, vector right, vector up) SetListener = #351;
-void(string cmdname) registercommand = #352;
-float(entity ent) wasfreed = #353;
-string(string key) serverkey = #354;
-
-// Use proper case; refer to the id1 Write* functions!
-int() ReadByte         = #360;
-int() ReadChar         = #361;
-int() ReadShort                = #362;
-int() ReadLong         = #363;
-float() ReadCoord      = #364;
-float() ReadAngle      = #365;
-string() ReadString    = #366;
-float() ReadFloat      = #367;
-
-// LordHavoc's range #400-#499
-void(entity from, entity to) copyentity = #400;
-
-entity(.string fld, string match) findchain = #402;
-entity(.float fld, float match) findchainfloat = #403;
-void(vector org, string modelname, float startframe, float endframe, float framerate) effect = #404;
-void(vector org, vector velocity, float howmany) te_blood = #405;
-void(vector mincorner, vector maxcorner, float explosionspeed, float howmany) te_bloodshower = #406;
-void(vector org, vector color) te_explosionrgb = #407;
-void(vector mincorner, vector maxcorner, vector vel, float howmany, float color, float gravityflag, float randomveljitter) te_particlecube = #408;
-void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlerain = #409;
-void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlesnow = #410;
-void(vector org, vector vel, float howmany) te_spark = #411;
-void(vector org) te_gunshotquad = #412;
-void(vector org) te_spikequad = #413;
-void(vector org) te_superspikequad = #414;
-void(vector org) te_explosionquad = #415;
-void(vector org) te_smallflash = #416;
-void(vector org, float radius, float lifetime, vector color) te_customflash = #417;
-void(vector org) te_gunshot = #418;
-void(vector org) te_spike = #419;
-void(vector org) te_superspike = #420;
-void(vector org) te_explosion = #421;
-void(vector org) te_tarexplosion = #422;
-void(vector org) te_wizspike = #423;
-void(vector org) te_knightspike = #424;
-void(vector org) te_lavasplash = #425;
-void(vector org) te_teleport = #426;
-void(vector org, float colorstart, float colorlength) te_explosion2 = #427;
-void(entity own, vector start, vector end) te_lightning1 = #428;
-void(entity own, vector start, vector end) te_lightning2 = #429;
-void(entity own, vector start, vector end) te_lightning3 = #430;
-void(entity own, vector start, vector end) te_beam = #431;
-void(vector dir) vectorvectors = #432;
-void(vector org) te_plasmaburn = #433;
-//float(entity e, float s) getsurfacenumpoints = #434;
-//vector(entity e, float s, float n) getsurfacepoint = #435;
-//vector(entity e, float s) getsurfacenormal = #436;
-//string(entity e, float s) getsurfacetexture = #437;
-//float(entity e, vector p) getsurfacenearpoint = #438;
-//vector(entity e, float s, vector p) getsurfaceclippedpoint = #439;
-
-int(string s) tokenize = #441;
-string(float n) argv = #442;
-void(entity e, entity tagentity, string tagname) setattachment = #443;
-float(string pattern, float caseinsensitive, float quiet) search_begin = #444;
-void(float handle) search_end = #445;
-float(float handle) search_getsize = #446;
-string(float handle, float num) search_getfilename = #447;
-string(string s) cvar_string = #448;
-entity(entity start, .float fld, float match) findflags = #449;
-entity(.float fld, float match) findchainflags = #450;
-int(entity ent, string tagname) gettagindex = #451;
-vector(entity ent, float tagindex) gettaginfo = #452;
-
-void(vector org, vector vel, float howmany) te_flamejet = #457;
-
-entity(float num) entitybyindex = #459;
-int() buf_create = #460;
-void(float bufhandle) buf_del = #461;
-float(float bufhandle) buf_getsize = #462;
-void(float bufhandle_from, float bufhandle_to) buf_copy = #463;
-void(float bufhandle, float sortpower, float backward) buf_sort = #464;
-string(float bufhandle, string glue) buf_implode = #465;
-string(float bufhandle, float string_index) bufstr_get = #466;
-void(float bufhandle, float string_index, string str) bufstr_set = #467;
-float(float bufhandle, string str, float order) bufstr_add = #468;
-void(float bufhandle, float string_index) bufstr_free = #469;
-
-//float(float s) asin = #471;
-//float(float c) acos = #472;
-//float(float t) atan = #473;
-//float(float c, float s) atan2 = #474;
-//float(float a) tan = #475;
-float(string s) strippedstringlen = #476;
-float(string s) strlennocol = #476; // This is the correct name for the function, but not removing the decolorizedstring mapping.
-string(string s) decolorizedstring = #477;
-string(string s) strdecolorize = #477; // This is the correct name for the function, but not removing the decolorizedstring mapping.
-string(float uselocaltime, string format, ...) strftime = #478;
-string(string s) strtolower = #480;
-string(string s) strtoupper = #481;
-string(string s) cvar_defstring = #482;
-void(vector origin, string sample, float volume, float attenuation) pointsound = #483;
-string(string search, string replace, string subject) strreplace = #484;
-string(string search, string replace, string subject) strireplace = #485;
-//vector(entity e, float s, float n, float a) getsurfacepointattribute = #486;
-#ifdef SUPPORT_GECKO
-float gecko_create( string name ) = #487;
-void gecko_destroy( string name ) = #488;
-void gecko_navigate( string name, string URI ) = #489;
-float gecko_keyevent( string name, float key, float eventtype ) = #490;
-void gecko_mousemove( string name, float x, float y ) = #491;
-void gecko_resize( string name, float w, float h ) = #492;
-vector gecko_get_texture_extent( string name ) = #493;
-#else
-
-#endif
-
-/*
-==============================================================================
-
-                       EXTENSION DEFINITIONS
-
-==============================================================================
-*/
-
-// DP_CSQC_SPAWNPARTICLE
-// idea: VorteX
-// darkplaces implementation: VorteX
-// constant definitions:
-// particle base behavior:
-float PT_ALPHASTATIC = 1;
-float PT_STATIC = 2;
-float PT_SPARK = 3;
-float PT_BEAM = 4;
-float PT_RAIN = 5;
-float PT_RAINDECAL = 6;
-float PT_SNOW = 7;
-float PT_BUBBLE = 8;
-float PT_BLOOD = 9;
-float PT_SMOKE = 10;
-float PT_DECAL = 11;
-float PT_ENTITYPARTICLE = 12;
-// particle blendtypes:
-float PBLEND_ALPHA = 0;
-float PBLEND_ADD = 1;
-float PBLEND_INVMOD = 2;
-// particle orientation:
-float PARTICLE_BILLBOARD = 0;
-float PARTICLE_SPARK = 1;
-float PARTICLE_ORIENTED_DOUBLESIDED = 2;
-float PARTICLE_BEAM = 3;
-// global definitions:
-float particle_type; // one of PT_
-float particle_blendmode; // one of PBLEND_ values
-float particle_orientation; // one of PARTICLE_ values
-vector particle_color1;
-vector particle_color2;
-float particle_tex; // number of chunk in particlefont
-float particle_size;
-float particle_sizeincrease;
-float particle_alpha;
-float particle_alphafade;
-float particle_time;
-float particle_gravity;
-float particle_bounce;
-float particle_airfriction;
-float particle_liquidfriction;
-float particle_originjitter;
-float particle_velocityjitter;
-float particle_qualityreduction; // enable culling of this particle when FPS is low
-float particle_stretch;
-vector particle_staincolor1;
-vector particle_staincolor2;
-float particle_staintex;
-float particle_stainalpha;
-float particle_stainsize;
-float particle_delayspawn;
-float particle_delaycollision;
-float particle_angle;
-float particle_spin;
-// builtin definitions:
-float(float max_themes) initparticlespawner = #522; // check fields/globals for integration and enable particle spawner, return 1 is succeded, otherwise returns 0
-void() resetparticle = #523; // reset p_ globals to default theme #0
-void(float theme) particletheme = #524; // restore p_ globals from saved theme
-float() particlethemesave = #525; // save p_ globals to new particletheme and return it's index
-void(float theme) particlethemeupdate = #525; // save p_ globals to new particletheme and return it's index
-void(float theme) particlethemefree = #526; // delete a particle theme
-float(vector org, vector vel) spawnparticle = #527; // returns 0 when failed, 1 when spawned
-float(vector org, vector vel, float theme) quickparticle = #527; // not reading globals, just theme, returns 0 when failed, 1 when spawned
-float(vector org, vector vel, float delay, float collisiondelay) delayedparticle = #528;
-float(vector org, vector vel, float delay, float collisiondelay, float theme) quickdelayedparticle = #528;
-// description: this builtin provides an easy and flexible way to spawn particles,
-// it is not created as replace for DP_SV_POINTPARTICLES but as an addition to it.
-// With this extension you can create a specific particles like rain particles, or entity particles
-// notes:
-// 1) 0 is default particle template, it could be changed
-// 2) color vectors could have value 0-255 of each component
-// restrictions: max themes could be between 4 and 2048
-// warning: you should call initparticlespawner() at very beginning BEFORE all other particle spawner functions
-// function to query particle info
-// don't remove this function as it protects all particle_ globals from FTEQCC/FRIKQCC non-referenced removal optimisation
-void() printparticle =
-{
-       // vortex: this also protects from 'non-referenced' optimisation on some compilers
-       print("PARTICLE:\n");
-       print(strcat("  type: ", ftos(particle_type), "\n"));
-       print(strcat("  blendmode: ", ftos(particle_blendmode), "\n"));
-       print(strcat("  orientation: ", ftos(particle_orientation), "\n"));
-       print(strcat("  color1: ", vtos(particle_color1), "\n"));
-       print(strcat("  color2: ", vtos(particle_color2), "\n"));
-       print(strcat("  tex: ", ftos(particle_tex), "\n"));
-       print(strcat("  size: ", ftos(particle_size), "\n"));
-       print(strcat("  sizeincrease: ", ftos(particle_sizeincrease), "\n"));
-       print(strcat("  alpha: ", ftos(particle_alpha), "\n"));
-       print(strcat("  alphafade: ", ftos(particle_alphafade), "\n"));
-       print(strcat("  time: ", ftos(particle_time), "\n"));
-       print(strcat("  gravity: ", ftos(particle_gravity), "\n"));
-       print(strcat("  bounce: ", ftos(particle_bounce), "\n"));
-       print(strcat("  airfriction: ", ftos(particle_airfriction), "\n"));
-       print(strcat("  liquidfriction: ", ftos(particle_liquidfriction), "\n"));
-       print(strcat("  originjitter: ", ftos(particle_originjitter), "\n"));
-       print(strcat("  velocityjitter: ", ftos(particle_velocityjitter), "\n"));
-       print(strcat("  qualityreduction: ", ftos(particle_qualityreduction), "\n"));
-       print(strcat("  stretch: ", ftos(particle_stretch), "\n"));
-       print(strcat("  staincolor1: ", vtos(particle_staincolor1), "\n"));
-       print(strcat("  staincolor2: ", vtos(particle_staincolor2), "\n"));
-       print(strcat("  staintex: ", ftos(particle_staintex), "\n"));
-       print(strcat("  stainalpha: ", ftos(particle_stainalpha), "\n"));
-       print(strcat("  stainsize: ", ftos(particle_stainsize), "\n"));
-       print(strcat("  delayspawn: ", ftos(particle_delayspawn), "\n"));
-       print(strcat("  delaycollision: ", ftos(particle_delaycollision), "\n"));
-       print(strcat("  angle: ", ftos(particle_angle), "\n"));
-       print(strcat("  spin: ", ftos(particle_spin), "\n"));
-}
-
-// DP_CSQC_ENTITYTRANSPARENTSORTING_OFFSET
-// idea: VorteX
-// darkplaces implementation: VorteX
-float RF_USETRANSPARENTOFFSET = 64; // enables transparent origin offsetting
-// global definitions
-float transparent_offset; // should be set before entity is added
-// description: offset a model's meshes origin used for transparent sorting. Could be used to tweak sorting bugs on very large transparent entities or hacking transparent sorting order for certain objects
-// example: transparent_offset = 1000000; // entity always appear on background of other transparents
-// note: offset is done in view forward axis
-
-// DP_CSQC_ENTITYWORLDOBJECT
-// idea: VorteX
-// darkplaces implementation: VorteX
-const float RF_WORLDOBJECT = 128;
-// description: when renderflag is set, engine will not use culling methods for this entity, e.g. it will always be drawn
-// useful for large outdoor objects (like asteroids on sky horizon or sky models)
-
-// DP_CSQC_ENTITYMODELLIGHT
-// idea: VorteX
-// darkplaces implementation: VorteX
-const float RF_MODELLIGHT = 4096;
-.vector modellight_ambient;
-.vector modellight_diffuse;
-.vector modellight_dir;
-// description: allows CSQC to override directional model lightning on entity
-
-// DP_CSQC_SETPAUSE
-// idea: VorteX
-// darkplaces implementation: VorteX
-// builtin definitions:
-void(float ispaused) setpause = #531;
-// description: provides ability to set pause in local games (similar to one set once console is activated)
-// not stopping sound/cd track, useful for inventory screens, ingame menus with input etc.
-
-// DP_CSQC_QUERYRENDERENTITY
-// idea: VorteX
-// darkplaces implementation: VorteX
-// constant definitions:
-// render entity fields:
-float E_ACTIVE             = 0; // float 0/1
-float E_ORIGIN      = 1; // vector
-float E_FORWARD     = 2; // vector
-float E_RIGHT       = 3; // vector
-float E_UP          = 4; // vector
-float E_SCALE       = 5; // float
-float E_ORIGINANDVECTORS = 6; // returns origin, + sets v_* vectors to orientation
-float E_ALPHA       = 7; // float
-float E_COLORMOD    = 8; // vector
-float E_PANTSCOLOR  = 9; // vector
-float E_SHIRTCOLOR  = 10; // vector
-float E_SKIN        = 11; // float
-float E_MINS        = 12; // vector
-float E_MAXS        = 13; // vector
-float E_ABSMIN      = 14; // vector
-float E_ABSMAX      = 15; // vector
-float E_LIGHT       = 16; // vector - modellight
-// builtin definitions:
-float(float entitynum, float fldnum) getentity = #504;
-vector(float entitynum, float fldnum) getentityvec = #504;
-// description: allows to query parms from render entities, especially useful with attaching CSQC ents to
-// server entities networked and interpolated by engine (monsters, players), number of entity is it's SVQC number
-// you can send it via tempentity/CSQC entity message. Note that this builtin doesnt know about entity removing/reallocating
-// so it's meaning to work for short period of time, dont use it on missiles/grenades whatever will be removed next five seconds
-
-//DP_GFX_FONTS
-//idea: Blub\0, divVerent
-//darkplaces implementation: Blub\0
-//console commands:
-//  loadfont fontname fontmaps size1 size2 ...
-//   A font can simply be gfx/tgafile (freetype fonts doent need extension),
-//   or alternatively you can specify multiple fonts and faces
-//   Like this: gfx/vera-sans:2,gfx/fallback:1
-//   to load face 2 of the font gfx/vera-sans and use face 1
-//   of gfx/fallback as fallback font
-//   You can also specify a list of font sizes to load, like this:
-//   loadfont console gfx/conchars,gfx/fallback 8 12 16 24 32
-//   In many cases, 8 12 16 24 32 should be a good choice.
-//   for slots see:
-//constant definitions:
-float drawfont;            // set it before drawstring()/drawchar() calls
-float FONT_DEFAULT = 0;    // 'default'
-float FONT_CONSOLE = 1;    // 'console', REALLY should be fixed width (ls!)
-float FONT_SBAR = 2;       // 'sbar', used on hud, must be fixed width
-float FONT_NOTIFY = 3;     // 'notify', used on sprint/bprint
-float FONT_CHAT = 4;       // 'chat'
-float FONT_CENTERPRINT = 5;// 'centerprint'
-float FONT_INFOBAR = 6;    // 'infobar'
-float FONT_MENU = 7;       // 'menu', should be fixed width
-float FONT_USER0 = 8;      // 'user0', userdefined fonts
-float FONT_USER1 = 9;      // 'user1', userdefined fonts
-float FONT_USER2 = 10;     // 'user2', userdefined fonts
-float FONT_USER3 = 11;     // 'user3', userdefined fonts
-float FONT_USER4 = 12;     // 'user4', userdefined fonts
-float FONT_USER5 = 13;     // 'user5', userdefined fonts
-float FONT_USER6 = 14;     // 'user6', userdefined fonts
-float FONT_USER7 = 15;     // 'user7' slot, userdefined fonts
-//builtin definitions:
-float findfont(string s) = #356; // find font by fontname and return it's index
-float loadfont(string fontname, string fontmaps, string sizes, float slot, float fix_scale, float fix_voffset) = #357;
-// loads font immediately so stringwidth() function can be used just after builtin call
-// returns a font slotnum (which is used to set drawfont to)
-// first 3 parms are identical to "loadfont" console command ones
-// slot could be one of FONT_ constants or result of findfont() or -1 to not use it
-// if slot is given, font will be loaded to this slotnum and fontname become new title for it
-// this way you can rename user* fonts to something more usable
-// fix_* parms let you fix badly made fonts by applying some transformations to them
-// fix_scale : per-character center-oriented scale (doesn't change line height at all)
-// fix_voffset : vertical offset for each character, it's a multiplier to character height
-float stringwidth(string text, float allowColorCodes, vector size) = #327; // get a width of string with given font and char size
-float stringwidth_menu(string text, float allowColorCodes, vector size) = #468; // in menu.dat it has different builtin #
-//description: engine support for custom fonts in console, hud, qc etc.
-// limits:
-//  max 128 chars for font name
-//  max 3 font fallbacks
-//  max 8 sizes per font
-
-//DP_GFX_FONTS_FREETYPE
-//idea: Blub\0, divVerent
-//darkplaces implementation: Blub\0
-//cvar definitions:
-//   r_font_disable_freetype 0/1 : disable freetype fonts loading (uttetly disables freetype library initialization)
-//   r_font_antialias 0/1 : antialiasing when loading font
-//   r_font_hint 0/1/2/3  : hinting when loading font, 0 is no hinting, 1 light autohinting , 2 full autohinting, 3 full hinting
-//   r_font_postprocess_blur X      : font outline blur amount
-//   r_font_postprocess_outline X   : font outline width
-//   r_font_postprocess_shadow_x X  : font outline shadow x shift amount, applied during outlining
-//   r_font_postprocess_shadow_y X  : font outline shadow y shift amount, applied during outlining
-//   r_font_postprocess_shadow_z X  : font outline shadow z shift amount, applied during blurring
-//description: engine support for truetype/freetype fonts
-//so .AFM+.PFB/.OTF/.TTF files could be stuffed as fontmaps in loadfont()
-//(console command version will support them as well)
-
-//DP_CSQC_BINDMAPS
-//idea: daemon, motorsep
-//darkplaces implementation: divVerent
-//builtin definitions:
-string(float key, float bindmap) getkeybind_bindmap = #342;
-float(float key, string bind, float bindmap) setkeybind_bindmap = #630;
-vector(void) getbindmaps = #631;
-float(vector bm) setbindmaps = #632;
-string(string command, float bindmap) findkeysforcommand = #610;
-//<already in EXT_CSQC> float(string key) stringtokeynum = #341;
-//<already in EXT_CSQC> string(float keynum) keynumtostring = #340;
-//description: key bind setting/getting including support for switchable
-//bindmaps.
-
-//DP_CRYPTO
-//idea: divVerent
-//darkplaces implementation: divVerent
-//builtin definitions: (CSQC)
-float(string url, float id, string content_type, string delim, float buf, float keyid) crypto_uri_postbuf = #513;
-//description:
-//use -1 as buffer handle to justs end delim as postdata
-
-//DP_CSQC_MAINVIEW
-//idea: divVerent
-//darkplaces implementation: divVerent
-//constant definitions:
-const int VF_MAINVIEW         = 400;
-//use setproperty(VF_MAINVIEW, 1); before calling R_RenderView for the render
-//that shall become the "main" view, which is e.g. used by PRYDON_CLIENTCURSOR
-//this flag is set for the first scene, and not cleared by R_ClearScene
-//this flag is automatically cleared by R_RenderView
-//so when not using this extension, the first view rendered is the main view
-
-//DP_CSQC_MINFPS_QUALITY
-//idea: divVerent
-//darkplaces implementation: divVerent
-//constant definitions:
-const int VF_MINFPS_QUALITY   = 401;
-//use getproperty(VF_MINFPS_QUALITY); to do CSQC based LOD based on cl_minfps
-//1 should lead to an unmodified view
-
-//DP_CSQC_V_CALCREFDEF_WIP1
-//DP_CSQC_V_CALCREFDEF_WIP2
-//idea: divVerent
-//darkplaces implementation: divVerent
-//builtin definitions:
-void(entity e, float refdefflags) V_CalcRefdef = #640;
-//constant definitions:
-const int PMF_DUCKED = 4;
-const int PMF_ONGROUND = 8;
-const int REFDEFFLAG_TELEPORTED = 1;
-const int REFDEFFLAG_JUMPING = 2;
-const int REFDEFFLAG_DEAD = 4;
-const int REFDEFFLAG_INTERMISSION = 8;
-//- use this on the player entity after performing prediction
-//- pass REFDEFFLAG_TELEPORTED if the player teleported since last frame
-//- pass REFDEFFLAG_JUMPING if jump button is pressed
-//- pass REFDEFFLAG_DEAD if dead (DP_CSQC_V_CALCREFDEF_WIP2)
-//- pass REFDEFFLAG_INTERMISSION if in intermission (DP_CSQC_V_CALCREFDEF_WIP2)
-//- the player entity needs to have origin, velocity, pmove_flags set according
-//  to prediction (the above two PMF_ flags are used in the player's pmove_flags)
-//- NOTE: to check for this, ALSO OR a check with DP_CSQC_V_CALCREFDEF to also support
-//  the finished extension once done
-
-// assorted builtins
-float  drawsubpic(vector position, vector size, string pic, vector srcPosition, vector srcSize, vector rgb, float alpha, float flag) = #328;
-vector drawgetimagesize(string pic) = #318;
-const float SPA_POSITION =  0;
-const float SPA_S_AXIS =  1;
-const float SPA_T_AXIS =  2;
-const float SPA_R_AXIS =  3;
-const float SPA_TEXCOORDS0 =  4;
-const float SPA_LIGHTMAP0_TEXCOORDS =  5;
-const float SPA_LIGHTMAP_COLOR =  6;
-float (entity e, float s)                                              getsurfacenumpoints = #434;
-vector (entity e, float s, float n)                                    getsurfacepoint = #435;
-vector (entity e, float s)                                             getsurfacenormal = #436;
-string (entity e, float s)                                             getsurfacetexture = #437;
-float (entity e, vector p)                                             getsurfacenearpoint = #438;
-vector (entity e, float s, vector p)                                   getsurfaceclippedpoint = #439;
-vector(entity e, float s, float n, float a) getsurfacepointattribute = #486;
-float(entity e, float s) getsurfacenumtriangles = #628;
-vector(entity e, float s, float n) getsurfacetriangle = #629;
-
-//DP_QC_ASINACOSATANATAN2TAN
-//idea: Urre
-//darkplaces implementation: LordHavoc
-//constant definitions:
-float DEG2RAD = 0.0174532925199432957692369076848861271344287188854172545609719144;
-float RAD2DEG = 57.2957795130823208767981548141051703324054724665643215491602438612;
-float PI      = 3.1415926535897932384626433832795028841971693993751058209749445923;
-//builtin definitions:
-float(float s) asin = #471; // returns angle in radians for a given sin() value, the result is in the range -PI*0.5 to PI*0.5
-float(float c) acos = #472; // returns angle in radians for a given cos() value, the result is in the range 0 to PI
-float(float t) atan = #473; // returns angle in radians for a given tan() value, the result is in the range -PI*0.5 to PI*0.5
-float(float c, float s) atan2 = #474; // returns angle in radians for a given cos() and sin() value pair, the result is in the range -PI to PI (this is identical to vectoyaw except it returns radians rather than degrees)
-float(float a) tan = #475; // returns tangent value (which is simply sin(a)/cos(a)) for the given angle in radians, the result is in the range -infinity to +infinity
-//description:
-//useful math functions for analyzing vectors, note that these all use angles in radians (just like the cos/sin functions) not degrees unlike makevectors/vectoyaw/vectoangles, so be sure to do the appropriate conversions (multiply by DEG2RAD or RAD2DEG as needed).
-//note: atan2 can take unnormalized vectors (just like vectoyaw), and the function was included only for completeness (more often you want vectoyaw or vectoangles), atan2(v_x,v_y) * RAD2DEG gives the same result as vectoyaw(v)
-
-//DP_QC_SPRINTF
-//idea: divVerent
-//darkplaces implementation: divVerent
-//builtin definitions:
-string(string format, ...) sprintf = #627;
-//description:
-//you know sprintf :P
-//supported stuff:
-//  %
-//  optional: <argpos>$ for the argument to format
-//  flags: #0- +
-//  optional: <width>, *, or *<argpos>$ for the field width
-//  optional: .<precision>, .*, or .*<argpos>$ for the precision
-//  length modifiers: h for forcing a float, l for forcing an int/entity (by default, %d etc. cast a float to int)
-//  conversions:
-//    d takes a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an int
-//    i takes an int/entity if no length is specified or i is, and a float if h is specified as length, and cast it to an int
-//    ouxXc take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an unsigned int
-//    eEfFgG take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to a double
-//    s takes a string
-//    vV takes a vector, and processes the three components as if it were a gG for all three components, separated by space
-//    For conversions s and c, the flag # makes precision and width interpreted
-//      as byte count, by default it is interpreted as character count in UTF-8
-//      enabled engines. No other conversions can create wide characters, and #
-//      has another meaning in these.
-
-//DP_QC_GETTIME
-//idea: tZork
-//darkplaces implementation: tZork, divVerent
-//constant definitions:
-float GETTIME_FRAMESTART = 0; // time of start of frame
-float GETTIME_REALTIME = 1; // current time (may be OS specific)
-float GETTIME_HIRES = 2; // like REALTIME, but may reset between QC invocations and thus can be higher precision
-float GETTIME_UPTIME = 3; // time since start of the engine
-//builtin definitions:
-float(float tmr) gettime = #519;
-//description:
-//some timers to query...
-
-//DP_QC_GETTIME_CDTRACK
-//idea: divVerent
-//darkplaces implementation: divVerent
-//constant definitions:
-float GETTIME_CDTRACK = 4;
-//description:
-//returns the playing time of the current cdtrack when passed to gettime()
-//see DP_END_GETSOUNDTIME for similar functionality but for entity sound channels
-
-//DP_QC_TOKENIZEBYSEPARATOR
-//idea: Electro, SavageX, LordHavoc
-//darkplaces implementation: LordHavoc
-//builtin definitions:
-int(string s, string separator1, ...) tokenizebyseparator = #479;
-//description:
-//this function returns tokens separated by any of the supplied separator strings, example:
-//numnumbers = tokenizebyseparator("10.2.3.4", ".");
-//returns 4 and the tokens are "10" "2" "3" "4"
-//possibly useful for parsing IPv4 addresses (such as "1.2.3.4") and IPv6 addresses (such as "[1234:5678:9abc:def0:1234:5678:9abc:def0]:26000")
-
-//DP_QC_TOKENIZE_CONSOLE
-//idea: divVerent
-//darkplaces implementation: divVerent
-//builtin definitions:
-int(string s) tokenize_console = #514;
-int(float i) argv_start_index = #515;
-int(float i) argv_end_index = #516;
-//description:
-//this function returns tokens separated just like the console does
-//also, functions are provided to get the index of the first and last character of each token in the original string
-//Passing negative values to them, or to argv, will be treated as indexes from the LAST token (like lists work in Perl). So argv(-1) will return the LAST token.
-
-//DP_SND_SOUND7_WIP1
-//DP_SND_SOUND7_WIP2
-//idea: divVerent
-//darkplaces implementation: divVerent
-//builtin definitions:
-void(entity e, float chan, string samp, float vol, float atten, float speed, float flags) sound7 = #8;
-float SOUNDFLAG_RELIABLE = 1;
-//description:
-//plays a sound, with some more flags
-//extensions to sound():
-//- channel may be in the range from -128 to 127; channels -128 to 0 are "auto",
-//  i.e. support multiple sounds at once, but cannot be stopped/restarted
-//- a value 0 in the speed parameter means no change; otherwise, it is a
-//  percentage of playback speed ("pitch shifting"). 100 is normal pitch, 50 is
-//  half speed, 200 is double speed, etc. (DP_SND_SOUND7_WIP2)
-//- the flag SOUNDFLAG_RELIABLE can be specified, which makes the sound send
-//  to MSG_ALL (reliable) instead of MSG_BROADCAST (unreliable, default);
-//  similarily, SOUNDFLAG_RELIABLE_TO_ONE sends to MSG_ONE
-//- channel 0 is controlled by snd_channel0volume; channel 1 and -1 by
-//  snd_channel1volume, etc. (so, a channel shares the cvar with its respective
-//  auto-channel); however, the mod MUST define snd_channel8volume and upwards
-//  in default.cfg if they are to be used, as the engine does not create them
-//  to not litter the cvar list
-//- this extension applies to CSQC as well; CSQC_Event_Sound will get speed and
-//  flags as extra 7th and 8th argument
-//- WIP2 ideas: SOUNDFLAG_RELIABLE_TO_ONE, SOUNDFLAG_NOPHS, SOUNDFLAG_FORCELOOP
-//- NOTE: to check for this, ALSO OR a check with DP_SND_SOUND7 to also support
-//  the finished extension once done
-
-//DP_PRECACHE_PIC_FLAGS
-//idea: divVerent
-//darkplaces implementation: divVerent
-//constant definitions:
-float PRECACHE_PIC_FROMWAD = 1; // this one actually is part of EXT_CSQC
-float PRECACHE_PIC_NOTPERSISTENT = 2; // picture may get deallocated when unused
-float PRECACHE_PIC_MIPMAP = 8; // mipmap the texture for possibly better downscaling at memory expense
-//notes: these constants are given as optional second argument to precache_pic()
-
-//DP_QC_TRACE_MOVETYPE_WORLDONLY
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//constant definitions:
-float MOVE_WORLDONLY = 3;
-//description:
-//allows traces to hit only world (ignoring all entities, unlike MOVE_NOMONSTERS which hits all bmodels), use as the nomonsters parameter to trace functions
-
-//DP_SND_GETSOUNDTIME
-//idea: VorteX
-//darkplaces implementation: VorteX
-//constant definitions:
-float(entity e, float channel) getsoundtime = #533; // get currently sound playing position on entity channel, -1 if not playing or error
-float(string sample) soundlength = #534; // returns length of sound sample in seconds, -1 on error (sound not precached, sound system not initialized etc.)
-//description: provides opportunity to query length of sound samples and realtime tracking of sound playing on entities (similar to DP_GETTIME_CDTRACK)
-//note: beware dedicated server not running sound engine at all, so in dedicated mode this builtins will not work in server progs
-//note also: menu progs not supporting getsoundtime() (will give a warning) since it has no sound playing on entities
-//examples of use:
-//  - QC-driven looped sounds
-//  - QC events when sound playing is finished
-//  - toggleable ambientsounds
-//  - subtitles
-
-//DP_QC_NUM_FOR_EDICT
-//idea: Blub\0
-//darkplaces implementation: Blub\0
-//Function to get the number of an entity - a clean way.
-float(entity num) num_for_edict = #512;
-
-//DP_TRACE_HITCONTENTSMASK_SURFACEINFO
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//globals:
-.int dphitcontentsmask; // if non-zero on the entity passed to traceline/tracebox/tracetoss this will override the normal collidable contents rules and instead hit these contents values (for example AI can use tracelines that hit DONOTENTER if it wants to, by simply changing this field on the entity passed to traceline), this affects normal movement as well as trace calls
-float trace_dpstartcontents; // DPCONTENTS_ value at start position of trace
-int trace_dphitcontents; // DPCONTENTS_ value of impacted surface (not contents at impact point, just contents of the surface that was hit)
-int trace_dphitq3surfaceflags; // Q3SURFACEFLAG_ value of impacted surface
-string trace_dphittexturename; // texture name of impacted surface
-//constants:
-const int DPCONTENTS_SOLID = 1; // hit a bmodel, not a bounding box
-const int DPCONTENTS_WATER = 2;
-const int DPCONTENTS_SLIME = 4;
-const int DPCONTENTS_LAVA = 8;
-const int DPCONTENTS_SKY = 16;
-const int DPCONTENTS_BODY = 32; // hit a bounding box, not a bmodel
-const int DPCONTENTS_CORPSE = 64; // hit a SOLID_CORPSE entity
-const int DPCONTENTS_NODROP = 128; // an area where backpacks should not spawn
-const int DPCONTENTS_PLAYERCLIP = 256; // blocks player movement
-const int DPCONTENTS_MONSTERCLIP = 512; // blocks monster movement
-const int DPCONTENTS_DONOTENTER = 1024; // AI hint brush
-const int DPCONTENTS_LIQUIDSMASK = 14; // WATER | SLIME | LAVA
-const int DPCONTENTS_BOTCLIP = 2048; // AI hint brush
-const int DPCONTENTS_OPAQUE = 4096; // only fully opaque brushes get this (may be useful for line of sight checks)
-const int Q3SURFACEFLAG_NODAMAGE = 1;
-const int Q3SURFACEFLAG_SLICK = 2; // low friction surface
-const int Q3SURFACEFLAG_SKY = 4; // sky surface (also has NOIMPACT and NOMARKS set)
-const int Q3SURFACEFLAG_LADDER = 8; // climbable surface
-const int Q3SURFACEFLAG_NOIMPACT = 16; // projectiles should remove themselves on impact (this is set on sky)
-const int Q3SURFACEFLAG_NOMARKS = 32; // projectiles should not leave marks, such as decals (this is set on sky)
-const int Q3SURFACEFLAG_FLESH = 64; // projectiles should do a fleshy effect (blood?) on impact
-const int Q3SURFACEFLAG_NODRAW = 128; // compiler hint (not important to qc)
-//float Q3SURFACEFLAG_HINT = 256; // compiler hint (not important to qc)
-//float Q3SURFACEFLAG_SKIP = 512; // compiler hint (not important to qc)
-//float Q3SURFACEFLAG_NOLIGHTMAP = 1024; // compiler hint (not important to qc)
-//float Q3SURFACEFLAG_POINTLIGHT = 2048; // compiler hint (not important to qc)
-const int Q3SURFACEFLAG_METALSTEPS = 4096; // walking on this surface should make metal step sounds
-const int Q3SURFACEFLAG_NOSTEPS = 8192; // walking on this surface should not make footstep sounds
-const int Q3SURFACEFLAG_NONSOLID = 16384; // compiler hint (not important to qc)
-//float Q3SURFACEFLAG_LIGHTFILTER = 32768; // compiler hint (not important to qc)
-//float Q3SURFACEFLAG_ALPHASHADOW = 65536; // compiler hint (not important to qc)
-//float Q3SURFACEFLAG_NODLIGHT = 131072; // compiler hint (not important to qc)
-//float Q3SURFACEFLAG_DUST = 262144; // translucent 'light beam' effect (not important to qc)
-//description:
-//adds additional information after a traceline/tracebox/tracetoss call.
-//also (very important) sets trace_* globals before calling .touch functions,
-//this allows them to inspect the nature of the collision (for example
-//determining if a projectile hit sky), clears trace_* variables for the other
-//object in a touch event (that is to say, a projectile moving will see the
-//trace results in its .touch function, but the player it hit will see very
-//little information in the trace_ variables as it was not moving at the time)
-
-//DP_QC_CVAR_TYPE
-//idea: divVerent
-//DarkPlaces implementation: divVerent
-//builtin definitions:
-float(string name) cvar_type = #495;
-const int CVAR_TYPEFLAG_EXISTS = 1;
-const int CVAR_TYPEFLAG_SAVED = 2;
-const int CVAR_TYPEFLAG_PRIVATE = 4;
-const int CVAR_TYPEFLAG_ENGINE = 8;
-const int CVAR_TYPEFLAG_HASDESCRIPTION = 16;
-const int CVAR_TYPEFLAG_READONLY = 32;
-
-//DP_QC_CRC16
-//idea: divVerent
-//darkplaces implementation: divVerent
-//Some hash function to build hash tables with. This has to be be the CRC-16-CCITT that is also required for the QuakeWorld download protocol.
-//When caseinsensitive is set, the CRC is calculated of the lower cased string.
-int(bool caseinsensitive, string s, ...) crc16 = #494;
-
-//DP_QC_URI_ESCAPE
-//idea: divVerent
-//darkplaces implementation: divVerent
-//URI::Escape's functionality
-string(string in) uri_escape = #510;
-string(string in) uri_unescape = #511;
-
-//DP_QC_DIGEST
-//idea: motorsep, Spike
-//DarkPlaces implementation: divVerent
-//builtin definitions:
-string(string digest, string data, ...) digest_hex = #639;
-//description:
-//returns a given hex digest of given data
-//the returned digest is always encoded in hexadecimal
-//only the "MD4" digest is always supported!
-//if the given digest is not supported, string_null is returned
-//the digest string is matched case sensitively, use "MD4", not "md4"!
-
-//DP_QC_DIGEST_SHA256
-//idea: motorsep, Spike
-//DarkPlaces implementation: divVerent
-//description:
-//"SHA256" is also an allowed digest type
-
-//DP_QC_LOG
-//darkplaces implementation: divVerent
-//builtin definitions:
-float log(float f) = #532;
-//description:
-//logarithm
-
-//FTE_CSQC_SKELETONOBJECTS
-//idea: Spike, LordHavoc
-//darkplaces implementation: LordHavoc
-//builtin definitions:
-// all skeleton numbers are 1-based (0 being no skeleton)
-// all bone numbers are 1-based (0 being invalid)
-float(float modlindex) skel_create = #263; // create a skeleton (be sure to assign this value into .skeletonindex for use), returns skeleton index (1 or higher) on success, returns 0 on failure (for example if the modelindex is not skeletal), it is recommended that you create a new skeleton if you change modelindex, as the skeleton uses the hierarchy from the model.
-float(float skel, entity ent, float modlindex, float retainfrac, float firstbone, float lastbone) skel_build = #264; // blend in a percentage of standard animation, 0 replaces entirely, 1 does nothing, 0.5 blends half, etc, and this only alters the bones in the specified range for which out of bounds values like 0,100000 are safe (uses .frame, .frame2, .frame3, .frame4, .lerpfrac, .lerpfrac3, .lerpfrac4, .frame1time, .frame2time, .frame3time, .frame4time), returns skel on success, 0 on failure
-float(float skel) skel_get_numbones = #265; // returns how many bones exist in the created skeleton, 0 if skeleton does not exist
-string(float skel, float bonenum) skel_get_bonename = #266; // returns name of bone (as a tempstring), "" if invalid bonenum (< 1 for example) or skeleton does not exist
-int(float skel, float bonenum) skel_get_boneparent = #267; // returns parent num for supplied bonenum, 0 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
-int(float skel, string tagname) skel_find_bone = #268; // get number of bone with specified name, 0 on failure, bonenum (1-based) on success, same as using gettagindex but takes modelindex instead of entity
-vector(float skel, float bonenum) skel_get_bonerel = #269; // get matrix of bone in skeleton relative to its parent - sets v_forward, v_right, v_up, returns origin (relative to parent bone)
-vector(float skel, float bonenum) skel_get_boneabs = #270; // get matrix of bone in skeleton in model space - sets v_forward, v_right, v_up, returns origin (relative to entity)
-void(float skel, float bonenum, vector org) skel_set_bone = #271; // set matrix of bone relative to its parent, reads v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
-void(float skel, float bonenum, vector org) skel_mul_bone = #272; // transform bone matrix (relative to its parent) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
-void(float skel, float startbone, float endbone, vector org) skel_mul_bones = #273; // transform bone matrices (relative to their parents) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bones)
-void(float skeldst, float skelsrc, float startbone, float endbone) skel_copybones = #274; // copy bone matrices (relative to their parents) from one skeleton to another, useful for copying a skeleton to a corpse
-void(float skel) skel_delete = #275; // deletes skeleton at the beginning of the next frame (you can add the entity, delete the skeleton, renderscene, and it will still work)
-float(float modlindex, string framename) frameforname = #276; // finds number of a specified frame in the animation, returns -1 if no match found
-float(float modlindex, float framenum) frameduration = #277; // returns the intended play time (in seconds) of the specified framegroup, if it does not exist the result is 0, if it is a single frame it may be a small value around 0.1 or 0.
-//fields:
-.float skeletonindex; // active skeleton overriding standard animation on model
-.int frame; // primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
-.int frame2; // secondary framegroup animation (strength = lerpfrac)
-.int frame3; // tertiary framegroup animation (strength = lerpfrac3)
-.int frame4; // quaternary framegroup animation (strength = lerpfrac4)
-.float lerpfrac; // strength of framegroup blend
-.float lerpfrac3; // strength of framegroup blend
-.float lerpfrac4; // strength of framegroup blend
-.float frame1time; // start time of framegroup animation
-.float frame2time; // start time of framegroup animation
-.float frame3time; // start time of framegroup animation
-.float frame4time; // start time of framegroup animation
-//description:
-//this extension provides a way to do complex skeletal animation on an entity.
-//
-//see also DP_SKELETONOBJECTS (this extension implemented on server as well as client)
-//
-//notes:
-//each model contains its own skeleton, reusing a skeleton with incompatible models will yield garbage (or not render).
-//each model contains its own animation data, you can use animations from other model files (for example saving out all character animations as separate model files).
-//if an engine supports loading an animation-only file format such as .md5anim in FTEQW, it can be used to animate any model with a compatible skeleton.
-//proper use of this extension may require understanding matrix transforms (v_forward, v_right, v_up, origin), and you must keep in mind that v_right is negative for this purpose.
-//
-//features include:
-//multiple animations blended together.
-//animating a model with animations from another model with a compatible skeleton.
-//restricting animation blends to certain bones of a model - for example independent animation of legs, torso, head.
-//custom bone controllers - for example making eyes track a target location.
-//
-//
-//
-//example code follows...
-//
-//this helper function lets you identify (by parentage) what group a bone
-//belongs to - for example "torso", "leftarm", would return 1 ("torso") for
-//all children of the bone named "torso", unless they are children of
-//"leftarm" (which is a child of "torso") which would return 2 instead...
-float(float skel, float bonenum, string g1, string g2, string g3, string g4, string g5, string g6) example_skel_findbonegroup =
-{
-       string bonename;
-       while (bonenum >= 0)
-       {
-               bonename = skel_get_bonename(skel, bonenum);
-               if (bonename == g1) return 1;
-               if (bonename == g2) return 2;
-               if (bonename == g3) return 3;
-               if (bonename == g4) return 4;
-               if (bonename == g5) return 5;
-               if (bonename == g6) return 6;
-               bonenum = skel_get_boneparent(skel, bonenum);
-       }
-       return 0;
-};
-// create a skeletonindex for our player using current modelindex
-void() example_skel_player_setup =
-{
-       self.skeletonindex = skel_create(self.modelindex);
-};
-// setup bones of skeleton based on an animation
-// note: animmodelindex can be a different model than self.modelindex
-void(float animmodelindex, float framegroup, float framegroupstarttime) example_skel_player_update_begin =
-{
-       // start with our standard animation
-       self.frame = framegroup;
-       self.frame2 = 0;
-       self.frame3 = 0;
-       self.frame4 = 0;
-       self.frame1time = framegroupstarttime;
-       self.frame2time = 0;
-       self.frame3time = 0;
-       self.frame4time = 0;
-       self.lerpfrac = 0;
-       self.lerpfrac3 = 0;
-       self.lerpfrac4 = 0;
-       skel_build(self.skeletonindex, self, animmodelindex, 0, 0, 100000);
-};
-// apply a different framegroup animation to bones with a specified parent
-void(float animmodelindex, float framegroup, float framegroupstarttime, float blendalpha, string groupbonename, string excludegroupname1, string excludegroupname2) example_skel_player_update_applyoverride =
-{
-       self.frame = framegroup;
-       self.frame2 = 0;
-       self.frame3 = 0;
-       self.frame4 = 0;
-       self.frame1time = framegroupstarttime;
-       self.frame2time = 0;
-       self.frame3time = 0;
-       self.frame4time = 0;
-       self.lerpfrac = 0;
-       self.lerpfrac3 = 0;
-       self.lerpfrac4 = 0;
-       float bonenum = 0;
-       float numbones = skel_get_numbones(self.skeletonindex);
-       while (bonenum < numbones)
-       {
-               if (example_skel_findbonegroup(self.skeletonindex, bonenum, groupbonename, excludegroupname1, excludegroupname2, "", "", "") == 1)
-                       skel_build(self.skeletonindex, self, animmodelindex, 1 - blendalpha, bonenum, bonenum + 1);
-               bonenum = bonenum + 1;
-       }
-};
-// make eyes point at a target location, be sure v_forward, v_right, v_up are set correctly before calling
-void(vector eyetarget, string bonename) example_skel_player_update_eyetarget =
-{
-       float bonenum = skel_find_bone(self.skeletonindex, bonename) - 1;
-       if (bonenum < 0)
-               return;
-       vector oldforward = v_forward;
-       vector oldright = v_right;
-       vector oldup = v_up;
-       vector v = eyetarget - self.origin;
-       vector modeleyetarget;
-       modeleyetarget.x =   v * v_forward;
-       modeleyetarget.y = 0-v * v_right;
-       modeleyetarget.z =   v * v_up;
-       // this is an eyeball, make it point at the target location
-       // first get all the data we can...
-       vector relorg = skel_get_bonerel(self.skeletonindex, bonenum);
-       vector relforward = v_forward;
-       vector relright = v_right;
-       vector relup = v_up;
-       vector boneorg = skel_get_boneabs(self.skeletonindex, bonenum);
-       vector boneforward = v_forward;
-       vector boneright = v_right;
-       vector boneup = v_up;
-       vector parentorg = skel_get_boneabs(self.skeletonindex, skel_get_boneparent(self.skeletonindex, bonenum));
-       vector parentforward = v_forward;
-       vector parentright = v_right;
-       vector parentup = v_up;
-       // get the vector from the eyeball to the target
-       vector u = modeleyetarget - boneorg;
-       // now transform it inversely by the parent matrix to produce new rel vectors
-       v.x = u * parentforward;
-       v.y = u * parentright;
-       v.z = u * parentup;
-       vector ang = vectoangles2(v, relup);
-       ang.x = 0 - ang.x;
-       makevectors(ang);
-       // set the relative bone matrix
-       skel_set_bone(self.skeletonindex, bonenum, relorg);
-       // restore caller's v_ vectors
-       v_forward = oldforward;
-       v_right = oldright;
-       v_up = oldup;
-};
-// delete skeleton when we're done with it
-// note: skeleton remains valid until next frame when it is really deleted
-void() example_skel_player_delete =
-{
-       skel_delete(self.skeletonindex);
-       self.skeletonindex = 0;
-};
-//
-// END OF EXAMPLES FOR FTE_CSQC_SKELETONOBJECTS
-//
-
-//DP_QC_ENTITYDATA
-//idea: KrimZon
-//darkplaces implementation: KrimZon
-//builtin definitions:
-float() numentityfields = #496;
-string(float fieldnum) entityfieldname = #497;
-float(float fieldnum) entityfieldtype = #498;
-string(float fieldnum, entity ent) getentityfieldstring = #499;
-float(float fieldnum, entity ent, string s) putentityfieldstring = #500;
-//constants:
-//Returned by entityfieldtype
-float FIELD_STRING   = 1;
-float FIELD_FLOAT    = 2;
-float FIELD_VECTOR   = 3;
-float FIELD_ENTITY   = 4;
-float FIELD_FUNCTION = 6;
-//description:
-//Versatile functions intended for storing data from specific entities between level changes, but can be customized for some kind of partial savegame.
-//WARNING: .entity fields cannot be saved and restored between map loads as they will leave dangling pointers.
-//numentityfields returns the number of entity fields. NOT offsets. Vectors comprise 4 fields: v, v_x, v_y and v_z.
-//entityfieldname returns the name as a string, eg. "origin" or "classname" or whatever.
-//entityfieldtype returns a value that the constants represent, but the field may be of another type in more exotic progs.dat formats or compilers.
-//getentityfieldstring returns data as would be written to a savegame, eg... "0.05" (float), "0 0 1" (vector), or "Hello World!" (string). Function names can also be returned.
-//putentityfieldstring puts the data returned by getentityfieldstring back into the entity.
-
-//DP_QC_ENTITYSTRING
-void(string s) loadfromdata = #529;
-void(string s) loadfromfile = #530;
-void(string s) callfunction = #605;
-void(float fh, entity e) writetofile = #606;
-float(string s) isfunction = #607;
-void(entity e, string s) parseentitydata = #608;
-
-//DP_COVERAGE
-//idea: divVerent
-//darkplaces implementation: divVerent
-//function definitions:
-void coverage() = #642;  // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
-
-// assorted builtins
-//const int STAT_MOVEVARS_TICRATE              = 240;
-//const int STAT_MOVEVARS_TIMESCALE            = 241;
-//const int STAT_FRAGLIMIT                             = 235;
-//const int STAT_TIMELIMIT                             = 236;
-//const int STAT_MOVEVARS_GRAVITY       = 242;
-string(void) ReadPicture                               = #501;
-const int PARTICLES_USEALPHA = 1;
-float particles_alphamin, particles_alphamax;
-const int PARTICLES_USECOLOR = 2;
-vector particles_colormin, particles_colormax;
-const int PARTICLES_USEFADE = 4;  // fades the COUNT (fade alpha using alphamin/alphamax)
-float particles_fade;
-const int PARTICLES_DRAWASTRAIL = 128;
-void(float effectindex, entity own, vector org_from, vector org_to, vector dir_from, vector dir_to, float countmultiplier, float flags) boxparticles = #502;
-float trace_networkentity;
-const int RF_FULLBRIGHT        = 256;
-const int RF_NOSHADOW  = 512;
-const int RF_DYNAMICMODELLIGHT = 8192;
-
-float gettaginfo_parent;
-string gettaginfo_name;
-vector gettaginfo_offset;
-vector gettaginfo_forward;
-vector gettaginfo_right;
-vector gettaginfo_up;
-float checkpvs(vector viewpos, entity viewee) = #240;
+#undef true
+#undef false
+#undef TRUE
+#undef FALSE
 
 #pragma noref 0
 
index 109e919..2487da4 100644 (file)
 #ifndef DPEXTENSIONS_H
 #define DPEXTENSIONS_H
-//DarkPlaces supported extension list, draft version 1.04
 
-//things that don't have extensions yet:
-.float disableclientprediction;
+#pragma noref 1
 
-//definitions that id Software left out:
-//these are passed as the 'nomonsters' parameter to traceline/tracebox (yes really this was supported in all quake engines, nomonsters is misnamed)
-float MOVE_NORMAL = 0; // same as false
-float MOVE_NOMONSTERS = 1; // same as true
-float MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE
+#include "upstream/dpextensions.qc"
 
-//checkextension function
-//idea: expected by almost everyone
-//darkplaces implementation: LordHavoc
-float(string s) checkextension = #99;
-//description:
-//check if (cvar("pr_checkextension")) before calling this, this is the only
-//guaranteed extension to be present in the extension system, it allows you
-//to check if an extension is available, by name, to check for an extension
-//use code like this:
-//// (it is recommended this code be placed in worldspawn or a worldspawn called function somewhere)
-//if (cvar("pr_checkextension"))
-//if (checkextension("DP_SV_SETCOLOR"))
-//     ext_setcolor = true;
-//from then on you can check ext_setcolor to know if that extension is available
+int(entity ent, string tagname) _gettagindex = #451;
+#define gettagindex _gettagindex
 
-//BX_WAL_SUPPORT
-//idea: id Software
-//darkplaces implementation: LordHavoc
-//description:
-//indicates the engine supports .wal textures for filenames in the textures/ directory
-//(note: DarkPlaces has supported this since 2001 or 2002, but did not advertise it as an extension, then I noticed Betwix was advertising it and added the extension accordingly)
+int(string effectname) _particleeffectnum = #335;
+#define particleeffectnum _particleeffectnum
 
-//DP_BUTTONCHAT
-//idea: Vermeulen
-//darkplaces implementation: LordHavoc
-//field definitions:
-.float buttonchat;
-//description:
-//true if the player is currently chatting (in messagemode, menus or console)
+int(string s, string separator1, ...) _tokenizebyseparator = #479;
+#define tokenizebyseparator _tokenizebyseparator
 
-//DP_BUTTONUSE
-//idea: id Software
-//darkplaces implementation: LordHavoc
-//field definitions:
-.float buttonuse;
-//client console commands:
-//+use
-//-use
-//description:
-//made +use and -use commands work, they now control the .buttonuse field (.button1 was used by many mods for other purposes).
+int(string s) _tokenize_console = #514;
+#define tokenize_console _tokenize_console
 
-//DP_CL_LOADSKY
-//idea: Nehahra, LordHavoc
-//darkplaces implementation: LordHavoc
-//client console commands:
-//"loadsky" (parameters: "basename", example: "mtnsun_" would load "mtnsun_up.tga" and "mtnsun_rt.tga" and similar names, use "" to revert to quake sky, note: this is the same as Quake2 skybox naming)
-//description:
-//sets global skybox for the map for this client (can be stuffed to a client by QC), does not hurt much to repeatedly execute this command, please don't use this in mods if it can be avoided (only if changing skybox is REALLY needed, otherwise please use DP_GFX_SKYBOX).
+int(int i) _argv_start_index = #515;
+#define argv_start_index _argv_start_index
 
-//DP_CON_SET
-//idea: id Software
-//darkplaces implementation: LordHavoc
-//description:
-//indicates this engine supports the "set" console command which creates or sets a non-archived cvar (not saved to config.cfg on exit), it is recommended that set and seta commands be placed in default.cfg for mod-specific cvars.
+int(int i) _argv_end_index = #516;
+#define argv_end_index _argv_end_index
 
-//DP_CON_SETA
-//idea: id Software
-//darkplaces implementation: LordHavoc
-//description:
-//indicates this engine supports the "seta" console command which creates or sets an archived cvar (saved to config.cfg on exit), it is recommended that set and seta commands be placed in default.cfg for mod-specific cvars.
+int(string s) _strlen = #114;
+#define strlen _strlen
 
-//DP_CON_ALIASPARAMETERS
-//idea: many
-//darkplaces implementation: Black
-//description:
-//indicates this engine supports aliases containing $1 through $9 parameter macros (which when called will expand to the parameters passed to the alias, for example alias test "say $2 $1", then you can type test hi there and it will execute say there hi), as well as $0 (name of the alias) and $* (all parameters $1 onward).
+float(float skel, float bonenum) _skel_get_boneparent = #267;
+#define skel_get_boneparent _skel_get_boneparent
 
-//DP_CON_EXPANDCVAR
-//idea: many, PHP
-//darkplaces implementation: Black
-//description:
-//indicates this engine supports console commandlines containing $cvarname which will expand to the contents of that cvar as a parameter, for instance say my fov is $fov, will say "my fov is 90", or similar.
+float(float skel, string tagname) _skel_find_bone = #268;
+#define skel_find_bone _skel_find_bone
 
-//DP_CON_STARTMAP
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//description:
-//adds two engine-called aliases named startmap_sp and startmap_dm which are called when the engine tries to start a singleplayer game from the menu (startmap_sp) or the -listen or -dedicated options are used or the engine is a dedicated server (uses startmap_dm), these allow a mod or game to specify their own map instead of start, and also distinguish between singleplayer and -listen/-dedicated, also these need not be a simple "map start" command, they can do other things if desired, startmap_sp and startmap_dm both default to "map start".
+float(string str, string sub, float startpos) _strstrofs = #221;
+#define strstrofs _strstrofs
 
-//DP_EF_ADDITIVE
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int   EF_ADDITIVE     = 32;
-//description:
-//additive blending when this object is rendered
+float(string str, float ofs) _str2chr = #222;
+#define str2chr _str2chr
 
-//DP_EF_BLUE
-//idea: id Software
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int   EF_BLUE         = 64;
-//description:
-//entity emits blue light (used for quad)
+string(int c, ...) _chr2str = #223;
+#define chr2str _chr2str
 
-//DP_EF_DOUBLESIDED
-//idea: LordHavoc
-//darkplaces implementation: [515] and LordHavoc
-//effects bit:
-const int EF_DOUBLESIDED = 32768;
-//description:
-//render entity as double sided (backfaces are visible, I.E. you see the 'interior' of the model, rather than just the front), can be occasionally useful on transparent stuff.
+int(string s1, string s2) _strcmp = #228;
+#define strcmp _strcmp
 
-//DP_EF_DYNAMICMODELLIGHT
-//idea: C.Brutail, divVerent, maikmerten
-//darkplaces implementation: divVerent
-//effects bit:
-const int   EF_DYNAMICMODELLIGHT     = 131072;
-//description:
-//force dynamic model light on the entity, even if it's a BSP model (or anything else with lightmaps or light colors)
+int(string s1, string s2, int len) _strncmp = #228;
+#define strncmp _strncmp
 
-//DP_EF_FLAME
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int   EF_FLAME        = 1024;
-//description:
-//entity is on fire
+int(string s1, string s2) _strcasecmp = #229;
+#define strcasecmp _strcasecmp
 
-//DP_EF_FULLBRIGHT
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int   EF_FULLBRIGHT   = 512;
-//description:
-//entity is always brightly lit
+int(string s1, string s2, int len) _strncasecmp = #230;
+#define strncasecmp _strncasecmp
 
-//DP_EF_NODEPTHTEST
-//idea: Supa
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int   EF_NODEPTHTEST       = 8192;
-//description:
-//makes entity show up to client even through walls, useful with EF_ADDITIVE for special indicators like where team bases are in a map, so that people don't get lost
+int() _buf_create = #460;
+#define buf_create _buf_create
 
-//DP_EF_NODRAW
-//idea: id Software
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int   EF_NODRAW       = 16;
-//description:
-//prevents server from sending entity to client (forced invisible, even if it would have been a light source or other such things)
+#pragma noref 0
 
-//DP_EF_NOGUNBOB
-//idea: Chris Page, Dresk
-//darkplaces implementation: LordHAvoc
-//effects bit:
-const int   EF_NOGUNBOB     = 256;
-//description:
-//this has different meanings depending on the entity it is used on:
-//player entity - prevents gun bobbing on player.viewmodel
-//viewmodelforclient entity - prevents gun bobbing on an entity attached to the player's view
-//other entities - no effect
-//uses:
-//disabling gun bobbing on a diving mask or other model used as a .viewmodel.
-//disabling gun bobbing on view-relative models meant to be part of the heads up display.  (note: if fov is changed these entities may be off-screen, or too near the center of the screen, so use fov 90 in this case)
-
-//DP_EF_NOSHADOW
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int   EF_NOSHADOW     = 4096;
-//description:
-//realtime lights will not cast shadows from this entity (but can still illuminate it)
-
-//DP_EF_RED
-//idea: id Software
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int   EF_RED          = 128;
-//description:
-//entity emits red light (used for invulnerability)
-
-//DP_EF_RESTARTANIM_BIT
-//idea: id software
-//darkplaces implementation: divVerent
-//effects bit:
-const int   EF_RESTARTANIM_BIT = 1048576;
-//description:
-//when toggled, the current animation is restarted. Useful for weapon animation.
-//to toggle this bit in QC, you can do:
-//  self.effects += (EF_RESTARTANIM_BIT - 2 * (self.effects & EF_RESTARTANIM_BIT));
-
-//DP_EF_STARDUST
-//idea: MythWorks Inc
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int   EF_STARDUST     = 2048;
-//description:
-//entity emits bouncing sparkles in every direction
-
-//DP_EF_TELEPORT_BIT
-//idea: id software
-//darkplaces implementation: divVerent
-//effects bit:
-const int   EF_TELEPORT_BIT = 2097152;
-//description:
-//when toggled, interpolation of the entity is skipped for one frame. Useful for teleporting.
-//to toggle this bit in QC, you can do:
-//  self.effects += (EF_TELEPORT_BIT - 2 * (self.effects & EF_TELEPORT_BIT));
-
-//DP_ENT_ALPHA
-//idea: Nehahra
-//darkplaces implementation: LordHavoc
-//fields:
-.float alpha;
-//description:
-//controls opacity of the entity, 0.0 is forced to be 1.0 (otherwise everything would be invisible), use -1 if you want to make something invisible, 1.0 is solid (like normal).
-
-//DP_ENT_COLORMOD
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//field definition:
-.vector colormod;
-//description:
-//controls color of the entity, '0 0 0', is forced to be '1 1 1' (otherwise everything would be black), used for tinting objects, for instance using '1 0.6 0.4' on an ogre would give you an orange ogre (order is red green blue), note the colors can go up to '8 8 8' (8x as bright as normal).
-
-//DP_ENT_CUSTOMCOLORMAP
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//description:
-//if .colormap is set to 1024 + pants + shirt * 16, those colors will be used for colormapping the entity, rather than looking up a colormap by player number.
-
-/*
-//NOTE: no longer supported by darkplaces because all entities are delta compressed now
-//DP_ENT_DELTACOMPRESS // no longer supported
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//effects bit:
-float EF_DELTA = 8388608;
-//description:
-//(obsolete) applies delta compression to the network updates of the entity, making updates smaller, this might cause some unreliable behavior in packet loss situations, so it should only be used on numerous (nails/plasma shots/etc) or unimportant objects (gibs/shell casings/bullet holes/etc).
-*/
-
-//DP_ENT_EXTERIORMODELTOCLIENT
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//fields:
-.entity exteriormodeltoclient;
-//description:
-//the entity is visible to all clients with one exception: if the specified client is using first person view (not using chase_active) the entity will not be shown.  Also if tag attachments are supported any entities attached to the player entity will not be drawn in first person.
-
-//DP_ENT_GLOW
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//field definitions:
-.float glow_color;
-.float glow_size;
-.float glow_trail;
-//description:
-//customizable glowing light effect on the entity, glow_color is a paletted (8bit) color in the range 0-255 (note: 0 and 254 are white), glow_size is 0 or higher (up to the engine what limit to cap it to, darkplaces imposes a 1020 limit), if glow_trail is true it will leave a trail of particles of the same color as the light.
-
-//DP_ENT_GLOWMOD
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//field definition:
-.vector glowmod;
-//description:
-//controls color of the entity's glow texture (fullbrights), '0 0 0', is forced to be '1 1 1' (otherwise everything would be black), used for tinting objects, see colormod (same color restrictions apply).
-
-//DP_ENT_LOWPRECISION
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//effects bit:
-const int EF_LOWPRECISION = 4194304;
-//description:
-//uses low quality origin coordinates, reducing network traffic compared to the default high precision, intended for numerous objects (projectiles/gibs/bullet holes/etc).
-
-//DP_ENT_SCALE
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//field definitions:
-.float scale;
-//description:
-//controls rendering scale of the object, 0 is forced to be 1, darkplaces uses 1/16th accuracy and a limit of 15.9375, can be used to make an object larger or smaller.
-
-//DP_ENT_TRAILEFFECTNUM
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//field definitions:
-.float traileffectnum;
-//description:
-//use a custom effectinfo.txt effect on this entity, assign it like this:
-//self.traileffectnum = particleeffectnum("mycustomeffect");
-//this will do both the dlight and particle trail as described in the effect, basically equivalent to trailparticles() in CSQC but performed on a server entity.
-
-//DP_ENT_VIEWMODEL
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//field definitions:
-.entity viewmodelforclient;
-//description:
-//this is a very special capability, attachs the entity to the view of the client specified, origin and angles become relative to the view of that client, all effects can be used (multiple skins on a weapon model etc)...  the entity is not visible to any other client.
-
-//DP_GFX_EXTERNALTEXTURES
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//description:
-//loads external textures found in various directories (tenebrae compatible)...
-/*
-in all examples .tga is merely the base texture, it can be any of these:
-.tga (base texture)
-_glow.tga (fullbrights or other glowing overlay stuff, NOTE: this is done using additive blend, not alpha)
-_pants.tga (pants overlay for colormapping on models, this should be shades of grey (it is tinted by pants color) and black wherever the base texture is not black, as this is an additive blend)
-_shirt.tga (same idea as pants, but for shirt color)
-_diffuse.tga (this may be used instead of base texture for per pixel lighting)
-_gloss.tga (specular texture for per pixel lighting, note this can be in color (tenebrae only supports greyscale))
-_norm.tga (normalmap texture for per pixel lighting)
-_bump.tga (bumpmap, converted to normalmap at load time, supported only for reasons of tenebrae compatibility)
-_luma.tga (same as _glow but supported only for reasons of tenebrae compatibility)
-
-due to glquake's incomplete Targa(r) loader, this section describes
-required Targa(r) features support:
-types:
-type 1 (uncompressed 8bit paletted with 24bit/32bit palette)
-type 2 (uncompressed 24bit/32bit true color, glquake supported this)
-type 3 (uncompressed 8bit greyscale)
-type 9 (RLE compressed 8bit paletted with 24bit/32bit palette)
-type 10 (RLE compressed 24bit/32bit true color, glquake supported this)
-type 11 (RLE compressed 8bit greyscale)
-attribute bit 0x20 (Origin At Top Left, top to bottom, left to right)
-
-image formats guaranteed to be supported: tga, pcx, lmp
-image formats that are optional: png, jpg
-
-mdl/spr/spr32 examples:
-skins are named _A (A being a number) and skingroups are named like _A_B
-these act as suffixes on the model name...
-example names for skin _2_1 of model "progs/armor.mdl":
-game/override/progs/armor.mdl_2_1.tga
-game/textures/progs/armor.mdl_2_1.tga
-game/progs/armor.mdl_2_1.tga
-example names for skin _0 of the model "progs/armor.mdl":
-game/override/progs/armor.mdl_0.tga
-game/textures/progs/armor.mdl_0.tga
-game/progs/armor.mdl_0.tga
-note that there can be more skins files (of the _0 naming) than the mdl
-contains, this is only useful to save space in the .mdl file if classic quake
-compatibility is not a concern.
-
-bsp/md2/md3 examples:
-example names for the texture "quake" of model "maps/start.bsp":
-game/override/quake.tga
-game/textures/quake.tga
-game/quake.tga
-
-sbar/menu/console textures: for example the texture "conchars" (console font) in gfx.wad
-game/override/gfx/conchars.tga
-game/textures/gfx/conchars.tga
-game/gfx/conchars.tga
-*/
-
-//DP_GFX_EXTERNALTEXTURES_PERMAPTEXTURES
-//idea: Fuh?
-//darkplaces implementation: LordHavoc
-//description:
-//Q1BSP and HLBSP map loading loads external textures found in textures/<mapname>/ as well as textures/.
-//Where mapname is the bsp filename minus the extension (typically .bsp) and minus maps/ if it is in maps/ (any other path is not removed)
-//example:
-//maps/e1m1.bsp uses textures in the directory textures/e1m1/ and falls back to textures/
-//maps/b_batt0.bsp uses textures in the directory textures/b_batt0.bsp and falls back to textures/
-//as a more extreme example:
-//progs/something/blah.bsp uses textures in the directory textures/progs/something/blah/ and falls back to textures/
-
-//DP_GFX_FOG
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//worldspawn fields:
-//"fog" (parameters: "density red green blue", example: "0.1 0.3 0.3 0.3")
-//description:
-//global fog for the map, can not be changed by QC
-
-//DP_GFX_QUAKE3MODELTAGS
-//idea: id Software
-//darkplaces implementation: LordHavoc
-//field definitions:
-.entity tag_entity; // entity this is attached to (call setattachment to set this)
-.float tag_index; // which tag on that entity (0 is relative to the entity, > 0 is an index into the tags on the model if it has any) (call setattachment to set this)
-//builtin definitions:
-void(entity e, entity tagentity, string tagname) setattachment = #443; // attachs e to a tag on tagentity (note: use "" to attach to entity origin/angles instead of a tag)
-//description:
-//allows entities to be visually attached to model tags (which follow animations perfectly) on other entities, for example attaching a weapon to a player's hand, or upper body attached to lower body, allowing it to change angles and frame separately (note: origin and angles are relative to the tag, use '0 0 0' for both if you want it to follow exactly, this is similar to viewmodelforclient's behavior).
-//note 2: if the tag is not found, it defaults to "" (attach to origin/angles of entity)
-//note 3: attaching to world turns off attachment
-//note 4: the entity that this is attached to must be visible for this to work
-//note 5: if an entity is attached to the player entity it will not be drawn in first person.
-
-//DP_GFX_SKINFILES
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//description:
-//alias models (mdl, md2, md3) can have .skin files to replace conventional texture naming, these have a naming format such as:
-//progs/test.md3_0.skin
-//progs/test.md3_1.skin
-//...
-//
-//these files contain replace commands (replace meshname shadername), example:
-//replace "helmet" "progs/test/helmet1.tga" // this is a mesh shader replacement
-//replace "teamstripes" "progs/test/redstripes.tga"
-//replace "visor" "common/nodraw" // this makes the visor mesh invisible
-////it is not possible to rename tags using this format
-//
-//Or the Quake3 syntax (100% compatible with Quake3's .skin files):
-//helmet,progs/test/helmet1.tga // this is a mesh shader replacement
-//teamstripes,progs/test/redstripes.tga
-//visor,common/nodraw // this makes the visor mesh invisible
-//tag_camera, // this defines that the first tag in the model is called tag_camera
-//tag_test, // this defines that the second tag in the model is called tag_test
-//
-//any names that are not replaced are automatically show up as a grey checkerboard to indicate the error status, and "common/nodraw" is a special case that is invisible.
-//this feature is intended to allow multiple skin sets on md3 models (which otherwise only have one skin set).
-//other commands might be added someday but it is not expected.
-
-//DP_GFX_SKYBOX
-//idea: LordHavoc
-//darkplaces implementation: LordHavoc
-//worldspawn fields:
-//"sky" (parameters: "basename", example: "mtnsun_" would load "mtnsun_up.tga" and "mtnsun_rt.tga" and similar names, note: "sky" is also used the same way by Quake2)
-//description:
-//global skybox for the map, can not be changed by QC
-
-//DP_UTF8
-//idea: Blub\0, divVerent
-//darkplaces implementation: Blub\0
-//cvar definitions:
-//   utf8_enable: en