├── .gitattributes ├── .github └── workflows │ └── build.yml ├── .gitignore ├── QIIIA Game Source License.doc ├── QIIIA Game Source License.txt ├── README.md ├── assets ├── gfx │ └── 2d │ │ ├── bigchars.cfg │ │ ├── bigchars_16.tga │ │ ├── bigchars_32.tga │ │ ├── bigchars_64.tga │ │ ├── numbers.cfg │ │ ├── numbers_128.tga │ │ ├── numbers_32.tga │ │ └── numbers_64.tga ├── icons │ ├── envirosuit.tga │ ├── flight.tga │ ├── haste.tga │ ├── icona_bfg.tga │ ├── icona_grenade.tga │ ├── icona_lightning.tga │ ├── icona_machinegun.tga │ ├── icona_plasma.tga │ ├── icona_railgun.tga │ ├── icona_rocket.tga │ ├── icona_shotgun.tga │ ├── iconf_blu.tga │ ├── iconf_blu1.tga │ ├── iconf_blu2.tga │ ├── iconf_blu3.tga │ ├── iconf_blu4.tga │ ├── iconf_neutral1.tga │ ├── iconf_neutral3.tga │ ├── iconf_red.tga │ ├── iconf_red1.tga │ ├── iconf_red2.tga │ ├── iconf_red3.tga │ ├── iconf_red4.tga │ ├── iconh_borb.tga │ ├── iconh_green.tga │ ├── iconh_mega.tga │ ├── iconh_red.tga │ ├── iconh_rorb.tga │ ├── iconh_yellow.tga │ ├── iconr_green.tga │ ├── iconr_red.tga │ ├── iconr_shard.tga │ ├── iconr_yellow.tga │ ├── icont_bfg.tga │ ├── icont_gauntlet.tga │ ├── icont_grapple.tga │ ├── icont_grenade.tga │ ├── icont_lightning.tga │ ├── icont_machinegun.tga │ ├── icont_plasma.tga │ ├── icont_railgun.tga │ ├── icont_rocket.tga │ ├── icont_shotgun.tga │ ├── iconw_bfg.tga │ ├── iconw_gauntlet.tga │ ├── iconw_grapple.tga │ ├── iconw_grapple_hr.tga │ ├── iconw_grenade.tga │ ├── iconw_lightning.tga │ ├── iconw_machinegun.tga │ ├── iconw_plasma.tga │ ├── iconw_railgun.tga │ ├── iconw_rocket.tga │ ├── iconw_shotgun.tga │ ├── invis.tga │ ├── medkit.tga │ ├── noammo.tga │ ├── quad.tga │ ├── regen.tga │ ├── skull_blue.tga │ ├── skull_red.tga │ └── teleporter.tga ├── menu │ └── art │ │ └── fx_base.tga ├── models │ ├── flag2 │ │ ├── blue.skin │ │ ├── flagflap3.md3 │ │ ├── flagpole.md3 │ │ ├── red.skin │ │ └── white.skin │ ├── flags │ │ └── w_flag2.tga │ ├── players │ │ ├── anarki │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── color_x.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── biker │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── bitterman │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── bones │ │ │ ├── color.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── crash │ │ │ ├── color.tga │ │ │ ├── color_t.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── doom │ │ │ ├── color.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── grunt │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── hunter │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── color_x.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── keel │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── klesk │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── lucy │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── major │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── mynx │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── color_x.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── orbb │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── ranger │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── razor │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── sarge │ │ │ ├── color.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── slash │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── color_skates.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── sorlag │ │ │ ├── color.tga │ │ │ ├── color_t.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── tankjr │ │ │ ├── color.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── uriel │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── color_x.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ ├── visor │ │ │ ├── color.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ │ └── xaero │ │ │ ├── color.tga │ │ │ ├── color_h.tga │ │ │ ├── head_pm.skin │ │ │ ├── icon_pm.tga │ │ │ ├── lower_pm.skin │ │ │ └── upper_pm.skin │ └── weaphits │ │ └── rlboom │ │ ├── rlboom_1.tga │ │ ├── rlboom_2.tga │ │ ├── rlboom_5.tga │ │ ├── rlboom_6.tga │ │ ├── rlboom_7.tga │ │ └── rlboom_8.tga ├── scripts │ ├── iconsdf.shaderx │ └── players.shader └── sound │ └── feedback │ ├── hit100.wav │ ├── hit25.wav │ ├── hit50.wav │ └── hit75.wav ├── build ├── linux-qvm │ ├── Makefile │ ├── config.mk │ ├── srcs.mk │ └── tools │ │ ├── q3asm │ │ ├── q3cpp │ │ ├── q3lcc │ │ └── q3rcc ├── linux │ └── Makefile ├── win32-msvc │ ├── baseq3e.sln │ ├── cgame.vcproj │ ├── game.vcproj │ └── q3_ui.vcproj └── win32-qvm │ ├── cgame.q3asm │ ├── compile.bat │ ├── game.q3asm │ ├── q3_ui.q3asm │ └── tools │ ├── 7za.exe │ ├── q3asm.exe │ ├── q3cpp.exe │ ├── q3lcc.exe │ └── q3rcc.exe ├── code ├── cgame │ ├── cg_consolecmds.c │ ├── cg_cvar.h │ ├── cg_draw.c │ ├── cg_drawtools.c │ ├── cg_effects.c │ ├── cg_ents.c │ ├── cg_event.c │ ├── cg_info.c │ ├── cg_local.h │ ├── cg_localents.c │ ├── cg_main.c │ ├── cg_marks.c │ ├── cg_newdraw.c │ ├── cg_particles.c │ ├── cg_players.c │ ├── cg_playerstate.c │ ├── cg_predict.c │ ├── cg_public.h │ ├── cg_scoreboard.c │ ├── cg_servercmds.c │ ├── cg_snapshot.c │ ├── cg_syscalls.asm │ ├── cg_syscalls.c │ ├── cg_view.c │ ├── cg_weapons.c │ ├── cgame.def │ ├── modulus.c │ └── tr_types.h ├── game │ ├── ai_chat.c │ ├── ai_chat.h │ ├── ai_cmd.c │ ├── ai_cmd.h │ ├── ai_dmnet.c │ ├── ai_dmnet.h │ ├── ai_dmq3.c │ ├── ai_dmq3.h │ ├── ai_main.c │ ├── ai_main.h │ ├── ai_team.c │ ├── ai_team.h │ ├── ai_vcmd.c │ ├── ai_vcmd.h │ ├── be_aas.h │ ├── be_ai_char.h │ ├── be_ai_chat.h │ ├── be_ai_gen.h │ ├── be_ai_goal.h │ ├── be_ai_move.h │ ├── be_ai_weap.h │ ├── be_ea.h │ ├── bg_events.h │ ├── bg_lib.c │ ├── bg_lib.h │ ├── bg_local.h │ ├── bg_misc.c │ ├── bg_mods.h │ ├── bg_pmove.c │ ├── bg_public.h │ ├── bg_slidemove.c │ ├── botlib.h │ ├── chars.h │ ├── g_active.c │ ├── g_arenas.c │ ├── g_bot.c │ ├── g_client.c │ ├── g_cmds.c │ ├── g_combat.c │ ├── g_cvar.h │ ├── g_items.c │ ├── g_local.h │ ├── g_main.c │ ├── g_mem.c │ ├── g_misc.c │ ├── g_missile.c │ ├── g_mover.c │ ├── g_public.h │ ├── g_rankings.c │ ├── g_rankings.h │ ├── g_rotation.c │ ├── g_session.c │ ├── g_spawn.c │ ├── g_svcmds.c │ ├── g_syscalls.asm │ ├── g_syscalls.c │ ├── g_target.c │ ├── g_team.c │ ├── g_team.h │ ├── g_trigger.c │ ├── g_unlagged.c │ ├── g_utils.c │ ├── g_weapon.c │ ├── game.def │ ├── inv.h │ ├── match.h │ ├── q_math.c │ ├── q_shared.c │ ├── q_shared.h │ ├── surfaceflags.h │ └── syn.h ├── q3_ui │ ├── keycodes.h │ ├── ui.def │ ├── ui_addbots.c │ ├── ui_atoms.c │ ├── ui_cdkey.c │ ├── ui_cinematics.c │ ├── ui_confirm.c │ ├── ui_connect.c │ ├── ui_controls2.c │ ├── ui_credits.c │ ├── ui_cvar.h │ ├── ui_demo2.c │ ├── ui_display.c │ ├── ui_gameinfo.c │ ├── ui_ingame.c │ ├── ui_loadconfig.c │ ├── ui_local.h │ ├── ui_login.c │ ├── ui_main.c │ ├── ui_menu.c │ ├── ui_mfield.c │ ├── ui_mods.c │ ├── ui_network.c │ ├── ui_options.c │ ├── ui_playermodel.c │ ├── ui_players.c │ ├── ui_playersettings.c │ ├── ui_preferences.c │ ├── ui_qmenu.c │ ├── ui_rankings.c │ ├── ui_rankstatus.c │ ├── ui_removebots.c │ ├── ui_saveconfig.c │ ├── ui_serverinfo.c │ ├── ui_servers2.c │ ├── ui_setup.c │ ├── ui_signup.c │ ├── ui_sound.c │ ├── ui_sparena.c │ ├── ui_specifyleague.c │ ├── ui_specifyserver.c │ ├── ui_splevel.c │ ├── ui_sppostgame.c │ ├── ui_spreset.c │ ├── ui_spskill.c │ ├── ui_startserver.c │ ├── ui_syscalls.asm │ ├── ui_syscalls.c │ ├── ui_team.c │ ├── ui_teamorders.c │ └── ui_video.c └── ui │ ├── keycodes.h │ ├── ui_atoms.c │ ├── ui_cvar.h │ ├── ui_gameinfo.c │ ├── ui_local.h │ ├── ui_main.c │ ├── ui_players.c │ ├── ui_public.h │ ├── ui_shared.c │ ├── ui_shared.h │ ├── ui_syscalls.asm │ ├── ui_syscalls.c │ └── ui_util.c └── docs ├── client.txt ├── rotation.txt └── server.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: [push] 3 | 4 | jobs: 5 | build: 6 | runs-on: ${{ matrix.os }} 7 | strategy: 8 | matrix: 9 | os: [windows-latest, ubuntu-latest] 10 | arch: [x86, x86_64] 11 | include: 12 | # Windows 13 | - os: windows-latest 14 | arch: x86 15 | platform: windows 16 | - os: windows-latest 17 | arch: x86_64 18 | platform: windows 19 | # Linux 20 | - os: ubuntu-latest 21 | arch: x86 22 | platform: linux 23 | - os: ubuntu-latest 24 | arch: x86_64 25 | platform: linux 26 | 27 | steps: 28 | - uses: actions/checkout@v4 29 | 30 | - name: Install dependencies 31 | if: ${{ matrix.os != 'windows-latest' }} 32 | shell: bash 33 | run: | 34 | sudo apt-get update # && sudo apt-get upgrade -y 35 | sudo apt-get install -y build-essential libc6-dev-i386 g++-multilib gcc-mingw-w64 p7zip-full 36 | 37 | - name: Build for ${{ matrix.os }} ${{ matrix.arch }} 38 | shell: bash 39 | run: | 40 | if [ "${{ matrix.os }}" == "windows-latest" ]; then 41 | # Windows build steps 42 | cd build/win32-qvm 43 | ./compile.bat 44 | else 45 | # Linux build steps 46 | cd build/linux 47 | make -j8 release ARCH="${{ matrix.arch }}" 48 | make -j8 debug ARCH="${{ matrix.arch }}" 49 | 50 | # compiles DLL behaving like MINGW: 51 | make -j8 release PLATFORM=mingw64 ARCH="${{ matrix.arch }}" 52 | make -j8 debug PLATFORM=mingw64 ARCH="${{ matrix.arch }}" 53 | 54 | # compiling QVMs 55 | cd ../../build/linux-qvm 56 | sudo chmod 777 tools/* # make all of them executable 57 | make 58 | fi 59 | env: 60 | ARCHIVE: 1 61 | 62 | - name: Store QVM artifacts 63 | # store only with Linux x86_64 64 | if: ${{ matrix.os != 'windows-latest' && matrix.arch != 'x86' }} 65 | uses: actions/upload-artifact@v4 66 | with: 67 | name: QVMs 68 | path: | 69 | build/linux-qvm/*.pk3 70 | if-no-files-found: error 71 | retention-days: 5 72 | 73 | - name: Store Linux ${{ matrix.arch }} .so artifacts 74 | if: ${{ matrix.os != 'windows-latest' }} 75 | uses: actions/upload-artifact@v4 76 | with: 77 | name: ${{ matrix.platform }}-${{ matrix.arch }} 78 | path: | 79 | build/linux/build/release-${{ matrix.platform }}-${{ matrix.arch }}/baseq3a/*.so 80 | build/linux/build/debug-${{ matrix.platform }}-${{ matrix.arch }}/baseq3a/*.so 81 | if-no-files-found: error 82 | retention-days: 5 83 | 84 | - name: Store Windows ${{ matrix.arch }} DLL artifacts (compiled on Linux) 85 | if: ${{ matrix.os != 'windows-latest' }} 86 | uses: actions/upload-artifact@v4 87 | with: 88 | name: windows-${{ matrix.arch }} 89 | path: | 90 | build/linux/build/release-mingw64-${{ matrix.arch }}/baseq3a/*.dll 91 | build/linux/build/debug-mingw64-${{ matrix.arch }}/baseq3a/*.dll 92 | if-no-files-found: error 93 | retention-days: 5 94 | 95 | - name: Publish a release 96 | uses: softprops/action-gh-release@v2 97 | if: startsWith(github.ref, 'refs/tags/') 98 | env: 99 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 100 | files: | 101 | *.pk3 102 | *.dll 103 | *.so -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/linux/build* 2 | 3 | build/linux-qvm/vm* 4 | build/linux-qvm/*.pk3 5 | 6 | build/win32-msvc/.vs 7 | build/win32-msvc/Backup 8 | build/win32-msvc/Win32 9 | build/win32-msvc/Win64 10 | build/win32-msvc/baseq3e.sln 11 | build/win32-msvc/*.vcxproj 12 | build/win32-msvc/*.vcxproj.filters 13 | build/win32-msvc/*.htm 14 | 15 | build/win32-qvm/vm* 16 | build/win32-qvm/*.pk3 17 | build/win32-qvm/*.pk3.tmp 18 | -------------------------------------------------------------------------------- /QIIIA Game Source License.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/QIIIA Game Source License.doc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # baseq3a 2 | 3 | Unofficial Quake III Arena gamecode patch 4 | 5 | # What is done: 6 | 7 | * new toolchain used (optimized q3lcc and q3asm) 8 | * upstream security fixes 9 | * floatfix 10 | * fixed vote system 11 | * fixed spawn system 12 | * fixed in-game crosshair proportions 13 | * fixed UI mouse sensitivity for high-resolution 14 | * fixed server browser + faster scanning 15 | * fixed grappling hook muzzle position visuals 16 | * new demo UI (subfolders,filtering,sorting) 17 | * updated serverinfo UI 18 | * map rotation system 19 | * unlagged weapons 20 | * improved prediction 21 | * damage-based hitsounds 22 | * colored skins 23 | * high-quality proportional font renderer 24 | * single-line cvar declaration, improved cvar code readability and development efficiency 25 | * single-line event (EV_*) declaration 26 | * single-line mean of death (MOD_*) declaration 27 | 28 | # TODO: 29 | 30 | * bugfixes 31 | 32 | # Documentation 33 | 34 | See /docs/ 35 | 36 | # Compilation and installation 37 | 38 | Look in /build/ 39 | -------------------------------------------------------------------------------- /assets/gfx/2d/bigchars_16.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/gfx/2d/bigchars_16.tga -------------------------------------------------------------------------------- /assets/gfx/2d/bigchars_32.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/gfx/2d/bigchars_32.tga -------------------------------------------------------------------------------- /assets/gfx/2d/bigchars_64.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/gfx/2d/bigchars_64.tga -------------------------------------------------------------------------------- /assets/gfx/2d/numbers.cfg: -------------------------------------------------------------------------------- 1 | // img , up to 4 entries allowed 2 | // img "gfx/2d/numbers_128.tga" 128 3 | img "gfx/2d/numbers_64.tga" 64 4 | img "gfx/2d/numbers_32.tga" 32 5 | // fnt 6 | fnt 512 512 128 128 7 | // 8 | '0' 0 0 6 116 10 10 9 | '1' 128 0 14 92 10 10 10 | '2' 256 0 6 116 10 10 11 | '3' 384 0 6 116 10 10 12 | '4' 0 128 6 116 10 10 13 | '5' 128 128 6 116 10 10 14 | '6' 256 128 6 116 10 10 15 | '7' 384 128 6 116 10 10 16 | '8' 0 256 6 116 10 10 17 | '9' 128 256 6 116 10 10 18 | '-' 256 256 38 52 10 10 19 | -------------------------------------------------------------------------------- /assets/gfx/2d/numbers_128.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/gfx/2d/numbers_128.tga -------------------------------------------------------------------------------- /assets/gfx/2d/numbers_32.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/gfx/2d/numbers_32.tga -------------------------------------------------------------------------------- /assets/gfx/2d/numbers_64.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/gfx/2d/numbers_64.tga -------------------------------------------------------------------------------- /assets/icons/envirosuit.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/envirosuit.tga -------------------------------------------------------------------------------- /assets/icons/flight.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/flight.tga -------------------------------------------------------------------------------- /assets/icons/haste.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/haste.tga -------------------------------------------------------------------------------- /assets/icons/icona_bfg.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icona_bfg.tga -------------------------------------------------------------------------------- /assets/icons/icona_grenade.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icona_grenade.tga -------------------------------------------------------------------------------- /assets/icons/icona_lightning.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icona_lightning.tga -------------------------------------------------------------------------------- /assets/icons/icona_machinegun.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icona_machinegun.tga -------------------------------------------------------------------------------- /assets/icons/icona_plasma.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icona_plasma.tga -------------------------------------------------------------------------------- /assets/icons/icona_railgun.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icona_railgun.tga -------------------------------------------------------------------------------- /assets/icons/icona_rocket.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icona_rocket.tga -------------------------------------------------------------------------------- /assets/icons/icona_shotgun.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icona_shotgun.tga -------------------------------------------------------------------------------- /assets/icons/iconf_blu.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_blu.tga -------------------------------------------------------------------------------- /assets/icons/iconf_blu1.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_blu1.tga -------------------------------------------------------------------------------- /assets/icons/iconf_blu2.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_blu2.tga -------------------------------------------------------------------------------- /assets/icons/iconf_blu3.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_blu3.tga -------------------------------------------------------------------------------- /assets/icons/iconf_blu4.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_blu4.tga -------------------------------------------------------------------------------- /assets/icons/iconf_neutral1.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_neutral1.tga -------------------------------------------------------------------------------- /assets/icons/iconf_neutral3.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_neutral3.tga -------------------------------------------------------------------------------- /assets/icons/iconf_red.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_red.tga -------------------------------------------------------------------------------- /assets/icons/iconf_red1.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_red1.tga -------------------------------------------------------------------------------- /assets/icons/iconf_red2.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_red2.tga -------------------------------------------------------------------------------- /assets/icons/iconf_red3.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_red3.tga -------------------------------------------------------------------------------- /assets/icons/iconf_red4.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconf_red4.tga -------------------------------------------------------------------------------- /assets/icons/iconh_borb.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconh_borb.tga -------------------------------------------------------------------------------- /assets/icons/iconh_green.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconh_green.tga -------------------------------------------------------------------------------- /assets/icons/iconh_mega.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconh_mega.tga -------------------------------------------------------------------------------- /assets/icons/iconh_red.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconh_red.tga -------------------------------------------------------------------------------- /assets/icons/iconh_rorb.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconh_rorb.tga -------------------------------------------------------------------------------- /assets/icons/iconh_yellow.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconh_yellow.tga -------------------------------------------------------------------------------- /assets/icons/iconr_green.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconr_green.tga -------------------------------------------------------------------------------- /assets/icons/iconr_red.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconr_red.tga -------------------------------------------------------------------------------- /assets/icons/iconr_shard.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconr_shard.tga -------------------------------------------------------------------------------- /assets/icons/iconr_yellow.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconr_yellow.tga -------------------------------------------------------------------------------- /assets/icons/icont_bfg.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_bfg.tga -------------------------------------------------------------------------------- /assets/icons/icont_gauntlet.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_gauntlet.tga -------------------------------------------------------------------------------- /assets/icons/icont_grapple.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_grapple.tga -------------------------------------------------------------------------------- /assets/icons/icont_grenade.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_grenade.tga -------------------------------------------------------------------------------- /assets/icons/icont_lightning.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_lightning.tga -------------------------------------------------------------------------------- /assets/icons/icont_machinegun.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_machinegun.tga -------------------------------------------------------------------------------- /assets/icons/icont_plasma.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_plasma.tga -------------------------------------------------------------------------------- /assets/icons/icont_railgun.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_railgun.tga -------------------------------------------------------------------------------- /assets/icons/icont_rocket.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_rocket.tga -------------------------------------------------------------------------------- /assets/icons/icont_shotgun.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/icont_shotgun.tga -------------------------------------------------------------------------------- /assets/icons/iconw_bfg.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_bfg.tga -------------------------------------------------------------------------------- /assets/icons/iconw_gauntlet.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_gauntlet.tga -------------------------------------------------------------------------------- /assets/icons/iconw_grapple.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_grapple.tga -------------------------------------------------------------------------------- /assets/icons/iconw_grapple_hr.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_grapple_hr.tga -------------------------------------------------------------------------------- /assets/icons/iconw_grenade.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_grenade.tga -------------------------------------------------------------------------------- /assets/icons/iconw_lightning.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_lightning.tga -------------------------------------------------------------------------------- /assets/icons/iconw_machinegun.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_machinegun.tga -------------------------------------------------------------------------------- /assets/icons/iconw_plasma.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_plasma.tga -------------------------------------------------------------------------------- /assets/icons/iconw_railgun.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_railgun.tga -------------------------------------------------------------------------------- /assets/icons/iconw_rocket.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_rocket.tga -------------------------------------------------------------------------------- /assets/icons/iconw_shotgun.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/iconw_shotgun.tga -------------------------------------------------------------------------------- /assets/icons/invis.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/invis.tga -------------------------------------------------------------------------------- /assets/icons/medkit.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/medkit.tga -------------------------------------------------------------------------------- /assets/icons/noammo.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/noammo.tga -------------------------------------------------------------------------------- /assets/icons/quad.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/quad.tga -------------------------------------------------------------------------------- /assets/icons/regen.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/regen.tga -------------------------------------------------------------------------------- /assets/icons/skull_blue.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/skull_blue.tga -------------------------------------------------------------------------------- /assets/icons/skull_red.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/skull_red.tga -------------------------------------------------------------------------------- /assets/icons/teleporter.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/icons/teleporter.tga -------------------------------------------------------------------------------- /assets/menu/art/fx_base.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/menu/art/fx_base.tga -------------------------------------------------------------------------------- /assets/models/flag2/blue.skin: -------------------------------------------------------------------------------- 1 | tag_flap, 2 | u_flag,models/flags/b_flag2.tga 3 | 4 | -------------------------------------------------------------------------------- /assets/models/flag2/flagflap3.md3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/flag2/flagflap3.md3 -------------------------------------------------------------------------------- /assets/models/flag2/flagpole.md3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/flag2/flagpole.md3 -------------------------------------------------------------------------------- /assets/models/flag2/red.skin: -------------------------------------------------------------------------------- 1 | tag_flap, 2 | u_flag,models/flags/r_flag2.tga 3 | 4 | -------------------------------------------------------------------------------- /assets/models/flag2/white.skin: -------------------------------------------------------------------------------- 1 | tag_flap, 2 | u_flag,models/flags/w_flag2.tga 3 | 4 | -------------------------------------------------------------------------------- /assets/models/flags/w_flag2.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/flags/w_flag2.tga -------------------------------------------------------------------------------- /assets/models/players/anarki/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/anarki/color.tga -------------------------------------------------------------------------------- /assets/models/players/anarki/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/anarki/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/anarki/color_x.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/anarki/color_x.tga -------------------------------------------------------------------------------- /assets/models/players/anarki/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_glasses,models/players/anarki/pmg 2 | h_head,models/players/anarki/pmh 3 | tag_head, 4 | -------------------------------------------------------------------------------- /assets/models/players/anarki/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/anarki/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/anarki/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_board,models/players/anarki/anarki_b.tga 2 | l_legs,models/players/anarki/pm 3 | tag_torso, 4 | -------------------------------------------------------------------------------- /assets/models/players/anarki/upper_pm.skin: -------------------------------------------------------------------------------- 1 | u_torso,models/players/anarki/pm 2 | tag_weapon, 3 | tag_torso, 4 | tag_head, 5 | -------------------------------------------------------------------------------- /assets/models/players/biker/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/biker/color.tga -------------------------------------------------------------------------------- /assets/models/players/biker/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/biker/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/biker/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_head,models/players/biker/pmh 2 | tag_head, 3 | -------------------------------------------------------------------------------- /assets/models/players/biker/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/biker/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/biker/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/biker/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/biker/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_larm,models/players/biker/pm 4 | u_torso,models/players/biker/pm 5 | u_rarm,models/players/biker/pm 6 | tag_torso, 7 | -------------------------------------------------------------------------------- /assets/models/players/bitterman/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/bitterman/color.tga -------------------------------------------------------------------------------- /assets/models/players/bitterman/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/bitterman/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/bitterman/head_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | h_head,models/players/bitterman/pmh 3 | -------------------------------------------------------------------------------- /assets/models/players/bitterman/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/bitterman/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/bitterman/lower_pm.skin: -------------------------------------------------------------------------------- 1 | tag_torso, 2 | l_legs,models/players/bitterman/pm 3 | -------------------------------------------------------------------------------- /assets/models/players/bitterman/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | tag_torso, 4 | u_body,models/players/bitterman/pm 5 | u_vestl,models/players/bitterman/pm 6 | u_vestr,models/players/bitterman/pm 7 | -------------------------------------------------------------------------------- /assets/models/players/bones/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/bones/color.tga -------------------------------------------------------------------------------- /assets/models/players/bones/head_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | h_head,models/players/bones/pm 3 | -------------------------------------------------------------------------------- /assets/models/players/bones/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/bones/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/bones/lower_pm.skin: -------------------------------------------------------------------------------- 1 | tag_torso, 2 | l_legs,models/players/bones/pm 3 | l_pelvis,models/players/bones/pm 4 | -------------------------------------------------------------------------------- /assets/models/players/bones/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | tag_torso, 4 | u_arms,models/players/bones/pm 5 | u_forearms,models/players/bones/pm 6 | u_torso,models/players/bones/pm 7 | -------------------------------------------------------------------------------- /assets/models/players/crash/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/crash/color.tga -------------------------------------------------------------------------------- /assets/models/players/crash/color_t.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/crash/color_t.tga -------------------------------------------------------------------------------- /assets/models/players/crash/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_helmet,models/players/crash/pm 2 | h_visor,models/players/crash/crash_f.tga 3 | tag_head, 4 | -------------------------------------------------------------------------------- /assets/models/players/crash/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/crash/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/crash/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/crash/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/crash/upper_pm.skin: -------------------------------------------------------------------------------- 1 | u_arms,models/players/crash/pm 2 | u_chest,models/players/crash/pm 3 | tag_head, 4 | tag_weapon, 5 | tag_torso, 6 | -------------------------------------------------------------------------------- /assets/models/players/doom/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/doom/color.tga -------------------------------------------------------------------------------- /assets/models/players/doom/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_helmet,models/players/doom/pm 2 | h_visor,models/players/doom/doom_f.tga 3 | tag_head, 4 | -------------------------------------------------------------------------------- /assets/models/players/doom/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/doom/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/doom/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/doom/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/doom/upper_pm.skin: -------------------------------------------------------------------------------- 1 | u_torso,models/players/doom/pm 2 | tag_head, 3 | tag_torso, 4 | tag_weapon, 5 | u_larm,models/players/doom/pm 6 | u_rarm,models/players/doom/pm 7 | -------------------------------------------------------------------------------- /assets/models/players/grunt/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/grunt/color.tga -------------------------------------------------------------------------------- /assets/models/players/grunt/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/grunt/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/grunt/head_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | h_head,models/players/grunt/pmh 3 | -------------------------------------------------------------------------------- /assets/models/players/grunt/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/grunt/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/grunt/lower_pm.skin: -------------------------------------------------------------------------------- 1 | tag_torso, 2 | l_legs,models/players/grunt/pm -------------------------------------------------------------------------------- /assets/models/players/grunt/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_torso,models/players/grunt/pm 4 | tag_torso, 5 | u_larm,models/players/grunt/pm 6 | u_rarm,models/players/grunt/pm 7 | -------------------------------------------------------------------------------- /assets/models/players/hunter/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/hunter/color.tga -------------------------------------------------------------------------------- /assets/models/players/hunter/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/hunter/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/hunter/color_x.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/hunter/color_x.tga -------------------------------------------------------------------------------- /assets/models/players/hunter/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_feathers,models/players/hunter/pmf 2 | h_head,models/players/hunter/pmh 3 | tag_head, 4 | -------------------------------------------------------------------------------- /assets/models/players/hunter/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/hunter/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/hunter/lower_pm.skin: -------------------------------------------------------------------------------- 1 | tag_torso, 2 | l_legs,models/players/hunter/pm -------------------------------------------------------------------------------- /assets/models/players/hunter/upper_pm.skin: -------------------------------------------------------------------------------- 1 | u_torso,models/players/hunter/pm 2 | tag_head, 3 | tag_torso, 4 | tag_weapon, 5 | -------------------------------------------------------------------------------- /assets/models/players/keel/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/keel/color.tga -------------------------------------------------------------------------------- /assets/models/players/keel/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/keel/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/keel/head_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | h_head,models/players/Keel/pmh 3 | -------------------------------------------------------------------------------- /assets/models/players/keel/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/keel/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/keel/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/Keel/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/keel/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_neck,models/players/Keel/pmh 4 | u_torso,models/players/Keel/pm 5 | tag_torso, 6 | -------------------------------------------------------------------------------- /assets/models/players/klesk/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/klesk/color.tga -------------------------------------------------------------------------------- /assets/models/players/klesk/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/klesk/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/klesk/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_head,models/players/klesk/pmh 2 | tag_head, 3 | -------------------------------------------------------------------------------- /assets/models/players/klesk/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/klesk/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/klesk/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/klesk/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/klesk/upper_pm.skin: -------------------------------------------------------------------------------- 1 | u_torso,models/players/klesk/pm 2 | tag_head, 3 | tag_torso, 4 | tag_weapon, 5 | -------------------------------------------------------------------------------- /assets/models/players/lucy/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/lucy/color.tga -------------------------------------------------------------------------------- /assets/models/players/lucy/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/lucy/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/lucy/head_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | h_head,models/players/lucy/pmh 3 | -------------------------------------------------------------------------------- /assets/models/players/lucy/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/lucy/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/lucy/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/lucy/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/lucy/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_torso,models/players/lucy/pm 4 | u_larm,models/players/lucy/pm 5 | u_rarm,models/players/lucy/pm 6 | tag_torso, 7 | -------------------------------------------------------------------------------- /assets/models/players/major/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/major/color.tga -------------------------------------------------------------------------------- /assets/models/players/major/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/major/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/major/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_head,models/players/major/pmh 2 | tag_head, 3 | -------------------------------------------------------------------------------- /assets/models/players/major/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/major/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/major/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_lfoot,models/players/major/pm 2 | l_rfoot,models/players/major/pm 3 | l_legs,models/players/major/pm -------------------------------------------------------------------------------- /assets/models/players/major/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | u_larm,models/players/major/pm 3 | tag_weapon, 4 | u_rarm,models/players/major/pm 5 | u_torso,models/players/major/pm 6 | tag_torso, 7 | -------------------------------------------------------------------------------- /assets/models/players/mynx/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/mynx/color.tga -------------------------------------------------------------------------------- /assets/models/players/mynx/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/mynx/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/mynx/color_x.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/mynx/color_x.tga -------------------------------------------------------------------------------- /assets/models/players/mynx/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_glasses,models/players/mynx/pm 2 | h_head,models/players/mynx/pmh 3 | tag_head, 4 | -------------------------------------------------------------------------------- /assets/models/players/mynx/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/mynx/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/mynx/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/mynx/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/mynx/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_weapon, 2 | u_arms,models/players/mynx/pmt 3 | u_torso,models/players/mynx/pm 4 | tag_head, 5 | tag_torso, 6 | -------------------------------------------------------------------------------- /assets/models/players/orbb/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/orbb/color.tga -------------------------------------------------------------------------------- /assets/models/players/orbb/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/orbb/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/orbb/head_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | h_head,models/players/orbb/pmh 3 | -------------------------------------------------------------------------------- /assets/models/players/orbb/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/orbb/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/orbb/lower_pm.skin: -------------------------------------------------------------------------------- 1 | tag_torso, 2 | l_legs,models/players/orbb/pm 3 | -------------------------------------------------------------------------------- /assets/models/players/orbb/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_ratchet,models/players/orbb/pm 4 | u_antenna,models/players/orbb/pm 5 | u_antennaball,models/players/orbb/orbb_light.tga 6 | u_tailight,models/players/orbb/orbb_tail.tga 7 | u_torso,models/players/orbb/pm 8 | tag_torso, 9 | -------------------------------------------------------------------------------- /assets/models/players/ranger/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/ranger/color.tga -------------------------------------------------------------------------------- /assets/models/players/ranger/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/ranger/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/ranger/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_face,models/players/ranger/pmh 2 | h_helmet,models/players/ranger/pm 3 | tag_head, 4 | -------------------------------------------------------------------------------- /assets/models/players/ranger/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/ranger/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/ranger/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/ranger/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/ranger/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | u_larm,models/players/ranger/pm 3 | tag_weapon, 4 | u_rarm,models/players/ranger/pm 5 | u_torso,models/players/ranger/pm 6 | tag_torso, 7 | -------------------------------------------------------------------------------- /assets/models/players/razor/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/razor/color.tga -------------------------------------------------------------------------------- /assets/models/players/razor/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/razor/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/razor/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_goggles,models/players/razor/razor_gogs.tga 2 | h_head,models/players/razor/pmh 3 | tag_head, 4 | -------------------------------------------------------------------------------- /assets/models/players/razor/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/razor/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/razor/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/razor/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/razor/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_body,models/players/razor/pm 4 | tag_torso, 5 | -------------------------------------------------------------------------------- /assets/models/players/sarge/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/sarge/color.tga -------------------------------------------------------------------------------- /assets/models/players/sarge/head_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | h_cigar,models/players/sarge/cigar.tga 3 | h_head,models/players/sarge/pm 4 | -------------------------------------------------------------------------------- /assets/models/players/sarge/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/sarge/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/sarge/lower_pm.skin: -------------------------------------------------------------------------------- 1 | tag_weapon, 2 | l_legs,models/players/sarge/pm 3 | tag_torso, 4 | -------------------------------------------------------------------------------- /assets/models/players/sarge/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_rshoulder,models/players/sarge/pm 4 | u_torso,models/players/sarge/pm 5 | tag_torso, 6 | -------------------------------------------------------------------------------- /assets/models/players/slash/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/slash/color.tga -------------------------------------------------------------------------------- /assets/models/players/slash/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/slash/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/slash/color_skates.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/slash/color_skates.tga -------------------------------------------------------------------------------- /assets/models/players/slash/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_head,models/players/slash/pmh 2 | tag_head, 3 | -------------------------------------------------------------------------------- /assets/models/players/slash/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/slash/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/slash/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_skatel,models/players/slash/pms 2 | l_skater,models/players/slash/pms 3 | l_legs,models/players/slash/pm 4 | tag_torso, 5 | -------------------------------------------------------------------------------- /assets/models/players/slash/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_torso,models/players/slash/pm 4 | tag_torso, 5 | -------------------------------------------------------------------------------- /assets/models/players/sorlag/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/sorlag/color.tga -------------------------------------------------------------------------------- /assets/models/players/sorlag/color_t.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/sorlag/color_t.tga -------------------------------------------------------------------------------- /assets/models/players/sorlag/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_head,models/players/sorlag/pm 2 | tag_head, 3 | -------------------------------------------------------------------------------- /assets/models/players/sorlag/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/sorlag/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/sorlag/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/sorlag/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/sorlag/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_weapon, 2 | u_arms,models/players/sorlag/pm 3 | u_lten,models/players/sorlag/pm 4 | u_neck,models/players/sorlag/pm 5 | u_rten,models/players/sorlag/pm 6 | u_torso,models/players/sorlag/pm 7 | tag_head, 8 | tag_torso, 9 | -------------------------------------------------------------------------------- /assets/models/players/tankjr/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/tankjr/color.tga -------------------------------------------------------------------------------- /assets/models/players/tankjr/head_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | h_head,models/players/tankjr/pm 3 | -------------------------------------------------------------------------------- /assets/models/players/tankjr/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/tankjr/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/tankjr/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_rcalf,models/players/tankjr/pm 2 | l_rfoot,models/players/tankjr/pm 3 | l_lfoot,models/players/tankjr/pm 4 | l_hips,models/players/tankjr/pm 5 | l_rthigh,models/players/tankjr/pm 6 | l_lthigh,models/players/tankjr/pm 7 | l_rtoe,models/players/tankjr/pm 8 | l_ltoe,models/players/tankjr/pm 9 | l_rtoes,models/players/tankjr/pm 10 | l_ltoes,models/players/tankjr/pm 11 | tag_torso, 12 | l_lcalf,models/players/tankjr/pm -------------------------------------------------------------------------------- /assets/models/players/tankjr/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_abdomen,models/players/tankjr/pm 4 | u_arms,models/players/tankjr/pm 5 | u_torso,models/players/tankjr/pm 6 | tag_torso, -------------------------------------------------------------------------------- /assets/models/players/uriel/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/uriel/color.tga -------------------------------------------------------------------------------- /assets/models/players/uriel/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/uriel/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/uriel/color_x.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/uriel/color_x.tga -------------------------------------------------------------------------------- /assets/models/players/uriel/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_face,models/players/uriel/pmh 2 | h_hood,models/players/uriel/pm 3 | tag_head, 4 | -------------------------------------------------------------------------------- /assets/models/players/uriel/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/uriel/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/uriel/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/uriel/pm 2 | tag_torso, 3 | -------------------------------------------------------------------------------- /assets/models/players/uriel/upper_pm.skin: -------------------------------------------------------------------------------- 1 | u_rwing,models/players/uriel/pmw 2 | u_lwing,models/players/uriel/pmw 3 | u_torso,models/players/uriel/pm 4 | tag_head, 5 | tag_torso, 6 | tag_weapon, 7 | -------------------------------------------------------------------------------- /assets/models/players/visor/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/visor/color.tga -------------------------------------------------------------------------------- /assets/models/players/visor/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_head,models/players/visor/pm 2 | tag_head, 3 | -------------------------------------------------------------------------------- /assets/models/players/visor/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/visor/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/visor/lower_pm.skin: -------------------------------------------------------------------------------- 1 | tag_weapon, 2 | l_legs,models/players/visor/pm 3 | tag_torso, 4 | -------------------------------------------------------------------------------- /assets/models/players/visor/upper_pm.skin: -------------------------------------------------------------------------------- 1 | tag_head, 2 | tag_weapon, 3 | u_torso,models/players/visor/pm 4 | tag_torso, 5 | -------------------------------------------------------------------------------- /assets/models/players/xaero/color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/xaero/color.tga -------------------------------------------------------------------------------- /assets/models/players/xaero/color_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/xaero/color_h.tga -------------------------------------------------------------------------------- /assets/models/players/xaero/head_pm.skin: -------------------------------------------------------------------------------- 1 | h_head,models/players/xaero/pmh 2 | tag_head, 3 | -------------------------------------------------------------------------------- /assets/models/players/xaero/icon_pm.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/players/xaero/icon_pm.tga -------------------------------------------------------------------------------- /assets/models/players/xaero/lower_pm.skin: -------------------------------------------------------------------------------- 1 | l_legs,models/players/xaero/pm 2 | l_sash_back,models/players/xaero/pm 3 | l_sash_front,models/players/xaero/pm 4 | tag_torso, 5 | -------------------------------------------------------------------------------- /assets/models/players/xaero/upper_pm.skin: -------------------------------------------------------------------------------- 1 | u_armbase,models/players/xaero/xaero_a.tga 2 | u_quill01,models/players/xaero/xaero_q.tga 3 | u_quill02,models/players/xaero/xaero_q.tga 4 | u_quill03,models/players/xaero/xaero_q.tga 5 | u_quill04,models/players/xaero/xaero_q.tga 6 | u_quill05,models/players/xaero/xaero_q.tga 7 | u_quill06,models/players/xaero/xaero_q.tga 8 | u_quill07,models/players/xaero/xaero_q.tga 9 | u_quill08,models/players/xaero/xaero_q.tga 10 | u_torso,models/players/xaero/pm 11 | u_arm,models/players/xaero/xaero_a.tga 12 | tag_weapon, 13 | tag_torso, 14 | tag_head, 15 | -------------------------------------------------------------------------------- /assets/models/weaphits/rlboom/rlboom_1.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/weaphits/rlboom/rlboom_1.tga -------------------------------------------------------------------------------- /assets/models/weaphits/rlboom/rlboom_2.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/weaphits/rlboom/rlboom_2.tga -------------------------------------------------------------------------------- /assets/models/weaphits/rlboom/rlboom_5.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/weaphits/rlboom/rlboom_5.tga -------------------------------------------------------------------------------- /assets/models/weaphits/rlboom/rlboom_6.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/weaphits/rlboom/rlboom_6.tga -------------------------------------------------------------------------------- /assets/models/weaphits/rlboom/rlboom_7.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/weaphits/rlboom/rlboom_7.tga -------------------------------------------------------------------------------- /assets/models/weaphits/rlboom/rlboom_8.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/models/weaphits/rlboom/rlboom_8.tga -------------------------------------------------------------------------------- /assets/sound/feedback/hit100.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/sound/feedback/hit100.wav -------------------------------------------------------------------------------- /assets/sound/feedback/hit25.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/sound/feedback/hit25.wav -------------------------------------------------------------------------------- /assets/sound/feedback/hit50.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/sound/feedback/hit50.wav -------------------------------------------------------------------------------- /assets/sound/feedback/hit75.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/assets/sound/feedback/hit75.wav -------------------------------------------------------------------------------- /build/linux-qvm/Makefile: -------------------------------------------------------------------------------- 1 | include config.mk 2 | 3 | srcs = $(foreach file,$1,$(if $(patsubst %.asm,,$(file)),$2/$(file).asm,$(file))) 4 | qa_asm = $(call srcs,$(QA_SRC),vm/game) 5 | cg_asm = $(call srcs,$(CG_SRC),vm/cgame) 6 | ui_asm = $(call srcs,$(UI_SRC),vm/ui) 7 | 8 | all: dirs $(PK3) 9 | 10 | dirs: 11 | mkdir -p vm/game vm/cgame vm/ui 12 | 13 | .PHONY: all dirs 14 | 15 | $(PK3): vm/qagame.qvm vm/cgame.qvm vm/ui.qvm 16 | $(7Z) $@ vm/*.qvm vm/*.jts ../../assets/* 17 | 18 | cc = cd vm/$1 && $(Q3LCC) $2 -o $(notdir $@).tmp ../../$< && mv $(notdir $@).tmp $(notdir $@) 19 | qa_cc = $(call cc,game,$(QA_CFLAGS)) 20 | cg_cc = $(call cc,cgame,$(CG_CFLAGS)) 21 | ui_cc = $(call cc,ui,$(UI_CFLAGS)) 22 | 23 | vm/qagame.qvm: $(qa_asm) 24 | $(Q3ASM) -o $@ $(qa_asm) 25 | 26 | vm/cgame.qvm: $(cg_asm) 27 | $(Q3ASM) -o $@ $(cg_asm) 28 | 29 | vm/ui.qvm: $(ui_asm) 30 | $(Q3ASM) -o $@ $(ui_asm) 31 | 32 | vm/game/%.asm: $(QADIR)/%.c; $(qa_cc) 33 | vm/cgame/%.asm: $(QADIR)/%.c; $(cg_cc) 34 | vm/cgame/%.asm: $(CGDIR)/%.c; $(cg_cc) 35 | vm/ui/%.asm: $(QADIR)/%.c; $(ui_cc) 36 | vm/ui/%.asm: $(UIDIR)/%.c; $(ui_cc) 37 | 38 | clean: 39 | $(RM) -rf *.pk3 vm/ ../cgame/*.asm ../game/*.asm ../ui/*.asm 40 | -------------------------------------------------------------------------------- /build/linux-qvm/config.mk: -------------------------------------------------------------------------------- 1 | PK3 = pak8a.pk3 2 | 3 | basedir = ../../code 4 | 5 | QADIR = $(basedir)/game 6 | CGDIR = $(basedir)/cgame 7 | UIDIR = $(basedir)/q3_ui 8 | 9 | Q3ASM = ./tools/q3asm -vq3 -r -m -v 10 | Q3LCC = ./../../tools/q3lcc -DQ3_VM -S -Wf-g -I$(QADIR) 11 | 7Z = 7z u -tzip -mx=9 -mpass=8 -mfb=255 -- 12 | 13 | QA_CFLAGS = -DQAGAME 14 | CG_CFLAGS = -DCGAME -I$(CGDIR) 15 | UI_CFLAGS = -DQ3UI -I$(UIDIR) 16 | 17 | include srcs.mk 18 | -------------------------------------------------------------------------------- /build/linux-qvm/srcs.mk: -------------------------------------------------------------------------------- 1 | QA_SRC = \ 2 | g_main $(QADIR)/g_syscalls.asm \ 3 | bg_misc bg_lib bg_pmove bg_slidemove \ 4 | q_math q_shared \ 5 | ai_dmnet ai_dmq3 ai_team ai_main ai_chat ai_cmd ai_vcmd \ 6 | g_active g_arenas g_bot g_client g_cmds g_combat g_items g_mem g_misc \ 7 | g_missile g_mover g_rotation g_session g_spawn g_svcmds g_target g_team \ 8 | g_trigger g_unlagged g_utils g_weapon \ 9 | 10 | CG_SRC = \ 11 | cg_main $(CGDIR)/cg_syscalls.asm \ 12 | cg_consolecmds cg_draw cg_drawtools cg_effects cg_ents cg_event cg_info \ 13 | cg_localents cg_marks cg_players cg_playerstate cg_predict cg_scoreboard \ 14 | cg_servercmds cg_snapshot cg_view cg_weapons \ 15 | bg_slidemove bg_pmove bg_lib bg_misc \ 16 | q_math q_shared \ 17 | 18 | UI_SRC = \ 19 | ui_main $(UIDIR)/ui_syscalls.asm \ 20 | ui_gameinfo ui_atoms ui_cinematics ui_connect ui_controls2 ui_demo2 \ 21 | ui_mfield ui_credits ui_menu ui_ingame ui_confirm ui_setup ui_options \ 22 | ui_display ui_sound ui_network ui_playermodel ui_players ui_playersettings \ 23 | ui_preferences ui_qmenu ui_serverinfo ui_servers2 ui_sparena \ 24 | ui_specifyserver ui_sppostgame ui_splevel ui_spskill ui_startserver ui_team \ 25 | ui_video ui_addbots ui_removebots ui_teamorders ui_loadconfig ui_saveconfig \ 26 | ui_cdkey ui_mods \ 27 | bg_misc bg_lib \ 28 | q_math q_shared \ 29 | -------------------------------------------------------------------------------- /build/linux-qvm/tools/q3asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/build/linux-qvm/tools/q3asm -------------------------------------------------------------------------------- /build/linux-qvm/tools/q3cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/build/linux-qvm/tools/q3cpp -------------------------------------------------------------------------------- /build/linux-qvm/tools/q3lcc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/build/linux-qvm/tools/q3lcc -------------------------------------------------------------------------------- /build/linux-qvm/tools/q3rcc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/build/linux-qvm/tools/q3rcc -------------------------------------------------------------------------------- /build/win32-msvc/baseq3e.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgame", "cgame.vcproj", "{FF0DC79F-C1D1-4DE3-BBD0-91B6146FD69C}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game", "game.vcproj", "{25F3B624-E060-4DAD-93D6-479AB6CD782F}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "q3_ui", "q3_ui.vcproj", "{96D17D51-0760-4732-89C1-26DFD5B581BF}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Debug|Win64 = Debug|Win64 14 | Release|Win32 = Release|Win32 15 | Release|Win64 = Release|Win64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {FF0DC79F-C1D1-4DE3-BBD0-91B6146FD69C}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {FF0DC79F-C1D1-4DE3-BBD0-91B6146FD69C}.Debug|Win32.Build.0 = Debug|Win32 20 | {FF0DC79F-C1D1-4DE3-BBD0-91B6146FD69C}.Debug|Win64.ActiveCfg = Debug|x64 21 | {FF0DC79F-C1D1-4DE3-BBD0-91B6146FD69C}.Debug|Win64.Build.0 = Debug|x64 22 | {FF0DC79F-C1D1-4DE3-BBD0-91B6146FD69C}.Release|Win32.ActiveCfg = Release|Win32 23 | {FF0DC79F-C1D1-4DE3-BBD0-91B6146FD69C}.Release|Win32.Build.0 = Release|Win32 24 | {FF0DC79F-C1D1-4DE3-BBD0-91B6146FD69C}.Release|Win64.ActiveCfg = Release|x64 25 | {FF0DC79F-C1D1-4DE3-BBD0-91B6146FD69C}.Release|Win64.Build.0 = Release|x64 26 | {25F3B624-E060-4DAD-93D6-479AB6CD782F}.Debug|Win32.ActiveCfg = Debug|Win32 27 | {25F3B624-E060-4DAD-93D6-479AB6CD782F}.Debug|Win32.Build.0 = Debug|Win32 28 | {25F3B624-E060-4DAD-93D6-479AB6CD782F}.Debug|Win64.ActiveCfg = Debug|x64 29 | {25F3B624-E060-4DAD-93D6-479AB6CD782F}.Debug|Win64.Build.0 = Debug|x64 30 | {25F3B624-E060-4DAD-93D6-479AB6CD782F}.Release|Win32.ActiveCfg = Release|Win32 31 | {25F3B624-E060-4DAD-93D6-479AB6CD782F}.Release|Win32.Build.0 = Release|Win32 32 | {25F3B624-E060-4DAD-93D6-479AB6CD782F}.Release|Win64.ActiveCfg = Release|x64 33 | {25F3B624-E060-4DAD-93D6-479AB6CD782F}.Release|Win64.Build.0 = Release|x64 34 | {96D17D51-0760-4732-89C1-26DFD5B581BF}.Debug|Win32.ActiveCfg = Debug|Win32 35 | {96D17D51-0760-4732-89C1-26DFD5B581BF}.Debug|Win32.Build.0 = Debug|Win32 36 | {96D17D51-0760-4732-89C1-26DFD5B581BF}.Debug|Win64.ActiveCfg = Debug|x64 37 | {96D17D51-0760-4732-89C1-26DFD5B581BF}.Debug|Win64.Build.0 = Debug|x64 38 | {96D17D51-0760-4732-89C1-26DFD5B581BF}.Release|Win32.ActiveCfg = Release|Win32 39 | {96D17D51-0760-4732-89C1-26DFD5B581BF}.Release|Win32.Build.0 = Release|Win32 40 | {96D17D51-0760-4732-89C1-26DFD5B581BF}.Release|Win64.ActiveCfg = Release|x64 41 | {96D17D51-0760-4732-89C1-26DFD5B581BF}.Release|Win64.Build.0 = Release|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /build/win32-qvm/cgame.q3asm: -------------------------------------------------------------------------------- 1 | cg_main 2 | ../../../../code/cgame/cg_syscalls 3 | cg_consolecmds 4 | cg_draw 5 | cg_drawtools 6 | cg_effects 7 | cg_ents 8 | cg_event 9 | cg_info 10 | cg_localents 11 | cg_marks 12 | cg_players 13 | cg_playerstate 14 | cg_predict 15 | cg_scoreboard 16 | cg_servercmds 17 | cg_snapshot 18 | cg_view 19 | cg_weapons 20 | bg_slidemove 21 | bg_pmove 22 | bg_lib 23 | bg_misc 24 | q_math 25 | q_shared 26 | -------------------------------------------------------------------------------- /build/win32-qvm/game.q3asm: -------------------------------------------------------------------------------- 1 | g_main 2 | ../../../../code/game/g_syscalls 3 | ai_chat 4 | ai_cmd 5 | ai_dmnet 6 | ai_dmq3 7 | ai_main 8 | ai_team 9 | ai_vcmd 10 | bg_lib 11 | bg_misc 12 | bg_pmove 13 | bg_slidemove 14 | g_active 15 | g_arenas 16 | g_bot 17 | g_client 18 | g_cmds 19 | g_combat 20 | g_items 21 | g_mem 22 | g_misc 23 | g_missile 24 | g_mover 25 | g_rotation 26 | g_session 27 | g_spawn 28 | g_svcmds 29 | g_target 30 | g_team 31 | g_trigger 32 | g_unlagged 33 | g_utils 34 | g_weapon 35 | q_math 36 | q_shared 37 | -------------------------------------------------------------------------------- /build/win32-qvm/q3_ui.q3asm: -------------------------------------------------------------------------------- 1 | ui_main 2 | ..\..\..\..\code\q3_ui\ui_syscalls 3 | ui_addbots 4 | ui_atoms 5 | ui_cdkey 6 | ui_cinematics 7 | ui_confirm 8 | ui_connect 9 | ui_controls2 10 | ui_credits 11 | ui_demo2 12 | ui_display 13 | ui_gameinfo 14 | ui_ingame 15 | ui_menu 16 | ui_mfield 17 | ui_mods 18 | ui_network 19 | ui_options 20 | ui_setup 21 | ui_sound 22 | ui_playermodel 23 | ui_players 24 | ui_playersettings 25 | ui_preferences 26 | ui_qmenu 27 | ui_removebots 28 | ui_serverinfo 29 | ui_servers2 30 | ui_sparena 31 | ui_specifyserver 32 | ui_sppostgame 33 | ui_splevel 34 | ui_spskill 35 | ui_startserver 36 | ui_team 37 | ui_teamorders 38 | ui_video 39 | bg_misc 40 | bg_lib 41 | q_math 42 | q_shared 43 | -------------------------------------------------------------------------------- /build/win32-qvm/tools/7za.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/build/win32-qvm/tools/7za.exe -------------------------------------------------------------------------------- /build/win32-qvm/tools/q3asm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/build/win32-qvm/tools/q3asm.exe -------------------------------------------------------------------------------- /build/win32-qvm/tools/q3cpp.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/build/win32-qvm/tools/q3cpp.exe -------------------------------------------------------------------------------- /build/win32-qvm/tools/q3lcc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/build/win32-qvm/tools/q3lcc.exe -------------------------------------------------------------------------------- /build/win32-qvm/tools/q3rcc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ec-/baseq3a/dcd8925d9b6e8731f20d00cca98f4113e3ff6f1e/build/win32-qvm/tools/q3rcc.exe -------------------------------------------------------------------------------- /code/cgame/cg_syscalls.asm: -------------------------------------------------------------------------------- 1 | code 2 | 3 | equ trap_Print -1 4 | equ trap_Error -2 5 | equ trap_Milliseconds -3 6 | equ trap_Cvar_Register -4 7 | equ trap_Cvar_Update -5 8 | equ trap_Cvar_Set -6 9 | equ trap_Cvar_VariableStringBuffer -7 10 | equ trap_Argc -8 11 | equ trap_Argv -9 12 | equ trap_Args -10 13 | equ trap_FS_FOpenFile -11 14 | equ trap_FS_Read -12 15 | equ trap_FS_Write -13 16 | equ trap_FS_FCloseFile -14 17 | equ trap_SendConsoleCommand -15 18 | equ trap_AddCommand -16 19 | equ trap_SendClientCommand -17 20 | equ trap_UpdateScreen -18 21 | equ trap_CM_LoadMap -19 22 | equ trap_CM_NumInlineModels -20 23 | equ trap_CM_InlineModel -21 24 | equ trap_CM_LoadModel -22 25 | equ trap_CM_TempBoxModel -23 26 | equ trap_CM_PointContents -24 27 | equ trap_CM_TransformedPointContents -25 28 | equ trap_CM_BoxTrace -26 29 | equ trap_CM_TransformedBoxTrace -27 30 | equ trap_CM_MarkFragments -28 31 | equ trap_S_StartSound -29 32 | equ trap_S_StartLocalSound -30 33 | equ trap_S_ClearLoopingSounds -31 34 | equ trap_S_AddLoopingSound -32 35 | equ trap_S_UpdateEntityPosition -33 36 | equ trap_S_Respatialize -34 37 | equ trap_S_RegisterSound -35 38 | equ trap_S_StartBackgroundTrack -36 39 | equ trap_R_LoadWorldMap -37 40 | equ trap_R_RegisterModel -38 41 | equ trap_R_RegisterSkin -39 42 | equ trap_R_RegisterShader -40 43 | equ trap_R_ClearScene -41 44 | equ trap_R_AddRefEntityToScene -42 45 | equ trap_R_AddPolyToScene -43 46 | equ trap_R_AddLightToScene -44 47 | equ trap_R_RenderScene -45 48 | equ trap_R_SetColor -46 49 | equ trap_R_DrawStretchPic -47 50 | equ trap_R_ModelBounds -48 51 | equ trap_R_LerpTag -49 52 | equ trap_GetGlconfig -50 53 | equ trap_GetGameState -51 54 | equ trap_GetCurrentSnapshotNumber -52 55 | equ trap_GetSnapshot -53 56 | equ trap_GetServerCommand -54 57 | equ trap_GetCurrentCmdNumber -55 58 | equ trap_GetUserCmd -56 59 | equ trap_SetUserCmdValue -57 60 | equ trap_R_RegisterShaderNoMip -58 61 | equ trap_MemoryRemaining -59 62 | equ trap_R_RegisterFont -60 63 | equ trap_Key_IsDown -61 64 | equ trap_Key_GetCatcher -62 65 | equ trap_Key_SetCatcher -63 66 | equ trap_Key_GetKey -64 67 | equ trap_PC_AddGlobalDefine -65 68 | equ trap_PC_LoadSource -66 69 | equ trap_PC_FreeSource -67 70 | equ trap_PC_ReadToken -68 71 | equ trap_PC_SourceFileAndLine -69 72 | equ trap_S_StopBackgroundTrack -70 73 | equ trap_RealTime -71 74 | equ trap_SnapVector -72 75 | equ trap_RemoveCommand -73 76 | equ trap_R_LightForPoint -74 77 | equ trap_CIN_PlayCinematic -75 78 | equ trap_CIN_StopCinematic -76 79 | equ trap_CIN_RunCinematic -77 80 | equ trap_CIN_DrawCinematic -78 81 | equ trap_CIN_SetExtents -79 82 | equ trap_R_RemapShader -80 83 | equ trap_S_AddRealLoopingSound -81 84 | equ trap_S_StopLoopingSound -82 85 | equ trap_CM_TempCapsuleModel -83 86 | equ trap_CM_CapsuleTrace -84 87 | equ trap_CM_TransformedCapsuleTrace -85 88 | equ trap_R_AddAdditiveLightToScene -86 89 | equ trap_GetEntityToken -87 90 | equ trap_R_AddPolysToScene -88 91 | equ trap_R_inPVS -89 92 | equ trap_FS_Seek -90 93 | 94 | equ memset -101 95 | equ memcpy -102 96 | equ strncpy -103 97 | equ sin -104 98 | equ cos -105 99 | equ atan2 -106 100 | equ sqrt -107 101 | equ floor -108 102 | equ ceil -109 103 | equ testPrintInt -110 104 | equ testPrintFloat -111 105 | equ acos -112 106 | 107 | -------------------------------------------------------------------------------- /code/cgame/cgame.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | vmMain 3 | dllEntry 4 | -------------------------------------------------------------------------------- /code/cgame/modulus.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define PI 3.1415926535897932384 6 | 7 | int main( int argc, char *argv[] ) 8 | { 9 | double err, divide, e0; 10 | double v0, v1; 11 | int mod, n, times; 12 | 13 | if ( argc < 2 ) 14 | { 15 | divide = 1000; // default value 16 | } 17 | else 18 | { 19 | divide = atof( argv[1] ); 20 | if ( divide == 0 ) 21 | return 0; 22 | } 23 | 24 | printf( "=======\ncalculating best modulus for %f divider\n=======\n", divide ); 25 | 26 | e0 = 10000000000; 27 | 28 | for ( n = 1; ; n++ ) 29 | { 30 | 31 | mod = (int)( (double) n * divide * 2.0 * PI ); 32 | if ( mod > 16*1024*1024 ) 33 | break; 34 | 35 | times = (0x7FFFFFFF / mod) + 1; // times we should multiply phase error 36 | 37 | v0 = (double) n * divide* 2.0 * PI; 38 | v1 = mod; 39 | 40 | // err = sin( v0 - v1 ) * (double) times / (2.0 * PI ) * 100.0; 41 | err = fabs( v0 - v1 ) * (double) times / (2.0 * PI ) * 100.0; 42 | 43 | if ( err <= e0 ) 44 | { 45 | e0 = err; 46 | printf( "modulus:%8i phase error:%13.2f%%\n", mod, err ); 47 | } 48 | } 49 | 50 | printf( "=======\nfinished\n" ); 51 | 52 | return 0; 53 | } 54 | -------------------------------------------------------------------------------- /code/game/ai_chat.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: ai_chat.h 6 | * 7 | * desc: Quake3 bot AI 8 | * 9 | * $Archive: /source/code/botai/ai_chat.c $ 10 | * 11 | *****************************************************************************/ 12 | 13 | // 14 | int BotChat_EnterGame(bot_state_t *bs); 15 | // 16 | int BotChat_ExitGame(bot_state_t *bs); 17 | // 18 | int BotChat_StartLevel(bot_state_t *bs); 19 | // 20 | int BotChat_EndLevel(bot_state_t *bs); 21 | // 22 | int BotChat_HitTalking(bot_state_t *bs); 23 | // 24 | int BotChat_HitNoDeath(bot_state_t *bs); 25 | // 26 | int BotChat_HitNoKill(bot_state_t *bs); 27 | // 28 | int BotChat_Death(bot_state_t *bs); 29 | // 30 | int BotChat_Kill(bot_state_t *bs); 31 | // 32 | int BotChat_EnemySuicide(bot_state_t *bs); 33 | // 34 | int BotChat_Random(bot_state_t *bs); 35 | // time the selected chat takes to type in 36 | float BotChatTime(bot_state_t *bs); 37 | // returns true if the bot can chat at the current position 38 | int BotValidChatPosition(bot_state_t *bs); 39 | // test the initial bot chats 40 | void BotChatTest(bot_state_t *bs); 41 | 42 | -------------------------------------------------------------------------------- /code/game/ai_cmd.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: ai_cmd.h 6 | * 7 | * desc: Quake3 bot AI 8 | * 9 | * $Archive: /source/code/botai/ai_chat.c $ 10 | * 11 | *****************************************************************************/ 12 | 13 | extern int notleader[MAX_CLIENTS]; 14 | 15 | int BotMatchMessage(bot_state_t *bs, char *message); 16 | void BotPrintTeamGoal(bot_state_t *bs); 17 | 18 | -------------------------------------------------------------------------------- /code/game/ai_dmnet.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: ai_dmnet.h 6 | * 7 | * desc: Quake3 bot AI 8 | * 9 | * $Archive: /source/code/botai/ai_chat.c $ 10 | * 11 | *****************************************************************************/ 12 | 13 | #define MAX_NODESWITCHES 50 14 | 15 | void AIEnter_Intermission(bot_state_t *bs, char *s); 16 | void AIEnter_Observer(bot_state_t *bs, char *s); 17 | void AIEnter_Respawn(bot_state_t *bs, char *s); 18 | void AIEnter_Stand(bot_state_t *bs, char *s); 19 | void AIEnter_Seek_ActivateEntity(bot_state_t *bs, char *s); 20 | void AIEnter_Seek_NBG(bot_state_t *bs, char *s); 21 | void AIEnter_Seek_LTG(bot_state_t *bs, char *s); 22 | void AIEnter_Seek_Camp(bot_state_t *bs, char *s); 23 | void AIEnter_Battle_Fight(bot_state_t *bs, char *s); 24 | void AIEnter_Battle_Chase(bot_state_t *bs, char *s); 25 | void AIEnter_Battle_Retreat(bot_state_t *bs, char *s); 26 | void AIEnter_Battle_NBG(bot_state_t *bs, char *s); 27 | int AINode_Intermission(bot_state_t *bs); 28 | int AINode_Observer(bot_state_t *bs); 29 | int AINode_Respawn(bot_state_t *bs); 30 | int AINode_Stand(bot_state_t *bs); 31 | int AINode_Seek_ActivateEntity(bot_state_t *bs); 32 | int AINode_Seek_NBG(bot_state_t *bs); 33 | int AINode_Seek_LTG(bot_state_t *bs); 34 | int AINode_Battle_Fight(bot_state_t *bs); 35 | int AINode_Battle_Chase(bot_state_t *bs); 36 | int AINode_Battle_Retreat(bot_state_t *bs); 37 | int AINode_Battle_NBG(bot_state_t *bs); 38 | 39 | void BotResetNodeSwitches(void); 40 | void BotDumpNodeSwitches(bot_state_t *bs); 41 | 42 | -------------------------------------------------------------------------------- /code/game/ai_team.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: ai_team.h 6 | * 7 | * desc: Quake3 bot AI 8 | * 9 | * $Archive: /source/code/botai/ai_chat.c $ 10 | * 11 | *****************************************************************************/ 12 | 13 | void BotTeamAI(bot_state_t *bs); 14 | int BotGetTeamMateTaskPreference(bot_state_t *bs, int teammate); 15 | void BotSetTeamMateTaskPreference(bot_state_t *bs, int teammate, int preference); 16 | void BotVoiceChat(bot_state_t *bs, int toclient, char *voicechat); 17 | void BotVoiceChatOnly(bot_state_t *bs, int toclient, char *voicechat); 18 | 19 | 20 | -------------------------------------------------------------------------------- /code/game/ai_vcmd.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: ai_vcmd.h 6 | * 7 | * desc: Quake3 bot AI 8 | * 9 | * $Archive: /source/code/botai/ai_vcmd.c $ 10 | * 11 | *****************************************************************************/ 12 | 13 | int BotVoiceChatCommand(bot_state_t *bs, int mode, char *voicechat); 14 | void BotVoiceChat_Defend(bot_state_t *bs, int client, int mode); 15 | 16 | 17 | -------------------------------------------------------------------------------- /code/game/be_ai_char.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: be_ai_char.h 6 | * 7 | * desc: bot characters 8 | * 9 | * $Archive: /source/code/botlib/be_ai_char.h $ 10 | * 11 | *****************************************************************************/ 12 | 13 | //loads a bot character from a file 14 | int BotLoadCharacter(char *charfile, float skill); 15 | //frees a bot character 16 | void BotFreeCharacter(int character); 17 | //returns a float characteristic 18 | float Characteristic_Float(int character, int index); 19 | //returns a bounded float characteristic 20 | float Characteristic_BFloat(int character, int index, float min, float max); 21 | //returns an integer characteristic 22 | int Characteristic_Integer(int character, int index); 23 | //returns a bounded integer characteristic 24 | int Characteristic_BInteger(int character, int index, int min, int max); 25 | //returns a string characteristic 26 | void Characteristic_String(int character, int index, char *buf, int size); 27 | //free cached bot characters 28 | void BotShutdownCharacters(void); 29 | -------------------------------------------------------------------------------- /code/game/be_ai_chat.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | /***************************************************************************** 4 | * name: be_ai_chat.h 5 | * 6 | * desc: char AI 7 | * 8 | * $Archive: /source/code/botlib/be_ai_chat.h $ 9 | * 10 | *****************************************************************************/ 11 | 12 | #define MAX_MESSAGE_SIZE 256 13 | #define MAX_CHATTYPE_NAME 32 14 | #define MAX_MATCHVARIABLES 8 15 | 16 | #define CHAT_GENDERLESS 0 17 | #define CHAT_GENDERFEMALE 1 18 | #define CHAT_GENDERMALE 2 19 | 20 | #define CHAT_ALL 0 21 | #define CHAT_TEAM 1 22 | #define CHAT_TELL 2 23 | 24 | //a console message 25 | typedef struct bot_consolemessage_s 26 | { 27 | int handle; 28 | float time; //message time 29 | int type; //message type 30 | char message[MAX_MESSAGE_SIZE]; //message 31 | struct bot_consolemessage_s *prev, *next; //prev and next in list 32 | } bot_consolemessage_t; 33 | 34 | //match variable 35 | typedef struct bot_matchvariable_s 36 | { 37 | char offset; 38 | int length; 39 | } bot_matchvariable_t; 40 | //returned to AI when a match is found 41 | typedef struct bot_match_s 42 | { 43 | char string[MAX_MESSAGE_SIZE]; 44 | int type; 45 | int subtype; 46 | bot_matchvariable_t variables[MAX_MATCHVARIABLES]; 47 | } bot_match_t; 48 | 49 | //setup the chat AI 50 | int BotSetupChatAI(void); 51 | //shutdown the chat AI 52 | void BotShutdownChatAI(void); 53 | //returns the handle to a newly allocated chat state 54 | int BotAllocChatState(void); 55 | //frees the chatstate 56 | void BotFreeChatState(int handle); 57 | //adds a console message to the chat state 58 | void BotQueueConsoleMessage(int chatstate, int type, char *message); 59 | //removes the console message from the chat state 60 | void BotRemoveConsoleMessage(int chatstate, int handle); 61 | //returns the next console message from the state 62 | int BotNextConsoleMessage(int chatstate, bot_consolemessage_t *cm); 63 | //returns the number of console messages currently stored in the state 64 | int BotNumConsoleMessages(int chatstate); 65 | //selects a chat message of the given type 66 | void BotInitialChat(int chatstate, char *type, int mcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7); 67 | //returns the number of initial chat messages of the given type 68 | int BotNumInitialChats(int chatstate, char *type); 69 | //find and select a reply for the given message 70 | int BotReplyChat(int chatstate, char *message, int mcontext, int vcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7); 71 | //returns the length of the currently selected chat message 72 | int BotChatLength(int chatstate); 73 | //enters the selected chat message 74 | void BotEnterChat(int chatstate, int clientto, int sendto); 75 | //get the chat message ready to be output 76 | void BotGetChatMessage(int chatstate, char *buf, int size); 77 | //checks if the first string contains the second one, returns index into first string or -1 if not found 78 | int StringContains(char *str1, char *str2, int casesensitive); 79 | //finds a match for the given string using the match templates 80 | int BotFindMatch(char *str, bot_match_t *match, unsigned long int context); 81 | //returns a variable from a match 82 | void BotMatchVariable(bot_match_t *match, int variable, char *buf, int size); 83 | //unify all the white spaces in the string 84 | void UnifyWhiteSpaces(char *string); 85 | //replace all the context related synonyms in the string 86 | void BotReplaceSynonyms(char *string, unsigned long int context); 87 | //loads a chat file for the chat state 88 | int BotLoadChatFile(int chatstate, char *chatfile, char *chatname); 89 | //store the gender of the bot in the chat state 90 | void BotSetChatGender(int chatstate, int gender); 91 | //store the bot name in the chat state 92 | void BotSetChatName(int chatstate, char *name, int client); 93 | 94 | -------------------------------------------------------------------------------- /code/game/be_ai_gen.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: be_ai_gen.h 6 | * 7 | * desc: genetic selection 8 | * 9 | * $Archive: /source/code/botlib/be_ai_gen.h $ 10 | * 11 | *****************************************************************************/ 12 | 13 | int GeneticParentsAndChildSelection(int numranks, float *ranks, int *parent1, int *parent2, int *child); 14 | -------------------------------------------------------------------------------- /code/game/be_ai_goal.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | /***************************************************************************** 4 | * name: be_ai_goal.h 5 | * 6 | * desc: goal AI 7 | * 8 | * $Archive: /source/code/botlib/be_ai_goal.h $ 9 | * 10 | *****************************************************************************/ 11 | 12 | #define MAX_AVOIDGOALS 256 13 | #define MAX_GOALSTACK 8 14 | 15 | #define GFL_NONE 0 16 | #define GFL_ITEM 1 17 | #define GFL_ROAM 2 18 | #define GFL_DROPPED 4 19 | 20 | //a bot goal 21 | typedef struct bot_goal_s 22 | { 23 | vec3_t origin; //origin of the goal 24 | int areanum; //area number of the goal 25 | vec3_t mins, maxs; //mins and maxs of the goal 26 | int entitynum; //number of the goal entity 27 | int number; //goal number 28 | int flags; //goal flags 29 | int iteminfo; //item information 30 | } bot_goal_t; 31 | 32 | //reset the whole goal state, but keep the item weights 33 | void BotResetGoalState(int goalstate); 34 | //reset avoid goals 35 | void BotResetAvoidGoals(int goalstate); 36 | //remove the goal with the given number from the avoid goals 37 | void BotRemoveFromAvoidGoals(int goalstate, int number); 38 | //push a goal onto the goal stack 39 | void BotPushGoal(int goalstate, bot_goal_t *goal); 40 | //pop a goal from the goal stack 41 | void BotPopGoal(int goalstate); 42 | //empty the bot's goal stack 43 | void BotEmptyGoalStack(int goalstate); 44 | //dump the avoid goals 45 | void BotDumpAvoidGoals(int goalstate); 46 | //dump the goal stack 47 | void BotDumpGoalStack(int goalstate); 48 | //get the name name of the goal with the given number 49 | void BotGoalName(int number, char *name, int size); 50 | //get the top goal from the stack 51 | int BotGetTopGoal(int goalstate, bot_goal_t *goal); 52 | //get the second goal on the stack 53 | int BotGetSecondGoal(int goalstate, bot_goal_t *goal); 54 | //choose the best long term goal item for the bot 55 | int BotChooseLTGItem(int goalstate, vec3_t origin, int *inventory, int travelflags); 56 | //choose the best nearby goal item for the bot 57 | //the item may not be further away from the current bot position than maxtime 58 | //also the travel time from the nearby goal towards the long term goal may not 59 | //be larger than the travel time towards the long term goal from the current bot position 60 | int BotChooseNBGItem(int goalstate, vec3_t origin, int *inventory, int travelflags, 61 | bot_goal_t *ltg, float maxtime); 62 | //returns true if the bot touches the goal 63 | int BotTouchingGoal(vec3_t origin, bot_goal_t *goal); 64 | //returns true if the goal should be visible but isn't 65 | int BotItemGoalInVisButNotVisible(int viewer, vec3_t eye, vec3_t viewangles, bot_goal_t *goal); 66 | //search for a goal for the given classname, the index can be used 67 | //as a start point for the search when multiple goals are available with that same classname 68 | int BotGetLevelItemGoal(int index, char *classname, bot_goal_t *goal); 69 | //get the next camp spot in the map 70 | int BotGetNextCampSpotGoal(int num, bot_goal_t *goal); 71 | //get the map location with the given name 72 | int BotGetMapLocationGoal(char *name, bot_goal_t *goal); 73 | //returns the avoid goal time 74 | float BotAvoidGoalTime(int goalstate, int number); 75 | //set the avoid goal time 76 | void BotSetAvoidGoalTime(int goalstate, int number, float avoidtime); 77 | //initializes the items in the level 78 | void BotInitLevelItems(void); 79 | //regularly update dynamic entity items (dropped weapons, flags etc.) 80 | void BotUpdateEntityItems(void); 81 | //interbreed the goal fuzzy logic 82 | void BotInterbreedGoalFuzzyLogic(int parent1, int parent2, int child); 83 | //save the goal fuzzy logic to disk 84 | void BotSaveGoalFuzzyLogic(int goalstate, char *filename); 85 | //mutate the goal fuzzy logic 86 | void BotMutateGoalFuzzyLogic(int goalstate, float range); 87 | //loads item weights for the bot 88 | int BotLoadItemWeights(int goalstate, char *filename); 89 | //frees the item weights of the bot 90 | void BotFreeItemWeights(int goalstate); 91 | //returns the handle of a newly allocated goal state 92 | int BotAllocGoalState(int client); 93 | //free the given goal state 94 | void BotFreeGoalState(int handle); 95 | //setup the goal AI 96 | int BotSetupGoalAI(void); 97 | //shut down the goal AI 98 | void BotShutdownGoalAI(void); 99 | -------------------------------------------------------------------------------- /code/game/be_ai_move.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: be_ai_move.h 6 | * 7 | * desc: movement AI 8 | * 9 | * $Archive: /source/code/botlib/be_ai_move.h $ 10 | * 11 | *****************************************************************************/ 12 | 13 | //movement types 14 | #define MOVE_WALK 1 15 | #define MOVE_CROUCH 2 16 | #define MOVE_JUMP 4 17 | #define MOVE_GRAPPLE 8 18 | #define MOVE_ROCKETJUMP 16 19 | #define MOVE_BFGJUMP 32 20 | //move flags 21 | #define MFL_BARRIERJUMP 1 //bot is performing a barrier jump 22 | #define MFL_ONGROUND 2 //bot is in the ground 23 | #define MFL_SWIMMING 4 //bot is swimming 24 | #define MFL_AGAINSTLADDER 8 //bot is against a ladder 25 | #define MFL_WATERJUMP 16 //bot is waterjumping 26 | #define MFL_TELEPORTED 32 //bot is being teleported 27 | #define MFL_GRAPPLEPULL 64 //bot is being pulled by the grapple 28 | #define MFL_ACTIVEGRAPPLE 128 //bot is using the grapple hook 29 | #define MFL_GRAPPLERESET 256 //bot has reset the grapple 30 | #define MFL_WALK 512 //bot should walk slowly 31 | // move result flags 32 | #define MOVERESULT_MOVEMENTVIEW 1 //bot uses view for movement 33 | #define MOVERESULT_SWIMVIEW 2 //bot uses view for swimming 34 | #define MOVERESULT_WAITING 4 //bot is waiting for something 35 | #define MOVERESULT_MOVEMENTVIEWSET 8 //bot has set the view in movement code 36 | #define MOVERESULT_MOVEMENTWEAPON 16 //bot uses weapon for movement 37 | #define MOVERESULT_ONTOPOFOBSTACLE 32 //bot is ontop of obstacle 38 | #define MOVERESULT_ONTOPOF_FUNCBOB 64 //bot is ontop of a func_bobbing 39 | #define MOVERESULT_ONTOPOF_ELEVATOR 128 //bot is ontop of an elevator (func_plat) 40 | #define MOVERESULT_BLOCKEDBYAVOIDSPOT 256 //bot is blocked by an avoid spot 41 | // 42 | #define MAX_AVOIDREACH 1 43 | #define MAX_AVOIDSPOTS 32 44 | // avoid spot types 45 | #define AVOID_CLEAR 0 //clear all avoid spots 46 | #define AVOID_ALWAYS 1 //avoid always 47 | #define AVOID_DONTBLOCK 2 //never totally block 48 | // restult types 49 | #define RESULTTYPE_ELEVATORUP 1 //elevator is up 50 | #define RESULTTYPE_WAITFORFUNCBOBBING 2 //waiting for func bobbing to arrive 51 | #define RESULTTYPE_BADGRAPPLEPATH 4 //grapple path is obstructed 52 | #define RESULTTYPE_INSOLIDAREA 8 //stuck in solid area, this is bad 53 | 54 | //structure used to initialize the movement state 55 | //the or_moveflags MFL_ONGROUND, MFL_TELEPORTED and MFL_WATERJUMP come from the playerstate 56 | typedef struct bot_initmove_s 57 | { 58 | vec3_t origin; //origin of the bot 59 | vec3_t velocity; //velocity of the bot 60 | vec3_t viewoffset; //view offset 61 | int entitynum; //entity number of the bot 62 | int client; //client number of the bot 63 | float thinktime; //time the bot thinks 64 | int presencetype; //presencetype of the bot 65 | vec3_t viewangles; //view angles of the bot 66 | int or_moveflags; //values ored to the movement flags 67 | } bot_initmove_t; 68 | 69 | //NOTE: the ideal_viewangles are only valid if MFL_MOVEMENTVIEW is set 70 | typedef struct bot_moveresult_s 71 | { 72 | int failure; //true if movement failed all together 73 | int type; //failure or blocked type 74 | int blocked; //true if blocked by an entity 75 | int blockentity; //entity blocking the bot 76 | int traveltype; //last executed travel type 77 | int flags; //result flags 78 | int weapon; //weapon used for movement 79 | vec3_t movedir; //movement direction 80 | vec3_t ideal_viewangles; //ideal viewangles for the movement 81 | } bot_moveresult_t; 82 | 83 | // bk001204: from code/botlib/be_ai_move.c 84 | // TTimo 04/12/2001 was moved here to avoid dup defines 85 | typedef struct bot_avoidspot_s 86 | { 87 | vec3_t origin; 88 | float radius; 89 | int type; 90 | } bot_avoidspot_t; 91 | 92 | //resets the whole move state 93 | void BotResetMoveState(int movestate); 94 | //moves the bot to the given goal 95 | void BotMoveToGoal(bot_moveresult_t *result, int movestate, bot_goal_t *goal, int travelflags); 96 | //moves the bot in the specified direction using the specified type of movement 97 | int BotMoveInDirection(int movestate, vec3_t dir, float speed, int type); 98 | //reset avoid reachability 99 | void BotResetAvoidReach(int movestate); 100 | //resets the last avoid reachability 101 | void BotResetLastAvoidReach(int movestate); 102 | //returns a reachability area if the origin is in one 103 | int BotReachabilityArea(vec3_t origin, int client); 104 | //view target based on movement 105 | int BotMovementViewTarget(int movestate, bot_goal_t *goal, int travelflags, float lookahead, vec3_t target); 106 | //predict the position of a player based on movement towards a goal 107 | int BotPredictVisiblePosition(vec3_t origin, int areanum, bot_goal_t *goal, int travelflags, vec3_t target); 108 | //returns the handle of a newly allocated movestate 109 | int BotAllocMoveState(void); 110 | //frees the movestate with the given handle 111 | void BotFreeMoveState(int handle); 112 | //initialize movement state before performing any movement 113 | void BotInitMoveState(int handle, bot_initmove_t *initmove); 114 | //add a spot to avoid (if type == AVOID_CLEAR all spots are removed) 115 | void BotAddAvoidSpot(int movestate, vec3_t origin, float radius, int type); 116 | //must be called every map change 117 | void BotSetBrushModelTypes(void); 118 | //setup movement AI 119 | int BotSetupMoveAI(void); 120 | //shutdown movement AI 121 | void BotShutdownMoveAI(void); 122 | 123 | -------------------------------------------------------------------------------- /code/game/be_ai_weap.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: be_ai_weap.h 6 | * 7 | * desc: weapon AI 8 | * 9 | * $Archive: /source/code/botlib/be_ai_weap.h $ 10 | * 11 | *****************************************************************************/ 12 | 13 | //projectile flags 14 | #define PFL_WINDOWDAMAGE 1 //projectile damages through window 15 | #define PFL_RETURN 2 //set when projectile returns to owner 16 | //weapon flags 17 | #define WFL_FIRERELEASED 1 //set when projectile is fired with key-up event 18 | //damage types 19 | #define DAMAGETYPE_IMPACT 1 //damage on impact 20 | #define DAMAGETYPE_RADIAL 2 //radial damage 21 | #define DAMAGETYPE_VISIBLE 4 //damage to all entities visible to the projectile 22 | 23 | typedef struct projectileinfo_s 24 | { 25 | char name[MAX_STRINGFIELD]; 26 | char model[MAX_STRINGFIELD]; 27 | int flags; 28 | float gravity; 29 | int damage; 30 | float radius; 31 | int visdamage; 32 | int damagetype; 33 | int healthinc; 34 | float push; 35 | float detonation; 36 | float bounce; 37 | float bouncefric; 38 | float bouncestop; 39 | } projectileinfo_t; 40 | 41 | typedef struct weaponinfo_s 42 | { 43 | int valid; //true if the weapon info is valid 44 | int number; //number of the weapon 45 | char name[MAX_STRINGFIELD]; 46 | char model[MAX_STRINGFIELD]; 47 | int level; 48 | int weaponindex; 49 | int flags; 50 | char projectile[MAX_STRINGFIELD]; 51 | int numprojectiles; 52 | float hspread; 53 | float vspread; 54 | float speed; 55 | float acceleration; 56 | vec3_t recoil; 57 | vec3_t offset; 58 | vec3_t angleoffset; 59 | float extrazvelocity; 60 | int ammoamount; 61 | int ammoindex; 62 | float activate; 63 | float reload; 64 | float spinup; 65 | float spindown; 66 | projectileinfo_t proj; //pointer to the used projectile 67 | } weaponinfo_t; 68 | 69 | //setup the weapon AI 70 | int BotSetupWeaponAI(void); 71 | //shut down the weapon AI 72 | void BotShutdownWeaponAI(void); 73 | //returns the best weapon to fight with 74 | int BotChooseBestFightWeapon(int weaponstate, int *inventory); 75 | //returns the information of the current weapon 76 | void BotGetWeaponInfo(int weaponstate, int weapon, weaponinfo_t *weaponinfo); 77 | //loads the weapon weights 78 | int BotLoadWeaponWeights(int weaponstate, char *filename); 79 | //returns a handle to a newly allocated weapon state 80 | int BotAllocWeaponState(void); 81 | //frees the weapon state 82 | void BotFreeWeaponState(int weaponstate); 83 | //resets the whole weapon state 84 | void BotResetWeaponState(int weaponstate); 85 | -------------------------------------------------------------------------------- /code/game/be_ea.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | /***************************************************************************** 5 | * name: be_ea.h 6 | * 7 | * desc: elementary actions 8 | * 9 | * $Archive: /source/code/botlib/be_ea.h $ 10 | * 11 | *****************************************************************************/ 12 | 13 | //ClientCommand elementary actions 14 | void EA_Say(int client, char *str); 15 | void EA_SayTeam(int client, char *str); 16 | void EA_Command(int client, char *command ); 17 | 18 | void EA_Action(int client, int action); 19 | void EA_Crouch(int client); 20 | void EA_Walk(int client); 21 | void EA_MoveUp(int client); 22 | void EA_MoveDown(int client); 23 | void EA_MoveForward(int client); 24 | void EA_MoveBack(int client); 25 | void EA_MoveLeft(int client); 26 | void EA_MoveRight(int client); 27 | void EA_Attack(int client); 28 | void EA_Respawn(int client); 29 | void EA_Talk(int client); 30 | void EA_Gesture(int client); 31 | void EA_Use(int client); 32 | 33 | //regular elementary actions 34 | void EA_SelectWeapon(int client, int weapon); 35 | void EA_Jump(int client); 36 | void EA_DelayedJump(int client); 37 | void EA_Move(int client, vec3_t dir, float speed); 38 | void EA_View(int client, vec3_t viewangles); 39 | 40 | //send regular input to the server 41 | void EA_EndRegular(int client, float thinktime); 42 | void EA_GetInput(int client, float thinktime, bot_input_t *input); 43 | void EA_ResetInput(int client); 44 | //setup and shutdown routines 45 | int EA_Setup(void); 46 | void EA_Shutdown(void); 47 | -------------------------------------------------------------------------------- /code/game/bg_events.h: -------------------------------------------------------------------------------- 1 | #ifdef EVENT_ENUMS 2 | #define DECLARE_EVENT( ev ) ev 3 | #endif 4 | 5 | #ifdef EVENT_STRINGS 6 | #define DECLARE_EVENT( ev ) #ev 7 | #endif 8 | 9 | DECLARE_EVENT( EV_NONE ), 10 | 11 | DECLARE_EVENT( EV_FOOTSTEP ), 12 | DECLARE_EVENT( EV_FOOTSTEP_METAL ), 13 | DECLARE_EVENT( EV_FOOTSPLASH ), 14 | DECLARE_EVENT( EV_FOOTWADE ), 15 | DECLARE_EVENT( EV_SWIM ), 16 | 17 | DECLARE_EVENT( EV_STEP_4 ), 18 | DECLARE_EVENT( EV_STEP_8 ), 19 | DECLARE_EVENT( EV_STEP_12 ), 20 | DECLARE_EVENT( EV_STEP_16 ), 21 | 22 | DECLARE_EVENT( EV_FALL_SHORT ), 23 | DECLARE_EVENT( EV_FALL_MEDIUM ), 24 | DECLARE_EVENT( EV_FALL_FAR ), 25 | 26 | DECLARE_EVENT( EV_JUMP_PAD ), // boing sound at origin, jump sound on player 27 | 28 | DECLARE_EVENT( EV_JUMP ), 29 | DECLARE_EVENT( EV_WATER_TOUCH ), // foot touches 30 | DECLARE_EVENT( EV_WATER_LEAVE ), // foot leaves 31 | DECLARE_EVENT( EV_WATER_UNDER ), // head touches 32 | DECLARE_EVENT( EV_WATER_CLEAR ), // head leaves 33 | 34 | DECLARE_EVENT( EV_ITEM_PICKUP ), // normal item pickups are predictable 35 | DECLARE_EVENT( EV_GLOBAL_ITEM_PICKUP ), // powerup / team sounds are broadcast to everyone 36 | 37 | DECLARE_EVENT( EV_NOAMMO ), 38 | DECLARE_EVENT( EV_CHANGE_WEAPON ), 39 | DECLARE_EVENT( EV_FIRE_WEAPON ), 40 | 41 | DECLARE_EVENT( EV_USE_ITEM0 ), 42 | DECLARE_EVENT( EV_USE_ITEM1 ), 43 | DECLARE_EVENT( EV_USE_ITEM2 ), 44 | DECLARE_EVENT( EV_USE_ITEM3 ), 45 | DECLARE_EVENT( EV_USE_ITEM4 ), 46 | DECLARE_EVENT( EV_USE_ITEM5 ), 47 | DECLARE_EVENT( EV_USE_ITEM6 ), 48 | DECLARE_EVENT( EV_USE_ITEM7 ), 49 | DECLARE_EVENT( EV_USE_ITEM8 ), 50 | DECLARE_EVENT( EV_USE_ITEM9 ), 51 | DECLARE_EVENT( EV_USE_ITEM10 ), 52 | DECLARE_EVENT( EV_USE_ITEM11 ), 53 | DECLARE_EVENT( EV_USE_ITEM12 ), 54 | DECLARE_EVENT( EV_USE_ITEM13 ), 55 | DECLARE_EVENT( EV_USE_ITEM14 ), 56 | DECLARE_EVENT( EV_USE_ITEM15 ), 57 | 58 | DECLARE_EVENT( EV_ITEM_RESPAWN ), 59 | DECLARE_EVENT( EV_ITEM_POP ), 60 | DECLARE_EVENT( EV_PLAYER_TELEPORT_IN ), 61 | DECLARE_EVENT( EV_PLAYER_TELEPORT_OUT ), 62 | 63 | DECLARE_EVENT( EV_GRENADE_BOUNCE ), // eventParm will be the soundindex 64 | 65 | DECLARE_EVENT( EV_GENERAL_SOUND ), 66 | DECLARE_EVENT( EV_GLOBAL_SOUND ), // no attenuation 67 | DECLARE_EVENT( EV_GLOBAL_TEAM_SOUND ), 68 | 69 | DECLARE_EVENT( EV_BULLET_HIT_FLESH ), 70 | DECLARE_EVENT( EV_BULLET_HIT_WALL ), 71 | 72 | DECLARE_EVENT( EV_MISSILE_HIT ), 73 | DECLARE_EVENT( EV_MISSILE_MISS ), 74 | DECLARE_EVENT( EV_MISSILE_MISS_METAL ), 75 | DECLARE_EVENT( EV_RAILTRAIL ), 76 | DECLARE_EVENT( EV_SHOTGUN ), 77 | DECLARE_EVENT( EV_BULLET ), // otherEntity is the shooter 78 | 79 | DECLARE_EVENT( EV_PAIN ), 80 | DECLARE_EVENT( EV_DEATH1 ), 81 | DECLARE_EVENT( EV_DEATH2 ), 82 | DECLARE_EVENT( EV_DEATH3 ), 83 | DECLARE_EVENT( EV_OBITUARY ), 84 | 85 | DECLARE_EVENT( EV_POWERUP_QUAD ), 86 | DECLARE_EVENT( EV_POWERUP_BATTLESUIT ), 87 | DECLARE_EVENT( EV_POWERUP_REGEN ), 88 | 89 | DECLARE_EVENT( EV_GIB_PLAYER ), // gib a previously living player 90 | DECLARE_EVENT( EV_SCOREPLUM ), // score plum 91 | 92 | //#ifdef MISSIONPACK 93 | DECLARE_EVENT( EV_PROXIMITY_MINE_STICK ), 94 | DECLARE_EVENT( EV_PROXIMITY_MINE_TRIGGER ), 95 | DECLARE_EVENT( EV_KAMIKAZE ), // kamikaze explodes 96 | DECLARE_EVENT( EV_OBELISKEXPLODE ), // obelisk explodes 97 | DECLARE_EVENT( EV_OBELISKPAIN ), // obelisk is in pain 98 | DECLARE_EVENT( EV_INVUL_IMPACT ), // invulnerability sphere impact 99 | DECLARE_EVENT( EV_JUICED ), // invulnerability juiced effect 100 | DECLARE_EVENT( EV_LIGHTNINGBOLT ), // lightning bolt bounced of invulnerability sphere 101 | //endif 102 | 103 | DECLARE_EVENT( EV_DEBUG_LINE ), 104 | DECLARE_EVENT( EV_STOPLOOPINGSOUND ), 105 | DECLARE_EVENT( EV_TAUNT ), 106 | DECLARE_EVENT( EV_TAUNT_YES ), 107 | DECLARE_EVENT( EV_TAUNT_NO ), 108 | DECLARE_EVENT( EV_TAUNT_FOLLOWME ), 109 | DECLARE_EVENT( EV_TAUNT_GETFLAG ), 110 | DECLARE_EVENT( EV_TAUNT_GUARDBASE ), 111 | DECLARE_EVENT( EV_TAUNT_PATROL ) 112 | 113 | #ifdef EVENT_ENUMS 114 | , DECLARE_EVENT( EV_MAX ) 115 | #endif 116 | 117 | #undef DECLARE_EVENT 118 | -------------------------------------------------------------------------------- /code/game/bg_lib.h: -------------------------------------------------------------------------------- 1 | // bg_lib.h -- standard C library replacement routines used by code 2 | // compiled for the virtual machine 3 | 4 | // This file is NOT included on native builds 5 | 6 | typedef int size_t; 7 | typedef int intptr_t; 8 | 9 | typedef char * va_list; 10 | #define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) 11 | #define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) ) 12 | #define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) 13 | #define va_end(ap) ( ap = (va_list)0 ) 14 | 15 | #define CHAR_BIT 8 /* number of bits in a char */ 16 | #define SCHAR_MIN (-128) /* minimum signed char value */ 17 | #define SCHAR_MAX 127 /* maximum signed char value */ 18 | #define UCHAR_MAX 0xff /* maximum unsigned char value */ 19 | 20 | #define SHRT_MIN (-32768) /* minimum (signed) short value */ 21 | #define SHRT_MAX 32767 /* maximum (signed) short value */ 22 | #define USHRT_MAX 0xffff /* maximum unsigned short value */ 23 | #define INT_MIN (-2147483647 - 1) /* minimum (signed) int value */ 24 | #define INT_MAX 2147483647 /* maximum (signed) int value */ 25 | #define UINT_MAX 0xffffffff /* maximum unsigned int value */ 26 | #define LONG_MIN (-2147483647L - 1) /* minimum (signed) long value */ 27 | #define LONG_MAX 2147483647L /* maximum (signed) long value */ 28 | #define ULONG_MAX 0xffffffffUL /* maximum unsigned long value */ 29 | 30 | // Misc functions 31 | typedef int cmp_t(const void *, const void *); 32 | void qsort(void *a, size_t n, size_t es, cmp_t *cmp); 33 | void srand( unsigned seed ); 34 | int rand( void ); 35 | 36 | // String functions 37 | size_t strlen( const char *string ); 38 | char *strcat( char *strDestination, const char *strSource ); 39 | char *strcpy( char *strDestination, const char *strSource ); 40 | int strcmp( const char *string1, const char *string2 ); 41 | char *strchr( const char *string, int c ); 42 | char *strstr( const char *string, const char *strCharSet ); 43 | char *strncpy( char *strDest, const char *strSource, size_t count ); 44 | int tolower( int c ); 45 | int toupper( int c ); 46 | 47 | double atof( const char *string ); 48 | int atoi( const char *string ); 49 | 50 | int Q_vsprintf( char *buffer, const char *fmt, va_list argptr ); 51 | int Q_sscanf( const char *buffer, const char *fmt, ... ); 52 | 53 | // Memory functions 54 | void *memmove( void *dest, const void *src, size_t count ); 55 | void *memset( void *dest, int c, size_t count ); 56 | void *memcpy( void *dest, const void *src, size_t count ); 57 | 58 | // Math functions 59 | double ceil( double x ); 60 | double floor( double x ); 61 | double sqrt( double x ); 62 | double sin( double x ); 63 | double cos( double x ); 64 | double atan2( double y, double x ); 65 | double tan( double x ); 66 | int abs( int n ); 67 | double fabs( double x ); 68 | double acos( double x ); 69 | 70 | -------------------------------------------------------------------------------- /code/game/bg_local.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | // bg_local.h -- local definitions for the bg (both games) files 4 | 5 | #define MIN_WALK_NORMAL 0.7f // can't walk on very steep slopes 6 | 7 | #define JUMP_VELOCITY 270 8 | 9 | #define TIMER_LAND 130 10 | #define TIMER_GESTURE (34*66+50) 11 | 12 | #define OVERCLIP 1.001f 13 | 14 | // all of the locals will be zeroed before each 15 | // pmove, just to make damn sure we don't have 16 | // any differences when running on client or server 17 | typedef struct { 18 | vec3_t forward, right, up; 19 | float frametime; 20 | 21 | int msec; 22 | 23 | qboolean walking; 24 | qboolean groundPlane; 25 | trace_t groundTrace; 26 | 27 | float impactSpeed; 28 | 29 | vec3_t previous_origin; 30 | vec3_t previous_velocity; 31 | int previous_waterlevel; 32 | } pml_t; 33 | 34 | extern pmove_t *pm; 35 | extern pml_t pml; 36 | 37 | // movement parameters 38 | extern float pm_stopspeed; 39 | extern float pm_duckScale; 40 | extern float pm_swimScale; 41 | extern float pm_wadeScale; 42 | 43 | extern float pm_accelerate; 44 | extern float pm_airaccelerate; 45 | extern float pm_wateraccelerate; 46 | extern float pm_flyaccelerate; 47 | 48 | extern float pm_friction; 49 | extern float pm_waterfriction; 50 | extern float pm_flightfriction; 51 | 52 | extern int c_pmove; 53 | 54 | void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, float overbounce ); 55 | void PM_AddTouchEnt( int entityNum ); 56 | void PM_AddEvent( int newEvent ); 57 | 58 | qboolean PM_SlideMove( qboolean gravity ); 59 | void PM_StepSlideMove( qboolean gravity ); 60 | -------------------------------------------------------------------------------- /code/game/bg_mods.h: -------------------------------------------------------------------------------- 1 | #ifdef MOD_ENUMS 2 | #define DECLARE_MOD( mod ) mod 3 | #endif 4 | 5 | #ifdef MOD_STRINGS 6 | #define DECLARE_MOD( mod ) #mod 7 | #endif 8 | 9 | DECLARE_MOD( MOD_UNKNOWN ), 10 | DECLARE_MOD( MOD_SHOTGUN ), 11 | DECLARE_MOD( MOD_GAUNTLET ), 12 | DECLARE_MOD( MOD_MACHINEGUN ), 13 | DECLARE_MOD( MOD_GRENADE ), 14 | DECLARE_MOD( MOD_GRENADE_SPLASH ), 15 | DECLARE_MOD( MOD_ROCKET ), 16 | DECLARE_MOD( MOD_ROCKET_SPLASH ), 17 | DECLARE_MOD( MOD_PLASMA ), 18 | DECLARE_MOD( MOD_PLASMA_SPLASH ), 19 | DECLARE_MOD( MOD_RAILGUN ), 20 | DECLARE_MOD( MOD_LIGHTNING ), 21 | DECLARE_MOD( MOD_BFG ), 22 | DECLARE_MOD( MOD_BFG_SPLASH ), 23 | DECLARE_MOD( MOD_WATER ), 24 | DECLARE_MOD( MOD_SLIME ), 25 | DECLARE_MOD( MOD_LAVA ), 26 | DECLARE_MOD( MOD_CRUSH ), 27 | DECLARE_MOD( MOD_TELEFRAG ), 28 | DECLARE_MOD( MOD_FALLING ), 29 | DECLARE_MOD( MOD_SUICIDE ), 30 | DECLARE_MOD( MOD_TARGET_LASER ), 31 | DECLARE_MOD( MOD_TRIGGER_HURT ), 32 | #ifdef MISSIONPACK 33 | DECLARE_MOD( MOD_NAIL ), 34 | DECLARE_MOD( MOD_CHAINGUN ), 35 | DECLARE_MOD( MOD_PROXIMITY_MINE ), 36 | DECLARE_MOD( MOD_KAMIKAZE ), 37 | DECLARE_MOD( MOD_JUICED ), 38 | #endif 39 | DECLARE_MOD( MOD_GRAPPLE ) 40 | 41 | #ifdef MOD_ENUMS 42 | , DECLARE_MOD( MOD_NUM_MAX ) 43 | #endif 44 | 45 | #undef DECLARE_MOD 46 | -------------------------------------------------------------------------------- /code/game/chars.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | //=========================================================================== 4 | // 5 | // Name: chars.h 6 | // Function: bot characteristics 7 | // Programmer: Mr Elusive (MrElusive@idsoftware.com) 8 | // Last update: 1999-09-08 9 | // Tab Size: 4 (real tabs) 10 | //=========================================================================== 11 | 12 | 13 | //======================================================== 14 | //======================================================== 15 | //name 16 | #define CHARACTERISTIC_NAME 0 //string 17 | //gender of the bot 18 | #define CHARACTERISTIC_GENDER 1 //string ("male", "female", "it") 19 | //attack skill 20 | // > 0.0 && < 0.2 = don't move 21 | // > 0.3 && < 1.0 = aim at enemy during retreat 22 | // > 0.0 && < 0.4 = only move forward/backward 23 | // >= 0.4 && < 1.0 = circle strafing 24 | // > 0.7 && < 1.0 = random strafe direction change 25 | #define CHARACTERISTIC_ATTACK_SKILL 2 //float [0, 1] 26 | //weapon weight file 27 | #define CHARACTERISTIC_WEAPONWEIGHTS 3 //string 28 | //view angle difference to angle change factor 29 | #define CHARACTERISTIC_VIEW_FACTOR 4 //float <0, 1] 30 | //maximum view angle change 31 | #define CHARACTERISTIC_VIEW_MAXCHANGE 5 //float [1, 360] 32 | //reaction time in seconds 33 | #define CHARACTERISTIC_REACTIONTIME 6 //float [0, 5] 34 | //accuracy when aiming 35 | #define CHARACTERISTIC_AIM_ACCURACY 7 //float [0, 1] 36 | //weapon specific aim accuracy 37 | #define CHARACTERISTIC_AIM_ACCURACY_MACHINEGUN 8 //float [0, 1] 38 | #define CHARACTERISTIC_AIM_ACCURACY_SHOTGUN 9 //float [0, 1] 39 | #define CHARACTERISTIC_AIM_ACCURACY_ROCKETLAUNCHER 10 //float [0, 1] 40 | #define CHARACTERISTIC_AIM_ACCURACY_GRENADELAUNCHER 11 //float [0, 1] 41 | #define CHARACTERISTIC_AIM_ACCURACY_LIGHTNING 12 42 | #define CHARACTERISTIC_AIM_ACCURACY_PLASMAGUN 13 //float [0, 1] 43 | #define CHARACTERISTIC_AIM_ACCURACY_RAILGUN 14 44 | #define CHARACTERISTIC_AIM_ACCURACY_BFG10K 15 //float [0, 1] 45 | //skill when aiming 46 | // > 0.0 && < 0.9 = aim is affected by enemy movement 47 | // > 0.4 && <= 0.8 = enemy linear leading 48 | // > 0.8 && <= 1.0 = enemy exact movement leading 49 | // > 0.5 && <= 1.0 = prediction shots when enemy is not visible 50 | // > 0.6 && <= 1.0 = splash damage by shooting nearby geometry 51 | #define CHARACTERISTIC_AIM_SKILL 16 //float [0, 1] 52 | //weapon specific aim skill 53 | #define CHARACTERISTIC_AIM_SKILL_ROCKETLAUNCHER 17 //float [0, 1] 54 | #define CHARACTERISTIC_AIM_SKILL_GRENADELAUNCHER 18 //float [0, 1] 55 | #define CHARACTERISTIC_AIM_SKILL_PLASMAGUN 19 //float [0, 1] 56 | #define CHARACTERISTIC_AIM_SKILL_BFG10K 20 //float [0, 1] 57 | //======================================================== 58 | //chat 59 | //======================================================== 60 | //file with chats 61 | #define CHARACTERISTIC_CHAT_FILE 21 //string 62 | //name of the chat character 63 | #define CHARACTERISTIC_CHAT_NAME 22 //string 64 | //characters per minute type speed 65 | #define CHARACTERISTIC_CHAT_CPM 23 //integer [1, 4000] 66 | //tendency to insult/praise 67 | #define CHARACTERISTIC_CHAT_INSULT 24 //float [0, 1] 68 | //tendency to chat misc 69 | #define CHARACTERISTIC_CHAT_MISC 25 //float [0, 1] 70 | //tendency to chat at start or end of level 71 | #define CHARACTERISTIC_CHAT_STARTENDLEVEL 26 //float [0, 1] 72 | //tendency to chat entering or exiting the game 73 | #define CHARACTERISTIC_CHAT_ENTEREXITGAME 27 //float [0, 1] 74 | //tendency to chat when killed someone 75 | #define CHARACTERISTIC_CHAT_KILL 28 //float [0, 1] 76 | //tendency to chat when died 77 | #define CHARACTERISTIC_CHAT_DEATH 29 //float [0, 1] 78 | //tendency to chat when enemy suicides 79 | #define CHARACTERISTIC_CHAT_ENEMYSUICIDE 30 //float [0, 1] 80 | //tendency to chat when hit while talking 81 | #define CHARACTERISTIC_CHAT_HITTALKING 31 //float [0, 1] 82 | //tendency to chat when bot was hit but didn't dye 83 | #define CHARACTERISTIC_CHAT_HITNODEATH 32 //float [0, 1] 84 | //tendency to chat when bot hit the enemy but enemy didn't dye 85 | #define CHARACTERISTIC_CHAT_HITNOKILL 33 //float [0, 1] 86 | //tendency to randomly chat 87 | #define CHARACTERISTIC_CHAT_RANDOM 34 //float [0, 1] 88 | //tendency to reply 89 | #define CHARACTERISTIC_CHAT_REPLY 35 //float [0, 1] 90 | //======================================================== 91 | //movement 92 | //======================================================== 93 | //tendency to crouch 94 | #define CHARACTERISTIC_CROUCHER 36 //float [0, 1] 95 | //tendency to jump 96 | #define CHARACTERISTIC_JUMPER 37 //float [0, 1] 97 | //tendency to walk 98 | #define CHARACTERISTIC_WALKER 48 //float [0, 1] 99 | //tendency to jump using a weapon 100 | #define CHARACTERISTIC_WEAPONJUMPING 38 //float [0, 1] 101 | //tendency to use the grapple hook when available 102 | #define CHARACTERISTIC_GRAPPLE_USER 39 //float [0, 1] //use this!! 103 | //======================================================== 104 | //goal 105 | //======================================================== 106 | //item weight file 107 | #define CHARACTERISTIC_ITEMWEIGHTS 40 //string 108 | //the aggression of the bot 109 | #define CHARACTERISTIC_AGGRESSION 41 //float [0, 1] 110 | //the self preservation of the bot (rockets near walls etc.) 111 | #define CHARACTERISTIC_SELFPRESERVATION 42 //float [0, 1] 112 | //how likely the bot is to take revenge 113 | #define CHARACTERISTIC_VENGEFULNESS 43 //float [0, 1] //use this!! 114 | //tendency to camp 115 | #define CHARACTERISTIC_CAMPER 44 //float [0, 1] 116 | //======================================================== 117 | //======================================================== 118 | //tendency to get easy frags 119 | #define CHARACTERISTIC_EASY_FRAGGER 45 //float [0, 1] 120 | //how alert the bot is (view distance) 121 | #define CHARACTERISTIC_ALERTNESS 46 //float [0, 1] 122 | //how much the bot fires its weapon 123 | #define CHARACTERISTIC_FIRETHROTTLE 47 //float [0, 1] 124 | 125 | -------------------------------------------------------------------------------- /code/game/g_cvar.h: -------------------------------------------------------------------------------- 1 | #ifdef EXTERN_G_CVAR 2 | #define G_CVAR( vmCvar, cvarName, defaultString, cvarFlags, modificationCount, trackChange, teamShader ) extern vmCvar_t vmCvar; 3 | #endif 4 | 5 | #ifdef DECLARE_G_CVAR 6 | #define G_CVAR( vmCvar, cvarName, defaultString, cvarFlags, modificationCount, trackChange, teamShader ) vmCvar_t vmCvar; 7 | #endif 8 | 9 | #ifdef G_CVAR_LIST 10 | #define G_CVAR( vmCvar, cvarName, defaultString, cvarFlags, modificationCount, trackChange, teamShader ) { & vmCvar, cvarName, defaultString, cvarFlags, modificationCount, trackChange, teamShader }, 11 | #endif 12 | 13 | // don't override the cheat state set by the system 14 | G_CVAR( g_cheats, "sv_cheats", "", 0, 0, qfalse, qfalse ) 15 | 16 | //G_CVAR( g_restarted, "g_restarted", "0", CVAR_ROM, 0, qfalse, qfalse ) 17 | G_CVAR( g_mapname, "mapname", "", CVAR_SERVERINFO | CVAR_ROM, 0, qfalse, qfalse ) 18 | G_CVAR( sv_fps, "sv_fps", "30", CVAR_ARCHIVE, 0, qfalse, qfalse ) 19 | 20 | // latched vars 21 | G_CVAR( g_gametype, "g_gametype", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH, 0, qfalse, qfalse ) 22 | 23 | G_CVAR( g_maxclients, "sv_maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH | CVAR_ARCHIVE, 0, qfalse, qfalse ) // allow this many total, including spectators 24 | G_CVAR( g_maxGameClients, "g_maxGameClients", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_ARCHIVE, 0, qfalse, qfalse ) // allow this many active 25 | 26 | // change anytime vars 27 | G_CVAR( g_dmflags, "dmflags", "0", CVAR_SERVERINFO | CVAR_ARCHIVE, 0, qtrue, qfalse ) 28 | G_CVAR( g_fraglimit, "fraglimit", "20", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue, qfalse ) 29 | G_CVAR( g_timelimit, "timelimit", "0", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue, qfalse ) 30 | G_CVAR( g_capturelimit, "capturelimit", "8", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue, qfalse ) 31 | 32 | G_CVAR( g_synchronousClients, "g_synchronousClients", "0", CVAR_SYSTEMINFO, 0, qfalse, qfalse ) 33 | 34 | G_CVAR( g_friendlyFire, "g_friendlyFire", "0", CVAR_ARCHIVE, 0, qtrue, qfalse ) 35 | 36 | G_CVAR( g_autoJoin, "g_autoJoin", "1", CVAR_ARCHIVE, 0, qfalse, qfalse ) 37 | G_CVAR( g_teamForceBalance, "g_teamForceBalance", "0", CVAR_ARCHIVE, 0, qfalse, qfalse ) 38 | 39 | G_CVAR( g_warmup, "g_warmup", "20", CVAR_ARCHIVE, 0, qtrue, qfalse ) 40 | G_CVAR( g_log, "g_log", "games.log", CVAR_ARCHIVE, 0, qfalse, qfalse ) 41 | G_CVAR( g_logSync, "g_logSync", "0", CVAR_ARCHIVE, 0, qfalse, qfalse ) 42 | 43 | G_CVAR( g_password, "g_password", "", CVAR_USERINFO, 0, qfalse, qfalse ) 44 | 45 | G_CVAR( g_banIPs, "g_banIPs", "", CVAR_ARCHIVE, 0, qfalse, qfalse ) 46 | G_CVAR( g_filterBan, "g_filterBan", "1", CVAR_ARCHIVE, 0, qfalse, qfalse ) 47 | 48 | G_CVAR( g_needpass, "g_needpass", "0", CVAR_SERVERINFO | CVAR_ROM, 0, qfalse, qfalse ) 49 | 50 | G_CVAR( g_dedicated, "dedicated", "0", 0, 0, qfalse, qfalse ) 51 | 52 | G_CVAR( g_speed, "g_speed", "320", 0, 0, qtrue, qfalse ) 53 | G_CVAR( g_gravity, "g_gravity", "800", 0, 0, qtrue, qfalse ) 54 | G_CVAR( g_knockback, "g_knockback", "1000", 0, 0, qtrue, qfalse ) 55 | G_CVAR( g_quadfactor, "g_quadfactor", "3", 0, 0, qtrue, qfalse ) 56 | G_CVAR( g_weaponRespawn, "g_weaponrespawn", "5", 0, 0, qtrue, qfalse ) 57 | G_CVAR( g_weaponTeamRespawn, "g_weaponTeamRespawn", "30", 0, 0, qtrue, qfalse ) 58 | G_CVAR( g_forcerespawn, "g_forcerespawn", "20", 0, 0, qtrue, qfalse ) 59 | G_CVAR( g_inactivity, "g_inactivity", "0", 0, 0, qtrue, qfalse ) 60 | G_CVAR( g_debugMove, "g_debugMove", "0", 0, 0, qfalse, qfalse ) 61 | G_CVAR( g_debugDamage, "g_debugDamage", "0", 0, 0, qfalse, qfalse ) 62 | G_CVAR( g_debugAlloc, "g_debugAlloc", "0", 0, 0, qfalse, qfalse ) 63 | G_CVAR( g_motd, "g_motd", "", 0, 0, qfalse, qfalse ) 64 | G_CVAR( g_blood, "com_blood", "1", 0, 0, qfalse, qfalse ) 65 | 66 | G_CVAR( g_podiumDist, "g_podiumDist", "80", 0, 0, qfalse, qfalse ) 67 | G_CVAR( g_podiumDrop, "g_podiumDrop", "70", 0, 0, qfalse, qfalse ) 68 | 69 | G_CVAR( g_allowVote, "g_allowVote", "1", CVAR_ARCHIVE, 0, qfalse, qfalse ) 70 | G_CVAR( g_listEntity, "g_listEntity", "0", 0, 0, qfalse, qfalse ) 71 | 72 | G_CVAR( g_unlagged, "g_unlagged", "1", CVAR_SERVERINFO | CVAR_ARCHIVE, 0, qfalse, qfalse ) 73 | G_CVAR( g_predictPVS, "g_predictPVS", "0", CVAR_ARCHIVE, 0, qfalse, qfalse ) 74 | 75 | #ifdef MISSIONPACK 76 | G_CVAR( g_obeliskHealth, "g_obeliskHealth", "2500", 0, 0, qfalse, qfalse ) 77 | G_CVAR( g_obeliskRegenPeriod, "g_obeliskRegenPeriod", "1", 0, 0, qfalse, qfalse ) 78 | G_CVAR( g_obeliskRegenAmount, "g_obeliskRegenAmount", "15", 0, 0, qfalse, qfalse ) 79 | G_CVAR( g_obeliskRespawnDelay, "g_obeliskRespawnDelay", "10", CVAR_SERVERINFO, 0, qfalse, qfalse ) 80 | 81 | G_CVAR( g_cubeTimeout, "g_cubeTimeout", "30", 0, 0, qfalse, qfalse ) 82 | G_CVAR( g_redteam, "g_redteam", "Stroggs", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO, 0, qtrue, qtrue ) 83 | G_CVAR( g_blueteam, "g_blueteam", "Pagans", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_USERINFO, 0, qtrue, qtrue ) 84 | G_CVAR( g_singlePlayer, "ui_singlePlayerActive", "", 0, 0, qfalse, qfalse ) 85 | 86 | G_CVAR( g_enableDust, "g_enableDust", "0", CVAR_SERVERINFO, 0, qtrue, qfalse ) 87 | G_CVAR( g_enableBreath, "g_enableBreath", "0", CVAR_SERVERINFO, 0, qtrue, qfalse ) 88 | G_CVAR( g_proxMineTimeout, "g_proxMineTimeout", "20000", 0, 0, qfalse, qfalse ) 89 | #endif 90 | G_CVAR( g_smoothClients, "g_smoothClients", "1", 0, 0, qfalse, qfalse ) 91 | G_CVAR( pmove_fixed, "pmove_fixed", "0", CVAR_SYSTEMINFO, 0, qfalse, qfalse ) 92 | G_CVAR( pmove_msec, "pmove_msec", "8", CVAR_SYSTEMINFO, 0, qfalse, qfalse ) 93 | 94 | G_CVAR( g_rotation, "g_rotation", "0", CVAR_ARCHIVE, 0, qfalse, qfalse ) 95 | 96 | #undef G_CVAR 97 | -------------------------------------------------------------------------------- /code/game/g_mem.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | // 4 | // g_mem.c 5 | // 6 | 7 | 8 | #include "g_local.h" 9 | 10 | 11 | #define POOLSIZE (768 * 1024) 12 | 13 | static char memoryPool[POOLSIZE]; 14 | static int allocPoint; 15 | 16 | void *G_Alloc( size_t size ) { 17 | char *p; 18 | 19 | if ( g_debugAlloc.integer ) { 20 | G_Printf( "G_Alloc of %i bytes (%i left)\n", size, POOLSIZE - allocPoint - ( ( size + 31 ) & ~31 ) ); 21 | } 22 | 23 | if ( allocPoint + size > POOLSIZE ) { 24 | G_Error( "G_Alloc: failed on allocation of %i bytes", size ); 25 | return NULL; 26 | } 27 | 28 | p = &memoryPool[allocPoint]; 29 | 30 | allocPoint += ( size + 31 ) & ~31; 31 | 32 | return p; 33 | } 34 | 35 | void G_InitMemory( void ) { 36 | allocPoint = 0; 37 | } 38 | 39 | void Svcmd_GameMem_f( void ) { 40 | G_Printf( "Game memory status: %i out of %i bytes allocated\n", allocPoint, POOLSIZE ); 41 | } 42 | -------------------------------------------------------------------------------- /code/game/g_rotation.c: -------------------------------------------------------------------------------- 1 | // Public Domain 2 | 3 | #include "g_local.h" 4 | 5 | qboolean G_MapExist( const char *map ) 6 | { 7 | fileHandle_t fh; 8 | int len; 9 | 10 | if ( !map || !*map ) 11 | return qfalse; 12 | 13 | len = trap_FS_FOpenFile( va( "maps/%s.bsp", map ), &fh, FS_READ ); 14 | 15 | if ( len < 0 ) 16 | return qfalse; 17 | 18 | trap_FS_FCloseFile( fh ); 19 | 20 | return ( len >= 144 ) ? qtrue : qfalse ; 21 | } 22 | 23 | 24 | void G_LoadMap( const char *map ) 25 | { 26 | char cmd[ MAX_CVAR_VALUE_STRING ]; 27 | char ver[ 16 ]; 28 | int version; 29 | 30 | trap_Cvar_VariableStringBuffer( "version", ver, sizeof( ver ) ); 31 | if ( !Q_strncmp( ver, "Q3 1.32 ", 8 ) || !Q_strncmp( ver, "Q3 1.32b ", 9 ) || 32 | !Q_strncmp( ver, "Q3 1.32c ", 9 ) ) 33 | version = 0; // buggy vanilla binaries 34 | else 35 | version = 1; 36 | 37 | if ( !map || !*map || !G_MapExist( map ) || !Q_stricmp( map, g_mapname.string ) ) { 38 | if ( level.time > 12*60*60*1000 || version == 0 || level.denyMapRestart ) 39 | BG_sprintf( cmd, "map \"%s\"\n", g_mapname.string ); 40 | else 41 | Q_strcpy( cmd, "map_restart 0\n" ); 42 | } else { 43 | if ( !G_MapExist( map ) ) // required map doesn't exists, reload existing 44 | BG_sprintf( cmd, "map \"%s\"\n", g_mapname.string ); 45 | else 46 | BG_sprintf( cmd, "map \"%s\"\n", map ); 47 | } 48 | 49 | trap_SendConsoleCommand( EXEC_APPEND, cmd ); 50 | level.restarted = qtrue; 51 | } 52 | 53 | 54 | qboolean ParseMapRotation( void ) 55 | { 56 | char buf[ 4096 ]; 57 | char cvar[ 256 ]; 58 | char map[ 256 ]; 59 | char *s; 60 | fileHandle_t fh; 61 | int len; 62 | char *tk; 63 | int reqIndex; 64 | int curIndex = 0; 65 | int scopeLevel = 0; 66 | 67 | if ( g_gametype.integer == GT_SINGLE_PLAYER || !g_rotation.string[0] ) 68 | return qfalse; 69 | 70 | len = trap_FS_FOpenFile( g_rotation.string, &fh, FS_READ ); 71 | if ( fh == FS_INVALID_HANDLE ) 72 | { 73 | Com_Printf( S_COLOR_YELLOW "%s: map rotation file doesn't exists.\n", g_rotation.string ); 74 | return qfalse; 75 | } 76 | if ( len >= sizeof( buf ) ) 77 | { 78 | Com_Printf( S_COLOR_YELLOW "%s: map rotation file is too big.\n", g_rotation.string ); 79 | len = sizeof( buf ) - 1; 80 | } 81 | trap_FS_Read( buf, len, fh ); 82 | buf[ len ] = '\0'; 83 | trap_FS_FCloseFile( fh ); 84 | 85 | Com_InitSeparators(); // needed for COM_ParseSep() 86 | 87 | reqIndex = trap_Cvar_VariableIntegerValue( SV_ROTATION ); 88 | if ( reqIndex == 0 ) 89 | reqIndex = 1; 90 | 91 | __rescan: 92 | 93 | COM_BeginParseSession( g_rotation.string ); 94 | 95 | s = buf; // initialize token parsing 96 | map[0] = '\0'; 97 | 98 | while ( 1 ) 99 | { 100 | tk = COM_ParseSep( &s, qtrue ); 101 | if ( tk[0] == '\0' ) 102 | break; 103 | 104 | if ( tk[0] == '$' && tk[1] != '\0' ) // cvar name 105 | { 106 | // save cvar name 107 | strcpy( cvar, tk+1 ); 108 | tk = COM_ParseSep( &s, qfalse ); 109 | // expect '=' 110 | if ( tk[0] == '=' && tk[1] == '\0' ) 111 | { 112 | tk = COM_ParseSep( &s, qtrue ); 113 | if ( !scopeLevel || curIndex == reqIndex ) 114 | { 115 | trap_Cvar_Set( cvar, tk ); 116 | } 117 | SkipTillSeparators( &s ); 118 | continue; 119 | } 120 | else 121 | { 122 | COM_ParseWarning( S_COLOR_YELLOW "missing '=' after '%s'", cvar ); 123 | SkipRestOfLine( &s ); 124 | continue; 125 | } 126 | 127 | } 128 | else if ( tk[0] == '{' && tk[1] == '\0' ) 129 | { 130 | if ( scopeLevel == 0 && curIndex ) 131 | { 132 | scopeLevel++; 133 | continue; 134 | } 135 | else 136 | { 137 | COM_ParseWarning( S_COLOR_YELLOW "unexpected '{'" ); 138 | continue; 139 | } 140 | } 141 | else if ( tk[0] == '}' && tk[1] == '\0' ) 142 | { 143 | if ( scopeLevel == 1 ) 144 | { 145 | scopeLevel--; 146 | continue; 147 | } 148 | else 149 | { 150 | COM_ParseWarning( S_COLOR_YELLOW "unexpected '}'" ); 151 | } 152 | } 153 | else if ( G_MapExist( tk ) ) 154 | { 155 | curIndex++; 156 | if ( curIndex == reqIndex ) 157 | { 158 | Q_strncpyz( map, tk, sizeof( map ) ); 159 | } 160 | } 161 | else 162 | { 163 | COM_ParseWarning( S_COLOR_YELLOW "map '%s' doesn't exists", tk ); 164 | SkipRestOfLine( &s ); 165 | continue; 166 | } 167 | } 168 | 169 | if ( curIndex == 0 ) // no maps in rotation file 170 | { 171 | Com_Printf( S_COLOR_YELLOW "%s: no maps in rotation file.\n", g_rotation.string ); 172 | trap_Cvar_Set( SV_ROTATION, "1" ); 173 | return qfalse; 174 | } 175 | 176 | if ( !map[0] ) // map at required index not found? 177 | { 178 | if ( reqIndex > 1 ) // try to rescan with lower index 179 | { 180 | Com_Printf( S_COLOR_CYAN "%s: map at index %i not found, rescan\n", g_rotation.integer, reqIndex ); 181 | reqIndex = 1; 182 | goto __rescan; 183 | } 184 | trap_Cvar_Set( SV_ROTATION, "1" ); 185 | return qfalse; 186 | } 187 | 188 | reqIndex++; 189 | if ( reqIndex > curIndex ) 190 | reqIndex = 1; 191 | 192 | trap_Cvar_Set( SV_ROTATION, va( "%i", reqIndex ) ); 193 | //trap_Cvar_Set( "g_restarted", "1" ); 194 | G_LoadMap( map ); 195 | 196 | return qtrue; 197 | } 198 | -------------------------------------------------------------------------------- /code/game/g_session.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | #include "g_local.h" 4 | 5 | 6 | /* 7 | ======================================================================= 8 | 9 | SESSION DATA 10 | 11 | Session data is the only data that stays persistant across level loads 12 | and tournament restarts. 13 | ======================================================================= 14 | */ 15 | 16 | /* 17 | ================ 18 | G_WriteClientSessionData 19 | 20 | Called on game shutdown 21 | ================ 22 | */ 23 | void G_WriteClientSessionData( gclient_t *client ) { 24 | const char *s; 25 | const char *var; 26 | 27 | s = va("%i %i %i %i %i %i %i", 28 | client->sess.sessionTeam, 29 | client->sess.spectatorTime, 30 | client->sess.spectatorState, 31 | client->sess.spectatorClient, 32 | client->sess.wins, 33 | client->sess.losses, 34 | client->sess.teamLeader 35 | ); 36 | 37 | var = va( "session%i", client - level.clients ); 38 | 39 | trap_Cvar_Set( var, s ); 40 | } 41 | 42 | 43 | /* 44 | ================ 45 | G_ReadSessionData 46 | 47 | Called on a reconnect 48 | ================ 49 | */ 50 | void G_ReadClientSessionData( gclient_t *client ) { 51 | char s[MAX_STRING_CHARS]; 52 | const char *var; 53 | int teamLeader; 54 | int spectatorState; 55 | int sessionTeam; 56 | 57 | var = va( "session%i", client - level.clients ); 58 | trap_Cvar_VariableStringBuffer( var, s, sizeof(s) ); 59 | 60 | Q_sscanf( s, "%i %i %i %i %i %i %i", 61 | &sessionTeam, 62 | &client->sess.spectatorTime, 63 | &spectatorState, 64 | &client->sess.spectatorClient, 65 | &client->sess.wins, 66 | &client->sess.losses, 67 | &teamLeader 68 | ); 69 | 70 | client->sess.sessionTeam = (team_t)sessionTeam; 71 | client->sess.spectatorState = (spectatorState_t)spectatorState; 72 | client->sess.teamLeader = (qboolean)teamLeader; 73 | 74 | if ( (unsigned)client->sess.sessionTeam >= TEAM_NUM_TEAMS ) { 75 | client->sess.sessionTeam = TEAM_SPECTATOR; 76 | } 77 | } 78 | 79 | 80 | /* 81 | ================ 82 | G_ClearClientSessionData 83 | ================ 84 | */ 85 | void G_ClearClientSessionData( gclient_t *client ) 86 | { 87 | const char *var; 88 | 89 | var = va( "session%i", client - level.clients ); 90 | trap_Cvar_Set( var, "" ); 91 | } 92 | 93 | 94 | /* 95 | ================ 96 | G_InitSessionData 97 | 98 | Called on a first-time connect 99 | ================ 100 | */ 101 | void G_InitSessionData( gclient_t *client, const char *team, qboolean isBot ) { 102 | clientSession_t *sess; 103 | 104 | sess = &client->sess; 105 | 106 | // initial team determination 107 | if ( g_gametype.integer >= GT_TEAM ) { 108 | if ( team[0] == 's' || team[0] == 'S' ) { 109 | // a willing spectator, not a waiting-in-line 110 | sess->sessionTeam = TEAM_SPECTATOR; 111 | } else { 112 | if ( g_autoJoin.integer & 2 ) { 113 | sess->sessionTeam = PickTeam( -1 ); 114 | } else { 115 | // always spawn as spectator in team games 116 | if ( isBot == qfalse ) { 117 | sess->sessionTeam = TEAM_SPECTATOR; 118 | } else { 119 | // bind player to specified team 120 | if ( team[0] == 'r' || team[0] == 'R' ) { 121 | sess->sessionTeam = TEAM_RED; 122 | } else if ( team[0] == 'b' || team[0] == 'B' ) { 123 | sess->sessionTeam = TEAM_BLUE; 124 | } else { 125 | // or choose new 126 | sess->sessionTeam = PickTeam( -1 ); 127 | } 128 | } 129 | } 130 | } 131 | } else { 132 | if ( team[0] == 's' || team[0] == 'S' ) { 133 | // a willing spectator, not a waiting-in-line 134 | sess->sessionTeam = TEAM_SPECTATOR; 135 | } else { 136 | switch ( g_gametype.integer ) { 137 | default: 138 | case GT_FFA: 139 | case GT_SINGLE_PLAYER: 140 | if ( g_maxGameClients.integer > 0 && level.numNonSpectatorClients >= g_maxGameClients.integer ) { 141 | sess->sessionTeam = TEAM_SPECTATOR; 142 | } else { 143 | if ( g_autoJoin.integer & 1 || isBot || g_gametype.integer == GT_SINGLE_PLAYER ) 144 | sess->sessionTeam = TEAM_FREE; 145 | else 146 | sess->sessionTeam = TEAM_SPECTATOR; 147 | } 148 | break; 149 | case GT_TOURNAMENT: 150 | // if the game is full, go into a waiting mode 151 | if ( level.numNonSpectatorClients >= 2 ) { 152 | sess->sessionTeam = TEAM_SPECTATOR; 153 | } else { 154 | if ( g_autoJoin.integer & 1 || isBot ) 155 | sess->sessionTeam = TEAM_FREE; 156 | else 157 | sess->sessionTeam = TEAM_SPECTATOR; 158 | } 159 | break; 160 | } 161 | } 162 | } 163 | 164 | sess->spectatorState = SPECTATOR_FREE; 165 | sess->spectatorTime = 0; 166 | } 167 | 168 | 169 | /* 170 | ================== 171 | G_InitWorldSession 172 | 173 | ================== 174 | */ 175 | void G_InitWorldSession( void ) { 176 | char s[MAX_STRING_CHARS]; 177 | int gt; 178 | 179 | trap_Cvar_VariableStringBuffer( "session", s, sizeof(s) ); 180 | gt = atoi( s ); 181 | 182 | // if the gametype changed since the last session, don't use any 183 | // client sessions 184 | if ( !*s || g_gametype.integer != gt ) { 185 | level.newSession = qtrue; 186 | G_Printf( "Gametype changed, clearing session data.\n" ); 187 | } 188 | } 189 | 190 | 191 | /* 192 | ================== 193 | G_WriteSessionData 194 | 195 | ================== 196 | */ 197 | void G_WriteSessionData( void ) { 198 | int i; 199 | 200 | trap_Cvar_Set( "session", va("%i", g_gametype.integer) ); 201 | 202 | for ( i = 0 ; i < level.maxclients ; i++ ) { 203 | if ( level.clients[i].pers.connected != CON_DISCONNECTED ) { 204 | G_WriteClientSessionData( &level.clients[i] ); 205 | } 206 | } 207 | } 208 | -------------------------------------------------------------------------------- /code/game/g_team.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | 4 | #ifdef MISSIONPACK 5 | 6 | #define CTF_CAPTURE_BONUS 100 // what you get for capture 7 | #define CTF_TEAM_BONUS 25 // what your team gets for capture 8 | #define CTF_RECOVERY_BONUS 10 // what you get for recovery 9 | #define CTF_FLAG_BONUS 10 // what you get for picking up enemy flag 10 | #define CTF_FRAG_CARRIER_BONUS 20 // what you get for fragging enemy flag carrier 11 | #define CTF_FLAG_RETURN_TIME 40000 // seconds until auto return 12 | 13 | #define CTF_CARRIER_DANGER_PROTECT_BONUS 5 // bonus for fraggin someone who has recently hurt your flag carrier 14 | #define CTF_CARRIER_PROTECT_BONUS 2 // bonus for fraggin someone while either you or your target are near your flag carrier 15 | #define CTF_FLAG_DEFENSE_BONUS 10 // bonus for fraggin someone while either you or your target are near your flag 16 | #define CTF_RETURN_FLAG_ASSIST_BONUS 10 // awarded for returning a flag that causes a capture to happen almost immediately 17 | #define CTF_FRAG_CARRIER_ASSIST_BONUS 10 // award for fragging a flag carrier if a capture happens almost immediately 18 | 19 | #else 20 | 21 | #define CTF_CAPTURE_BONUS 5 // what you get for capture 22 | #define CTF_TEAM_BONUS 0 // what your team gets for capture 23 | #define CTF_RECOVERY_BONUS 1 // what you get for recovery 24 | #define CTF_FLAG_BONUS 0 // what you get for picking up enemy flag 25 | #define CTF_FRAG_CARRIER_BONUS 2 // what you get for fragging enemy flag carrier 26 | #define CTF_FLAG_RETURN_TIME 40000 // seconds until auto return 27 | 28 | #define CTF_CARRIER_DANGER_PROTECT_BONUS 2 // bonus for fraggin someone who has recently hurt your flag carrier 29 | #define CTF_CARRIER_PROTECT_BONUS 1 // bonus for fraggin someone while either you or your target are near your flag carrier 30 | #define CTF_FLAG_DEFENSE_BONUS 1 // bonus for fraggin someone while either you or your target are near your flag 31 | #define CTF_RETURN_FLAG_ASSIST_BONUS 1 // awarded for returning a flag that causes a capture to happen almost immediately 32 | #define CTF_FRAG_CARRIER_ASSIST_BONUS 2 // award for fragging a flag carrier if a capture happens almost immediately 33 | 34 | #endif 35 | 36 | #define CTF_TARGET_PROTECT_RADIUS 1000 // the radius around an object being defended where a target will be worth extra frags 37 | #define CTF_ATTACKER_PROTECT_RADIUS 1000 // the radius around an object being defended where an attacker will get extra frags when making kills 38 | 39 | #define CTF_CARRIER_DANGER_PROTECT_TIMEOUT 8000 40 | #define CTF_FRAG_CARRIER_ASSIST_TIMEOUT 10000 41 | #define CTF_RETURN_FLAG_ASSIST_TIMEOUT 10000 42 | 43 | #define CTF_GRAPPLE_SPEED 750 // speed of grapple in flight 44 | #define CTF_GRAPPLE_PULL_SPEED 750 // speed player is pulled at 45 | 46 | #define OVERLOAD_ATTACK_BASE_SOUND_TIME 20000 47 | 48 | // Prototypes 49 | 50 | int OtherTeam( team_t team ); 51 | const char *TeamName( team_t team ); 52 | const char *OtherTeamName( team_t team ); 53 | const char *TeamColorString( team_t team ); 54 | 55 | void Team_DroppedFlagThink(gentity_t *ent); 56 | void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker); 57 | void Team_CheckHurtCarrier(gentity_t *targ, gentity_t *attacker); 58 | void Team_InitGame(void); 59 | void Team_ReturnFlag(team_t team); 60 | void Team_FreeEntity(gentity_t *ent); 61 | gentity_t *SelectCTFSpawnPoint( gentity_t *ent, team_t team, int teamstate, vec3_t origin, vec3_t angles ); 62 | gentity_t *Team_GetLocation(gentity_t *ent); 63 | qboolean Team_GetLocationMsg(gentity_t *ent, char *loc, int loclen); 64 | void TeamplayInfoMessage( gentity_t *ent ); 65 | void CheckTeamStatus(void); 66 | 67 | int Pickup_Team( gentity_t *ent, gentity_t *other ); 68 | void AddTeamScore( vec3_t origin, team_t team, int score ); 69 | -------------------------------------------------------------------------------- /code/game/game.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | vmMain 3 | dllEntry 4 | -------------------------------------------------------------------------------- /code/game/inv.h: -------------------------------------------------------------------------------- 1 | 2 | #define INVENTORY_NONE 0 3 | //armor 4 | #define INVENTORY_ARMOR 1 5 | //weapons 6 | #define INVENTORY_GAUNTLET 4 7 | #define INVENTORY_SHOTGUN 5 8 | #define INVENTORY_MACHINEGUN 6 9 | #define INVENTORY_GRENADELAUNCHER 7 10 | #define INVENTORY_ROCKETLAUNCHER 8 11 | #define INVENTORY_LIGHTNING 9 12 | #define INVENTORY_RAILGUN 10 13 | #define INVENTORY_PLASMAGUN 11 14 | #define INVENTORY_BFG10K 13 15 | #define INVENTORY_GRAPPLINGHOOK 14 16 | #define INVENTORY_NAILGUN 15 17 | #define INVENTORY_PROXLAUNCHER 16 18 | #define INVENTORY_CHAINGUN 17 19 | //ammo 20 | #define INVENTORY_SHELLS 18 21 | #define INVENTORY_BULLETS 19 22 | #define INVENTORY_GRENADES 20 23 | #define INVENTORY_CELLS 21 24 | #define INVENTORY_LIGHTNINGAMMO 22 25 | #define INVENTORY_ROCKETS 23 26 | #define INVENTORY_SLUGS 24 27 | #define INVENTORY_BFGAMMO 25 28 | #define INVENTORY_NAILS 26 29 | #define INVENTORY_MINES 27 30 | #define INVENTORY_BELT 28 31 | //powerups 32 | #define INVENTORY_HEALTH 29 33 | #define INVENTORY_TELEPORTER 30 34 | #define INVENTORY_MEDKIT 31 35 | #define INVENTORY_KAMIKAZE 32 36 | #define INVENTORY_PORTAL 33 37 | #define INVENTORY_INVULNERABILITY 34 38 | #define INVENTORY_QUAD 35 39 | #define INVENTORY_ENVIRONMENTSUIT 36 40 | #define INVENTORY_HASTE 37 41 | #define INVENTORY_INVISIBILITY 38 42 | #define INVENTORY_REGEN 39 43 | #define INVENTORY_FLIGHT 40 44 | #define INVENTORY_SCOUT 41 45 | #define INVENTORY_GUARD 42 46 | #define INVENTORY_DOUBLER 43 47 | #define INVENTORY_AMMOREGEN 44 48 | 49 | #define INVENTORY_REDFLAG 45 50 | #define INVENTORY_BLUEFLAG 46 51 | #define INVENTORY_NEUTRALFLAG 47 52 | #define INVENTORY_REDCUBE 48 53 | #define INVENTORY_BLUECUBE 49 54 | //enemy stuff 55 | #define ENEMY_HORIZONTAL_DIST 200 56 | #define ENEMY_HEIGHT 201 57 | #define NUM_VISIBLE_ENEMIES 202 58 | #define NUM_VISIBLE_TEAMMATES 203 59 | 60 | // if running the mission pack 61 | #ifdef MISSIONPACK 62 | 63 | //#error "running mission pack" 64 | 65 | #endif 66 | 67 | //item numbers (make sure they are in sync with bg_itemlist in bg_misc.c) 68 | #define MODELINDEX_ARMORSHARD 1 69 | #define MODELINDEX_ARMORCOMBAT 2 70 | #define MODELINDEX_ARMORBODY 3 71 | #define MODELINDEX_HEALTHSMALL 4 72 | #define MODELINDEX_HEALTH 5 73 | #define MODELINDEX_HEALTHLARGE 6 74 | #define MODELINDEX_HEALTHMEGA 7 75 | 76 | #define MODELINDEX_GAUNTLET 8 77 | #define MODELINDEX_SHOTGUN 9 78 | #define MODELINDEX_MACHINEGUN 10 79 | #define MODELINDEX_GRENADELAUNCHER 11 80 | #define MODELINDEX_ROCKETLAUNCHER 12 81 | #define MODELINDEX_LIGHTNING 13 82 | #define MODELINDEX_RAILGUN 14 83 | #define MODELINDEX_PLASMAGUN 15 84 | #define MODELINDEX_BFG10K 16 85 | #define MODELINDEX_GRAPPLINGHOOK 17 86 | 87 | #define MODELINDEX_SHELLS 18 88 | #define MODELINDEX_BULLETS 19 89 | #define MODELINDEX_GRENADES 20 90 | #define MODELINDEX_CELLS 21 91 | #define MODELINDEX_LIGHTNINGAMMO 22 92 | #define MODELINDEX_ROCKETS 23 93 | #define MODELINDEX_SLUGS 24 94 | #define MODELINDEX_BFGAMMO 25 95 | 96 | #define MODELINDEX_TELEPORTER 26 97 | #define MODELINDEX_MEDKIT 27 98 | #define MODELINDEX_QUAD 28 99 | #define MODELINDEX_ENVIRONMENTSUIT 29 100 | #define MODELINDEX_HASTE 30 101 | #define MODELINDEX_INVISIBILITY 31 102 | #define MODELINDEX_REGEN 32 103 | #define MODELINDEX_FLIGHT 33 104 | 105 | #define MODELINDEX_REDFLAG 34 106 | #define MODELINDEX_BLUEFLAG 35 107 | 108 | // mission pack only defines 109 | 110 | #define MODELINDEX_KAMIKAZE 36 111 | #define MODELINDEX_PORTAL 37 112 | #define MODELINDEX_INVULNERABILITY 38 113 | 114 | #define MODELINDEX_NAILS 39 115 | #define MODELINDEX_MINES 40 116 | #define MODELINDEX_BELT 41 117 | 118 | #define MODELINDEX_SCOUT 42 119 | #define MODELINDEX_GUARD 43 120 | #define MODELINDEX_DOUBLER 44 121 | #define MODELINDEX_AMMOREGEN 45 122 | 123 | #define MODELINDEX_NEUTRALFLAG 46 124 | #define MODELINDEX_REDCUBE 47 125 | #define MODELINDEX_BLUECUBE 48 126 | 127 | #define MODELINDEX_NAILGUN 49 128 | #define MODELINDEX_PROXLAUNCHER 50 129 | #define MODELINDEX_CHAINGUN 51 130 | 131 | 132 | // 133 | #define WEAPONINDEX_GAUNTLET 1 134 | #define WEAPONINDEX_MACHINEGUN 2 135 | #define WEAPONINDEX_SHOTGUN 3 136 | #define WEAPONINDEX_GRENADE_LAUNCHER 4 137 | #define WEAPONINDEX_ROCKET_LAUNCHER 5 138 | #define WEAPONINDEX_LIGHTNING 6 139 | #define WEAPONINDEX_RAILGUN 7 140 | #define WEAPONINDEX_PLASMAGUN 8 141 | #define WEAPONINDEX_BFG 9 142 | #define WEAPONINDEX_GRAPPLING_HOOK 10 143 | #define WEAPONINDEX_NAILGUN 11 144 | #define WEAPONINDEX_PROXLAUNCHER 12 145 | #define WEAPONINDEX_CHAINGUN 13 146 | -------------------------------------------------------------------------------- /code/game/match.h: -------------------------------------------------------------------------------- 1 | //=========================================================================== 2 | // 3 | // Name: match.h 4 | // Function: match template defines 5 | // Programmer: Mr Elusive 6 | // Last update: 7 | // Tab Size: 4 (real tabs) 8 | // 9 | //=========================================================================== 10 | 11 | // make sure this is the same character as we use in chats in g_cmd.c 12 | #define EC "\x19" 13 | 14 | //match template contexts 15 | #define MTCONTEXT_MISC 2 16 | #define MTCONTEXT_INITIALTEAMCHAT 4 17 | #define MTCONTEXT_TIME 8 18 | #define MTCONTEXT_TEAMMATE 16 19 | #define MTCONTEXT_ADDRESSEE 32 20 | #define MTCONTEXT_PATROLKEYAREA 64 21 | #define MTCONTEXT_REPLYCHAT 128 22 | #define MTCONTEXT_CTF 256 23 | 24 | //message types 25 | #define MSG_NEWLEADER 1 //new leader 26 | #define MSG_ENTERGAME 2 //enter game message 27 | #define MSG_HELP 3 //help someone 28 | #define MSG_ACCOMPANY 4 //accompany someone 29 | #define MSG_DEFENDKEYAREA 5 //defend a key area 30 | #define MSG_RUSHBASE 6 //everyone rush to base 31 | #define MSG_GETFLAG 7 //get the enemy flag 32 | #define MSG_STARTTEAMLEADERSHIP 8 //someone wants to become the team leader 33 | #define MSG_STOPTEAMLEADERSHIP 9 //someone wants to stop being the team leader 34 | #define MSG_WHOISTEAMLAEDER 10 //who is the team leader 35 | #define MSG_WAIT 11 //wait for someone 36 | #define MSG_WHATAREYOUDOING 12 //what are you doing? 37 | #define MSG_JOINSUBTEAM 13 //join a sub-team 38 | #define MSG_LEAVESUBTEAM 14 //leave a sub-team 39 | #define MSG_CREATENEWFORMATION 15 //create a new formation 40 | #define MSG_FORMATIONPOSITION 16 //tell someone his/her position in a formation 41 | #define MSG_FORMATIONSPACE 17 //set the formation intervening space 42 | #define MSG_DOFORMATION 18 //form a known formation 43 | #define MSG_DISMISS 19 //dismiss commanded team mates 44 | #define MSG_CAMP 20 //camp somewhere 45 | #define MSG_CHECKPOINT 21 //remember a check point 46 | #define MSG_PATROL 22 //patrol between certain keypoints 47 | #define MSG_LEADTHEWAY 23 //lead the way 48 | #define MSG_GETITEM 24 //get an item 49 | #define MSG_KILL 25 //kill someone 50 | #define MSG_WHEREAREYOU 26 //where is someone 51 | #define MSG_RETURNFLAG 27 //return the flag 52 | #define MSG_WHATISMYCOMMAND 28 //ask the team leader what to do 53 | #define MSG_WHICHTEAM 29 //ask which team a bot is in 54 | #define MSG_TASKPREFERENCE 30 //tell your teamplay task preference 55 | #define MSG_ATTACKENEMYBASE 31 //attack the enemy base 56 | #define MSG_HARVEST 32 //go harvest 57 | #define MSG_SUICIDE 33 //order to suicide 58 | // 59 | #define MSG_ME 100 60 | #define MSG_EVERYONE 101 61 | #define MSG_MULTIPLENAMES 102 62 | #define MSG_NAME 103 63 | #define MSG_PATROLKEYAREA 104 64 | #define MSG_MINUTES 105 65 | #define MSG_SECONDS 106 66 | #define MSG_FOREVER 107 67 | #define MSG_FORALONGTIME 108 68 | #define MSG_FORAWHILE 109 69 | // 70 | #define MSG_CHATALL 200 71 | #define MSG_CHATTEAM 201 72 | #define MSG_CHATTELL 202 73 | // 74 | #define MSG_CTF 300 //ctf message 75 | 76 | //command sub types 77 | #define ST_SOMEWHERE 0 78 | #define ST_NEARITEM 1 79 | #define ST_ADDRESSED 2 80 | #define ST_METER 4 81 | #define ST_FEET 8 82 | #define ST_TIME 16 83 | #define ST_HERE 32 84 | #define ST_THERE 64 85 | #define ST_I 128 86 | #define ST_MORE 256 87 | #define ST_BACK 512 88 | #define ST_REVERSE 1024 89 | #define ST_SOMEONE 2048 90 | #define ST_GOTFLAG 4096 91 | #define ST_CAPTUREDFLAG 8192 92 | #define ST_RETURNEDFLAG 16384 93 | #define ST_TEAM 32768 94 | #define ST_1FCTFGOTFLAG 65535 95 | //ctf task preferences 96 | #define ST_DEFENDER 1 97 | #define ST_ATTACKER 2 98 | #define ST_ROAMER 4 99 | 100 | 101 | //word replacement variables 102 | #define THE_ENEMY 7 103 | #define THE_TEAM 7 104 | //team message variables 105 | #define NETNAME 0 106 | #define PLACE 1 107 | #define FLAG 1 108 | #define MESSAGE 2 109 | #define ADDRESSEE 2 110 | #define ITEM 3 111 | #define TEAMMATE 4 112 | #define TEAMNAME 4 113 | #define ENEMY 4 114 | #define KEYAREA 5 115 | #define FORMATION 5 116 | #define POSITION 5 117 | #define NUMBER 5 118 | #define TIME 6 119 | #define NAME 6 120 | #define MORE 6 121 | 122 | 123 | -------------------------------------------------------------------------------- /code/game/surfaceflags.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | // This file must be identical in the quake and utils directories 4 | 5 | // contents flags are seperate bits 6 | // a given brush can contribute multiple content bits 7 | 8 | // these definitions also need to be in q_shared.h! 9 | 10 | #define CONTENTS_SOLID 1 // an eye is never valid in a solid 11 | #define CONTENTS_LAVA 8 12 | #define CONTENTS_SLIME 16 13 | #define CONTENTS_WATER 32 14 | #define CONTENTS_FOG 64 15 | 16 | #define CONTENTS_NOTTEAM1 0x0080 17 | #define CONTENTS_NOTTEAM2 0x0100 18 | #define CONTENTS_NOBOTCLIP 0x0200 19 | 20 | #define CONTENTS_AREAPORTAL 0x8000 21 | 22 | #define CONTENTS_PLAYERCLIP 0x10000 23 | #define CONTENTS_MONSTERCLIP 0x20000 24 | //bot specific contents types 25 | #define CONTENTS_TELEPORTER 0x40000 26 | #define CONTENTS_JUMPPAD 0x80000 27 | #define CONTENTS_CLUSTERPORTAL 0x100000 28 | #define CONTENTS_DONOTENTER 0x200000 29 | #define CONTENTS_BOTCLIP 0x400000 30 | #define CONTENTS_MOVER 0x800000 31 | 32 | #define CONTENTS_ORIGIN 0x1000000 // removed before bsping an entity 33 | 34 | #define CONTENTS_BODY 0x2000000 // should never be on a brush, only in game 35 | #define CONTENTS_CORPSE 0x4000000 36 | #define CONTENTS_DETAIL 0x8000000 // brushes not used for the bsp 37 | #define CONTENTS_STRUCTURAL 0x10000000 // brushes used for the bsp 38 | #define CONTENTS_TRANSLUCENT 0x20000000 // don't consume surface fragments inside 39 | #define CONTENTS_TRIGGER 0x40000000 40 | #define CONTENTS_NODROP 0x80000000 // don't leave bodies or items (death fog, lava) 41 | #define CONTENTS_NODE 0xFFFFFFFF 42 | 43 | #define SURF_NODAMAGE 0x1 // never give falling damage 44 | #define SURF_SLICK 0x2 // effects game physics 45 | #define SURF_SKY 0x4 // lighting from environment map 46 | #define SURF_LADDER 0x8 47 | #define SURF_NOIMPACT 0x10 // don't make missile explosions 48 | #define SURF_NOMARKS 0x20 // don't leave missile marks 49 | #define SURF_FLESH 0x40 // make flesh sounds and effects 50 | #define SURF_NODRAW 0x80 // don't generate a drawsurface at all 51 | #define SURF_HINT 0x100 // make a primary bsp splitter 52 | #define SURF_SKIP 0x200 // completely ignore, allowing non-closed brushes 53 | #define SURF_NOLIGHTMAP 0x400 // surface doesn't need a lightmap 54 | #define SURF_POINTLIGHT 0x800 // generate lighting info at vertexes 55 | #define SURF_METALSTEPS 0x1000 // clanking footsteps 56 | #define SURF_NOSTEPS 0x2000 // no footstep sounds 57 | #define SURF_NONSOLID 0x4000 // don't collide against curves with this set 58 | #define SURF_LIGHTFILTER 0x8000 // act as a light filter during q3map -light 59 | #define SURF_ALPHASHADOW 0x10000 // do per-pixel light shadow casting in q3map 60 | #define SURF_NODLIGHT 0x20000 // don't dlight even if solid (solid lava, skies) 61 | #define SURF_DUST 0x40000 // leave a dust trail when walking on this surface 62 | -------------------------------------------------------------------------------- /code/game/syn.h: -------------------------------------------------------------------------------- 1 | //=========================================================================== 2 | // 3 | // Name: syn.h 4 | // Function: synonyms 5 | // Programmer: Mr Elusive 6 | // Last update: - 7 | // Tab Size: 4 (real tabs) 8 | // Notes: - 9 | //=========================================================================== 10 | 11 | #define CONTEXT_ALL 0xFFFFFFFF 12 | #define CONTEXT_NORMAL 1 13 | #define CONTEXT_NEARBYITEM 2 14 | #define CONTEXT_CTFREDTEAM 4 15 | #define CONTEXT_CTFBLUETEAM 8 16 | #define CONTEXT_REPLY 16 17 | #define CONTEXT_OBELISKREDTEAM 32 18 | #define CONTEXT_OBELISKBLUETEAM 64 19 | #define CONTEXT_HARVESTERREDTEAM 128 20 | #define CONTEXT_HARVESTERBLUETEAM 256 21 | 22 | #define CONTEXT_NAMES 1024 23 | -------------------------------------------------------------------------------- /code/q3_ui/keycodes.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | #ifndef __KEYCODES_H__ 4 | #define __KEYCODES_H__ 5 | 6 | // 7 | // these are the key numbers that should be passed to KeyEvent 8 | // 9 | 10 | // normal keys should be passed as lowercased ascii 11 | 12 | typedef enum { 13 | K_TAB = 9, 14 | K_ENTER = 13, 15 | K_ESCAPE = 27, 16 | K_SPACE = 32, 17 | 18 | K_BACKSPACE = 127, 19 | 20 | K_COMMAND = 128, 21 | K_CAPSLOCK, 22 | K_POWER, 23 | K_PAUSE, 24 | 25 | K_UPARROW, 26 | K_DOWNARROW, 27 | K_LEFTARROW, 28 | K_RIGHTARROW, 29 | 30 | K_ALT, 31 | K_CTRL, 32 | K_SHIFT, 33 | K_INS, 34 | K_DEL, 35 | K_PGDN, 36 | K_PGUP, 37 | K_HOME, 38 | K_END, 39 | 40 | K_F1, 41 | K_F2, 42 | K_F3, 43 | K_F4, 44 | K_F5, 45 | K_F6, 46 | K_F7, 47 | K_F8, 48 | K_F9, 49 | K_F10, 50 | K_F11, 51 | K_F12, 52 | K_F13, 53 | K_F14, 54 | K_F15, 55 | 56 | K_KP_HOME, 57 | K_KP_UPARROW, 58 | K_KP_PGUP, 59 | K_KP_LEFTARROW, 60 | K_KP_5, 61 | K_KP_RIGHTARROW, 62 | K_KP_END, 63 | K_KP_DOWNARROW, 64 | K_KP_PGDN, 65 | K_KP_ENTER, 66 | K_KP_INS, 67 | K_KP_DEL, 68 | K_KP_SLASH, 69 | K_KP_MINUS, 70 | K_KP_PLUS, 71 | K_KP_NUMLOCK, 72 | K_KP_STAR, 73 | K_KP_EQUALS, 74 | 75 | K_MOUSE1, 76 | K_MOUSE2, 77 | K_MOUSE3, 78 | K_MOUSE4, 79 | K_MOUSE5, 80 | 81 | K_MWHEELDOWN, 82 | K_MWHEELUP, 83 | 84 | K_JOY1, 85 | K_JOY2, 86 | K_JOY3, 87 | K_JOY4, 88 | K_JOY5, 89 | K_JOY6, 90 | K_JOY7, 91 | K_JOY8, 92 | K_JOY9, 93 | K_JOY10, 94 | K_JOY11, 95 | K_JOY12, 96 | K_JOY13, 97 | K_JOY14, 98 | K_JOY15, 99 | K_JOY16, 100 | K_JOY17, 101 | K_JOY18, 102 | K_JOY19, 103 | K_JOY20, 104 | K_JOY21, 105 | K_JOY22, 106 | K_JOY23, 107 | K_JOY24, 108 | K_JOY25, 109 | K_JOY26, 110 | K_JOY27, 111 | K_JOY28, 112 | K_JOY29, 113 | K_JOY30, 114 | K_JOY31, 115 | K_JOY32, 116 | 117 | K_AUX1, 118 | K_AUX2, 119 | K_AUX3, 120 | K_AUX4, 121 | K_AUX5, 122 | K_AUX6, 123 | K_AUX7, 124 | K_AUX8, 125 | K_AUX9, 126 | K_AUX10, 127 | K_AUX11, 128 | K_AUX12, 129 | K_AUX13, 130 | K_AUX14, 131 | K_AUX15, 132 | K_AUX16, 133 | 134 | K_LAST_KEY // this had better be <256! 135 | } keyNum_t; 136 | 137 | 138 | // The menu code needs to get both key and char events, but 139 | // to avoid duplicating the paths, the char events are just 140 | // distinguished by or'ing in K_CHAR_FLAG (ugly) 141 | #define K_CHAR_FLAG 1024 142 | 143 | #endif 144 | -------------------------------------------------------------------------------- /code/q3_ui/ui.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | vmMain 3 | dllEntry 4 | -------------------------------------------------------------------------------- /code/q3_ui/ui_credits.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | /* 4 | ======================================================================= 5 | 6 | CREDITS 7 | 8 | ======================================================================= 9 | */ 10 | 11 | 12 | #include "ui_local.h" 13 | 14 | 15 | typedef struct { 16 | menuframework_s menu; 17 | } creditsmenu_t; 18 | 19 | static creditsmenu_t s_credits; 20 | 21 | 22 | /* 23 | ================= 24 | UI_CreditMenu_Key 25 | ================= 26 | */ 27 | static sfxHandle_t UI_CreditMenu_Key( int key ) { 28 | if( key & K_CHAR_FLAG ) { 29 | return 0; 30 | } 31 | 32 | trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" ); 33 | return 0; 34 | } 35 | 36 | 37 | /* 38 | =============== 39 | UI_CreditMenu_Draw 40 | =============== 41 | */ 42 | static void UI_CreditMenu_Draw( void ) { 43 | int y; 44 | 45 | y = 12; 46 | UI_DrawProportionalString( 320, y, "id Software is:", UI_CENTER|UI_SMALLFONT, color_white ); 47 | 48 | y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 49 | UI_DrawProportionalString( 320, y, "Programming", UI_CENTER|UI_SMALLFONT, color_white ); 50 | y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 51 | UI_DrawProportionalString( 320, y, "John Carmack, Robert A. Duffy, Jim Dose'", UI_CENTER|UI_SMALLFONT, color_white ); 52 | 53 | y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 54 | UI_DrawProportionalString( 320, y, "Art", UI_CENTER|UI_SMALLFONT, color_white ); 55 | y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 56 | UI_DrawProportionalString( 320, y, "Adrian Carmack, Kevin Cloud,", UI_CENTER|UI_SMALLFONT, color_white ); 57 | y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 58 | UI_DrawProportionalString( 320, y, "Kenneth Scott, Seneca Menard, Fred Nilsson", UI_CENTER|UI_SMALLFONT, color_white ); 59 | 60 | y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 61 | UI_DrawProportionalString( 320, y, "Game Designer", UI_CENTER|UI_SMALLFONT, color_white ); 62 | y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 63 | UI_DrawProportionalString( 320, y, "Graeme Devine", UI_CENTER|UI_SMALLFONT, color_white ); 64 | 65 | y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 66 | UI_DrawProportionalString( 320, y, "Level Design", UI_CENTER|UI_SMALLFONT, color_white ); 67 | y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 68 | UI_DrawProportionalString( 320, y, "Tim Willits, Christian Antkow, Paul Jaquays", UI_CENTER|UI_SMALLFONT, color_white ); 69 | 70 | y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 71 | UI_DrawProportionalString( 320, y, "CEO", UI_CENTER|UI_SMALLFONT, color_white ); 72 | y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 73 | UI_DrawProportionalString( 320, y, "Todd Hollenshead", UI_CENTER|UI_SMALLFONT, color_white ); 74 | 75 | y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 76 | UI_DrawProportionalString( 320, y, "Director of Business Development", UI_CENTER|UI_SMALLFONT, color_white ); 77 | y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 78 | UI_DrawProportionalString( 320, y, "Marty Stratton", UI_CENTER|UI_SMALLFONT, color_white ); 79 | 80 | y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 81 | UI_DrawProportionalString( 320, y, "Biz Assist and id Mom", UI_CENTER|UI_SMALLFONT, color_white ); 82 | y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 83 | UI_DrawProportionalString( 320, y, "Donna Jackson", UI_CENTER|UI_SMALLFONT, color_white ); 84 | 85 | y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 86 | UI_DrawProportionalString( 320, y, "Development Assistance", UI_CENTER|UI_SMALLFONT, color_white ); 87 | y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 88 | UI_DrawProportionalString( 320, y, "Eric Webb", UI_CENTER|UI_SMALLFONT, color_white ); 89 | 90 | y += 1.35 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; 91 | UI_DrawString( 320, y, "To order: 1-800-idgames www.quake3arena.com www.idsoftware.com", UI_CENTER|UI_SMALLFONT, color_red ); 92 | y += SMALLCHAR_HEIGHT; 93 | UI_DrawString( 320, y, "Quake III Arena(c) 1999-2000, Id Software, Inc. All Rights Reserved", UI_CENTER|UI_SMALLFONT, color_red ); 94 | } 95 | 96 | 97 | /* 98 | =============== 99 | UI_CreditMenu 100 | =============== 101 | */ 102 | void UI_CreditMenu( void ) { 103 | memset( &s_credits, 0 ,sizeof(s_credits) ); 104 | 105 | s_credits.menu.draw = UI_CreditMenu_Draw; 106 | s_credits.menu.key = UI_CreditMenu_Key; 107 | s_credits.menu.fullscreen = qtrue; 108 | UI_PushMenu ( &s_credits.menu ); 109 | } 110 | -------------------------------------------------------------------------------- /code/q3_ui/ui_cvar.h: -------------------------------------------------------------------------------- 1 | #ifdef EXTERN_UI_CVAR 2 | #define UI_CVAR( vmCvar, cvarName, defaultString, cvarFlags ) extern vmCvar_t vmCvar; 3 | #endif 4 | 5 | #ifdef DECLARE_UI_CVAR 6 | #define UI_CVAR( vmCvar, cvarName, defaultString, cvarFlags ) vmCvar_t vmCvar; 7 | #endif 8 | 9 | #ifdef UI_CVAR_LIST 10 | #define UI_CVAR( vmCvar, cvarName, defaultString, cvarFlags ) { & vmCvar, cvarName, defaultString, cvarFlags }, 11 | #endif 12 | 13 | UI_CVAR( ui_ffa_fraglimit, "ui_ffa_fraglimit", "20", CVAR_ARCHIVE ) 14 | UI_CVAR( ui_ffa_timelimit, "ui_ffa_timelimit", "0", CVAR_ARCHIVE ) 15 | 16 | UI_CVAR( ui_tourney_fraglimit, "ui_tourney_fraglimit", "0", CVAR_ARCHIVE ) 17 | UI_CVAR( ui_tourney_timelimit, "ui_tourney_timelimit", "15", CVAR_ARCHIVE ) 18 | 19 | UI_CVAR( ui_team_fraglimit, "ui_team_fraglimit", "0", CVAR_ARCHIVE ) 20 | UI_CVAR( ui_team_timelimit, "ui_team_timelimit", "20", CVAR_ARCHIVE ) 21 | UI_CVAR( ui_team_friendly, "ui_team_friendly", "1", CVAR_ARCHIVE ) 22 | 23 | UI_CVAR( ui_ctf_capturelimit, "ui_ctf_capturelimit", "8", CVAR_ARCHIVE ) 24 | UI_CVAR( ui_ctf_timelimit, "ui_ctf_timelimit", "30", CVAR_ARCHIVE ) 25 | UI_CVAR( ui_ctf_friendly, "ui_ctf_friendly", "0", CVAR_ARCHIVE ) 26 | 27 | UI_CVAR( ui_arenasFile, "g_arenasFile", "", CVAR_INIT|CVAR_ROM ) 28 | UI_CVAR( ui_botsFile, "g_botsFile", "", CVAR_ARCHIVE|CVAR_LATCH ) 29 | UI_CVAR( ui_spScores1, "g_spScores1", "", CVAR_ARCHIVE ) 30 | UI_CVAR( ui_spScores2, "g_spScores2", "", CVAR_ARCHIVE ) 31 | UI_CVAR( ui_spScores3, "g_spScores3", "", CVAR_ARCHIVE ) 32 | UI_CVAR( ui_spScores4, "g_spScores4", "", CVAR_ARCHIVE ) 33 | UI_CVAR( ui_spScores5, "g_spScores5", "", CVAR_ARCHIVE ) 34 | UI_CVAR( ui_spAwards, "g_spAwards", "", CVAR_ARCHIVE ) 35 | UI_CVAR( ui_spVideos, "g_spVideos", "", CVAR_ARCHIVE ) 36 | UI_CVAR( ui_spSkill, "g_spSkill", "2", CVAR_ARCHIVE | CVAR_LATCH ) 37 | 38 | UI_CVAR( ui_spSelection, "ui_spSelection", "", CVAR_ROM ) 39 | 40 | UI_CVAR( ui_browserMaster, "ui_browserMaster", "0", CVAR_ARCHIVE ) 41 | UI_CVAR( ui_browserGameType, "ui_browserGameType", "0", CVAR_ARCHIVE ) 42 | UI_CVAR( ui_browserSortKey, "ui_browserSortKey", "4", CVAR_ARCHIVE ) 43 | UI_CVAR( ui_browserShowFull, "ui_browserShowFull", "1", CVAR_ARCHIVE ) 44 | UI_CVAR( ui_browserShowEmpty, "ui_browserShowEmpty", "1", CVAR_ARCHIVE ) 45 | 46 | UI_CVAR( ui_brassTime, "cg_brassTime", "2500", CVAR_ARCHIVE ) 47 | UI_CVAR( ui_drawCrosshair, "cg_drawCrosshair", "4", CVAR_ARCHIVE ) 48 | UI_CVAR( ui_drawCrosshairNames, "cg_drawCrosshairNames", "1", CVAR_ARCHIVE ) 49 | UI_CVAR( ui_marks, "cg_marks", "1", CVAR_ARCHIVE ) 50 | 51 | UI_CVAR( ui_server1, "server1", "", CVAR_ARCHIVE ) 52 | UI_CVAR( ui_server2, "server2", "", CVAR_ARCHIVE ) 53 | UI_CVAR( ui_server3, "server3", "", CVAR_ARCHIVE ) 54 | UI_CVAR( ui_server4, "server4", "", CVAR_ARCHIVE ) 55 | UI_CVAR( ui_server5, "server5", "", CVAR_ARCHIVE ) 56 | UI_CVAR( ui_server6, "server6", "", CVAR_ARCHIVE ) 57 | UI_CVAR( ui_server7, "server7", "", CVAR_ARCHIVE ) 58 | UI_CVAR( ui_server8, "server8", "", CVAR_ARCHIVE ) 59 | UI_CVAR( ui_server9, "server9", "", CVAR_ARCHIVE ) 60 | UI_CVAR( ui_server10, "server10", "", CVAR_ARCHIVE ) 61 | UI_CVAR( ui_server11, "server11", "", CVAR_ARCHIVE ) 62 | UI_CVAR( ui_server12, "server12", "", CVAR_ARCHIVE ) 63 | UI_CVAR( ui_server13, "server13", "", CVAR_ARCHIVE ) 64 | UI_CVAR( ui_server14, "server14", "", CVAR_ARCHIVE ) 65 | UI_CVAR( ui_server15, "server15", "", CVAR_ARCHIVE ) 66 | UI_CVAR( ui_server16, "server16", "", CVAR_ARCHIVE ) 67 | 68 | UI_CVAR( ui_cdkeychecked, "ui_cdkeychecked", "0", CVAR_ROM ) 69 | 70 | #undef UI_CVAR 71 | -------------------------------------------------------------------------------- /code/q3_ui/ui_login.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | // 4 | // ui_login.c 5 | // 6 | 7 | #include "ui_local.h" 8 | 9 | 10 | #define LOGIN_FRAME "menu/art/cut_frame" 11 | 12 | #define ID_NAME 100 13 | #define ID_NAME_BOX 101 14 | #define ID_PASSWORD 102 15 | #define ID_PASSWORD_BOX 103 16 | #define ID_LOGIN 104 17 | #define ID_CANCEL 105 18 | 19 | 20 | typedef struct 21 | { 22 | menuframework_s menu; 23 | menubitmap_s frame; 24 | menutext_s name; 25 | menufield_s name_box; 26 | menutext_s password; 27 | menufield_s password_box; 28 | menutext_s login; 29 | menutext_s cancel; 30 | } login_t; 31 | 32 | static login_t s_login; 33 | 34 | static menuframework_s s_login_menu; 35 | static menuaction_s s_login_login; 36 | static menuaction_s s_login_cancel; 37 | 38 | static vec4_t s_login_color_prompt = {1.00, 0.43, 0.00, 1.00}; 39 | 40 | /* 41 | =============== 42 | Login_MenuEvent 43 | =============== 44 | */ 45 | static void Login_MenuEvent( void* ptr, int event ) { 46 | if( event != QM_ACTIVATED ) { 47 | return; 48 | } 49 | 50 | switch( ((menucommon_s*)ptr)->id ) { 51 | case ID_LOGIN: 52 | // set name `` 53 | //trap_Cvar_Set( "name", s_login.name_box.field.buffer ); 54 | /* 55 | trap_Cvar_Set( "rank_name", s_login.name_box.field.buffer ); 56 | trap_Cvar_Set( "rank_pwd", s_login.password_box.field.buffer ); 57 | */ 58 | 59 | // login 60 | trap_CL_UI_RankUserLogin( 61 | s_login.name_box.field.buffer, 62 | s_login.password_box.field.buffer ); 63 | 64 | UI_ForceMenuOff(); 65 | break; 66 | 67 | case ID_CANCEL: 68 | UI_PopMenu(); 69 | break; 70 | } 71 | } 72 | 73 | 74 | /* 75 | =============== 76 | Login_MenuInit 77 | =============== 78 | */ 79 | void Login_MenuInit( void ) { 80 | int y; 81 | 82 | memset( &s_login, 0, sizeof(s_login) ); 83 | 84 | Login_Cache(); 85 | 86 | s_login.menu.wrapAround = qtrue; 87 | s_login.menu.fullscreen = qfalse; 88 | 89 | s_login.frame.generic.type = MTYPE_BITMAP; 90 | s_login.frame.generic.flags = QMF_INACTIVE; 91 | s_login.frame.generic.name = LOGIN_FRAME; 92 | s_login.frame.generic.x = 142; //320-233; 93 | s_login.frame.generic.y = 118; //240-166; 94 | s_login.frame.width = 359; //466; 95 | s_login.frame.height = 256; //332; 96 | 97 | y = 214; 98 | 99 | s_login.name.generic.type = MTYPE_PTEXT; 100 | s_login.name.generic.flags = QMF_RIGHT_JUSTIFY|QMF_INACTIVE; 101 | s_login.name.generic.id = ID_NAME; 102 | s_login.name.generic.x = 310; 103 | s_login.name.generic.y = y; 104 | s_login.name.string = "NAME"; 105 | s_login.name.style = UI_RIGHT|UI_SMALLFONT; 106 | s_login.name.color = s_login_color_prompt; 107 | 108 | s_login.name_box.generic.type = MTYPE_FIELD; 109 | s_login.name_box.generic.ownerdraw = Rankings_DrawName; 110 | s_login.name_box.generic.name = ""; 111 | s_login.name_box.generic.flags = 0; 112 | s_login.name_box.generic.x = 330; 113 | s_login.name_box.generic.y = y; 114 | s_login.name_box.field.widthInChars = 16; 115 | s_login.name_box.field.maxchars = 16; 116 | y += 20; 117 | 118 | s_login.password.generic.type = MTYPE_PTEXT; 119 | s_login.password.generic.flags = QMF_RIGHT_JUSTIFY|QMF_INACTIVE; 120 | s_login.password.generic.id = ID_PASSWORD; 121 | s_login.password.generic.x = 310; 122 | s_login.password.generic.y = y; 123 | s_login.password.string = "PASSWORD"; 124 | s_login.password.style = UI_RIGHT|UI_SMALLFONT; 125 | s_login.password.color = s_login_color_prompt; 126 | 127 | s_login.password_box.generic.type = MTYPE_FIELD; 128 | s_login.password_box.generic.ownerdraw = Rankings_DrawPassword; 129 | s_login.password_box.generic.name = ""; 130 | s_login.password_box.generic.flags = 0; 131 | s_login.password_box.generic.x = 330; 132 | s_login.password_box.generic.y = y; 133 | s_login.password_box.field.widthInChars = 16; 134 | s_login.password_box.field.maxchars = 16; 135 | y += 40; 136 | 137 | s_login.login.generic.type = MTYPE_PTEXT; 138 | s_login.login.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS; 139 | s_login.login.generic.id = ID_LOGIN; 140 | s_login.login.generic.callback = Login_MenuEvent; 141 | s_login.login.generic.x = 310; 142 | s_login.login.generic.y = y; 143 | s_login.login.string = "LOGIN"; 144 | s_login.login.style = UI_RIGHT|UI_SMALLFONT; 145 | s_login.login.color = colorRed; 146 | 147 | s_login.cancel.generic.type = MTYPE_PTEXT; 148 | s_login.cancel.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS; 149 | s_login.cancel.generic.id = ID_CANCEL; 150 | s_login.cancel.generic.callback = Login_MenuEvent; 151 | s_login.cancel.generic.x = 330; 152 | s_login.cancel.generic.y = y; 153 | s_login.cancel.string = "CANCEL"; 154 | s_login.cancel.style = UI_LEFT|UI_SMALLFONT; 155 | s_login.cancel.color = colorRed; 156 | y += 20; 157 | 158 | Menu_AddItem( &s_login.menu, (void*) &s_login.frame ); 159 | Menu_AddItem( &s_login.menu, (void*) &s_login.name ); 160 | Menu_AddItem( &s_login.menu, (void*) &s_login.name_box ); 161 | Menu_AddItem( &s_login.menu, (void*) &s_login.password ); 162 | Menu_AddItem( &s_login.menu, (void*) &s_login.password_box ); 163 | Menu_AddItem( &s_login.menu, (void*) &s_login.login ); 164 | Menu_AddItem( &s_login.menu, (void*) &s_login.cancel ); 165 | } 166 | 167 | 168 | /* 169 | =============== 170 | Login_Cache 171 | =============== 172 | */ 173 | void Login_Cache( void ) { 174 | trap_R_RegisterShaderNoMip( LOGIN_FRAME ); 175 | } 176 | 177 | 178 | /* 179 | =============== 180 | UI_LoginMenu 181 | =============== 182 | */ 183 | void UI_LoginMenu( void ) { 184 | Login_MenuInit(); 185 | UI_PushMenu ( &s_login.menu ); 186 | } 187 | 188 | 189 | -------------------------------------------------------------------------------- /code/q3_ui/ui_main.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | /* 4 | ======================================================================= 5 | 6 | USER INTERFACE MAIN 7 | 8 | ======================================================================= 9 | */ 10 | 11 | 12 | #include "ui_local.h" 13 | 14 | 15 | /* 16 | ================ 17 | vmMain 18 | 19 | This is the only way control passes into the module. 20 | This must be the very first function compiled into the .qvm file 21 | ================ 22 | */ 23 | DLLEXPORT intptr_t vmMain( int command, int arg0, int arg1 ) { 24 | switch ( command ) { 25 | case UI_GETAPIVERSION: 26 | return UI_API_VERSION; 27 | 28 | case UI_INIT: 29 | UI_Init(); 30 | return 0; 31 | 32 | case UI_SHUTDOWN: 33 | UI_Shutdown(); 34 | return 0; 35 | 36 | case UI_KEY_EVENT: 37 | UI_KeyEvent( arg0, arg1 ); 38 | return 0; 39 | 40 | case UI_MOUSE_EVENT: 41 | UI_MouseEvent( arg0, arg1 ); 42 | return 0; 43 | 44 | case UI_REFRESH: 45 | UI_Refresh( arg0 ); 46 | return 0; 47 | 48 | case UI_IS_FULLSCREEN: 49 | return UI_IsFullscreen(); 50 | 51 | case UI_SET_ACTIVE_MENU: 52 | UI_SetActiveMenu( arg0 ); 53 | return 0; 54 | 55 | case UI_CONSOLE_COMMAND: 56 | return UI_ConsoleCommand( arg0 ); 57 | 58 | case UI_DRAW_CONNECT_SCREEN: 59 | UI_DrawConnectScreen( arg0 ); 60 | return 0; 61 | 62 | case UI_HASUNIQUECDKEY: // mod authors need to observe this 63 | return qtrue; // change this to qfalse for mods! 64 | } 65 | 66 | return -1; 67 | } 68 | 69 | 70 | /* 71 | ================ 72 | cvars 73 | ================ 74 | */ 75 | 76 | typedef struct { 77 | vmCvar_t *vmCvar; 78 | char *cvarName; 79 | char *defaultString; 80 | int cvarFlags; 81 | } cvarTable_t; 82 | 83 | #define DECLARE_UI_CVAR 84 | #include "ui_cvar.h" 85 | #undef DECLARE_UI_CVAR 86 | 87 | // bk001129 - made static to avoid aliasing. 88 | static cvarTable_t cvarTable[] = { 89 | 90 | #define UI_CVAR_LIST 91 | #include "ui_cvar.h" 92 | #undef UI_CVAR_LIST 93 | 94 | }; 95 | 96 | // bk001129 - made static to avoid aliasing 97 | static int cvarTableSize = sizeof(cvarTable) / sizeof(cvarTable[0]); 98 | 99 | 100 | /* 101 | ================= 102 | UI_RegisterCvars 103 | ================= 104 | */ 105 | void UI_RegisterCvars( void ) { 106 | int i; 107 | cvarTable_t *cv; 108 | 109 | for ( i = 0, cv = cvarTable ; i < cvarTableSize ; i++, cv++ ) { 110 | trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags ); 111 | } 112 | } 113 | 114 | /* 115 | ================= 116 | UI_UpdateCvars 117 | ================= 118 | */ 119 | void UI_UpdateCvars( void ) { 120 | int i; 121 | cvarTable_t *cv; 122 | 123 | for ( i = 0, cv = cvarTable ; i < cvarTableSize ; i++, cv++ ) { 124 | trap_Cvar_Update( cv->vmCvar ); 125 | } 126 | } 127 | 128 | 129 | /* 130 | ================= 131 | UI_VideoCheck 132 | ================= 133 | */ 134 | void UI_VideoCheck( int time ) 135 | { 136 | if ( abs( time - uis.lastVideoCheck ) > 1000 ) { 137 | 138 | int oldWidth, oldHeight; 139 | oldWidth = uis.glconfig.vidWidth; 140 | oldHeight = uis.glconfig.vidHeight; 141 | 142 | trap_GetGlconfig( &uis.glconfig ); 143 | 144 | if ( uis.glconfig.vidWidth != oldWidth || uis.glconfig.vidHeight != oldHeight ) { 145 | uis.biasY = 0.0; 146 | uis.biasX = 0.0; 147 | // for 640x480 virtualized screen 148 | if ( uis.glconfig.vidWidth * 480 > uis.glconfig.vidHeight * 640 ) { 149 | // wide screen, scale by height 150 | uis.scale = uis.glconfig.vidHeight * (1.0/480.0); 151 | uis.biasX = 0.5 * ( uis.glconfig.vidWidth - ( uis.glconfig.vidHeight * (640.0/480.0) ) ); 152 | } else { 153 | // no wide screen, scale by width 154 | uis.scale = uis.glconfig.vidWidth * (1.0/640.0); 155 | uis.biasY = 0.5 * ( uis.glconfig.vidHeight - ( uis.glconfig.vidWidth * (480.0/640) ) ); 156 | } 157 | 158 | uis.screenXmin = 0.0 - (uis.biasX / uis.scale); 159 | uis.screenXmax = 640.0 + (uis.biasX / uis.scale); 160 | 161 | uis.screenYmin = 0.0 - (uis.biasY / uis.scale); 162 | uis.screenYmax = 480.0 + (uis.biasY / uis.scale); 163 | 164 | uis.cursorScaleR = 1.0 / uis.scale; 165 | if ( uis.cursorScaleR < 0.5 ) { 166 | uis.cursorScaleR = 0.5; 167 | } 168 | } 169 | 170 | uis.lastVideoCheck = time; 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /code/q3_ui/ui_rankstatus.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | // 4 | // ui_rankstatus.c 5 | // 6 | 7 | #include "ui_local.h" 8 | 9 | 10 | #define RANKSTATUS_FRAME "menu/art/cut_frame" 11 | 12 | #define ID_MESSAGE 100 13 | #define ID_OK 101 14 | 15 | 16 | typedef struct 17 | { 18 | menuframework_s menu; 19 | menubitmap_s frame; 20 | menutext_s message; 21 | menutext_s ok; 22 | } rankstatus_t; 23 | 24 | static rankstatus_t s_rankstatus; 25 | 26 | static menuframework_s s_rankstatus_menu; 27 | static menuaction_s s_rankstatus_ok; 28 | 29 | static grank_status_t s_status = 0; 30 | static char* s_rankstatus_message = NULL; 31 | 32 | static vec4_t s_rankingstatus_color_prompt = {1.00, 0.43, 0.00, 1.00}; 33 | 34 | /* 35 | =============== 36 | RankStatus_MenuEvent 37 | =============== 38 | */ 39 | static void RankStatus_MenuEvent( void* ptr, int event ) { 40 | if( event != QM_ACTIVATED ) { 41 | return; 42 | } 43 | 44 | switch( ((menucommon_s*)ptr)->id ) { 45 | case ID_OK: 46 | UI_PopMenu(); 47 | 48 | switch( s_status ) 49 | { 50 | case QGR_STATUS_NO_USER: 51 | UI_RankingsMenu(); 52 | break; 53 | case QGR_STATUS_BAD_PASSWORD: 54 | UI_RankingsMenu(); 55 | UI_LoginMenu(); 56 | break; 57 | case QGR_STATUS_USER_EXISTS: 58 | UI_RankingsMenu(); 59 | UI_SignupMenu(); 60 | break; 61 | case QGR_STATUS_NO_MEMBERSHIP: 62 | UI_RankingsMenu(); 63 | break; 64 | case QGR_STATUS_TIMEOUT: 65 | UI_RankingsMenu(); 66 | break; 67 | case QGR_STATUS_INVALIDUSER: 68 | UI_RankingsMenu(); 69 | break; 70 | case QGR_STATUS_ERROR: 71 | UI_RankingsMenu(); 72 | break; 73 | default: 74 | break; 75 | } 76 | 77 | break; 78 | } 79 | } 80 | 81 | 82 | /* 83 | =============== 84 | RankStatus_MenuInit 85 | =============== 86 | */ 87 | void RankStatus_MenuInit( void ) { 88 | int y; 89 | 90 | memset( &s_rankstatus, 0, sizeof(s_rankstatus) ); 91 | 92 | RankStatus_Cache(); 93 | 94 | s_rankstatus.menu.wrapAround = qtrue; 95 | s_rankstatus.menu.fullscreen = qfalse; 96 | 97 | s_rankstatus.frame.generic.type = MTYPE_BITMAP; 98 | s_rankstatus.frame.generic.flags = QMF_INACTIVE; 99 | s_rankstatus.frame.generic.name = RANKSTATUS_FRAME; 100 | s_rankstatus.frame.generic.x = 142; //320-233; 101 | s_rankstatus.frame.generic.y = 118; //240-166; 102 | s_rankstatus.frame.width = 359; //466; 103 | s_rankstatus.frame.height = 256; //332; 104 | 105 | y = 214; 106 | 107 | s_rankstatus.message.generic.type = MTYPE_PTEXT; 108 | s_rankstatus.message.generic.flags = QMF_CENTER_JUSTIFY|QMF_INACTIVE; 109 | s_rankstatus.message.generic.id = ID_MESSAGE; 110 | s_rankstatus.message.generic.x = 320; 111 | s_rankstatus.message.generic.y = y; 112 | s_rankstatus.message.string = s_rankstatus_message; 113 | s_rankstatus.message.style = UI_CENTER|UI_SMALLFONT; 114 | s_rankstatus.message.color = s_rankingstatus_color_prompt; 115 | y += 40; 116 | 117 | s_rankstatus.ok.generic.type = MTYPE_PTEXT; 118 | s_rankstatus.ok.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; 119 | s_rankstatus.ok.generic.id = ID_OK; 120 | s_rankstatus.ok.generic.callback = RankStatus_MenuEvent; 121 | s_rankstatus.ok.generic.x = 320; 122 | s_rankstatus.ok.generic.y = y; 123 | s_rankstatus.ok.string = "OK"; 124 | s_rankstatus.ok.style = UI_CENTER|UI_SMALLFONT; 125 | s_rankstatus.ok.color = colorRed; 126 | 127 | Menu_AddItem( &s_rankstatus.menu, (void*) &s_rankstatus.frame ); 128 | Menu_AddItem( &s_rankstatus.menu, (void*) &s_rankstatus.message ); 129 | Menu_AddItem( &s_rankstatus.menu, (void*) &s_rankstatus.ok ); 130 | } 131 | 132 | 133 | /* 134 | =============== 135 | RankStatus_Cache 136 | =============== 137 | */ 138 | void RankStatus_Cache( void ) { 139 | trap_R_RegisterShaderNoMip( RANKSTATUS_FRAME ); 140 | } 141 | 142 | 143 | /* 144 | =============== 145 | UI_RankStatusMenu 146 | =============== 147 | */ 148 | void UI_RankStatusMenu( void ) { 149 | 150 | s_status = (grank_status_t)trap_Cvar_VariableValue("client_status"); 151 | 152 | switch( s_status ) 153 | { 154 | case QGR_STATUS_NEW: 155 | return; 156 | case QGR_STATUS_PENDING: 157 | // GRANK_FIXME 158 | return; 159 | case QGR_STATUS_NO_USER: 160 | // GRANK_FIXME - get this when user exists 161 | s_rankstatus_message = "Username unavailable"; 162 | break; 163 | case QGR_STATUS_BAD_PASSWORD: 164 | s_rankstatus_message = "Invalid password"; 165 | break; 166 | case QGR_STATUS_TIMEOUT: 167 | s_rankstatus_message = "Timed out"; 168 | break; 169 | case QGR_STATUS_NO_MEMBERSHIP: 170 | s_rankstatus_message = "No membership"; 171 | break; 172 | case QGR_STATUS_INVALIDUSER: 173 | s_rankstatus_message = "Validation failed"; 174 | break; 175 | case QGR_STATUS_ERROR: 176 | s_rankstatus_message = "Error"; 177 | break; 178 | case QGR_STATUS_SPECTATOR: 179 | case QGR_STATUS_ACTIVE: 180 | UI_ForceMenuOff(); 181 | return; 182 | default: 183 | return; 184 | } 185 | RankStatus_MenuInit(); 186 | trap_CL_UI_RankUserReset(); 187 | UI_PushMenu ( &s_rankstatus.menu ); 188 | } 189 | 190 | -------------------------------------------------------------------------------- /code/q3_ui/ui_saveconfig.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | /* 4 | ============================================================================= 5 | 6 | SAVE CONFIG MENU 7 | 8 | ============================================================================= 9 | */ 10 | 11 | #include "ui_local.h" 12 | 13 | 14 | #define ART_BACK0 "menu/art/back_0" 15 | #define ART_BACK1 "menu/art/back_1" 16 | #define ART_SAVE0 "menu/art/save_0" 17 | #define ART_SAVE1 "menu/art/save_1" 18 | #define ART_BACKGROUND "menu/art/cut_frame" 19 | 20 | #define ID_NAME 10 21 | #define ID_BACK 11 22 | #define ID_SAVE 12 23 | 24 | 25 | typedef struct { 26 | menuframework_s menu; 27 | 28 | menutext_s banner; 29 | menubitmap_s background; 30 | menufield_s savename; 31 | menubitmap_s back; 32 | menubitmap_s save; 33 | } saveConfig_t; 34 | 35 | static saveConfig_t saveConfig; 36 | 37 | 38 | /* 39 | =============== 40 | UI_SaveConfigMenu_BackEvent 41 | =============== 42 | */ 43 | static void UI_SaveConfigMenu_BackEvent( void *ptr, int event ) { 44 | if( event != QM_ACTIVATED ) { 45 | return; 46 | } 47 | 48 | UI_PopMenu(); 49 | } 50 | 51 | 52 | /* 53 | =============== 54 | UI_SaveConfigMenu_SaveEvent 55 | =============== 56 | */ 57 | static void UI_SaveConfigMenu_SaveEvent( void *ptr, int event ) { 58 | char configname[MAX_QPATH]; 59 | 60 | if( event != QM_ACTIVATED ) { 61 | return; 62 | } 63 | 64 | if( !saveConfig.savename.field.buffer[0] ) { 65 | return; 66 | } 67 | 68 | COM_StripExtension( saveConfig.savename.field.buffer, configname, sizeof( configname ) ); 69 | trap_Cmd_ExecuteText( EXEC_APPEND, va( "writeconfig %s.cfg\n", configname ) ); 70 | UI_PopMenu(); 71 | } 72 | 73 | 74 | /* 75 | =============== 76 | UI_SaveConfigMenu_SavenameDraw 77 | =============== 78 | */ 79 | static void UI_SaveConfigMenu_SavenameDraw( void *self ) { 80 | menufield_s *f; 81 | int style; 82 | float *color; 83 | 84 | f = (menufield_s *)self; 85 | 86 | if( f == Menu_ItemAtCursor( &saveConfig.menu ) ) { 87 | style = UI_LEFT|UI_PULSE|UI_SMALLFONT; 88 | color = text_color_highlight; 89 | } 90 | else { 91 | style = UI_LEFT|UI_SMALLFONT; 92 | color = colorRed; 93 | } 94 | 95 | UI_DrawProportionalString( 320, 192, "Enter filename:", UI_CENTER|UI_SMALLFONT, color_orange ); 96 | UI_FillRect( f->generic.x, f->generic.y, f->field.widthInChars*SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, colorBlack ); 97 | MField_Draw( &f->field, f->generic.x, f->generic.y, style, color ); 98 | } 99 | 100 | 101 | /* 102 | ================= 103 | UI_SaveConfigMenu_Init 104 | ================= 105 | */ 106 | static void UI_SaveConfigMenu_Init( void ) { 107 | memset( &saveConfig, 0, sizeof(saveConfig) ); 108 | 109 | UI_SaveConfigMenu_Cache(); 110 | saveConfig.menu.wrapAround = qtrue; 111 | saveConfig.menu.fullscreen = qtrue; 112 | 113 | saveConfig.banner.generic.type = MTYPE_BTEXT; 114 | saveConfig.banner.generic.x = 320; 115 | saveConfig.banner.generic.y = 16; 116 | saveConfig.banner.string = "SAVE CONFIG"; 117 | saveConfig.banner.color = color_white; 118 | saveConfig.banner.style = UI_CENTER; 119 | 120 | saveConfig.background.generic.type = MTYPE_BITMAP; 121 | saveConfig.background.generic.name = ART_BACKGROUND; 122 | saveConfig.background.generic.flags = QMF_INACTIVE; 123 | saveConfig.background.generic.x = 142; 124 | saveConfig.background.generic.y = 118; 125 | saveConfig.background.width = 359; 126 | saveConfig.background.height = 256; 127 | 128 | saveConfig.savename.generic.type = MTYPE_FIELD; 129 | saveConfig.savename.generic.flags = QMF_NODEFAULTINIT|QMF_UPPERCASE; 130 | saveConfig.savename.generic.ownerdraw = UI_SaveConfigMenu_SavenameDraw; 131 | saveConfig.savename.field.widthInChars = 20; 132 | saveConfig.savename.field.maxchars = 20; 133 | saveConfig.savename.generic.x = 240; 134 | saveConfig.savename.generic.y = 155+72; 135 | saveConfig.savename.generic.left = 240; 136 | saveConfig.savename.generic.top = 155+72; 137 | saveConfig.savename.generic.right = 233 + 20*SMALLCHAR_WIDTH; 138 | saveConfig.savename.generic.bottom = 155+72 + SMALLCHAR_HEIGHT+2; 139 | 140 | saveConfig.back.generic.type = MTYPE_BITMAP; 141 | saveConfig.back.generic.name = ART_BACK0; 142 | saveConfig.back.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS; 143 | saveConfig.back.generic.id = ID_BACK; 144 | saveConfig.back.generic.callback = UI_SaveConfigMenu_BackEvent; 145 | saveConfig.back.generic.x = 0; 146 | saveConfig.back.generic.y = 480-64; 147 | saveConfig.back.width = 128; 148 | saveConfig.back.height = 64; 149 | saveConfig.back.focuspic = ART_BACK1; 150 | 151 | saveConfig.save.generic.type = MTYPE_BITMAP; 152 | saveConfig.save.generic.name = ART_SAVE0; 153 | saveConfig.save.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS; 154 | saveConfig.save.generic.id = ID_SAVE; 155 | saveConfig.save.generic.callback = UI_SaveConfigMenu_SaveEvent; 156 | saveConfig.save.generic.x = 640; 157 | saveConfig.save.generic.y = 480-64; 158 | saveConfig.save.width = 128; 159 | saveConfig.save.height = 64; 160 | saveConfig.save.focuspic = ART_SAVE1; 161 | 162 | Menu_AddItem( &saveConfig.menu, &saveConfig.banner ); 163 | Menu_AddItem( &saveConfig.menu, &saveConfig.background ); 164 | Menu_AddItem( &saveConfig.menu, &saveConfig.savename ); 165 | Menu_AddItem( &saveConfig.menu, &saveConfig.back ); 166 | Menu_AddItem( &saveConfig.menu, &saveConfig.save ); 167 | } 168 | 169 | 170 | /* 171 | ================= 172 | UI_SaveConfigMenu_Cache 173 | ================= 174 | */ 175 | void UI_SaveConfigMenu_Cache( void ) { 176 | trap_R_RegisterShaderNoMip( ART_BACK0 ); 177 | trap_R_RegisterShaderNoMip( ART_BACK1 ); 178 | trap_R_RegisterShaderNoMip( ART_SAVE0 ); 179 | trap_R_RegisterShaderNoMip( ART_SAVE1 ); 180 | trap_R_RegisterShaderNoMip( ART_BACKGROUND ); 181 | } 182 | 183 | 184 | /* 185 | =============== 186 | UI_SaveConfigMenu 187 | =============== 188 | */ 189 | void UI_SaveConfigMenu( void ) { 190 | UI_SaveConfigMenu_Init(); 191 | UI_PushMenu( &saveConfig.menu ); 192 | } 193 | -------------------------------------------------------------------------------- /code/q3_ui/ui_sparena.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | #include "ui_local.h" 4 | 5 | void UI_SPArena_Start( const char *arenaInfo ) { 6 | char *map; 7 | int level; 8 | int n; 9 | char *txt; 10 | 11 | n = (int)trap_Cvar_VariableValue( "sv_maxclients" ); 12 | if ( n < 8 ) { 13 | trap_Cvar_SetValue( "sv_maxclients", 8 ); 14 | } 15 | 16 | level = atoi( Info_ValueForKey( arenaInfo, "num" ) ); 17 | txt = Info_ValueForKey( arenaInfo, "special" ); 18 | if( txt[0] ) { 19 | if( Q_stricmp( txt, "training" ) == 0 ) { 20 | level = -4; 21 | } 22 | else if( Q_stricmp( txt, "final" ) == 0 ) { 23 | level = UI_GetNumSPTiers() * ARENAS_PER_TIER; 24 | } 25 | } 26 | trap_Cvar_SetValue( "ui_spSelection", level ); 27 | 28 | map = Info_ValueForKey( arenaInfo, "map" ); 29 | trap_Cmd_ExecuteText( EXEC_APPEND, va( "spmap %s\n", map ) ); 30 | } 31 | -------------------------------------------------------------------------------- /code/q3_ui/ui_spreset.c: -------------------------------------------------------------------------------- 1 | /* 2 | ======================================================================= 3 | 4 | RESET MENU 5 | 6 | ======================================================================= 7 | */ 8 | 9 | #include "ui_local.h" 10 | 11 | 12 | #define ART_FRAME "menu/art/cut_frame" 13 | 14 | #define ID_NO 100 15 | #define ID_YES 101 16 | 17 | typedef struct 18 | { 19 | menuframework_s menu; 20 | menutext_s no; 21 | menutext_s yes; 22 | int slashX; 23 | } resetMenu_t; 24 | 25 | static resetMenu_t s_reset; 26 | 27 | 28 | /* 29 | ================= 30 | Reset_MenuEvent 31 | ================= 32 | */ 33 | void Reset_MenuEvent(void* ptr, int event) { 34 | if( event != QM_ACTIVATED ) { 35 | return; 36 | } 37 | 38 | UI_PopMenu(); 39 | 40 | if( ((menucommon_s*)ptr)->id == ID_NO ) { 41 | return; 42 | } 43 | 44 | // reset the game, pop the level menu and restart it so it updates 45 | UI_NewGame(); 46 | trap_Cvar_SetValue( "ui_spSelection", 0 ); 47 | UI_PopMenu(); 48 | UI_SPLevelMenu(); 49 | } 50 | 51 | 52 | /* 53 | ================= 54 | Reset_MenuKey 55 | ================= 56 | */ 57 | static sfxHandle_t Reset_MenuKey( int key ) { 58 | switch ( key ) { 59 | case K_KP_LEFTARROW: 60 | case K_LEFTARROW: 61 | case K_KP_RIGHTARROW: 62 | case K_RIGHTARROW: 63 | key = K_TAB; 64 | break; 65 | 66 | case 'n': 67 | case 'N': 68 | Reset_MenuEvent( &s_reset.no, QM_ACTIVATED ); 69 | break; 70 | 71 | case 'y': 72 | case 'Y': 73 | Reset_MenuEvent( &s_reset.yes, QM_ACTIVATED ); 74 | break; 75 | } 76 | 77 | return Menu_DefaultKey( &s_reset.menu, key ); 78 | } 79 | 80 | 81 | /* 82 | ================= 83 | Reset_MenuDraw 84 | ================= 85 | */ 86 | static void Reset_MenuDraw( void ) { 87 | UI_DrawNamedPic( 142, 118, 359, 256, ART_FRAME ); 88 | UI_DrawProportionalString( 320, 194 + 10, "RESET GAME?", UI_CENTER|UI_INVERSE, color_red ); 89 | UI_DrawProportionalString( s_reset.slashX, 265, "/", UI_LEFT|UI_INVERSE, color_red ); 90 | Menu_Draw( &s_reset.menu ); 91 | 92 | UI_DrawProportionalString( SCREEN_WIDTH/2, 356 + PROP_HEIGHT * 0, "WARNING: This resets all of the", UI_CENTER|UI_SMALLFONT, color_yellow ); 93 | UI_DrawProportionalString( SCREEN_WIDTH/2, 356 + PROP_HEIGHT * 1, "single player game variables.", UI_CENTER|UI_SMALLFONT, color_yellow ); 94 | UI_DrawProportionalString( SCREEN_WIDTH/2, 356 + PROP_HEIGHT * 2, "Do this only if you want to", UI_CENTER|UI_SMALLFONT, color_yellow ); 95 | UI_DrawProportionalString( SCREEN_WIDTH/2, 356 + PROP_HEIGHT * 3, "start over from the beginning.", UI_CENTER|UI_SMALLFONT, color_yellow ); 96 | } 97 | 98 | 99 | /* 100 | ================= 101 | Reset_Cache 102 | ================= 103 | */ 104 | void Reset_Cache( void ) { 105 | trap_R_RegisterShaderNoMip( ART_FRAME ); 106 | } 107 | 108 | 109 | /* 110 | ================= 111 | UI_ResetMenu 112 | ================= 113 | */ 114 | void UI_ResetMenu(void) { 115 | uiClientState_t cstate; 116 | int n1, n2, n3; 117 | int l1, l2, l3; 118 | 119 | // zero set all our globals 120 | memset( &s_reset, 0, sizeof(s_reset) ); 121 | 122 | Reset_Cache(); 123 | 124 | n1 = UI_ProportionalStringWidth( "YES/NO" ); 125 | n2 = UI_ProportionalStringWidth( "YES" ) + PROP_GAP_WIDTH; 126 | n3 = UI_ProportionalStringWidth( "/" ) + PROP_GAP_WIDTH; 127 | l1 = 320 - ( n1 / 2 ); 128 | l2 = l1 + n2; 129 | l3 = l2 + n3; 130 | s_reset.slashX = l2; 131 | 132 | s_reset.menu.draw = Reset_MenuDraw; 133 | s_reset.menu.key = Reset_MenuKey; 134 | s_reset.menu.wrapAround = qtrue; 135 | 136 | trap_GetClientState( &cstate ); 137 | 138 | if ( cstate.connState >= CA_CONNECTED ) { 139 | // float on top of running game 140 | s_reset.menu.fullscreen = qfalse; 141 | } 142 | else { 143 | // game not running 144 | s_reset.menu.fullscreen = qtrue; 145 | } 146 | 147 | s_reset.yes.generic.type = MTYPE_PTEXT; 148 | s_reset.yes.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS; 149 | s_reset.yes.generic.callback = Reset_MenuEvent; 150 | s_reset.yes.generic.id = ID_YES; 151 | s_reset.yes.generic.x = l1; 152 | s_reset.yes.generic.y = 264; 153 | s_reset.yes.string = "YES"; 154 | s_reset.yes.color = color_red; 155 | s_reset.yes.style = UI_LEFT; 156 | 157 | s_reset.no.generic.type = MTYPE_PTEXT; 158 | s_reset.no.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS; 159 | s_reset.no.generic.callback = Reset_MenuEvent; 160 | s_reset.no.generic.id = ID_NO; 161 | s_reset.no.generic.x = l3; 162 | s_reset.no.generic.y = 264; 163 | s_reset.no.string = "NO"; 164 | s_reset.no.color = color_red; 165 | s_reset.no.style = UI_LEFT; 166 | 167 | Menu_AddItem( &s_reset.menu, &s_reset.yes ); 168 | Menu_AddItem( &s_reset.menu, &s_reset.no ); 169 | 170 | UI_PushMenu( &s_reset.menu ); 171 | 172 | Menu_SetCursorToItem( &s_reset.menu, &s_reset.no ); 173 | } 174 | -------------------------------------------------------------------------------- /code/q3_ui/ui_syscalls.asm: -------------------------------------------------------------------------------- 1 | code 2 | 3 | equ trap_Error -1 4 | equ trap_Print -2 5 | equ trap_Milliseconds -3 6 | equ trap_Cvar_Set -4 7 | equ trap_Cvar_VariableValue -5 8 | equ trap_Cvar_VariableStringBuffer -6 9 | equ trap_Cvar_SetValue -7 10 | equ trap_Cvar_Reset -8 11 | equ trap_Cvar_Create -9 12 | equ trap_Cvar_InfoStringBuffer -10 13 | equ trap_Argc -11 14 | equ trap_Argv -12 15 | equ trap_Cmd_ExecuteText -13 16 | equ trap_FS_FOpenFile -14 17 | equ trap_FS_Read -15 18 | equ trap_FS_Write -16 19 | equ trap_FS_FCloseFile -17 20 | equ trap_FS_GetFileList -18 21 | equ trap_R_RegisterModel -19 22 | equ trap_R_RegisterSkin -20 23 | equ trap_R_RegisterShaderNoMip -21 24 | equ trap_R_ClearScene -22 25 | equ trap_R_AddRefEntityToScene -23 26 | equ trap_R_AddPolyToScene -24 27 | equ trap_R_AddLightToScene -25 28 | equ trap_R_RenderScene -26 29 | equ trap_R_SetColor -27 30 | equ trap_R_DrawStretchPic -28 31 | equ trap_UpdateScreen -29 32 | equ trap_CM_LerpTag -30 33 | equ trap_CM_LoadModel -31 34 | equ trap_S_RegisterSound -32 35 | equ trap_S_StartLocalSound -33 36 | equ trap_Key_KeynumToStringBuf -34 37 | equ trap_Key_GetBindingBuf -35 38 | equ trap_Key_SetBinding -36 39 | equ trap_Key_IsDown -37 40 | equ trap_Key_GetOverstrikeMode -38 41 | equ trap_Key_SetOverstrikeMode -39 42 | equ trap_Key_ClearStates -40 43 | equ trap_Key_GetCatcher -41 44 | equ trap_Key_SetCatcher -42 45 | equ trap_GetClipboardData -43 46 | equ trap_GetGlconfig -44 47 | equ trap_GetClientState -45 48 | equ trap_GetConfigString -46 49 | equ trap_LAN_GetPingQueueCount -47 50 | equ trap_LAN_ClearPing -48 51 | equ trap_LAN_GetPing -49 52 | equ trap_LAN_GetPingInfo -50 53 | equ trap_Cvar_Register -51 54 | equ trap_Cvar_Update -52 55 | equ trap_MemoryRemaining -53 56 | equ trap_GetCDKey -54 57 | equ trap_SetCDKey -55 58 | equ trap_R_RegisterFont -56 59 | equ trap_R_ModelBounds -57 60 | equ trap_PC_AddGlobalDefine -58 61 | equ trap_PC_LoadSource -59 62 | equ trap_PC_FreeSource -60 63 | equ trap_PC_ReadToken -61 64 | equ trap_PC_SourceFileAndLine -62 65 | equ trap_S_StopBackgroundTrack -63 66 | equ trap_S_StartBackgroundTrack -64 67 | equ trap_RealTime -65 68 | equ trap_LAN_GetServerCount -66 69 | equ trap_LAN_GetServerAddressString -67 70 | equ trap_LAN_GetServerInfo -68 71 | equ trap_LAN_MarkServerVisible -69 72 | equ trap_LAN_UpdateVisiblePings -70 73 | equ trap_LAN_ResetPings -71 74 | equ trap_LAN_LoadCachedServers -72 75 | equ trap_LAN_SaveCachedServers -73 76 | equ trap_LAN_AddServer -74 77 | equ trap_LAN_RemoveServer -75 78 | equ trap_CIN_PlayCinematic -76 79 | equ trap_CIN_StopCinematic -77 80 | equ trap_CIN_RunCinematic -78 81 | equ trap_CIN_DrawCinematic -79 82 | equ trap_CIN_SetExtents -80 83 | equ trap_R_RemapShader -81 84 | equ trap_VerifyCDKey -82 85 | equ trap_LAN_ServerStatus -83 86 | equ trap_LAN_GetServerPing -84 87 | equ trap_LAN_ServerIsVisible -85 88 | equ trap_LAN_CompareServers -86 89 | equ trap_FS_Seek -87 90 | equ trap_SetPbClStatus -88 91 | 92 | equ memset -101 93 | equ memcpy -102 94 | equ strncpy -103 95 | equ sin -104 96 | equ cos -105 97 | equ atan2 -106 98 | equ sqrt -107 99 | equ floor -108 100 | equ ceil -109 101 | 102 | -------------------------------------------------------------------------------- /code/q3_ui/ui_team.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | // 4 | // ui_team.c 5 | // 6 | 7 | #include "ui_local.h" 8 | 9 | 10 | #define TEAMMAIN_FRAME "menu/art/cut_frame" 11 | 12 | #define INGAME_TEAM_VERTICAL_SPACING 23 13 | 14 | #define ID_JOINRED 100 15 | #define ID_JOINBLUE 101 16 | #define ID_JOINGAME 102 17 | #define ID_SPECTATE 103 18 | 19 | 20 | typedef struct 21 | { 22 | menuframework_s menu; 23 | menubitmap_s frame; 24 | menutext_s joinred; 25 | menutext_s joinblue; 26 | menutext_s joingame; 27 | menutext_s spectate; 28 | } teammain_t; 29 | 30 | static teammain_t s_teammain; 31 | 32 | /* 33 | =============== 34 | TeamMain_MenuEvent 35 | =============== 36 | */ 37 | static void TeamMain_MenuEvent( void* ptr, int event ) { 38 | if( event != QM_ACTIVATED ) { 39 | return; 40 | } 41 | 42 | switch( ((menucommon_s*)ptr)->id ) { 43 | case ID_JOINRED: 44 | trap_Cmd_ExecuteText( EXEC_APPEND, "cmd team red\n" ); 45 | UI_ForceMenuOff(); 46 | break; 47 | 48 | case ID_JOINBLUE: 49 | trap_Cmd_ExecuteText( EXEC_APPEND, "cmd team blue\n" ); 50 | UI_ForceMenuOff(); 51 | break; 52 | 53 | case ID_JOINGAME: 54 | trap_Cmd_ExecuteText( EXEC_APPEND, "cmd team free\n" ); 55 | UI_ForceMenuOff(); 56 | break; 57 | 58 | case ID_SPECTATE: 59 | trap_Cmd_ExecuteText( EXEC_APPEND, "cmd team spectator\n" ); 60 | UI_ForceMenuOff(); 61 | break; 62 | } 63 | } 64 | 65 | 66 | /* 67 | =============== 68 | TeamMain_MenuInit 69 | =============== 70 | */ 71 | void TeamMain_MenuInit( void ) { 72 | char info[BIG_INFO_STRING]; // MAX_INFO_STRING 73 | gametype_t gametype; 74 | int y; 75 | 76 | memset( &s_teammain, 0, sizeof(s_teammain) ); 77 | 78 | TeamMain_Cache(); 79 | 80 | s_teammain.menu.wrapAround = qtrue; 81 | s_teammain.menu.fullscreen = qfalse; 82 | 83 | s_teammain.frame.generic.type = MTYPE_BITMAP; 84 | s_teammain.frame.generic.flags = QMF_INACTIVE; 85 | s_teammain.frame.generic.name = TEAMMAIN_FRAME; 86 | s_teammain.frame.width = 300; 87 | s_teammain.frame.height = 225; 88 | s_teammain.frame.generic.x = (640-s_teammain.frame.width)/2; 89 | s_teammain.frame.generic.y = (480-s_teammain.frame.height)/2; 90 | 91 | y = 195; // 188 92 | 93 | s_teammain.joinred.generic.type = MTYPE_PTEXT; 94 | s_teammain.joinred.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; 95 | s_teammain.joinred.generic.id = ID_JOINRED; 96 | s_teammain.joinred.generic.callback = TeamMain_MenuEvent; 97 | s_teammain.joinred.generic.x = 320; 98 | s_teammain.joinred.generic.y = y; 99 | s_teammain.joinred.string = "JOIN RED"; 100 | s_teammain.joinred.style = UI_CENTER|UI_SMALLFONT; 101 | s_teammain.joinred.color = colorRed; 102 | y += INGAME_TEAM_VERTICAL_SPACING; 103 | 104 | s_teammain.joinblue.generic.type = MTYPE_PTEXT; 105 | s_teammain.joinblue.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; 106 | s_teammain.joinblue.generic.id = ID_JOINBLUE; 107 | s_teammain.joinblue.generic.callback = TeamMain_MenuEvent; 108 | s_teammain.joinblue.generic.x = 320; 109 | s_teammain.joinblue.generic.y = y; 110 | s_teammain.joinblue.string = "JOIN BLUE"; 111 | s_teammain.joinblue.style = UI_CENTER|UI_SMALLFONT; 112 | s_teammain.joinblue.color = colorRed; 113 | y += INGAME_TEAM_VERTICAL_SPACING; 114 | 115 | s_teammain.joingame.generic.type = MTYPE_PTEXT; 116 | s_teammain.joingame.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; 117 | s_teammain.joingame.generic.id = ID_JOINGAME; 118 | s_teammain.joingame.generic.callback = TeamMain_MenuEvent; 119 | s_teammain.joingame.generic.x = 320; 120 | s_teammain.joingame.generic.y = y; 121 | s_teammain.joingame.string = "JOIN GAME"; 122 | s_teammain.joingame.style = UI_CENTER|UI_SMALLFONT; 123 | s_teammain.joingame.color = colorRed; 124 | y += INGAME_TEAM_VERTICAL_SPACING; 125 | 126 | s_teammain.spectate.generic.type = MTYPE_PTEXT; 127 | s_teammain.spectate.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; 128 | s_teammain.spectate.generic.id = ID_SPECTATE; 129 | s_teammain.spectate.generic.callback = TeamMain_MenuEvent; 130 | s_teammain.spectate.generic.x = 320; 131 | s_teammain.spectate.generic.y = y; 132 | s_teammain.spectate.string = "SPECTATE"; 133 | s_teammain.spectate.style = UI_CENTER|UI_SMALLFONT; 134 | s_teammain.spectate.color = colorRed; 135 | y += INGAME_TEAM_VERTICAL_SPACING; 136 | 137 | trap_GetConfigString( CS_SERVERINFO, info, sizeof( info ) ); 138 | gametype = atoi( Info_ValueForKey( info, "g_gametype" ) ); 139 | 140 | // set initial states 141 | switch( gametype ) { 142 | case GT_SINGLE_PLAYER: 143 | case GT_FFA: 144 | case GT_TOURNAMENT: 145 | s_teammain.joinred.generic.flags |= QMF_GRAYED; 146 | s_teammain.joinblue.generic.flags |= QMF_GRAYED; 147 | break; 148 | 149 | default: 150 | case GT_TEAM: 151 | case GT_CTF: 152 | s_teammain.joingame.generic.flags |= QMF_GRAYED; 153 | break; 154 | } 155 | 156 | Menu_AddItem( &s_teammain.menu, (void*) &s_teammain.frame ); 157 | Menu_AddItem( &s_teammain.menu, (void*) &s_teammain.joinred ); 158 | Menu_AddItem( &s_teammain.menu, (void*) &s_teammain.joinblue ); 159 | Menu_AddItem( &s_teammain.menu, (void*) &s_teammain.joingame ); 160 | Menu_AddItem( &s_teammain.menu, (void*) &s_teammain.spectate ); 161 | } 162 | 163 | 164 | /* 165 | =============== 166 | TeamMain_Cache 167 | =============== 168 | */ 169 | void TeamMain_Cache( void ) { 170 | trap_R_RegisterShaderNoMip( TEAMMAIN_FRAME ); 171 | } 172 | 173 | 174 | /* 175 | =============== 176 | UI_TeamMainMenu 177 | =============== 178 | */ 179 | void UI_TeamMainMenu( void ) { 180 | TeamMain_MenuInit(); 181 | UI_PushMenu ( &s_teammain.menu ); 182 | } 183 | -------------------------------------------------------------------------------- /code/ui/keycodes.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | #ifndef __KEYCODES_H__ 4 | #define __KEYCODES_H__ 5 | 6 | // 7 | // these are the key numbers that should be passed to KeyEvent 8 | // 9 | 10 | // normal keys should be passed as lowercased ascii 11 | 12 | typedef enum { 13 | K_TAB = 9, 14 | K_ENTER = 13, 15 | K_ESCAPE = 27, 16 | K_SPACE = 32, 17 | 18 | K_BACKSPACE = 127, 19 | 20 | K_COMMAND = 128, 21 | K_CAPSLOCK, 22 | K_POWER, 23 | K_PAUSE, 24 | 25 | K_UPARROW, 26 | K_DOWNARROW, 27 | K_LEFTARROW, 28 | K_RIGHTARROW, 29 | 30 | K_ALT, 31 | K_CTRL, 32 | K_SHIFT, 33 | K_INS, 34 | K_DEL, 35 | K_PGDN, 36 | K_PGUP, 37 | K_HOME, 38 | K_END, 39 | 40 | K_F1, 41 | K_F2, 42 | K_F3, 43 | K_F4, 44 | K_F5, 45 | K_F6, 46 | K_F7, 47 | K_F8, 48 | K_F9, 49 | K_F10, 50 | K_F11, 51 | K_F12, 52 | K_F13, 53 | K_F14, 54 | K_F15, 55 | 56 | K_KP_HOME, 57 | K_KP_UPARROW, 58 | K_KP_PGUP, 59 | K_KP_LEFTARROW, 60 | K_KP_5, 61 | K_KP_RIGHTARROW, 62 | K_KP_END, 63 | K_KP_DOWNARROW, 64 | K_KP_PGDN, 65 | K_KP_ENTER, 66 | K_KP_INS, 67 | K_KP_DEL, 68 | K_KP_SLASH, 69 | K_KP_MINUS, 70 | K_KP_PLUS, 71 | K_KP_NUMLOCK, 72 | K_KP_STAR, 73 | K_KP_EQUALS, 74 | 75 | K_MOUSE1, 76 | K_MOUSE2, 77 | K_MOUSE3, 78 | K_MOUSE4, 79 | K_MOUSE5, 80 | 81 | K_MWHEELDOWN, 82 | K_MWHEELUP, 83 | 84 | K_JOY1, 85 | K_JOY2, 86 | K_JOY3, 87 | K_JOY4, 88 | K_JOY5, 89 | K_JOY6, 90 | K_JOY7, 91 | K_JOY8, 92 | K_JOY9, 93 | K_JOY10, 94 | K_JOY11, 95 | K_JOY12, 96 | K_JOY13, 97 | K_JOY14, 98 | K_JOY15, 99 | K_JOY16, 100 | K_JOY17, 101 | K_JOY18, 102 | K_JOY19, 103 | K_JOY20, 104 | K_JOY21, 105 | K_JOY22, 106 | K_JOY23, 107 | K_JOY24, 108 | K_JOY25, 109 | K_JOY26, 110 | K_JOY27, 111 | K_JOY28, 112 | K_JOY29, 113 | K_JOY30, 114 | K_JOY31, 115 | K_JOY32, 116 | 117 | K_AUX1, 118 | K_AUX2, 119 | K_AUX3, 120 | K_AUX4, 121 | K_AUX5, 122 | K_AUX6, 123 | K_AUX7, 124 | K_AUX8, 125 | K_AUX9, 126 | K_AUX10, 127 | K_AUX11, 128 | K_AUX12, 129 | K_AUX13, 130 | K_AUX14, 131 | K_AUX15, 132 | K_AUX16, 133 | 134 | K_LAST_KEY // this had better be <256! 135 | } keyNum_t; 136 | 137 | 138 | // The menu code needs to get both key and char events, but 139 | // to avoid duplicating the paths, the char events are just 140 | // distinguished by or'ing in K_CHAR_FLAG (ugly) 141 | #define K_CHAR_FLAG 1024 142 | 143 | #endif 144 | -------------------------------------------------------------------------------- /code/ui/ui_public.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 1999-2000 Id Software, Inc. 2 | // 3 | #ifndef __UI_PUBLIC_H__ 4 | #define __UI_PUBLIC_H__ 5 | 6 | #define UI_API_VERSION 6 7 | 8 | typedef struct { 9 | connstate_t connState; 10 | int connectPacketCount; 11 | int clientNum; 12 | char servername[MAX_STRING_CHARS]; 13 | char updateInfoString[MAX_STRING_CHARS]; 14 | char messageString[MAX_STRING_CHARS]; 15 | } uiClientState_t; 16 | 17 | typedef enum { 18 | UI_ERROR, 19 | UI_PRINT, 20 | UI_MILLISECONDS, 21 | UI_CVAR_SET, 22 | UI_CVAR_VARIABLEVALUE, 23 | UI_CVAR_VARIABLESTRINGBUFFER, 24 | UI_CVAR_SETVALUE, 25 | UI_CVAR_RESET, 26 | UI_CVAR_CREATE, 27 | UI_CVAR_INFOSTRINGBUFFER, 28 | UI_ARGC, 29 | UI_ARGV, 30 | UI_CMD_EXECUTETEXT, 31 | UI_FS_FOPENFILE, 32 | UI_FS_READ, 33 | UI_FS_WRITE, 34 | UI_FS_FCLOSEFILE, 35 | UI_FS_GETFILELIST, 36 | UI_R_REGISTERMODEL, 37 | UI_R_REGISTERSKIN, 38 | UI_R_REGISTERSHADERNOMIP, 39 | UI_R_CLEARSCENE, 40 | UI_R_ADDREFENTITYTOSCENE, 41 | UI_R_ADDPOLYTOSCENE, 42 | UI_R_ADDLIGHTTOSCENE, 43 | UI_R_RENDERSCENE, 44 | UI_R_SETCOLOR, 45 | UI_R_DRAWSTRETCHPIC, 46 | UI_UPDATESCREEN, 47 | UI_CM_LERPTAG, 48 | UI_CM_LOADMODEL, 49 | UI_S_REGISTERSOUND, 50 | UI_S_STARTLOCALSOUND, 51 | UI_KEY_KEYNUMTOSTRINGBUF, 52 | UI_KEY_GETBINDINGBUF, 53 | UI_KEY_SETBINDING, 54 | UI_KEY_ISDOWN, 55 | UI_KEY_GETOVERSTRIKEMODE, 56 | UI_KEY_SETOVERSTRIKEMODE, 57 | UI_KEY_CLEARSTATES, 58 | UI_KEY_GETCATCHER, 59 | UI_KEY_SETCATCHER, 60 | UI_GETCLIPBOARDDATA, 61 | UI_GETGLCONFIG, 62 | UI_GETCLIENTSTATE, 63 | UI_GETCONFIGSTRING, 64 | UI_LAN_GETPINGQUEUECOUNT, 65 | UI_LAN_CLEARPING, 66 | UI_LAN_GETPING, 67 | UI_LAN_GETPINGINFO, 68 | UI_CVAR_REGISTER, 69 | UI_CVAR_UPDATE, 70 | UI_MEMORY_REMAINING, 71 | UI_GET_CDKEY, 72 | UI_SET_CDKEY, 73 | UI_R_REGISTERFONT, 74 | UI_R_MODELBOUNDS, 75 | UI_PC_ADD_GLOBAL_DEFINE, 76 | UI_PC_LOAD_SOURCE, 77 | UI_PC_FREE_SOURCE, 78 | UI_PC_READ_TOKEN, 79 | UI_PC_SOURCE_FILE_AND_LINE, 80 | UI_S_STOPBACKGROUNDTRACK, 81 | UI_S_STARTBACKGROUNDTRACK, 82 | UI_REAL_TIME, 83 | UI_LAN_GETSERVERCOUNT, 84 | UI_LAN_GETSERVERADDRESSSTRING, 85 | UI_LAN_GETSERVERINFO, 86 | UI_LAN_MARKSERVERVISIBLE, 87 | UI_LAN_UPDATEVISIBLEPINGS, 88 | UI_LAN_RESETPINGS, 89 | UI_LAN_LOADCACHEDSERVERS, 90 | UI_LAN_SAVECACHEDSERVERS, 91 | UI_LAN_ADDSERVER, 92 | UI_LAN_REMOVESERVER, 93 | UI_CIN_PLAYCINEMATIC, 94 | UI_CIN_STOPCINEMATIC, 95 | UI_CIN_RUNCINEMATIC, 96 | UI_CIN_DRAWCINEMATIC, 97 | UI_CIN_SETEXTENTS, 98 | UI_R_REMAP_SHADER, 99 | UI_VERIFY_CDKEY, 100 | UI_LAN_SERVERSTATUS, 101 | UI_LAN_GETSERVERPING, 102 | UI_LAN_SERVERISVISIBLE, 103 | UI_LAN_COMPARESERVERS, 104 | // 1.32 105 | UI_FS_SEEK, 106 | UI_SET_PBCLSTATUS, 107 | 108 | UI_MEMSET = 100, 109 | UI_MEMCPY, 110 | UI_STRNCPY, 111 | UI_SIN, 112 | UI_COS, 113 | UI_ATAN2, 114 | UI_SQRT, 115 | UI_FLOOR, 116 | UI_CEIL 117 | } uiImport_t; 118 | 119 | typedef enum { 120 | UIMENU_NONE, 121 | UIMENU_MAIN, 122 | UIMENU_INGAME, 123 | UIMENU_NEED_CD, 124 | UIMENU_BAD_CD_KEY, 125 | UIMENU_TEAM, 126 | UIMENU_POSTGAME 127 | } uiMenuCommand_t; 128 | 129 | #define SORT_HOST 0 130 | #define SORT_MAP 1 131 | #define SORT_CLIENTS 2 132 | #define SORT_GAME 3 133 | #define SORT_PING 4 134 | #define SORT_PUNKBUSTER 5 135 | 136 | typedef enum { 137 | UI_GETAPIVERSION = 0, // system reserved 138 | 139 | UI_INIT, 140 | // void UI_Init( void ); 141 | 142 | UI_SHUTDOWN, 143 | // void UI_Shutdown( void ); 144 | 145 | UI_KEY_EVENT, 146 | // void UI_KeyEvent( int key ); 147 | 148 | UI_MOUSE_EVENT, 149 | // void UI_MouseEvent( int dx, int dy ); 150 | 151 | UI_REFRESH, 152 | // void UI_Refresh( int time ); 153 | 154 | UI_IS_FULLSCREEN, 155 | // qboolean UI_IsFullscreen( void ); 156 | 157 | UI_SET_ACTIVE_MENU, 158 | // void UI_SetActiveMenu( uiMenuCommand_t menu ); 159 | 160 | UI_CONSOLE_COMMAND, 161 | // qboolean UI_ConsoleCommand( int realTime ); 162 | 163 | UI_DRAW_CONNECT_SCREEN, 164 | // void UI_DrawConnectScreen( qboolean overlay ); 165 | UI_HASUNIQUECDKEY 166 | // if !overlay, the background will be drawn, otherwise it will be 167 | // overlayed over whatever the cgame has drawn. 168 | // a GetClientState syscall will be made to get the current strings 169 | } uiExport_t; 170 | 171 | #endif 172 | -------------------------------------------------------------------------------- /code/ui/ui_syscalls.asm: -------------------------------------------------------------------------------- 1 | code 2 | 3 | equ trap_Error -1 4 | equ trap_Print -2 5 | equ trap_Milliseconds -3 6 | equ trap_Cvar_Set -4 7 | equ trap_Cvar_VariableValue -5 8 | equ trap_Cvar_VariableStringBuffer -6 9 | equ trap_Cvar_SetValue -7 10 | equ trap_Cvar_Reset -8 11 | equ trap_Cvar_Create -9 12 | equ trap_Cvar_InfoStringBuffer -10 13 | equ trap_Argc -11 14 | equ trap_Argv -12 15 | equ trap_Cmd_ExecuteText -13 16 | equ trap_FS_FOpenFile -14 17 | equ trap_FS_Read -15 18 | equ trap_FS_Write -16 19 | equ trap_FS_FCloseFile -17 20 | equ trap_FS_GetFileList -18 21 | equ trap_R_RegisterModel -19 22 | equ trap_R_RegisterSkin -20 23 | equ trap_R_RegisterShaderNoMip -21 24 | equ trap_R_ClearScene -22 25 | equ trap_R_AddRefEntityToScene -23 26 | equ trap_R_AddPolyToScene -24 27 | equ trap_R_AddLightToScene -25 28 | equ trap_R_RenderScene -26 29 | equ trap_R_SetColor -27 30 | equ trap_R_DrawStretchPic -28 31 | equ trap_UpdateScreen -29 32 | equ trap_CM_LerpTag -30 33 | equ trap_CM_LoadModel -31 34 | equ trap_S_RegisterSound -32 35 | equ trap_S_StartLocalSound -33 36 | equ trap_Key_KeynumToStringBuf -34 37 | equ trap_Key_GetBindingBuf -35 38 | equ trap_Key_SetBinding -36 39 | equ trap_Key_IsDown -37 40 | equ trap_Key_GetOverstrikeMode -38 41 | equ trap_Key_SetOverstrikeMode -39 42 | equ trap_Key_ClearStates -40 43 | equ trap_Key_GetCatcher -41 44 | equ trap_Key_SetCatcher -42 45 | equ trap_GetClipboardData -43 46 | equ trap_GetGlconfig -44 47 | equ trap_GetClientState -45 48 | equ trap_GetConfigString -46 49 | equ trap_LAN_GetPingQueueCount -47 50 | equ trap_LAN_ClearPing -48 51 | equ trap_LAN_GetPing -49 52 | equ trap_LAN_GetPingInfo -50 53 | equ trap_Cvar_Register -51 54 | equ trap_Cvar_Update -52 55 | equ trap_MemoryRemaining -53 56 | equ trap_GetCDKey -54 57 | equ trap_SetCDKey -55 58 | equ trap_R_RegisterFont -56 59 | equ trap_R_ModelBounds -57 60 | equ trap_PC_AddGlobalDefine -58 61 | equ trap_PC_LoadSource -59 62 | equ trap_PC_FreeSource -60 63 | equ trap_PC_ReadToken -61 64 | equ trap_PC_SourceFileAndLine -62 65 | equ trap_S_StopBackgroundTrack -63 66 | equ trap_S_StartBackgroundTrack -64 67 | equ trap_RealTime -65 68 | equ trap_LAN_GetServerCount -66 69 | equ trap_LAN_GetServerAddressString -67 70 | equ trap_LAN_GetServerInfo -68 71 | equ trap_LAN_MarkServerVisible -69 72 | equ trap_LAN_UpdateVisiblePings -70 73 | equ trap_LAN_ResetPings -71 74 | equ trap_LAN_LoadCachedServers -72 75 | equ trap_LAN_SaveCachedServers -73 76 | equ trap_LAN_AddServer -74 77 | equ trap_LAN_RemoveServer -75 78 | equ trap_CIN_PlayCinematic -76 79 | equ trap_CIN_StopCinematic -77 80 | equ trap_CIN_RunCinematic -78 81 | equ trap_CIN_DrawCinematic -79 82 | equ trap_CIN_SetExtents -80 83 | equ trap_R_RemapShader -81 84 | equ trap_VerifyCDKey -82 85 | equ trap_LAN_ServerStatus -83 86 | equ trap_LAN_GetServerPing -84 87 | equ trap_LAN_ServerIsVisible -85 88 | equ trap_LAN_CompareServers -86 89 | equ trap_FS_Seek -87 90 | equ trap_SetPbClStatus -88 91 | 92 | equ memset -101 93 | equ memcpy -102 94 | equ strncpy -103 95 | equ sin -104 96 | equ cos -105 97 | equ atan2 -106 98 | equ sqrt -107 99 | equ floor -108 100 | equ ceil -109 101 | 102 | -------------------------------------------------------------------------------- /code/ui/ui_util.c: -------------------------------------------------------------------------------- 1 | // ui_util.c 2 | // 3 | // origin: rad 4 | // new ui support stuff 5 | // 6 | // memory, string alloc 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/client.txt: -------------------------------------------------------------------------------- 1 | **************************************************** 2 | *********** client variables and commands ********** 3 | **************************************************** 4 | 5 | ======================== 6 | cg_followKiller <0|1> 7 | 8 | 9 | ======================== 10 | cg_drawWeaponSelect <0|1|2|3|-1|-2|-3> 11 | 12 | 0 - disabled 13 | 1 - horizontal with weapon name 14 | 2 - horizontal with ammo counters 15 | 3 - vectical with ammo counters 16 | 17 | use negative values to force permanent display 18 | 19 | 20 | ======================== 21 | cg_drawSpeed <0|1|2> 22 | 23 | draw xy-speed 24 | 25 | 0 - disabled 26 | 1 - in top-right corner 27 | 2 - under crosshair 28 | 29 | 30 | ======================== 31 | cg_enemyModel [ pm | modelname ] 32 | 33 | sets model for enemies 34 | 35 | "pm" means use current bright colored enemy model if model is known for mod i.e. there is possible to modify model colors 36 | if model is unknown (like "alien" or so) then it will be forced to "sarge" 37 | 38 | 39 | ======================== 40 | cg_enemyColors [colorstring] 41 | 42 | colorstring is a 3 [or 5] char-length string, where 43 | 44 | 1st char - head color, all colors forced to '???' if not set 45 | 2nd char - torso color, forced to white if not set 46 | 3rd char - legs color, forced to white if not set 47 | 48 | 4th char - optional, color1 override 49 | 5th char - optional, color2 override 50 | 51 | '?' will be replaced to white in FFA games or corresponding team color (red or blue) in team games 52 | 53 | !!! will work only if cg_enemyModel is set !!! 54 | 55 | 56 | ======================== 57 | cg_teamModel [ pm | modelname ] 58 | 59 | sets model for your teammates 60 | 61 | 62 | ======================== 63 | cg_teamColors [colorstring] 64 | 65 | syntax and values is the same as for cg_enemyColors 66 | 67 | colorstring[4] and [5] will ALWAYS override color1 and color2 for spectated client 68 | 69 | but head, torso and legs colors will work corectly only if cg_teamModel is set 70 | 71 | 72 | ======================== 73 | cg_deadBodyDarken <0|1> 74 | 75 | turn dead bodies into grey color 76 | 77 | works only if cg_enemyModel is set 78 | 79 | default is 1 80 | 81 | 82 | ======================== 83 | cg_hitSounds <0|1|2> 84 | 85 | damage-based hitsounds 86 | 87 | 0 - standard fixed tone 88 | 1 - higher damage - lower tone 89 | 1 - higher damage - higher tone 90 | 91 | requires proper from server in PERS_ATTACKEE_ARMOR 92 | 93 | default is 0 94 | 95 | 96 | ======================== 97 | cg_railTrailRadius 98 | 99 | radius for linear light source, available only in q3e engine atm 100 | 101 | 102 | ======================== 103 | cg_fovAdjust <0|1> 104 | 105 | Automatically rescale cg_fov from desired 4x3 screen ratio to widescreen resolution 106 | 107 | default is 0 108 | 109 | 110 | ======================== 111 | cg_gunX 112 | cg_gunY 113 | cg_gunZ 114 | 115 | turned into non-cheat cvars 116 | 117 | 118 | ======================== 119 | Miscellaneous 120 | 121 | Click on score line to follow selected player 122 | 123 | 124 | -------------------------------------------------------------------------------- /docs/rotation.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Map rotation system 3 | 4 | \g_rotation server cvar must point on this file 5 | 6 | Syntax: 7 | 8 | $cvar1 = value1; // set cvar1 for each rotation step (i.e global) 9 | {...} 10 | "mapname1" // first map in rotation 11 | "mapname2" // second map in rotation 12 | { 13 | $cvar2 = value2; // set cvar2 only for "mapname2" 14 | {...} 15 | } 16 | "mapname3" // third map in rotation 17 | {...} 18 | 19 | Note: its better to quote map names like "6++" which contains "+","-","&" etc. symbols 20 | 21 | Example of contents: 22 | */ 23 | 24 | $fraglimit = 40; 25 | $timelimit = 6; 26 | //pro-q3dm6 27 | q3dm17 { $timelimit = 7; $fraglimit = 50; } 28 | //q3dm2 29 | //q3dm5 30 | //q3tourney4 31 | //q3dm7 32 | //q3dm11 33 | -------------------------------------------------------------------------------- /docs/server.txt: -------------------------------------------------------------------------------- 1 | **************************************************** 2 | *********** server variables and commands ********** 3 | **************************************************** 4 | 5 | ======================== 6 | g_gametype 7 | 8 | 0 - Free For All 9 | 1 - 1-vs-1 Duel/Tournament 10 | 2 - Single Player, selectable only from UI 11 | 3 - Team Deathmatch 12 | 4 - Capture The Flag 13 | 14 | \map_restart required to apply change 15 | 16 | 17 | ======================== 18 | g_unlagged <0|1> 19 | 20 | enables lag(-ping) compensation technique for hitscan weapons 21 | such as Machinegun, Shotgun or Railgun 22 | 23 | 24 | ======================== 25 | g_predictPVS 26 | 27 | try to predict visible entities in order to compensate 'sudden spawn' effect on client-side 28 | 29 | this works only if client is moving towards entities, i.e. it doesn't enhance static visibility for wallhackers 30 | 31 | requires quake3e engine with SVF_SELFPORTAL2 functionality 32 | 33 | 34 | ======================== 35 | g_rotation 36 | 37 | points to filename with rotation information, see rotation.txt for details 38 | 39 | 40 | ======================== 41 | \callvote 42 | 43 | semicolons in vote strings now allowed 44 | so you can issue up to 4 commands in single vote 45 | just don't forget to quote such strings, for example: 46 | 47 | \callvote "g_gametype 1; map_restart" 48 | 49 | string aliases (ffa,duel,tdm,ctf) now acceptable for g_gametype, for example: 50 | 51 | \callvote "g_gametype tdm; fraglimit 100; timelimit 0; map_restart" 52 | 53 | \callvote rotate - will switch to next map just like \callvote nextmap 54 | \callvote rotate - will switch to map in rotation and rotation will continue from that index 55 | 56 | 57 | ======================== 58 | g_autoJoin 59 | 60 | replaces old g_teamAutoJoin: 61 | 62 | 1 - auto join in non-team games 63 | 2 - auto join in team games 64 | 3 - 1+2 65 | 66 | default is 1 67 | 68 | 69 | ======================== 70 | g_teamAutoJoin 71 | 72 | removed 73 | 74 | 75 | g_warmup 76 | ======================== 77 | 78 | warmup time in seconds 79 | 80 | = 0 - means instant match start 81 | < 0 - wait until everyone get ready 82 | > 0 - usual timed warmup 83 | 84 | 85 | g_doWarmup 86 | ======================== 87 | 88 | obsolete, forced to 1 89 | --------------------------------------------------------------------------------