Compare commits
269 Commits
9a1f5e3af1
...
822a7221b2
Author | SHA1 | Date |
---|---|---|
Marco Cawthorne | 822a7221b2 | |
Marco Cawthorne | d5053299dc | |
Marco Cawthorne | 53bab46f7d | |
Marco Cawthorne | ff649187ee | |
Marco Cawthorne | a9ededfd1a | |
Marco Cawthorne | 4b35d47522 | |
Marco Cawthorne | 33d7c3cc50 | |
Marco Cawthorne | 95b7c87ea3 | |
Marco Cawthorne | 1514c977e9 | |
Marco Cawthorne | c1eb4bcb99 | |
Marco Cawthorne | 9b9988232f | |
Marco Cawthorne | 2a6571e33b | |
Marco Cawthorne | b99ec4b39b | |
Marco Cawthorne | 8533f6d228 | |
Marco Cawthorne | 48b76b8786 | |
Marco Cawthorne | ffa3645395 | |
Marco Cawthorne | 396910e587 | |
Marco Cawthorne | ee60a09eed | |
Marco Cawthorne | d31a3b65fd | |
Marco Cawthorne | d697f53ca5 | |
Marco Cawthorne | e9f9ae5829 | |
Marco Cawthorne | bd74c588da | |
Marco Cawthorne | dcb87039b1 | |
Marco Cawthorne | 3d32e75e88 | |
Marco Cawthorne | bd2705eed6 | |
Marco Cawthorne | 0bb88774a2 | |
Marco Cawthorne | 2838900a82 | |
Marco Cawthorne | d9d579478a | |
Marco Cawthorne | 3a1a5d66f5 | |
Marco Cawthorne | 09839aa198 | |
Marco Cawthorne | efe079bdf7 | |
Marco Cawthorne | f11a10d343 | |
Marco Cawthorne | a3268ef65b | |
Marco Cawthorne | a9b6f9a428 | |
Marco Cawthorne | 0c2db7a23a | |
Marco Cawthorne | 32a36d8017 | |
Marco Cawthorne | f0034cb03a | |
Marco Cawthorne | 9c66c2c5f9 | |
Marco Cawthorne | c0b031ed9f | |
Marco Cawthorne | e2239a236f | |
Marco Cawthorne | 50cc1b6198 | |
Marco Cawthorne | 6c8b56c39f | |
Marco Cawthorne | 57b19425c1 | |
Marco Cawthorne | 37ab385bcf | |
Marco Cawthorne | 0f96e635b0 | |
Marco Cawthorne | 86cfec6e6d | |
Marco Cawthorne | d405ff7e90 | |
Marco Cawthorne | 649ed825ad | |
Marco Cawthorne | 0147278359 | |
Marco Cawthorne | c44bf11e3b | |
Marco Cawthorne | 0792fbaee9 | |
Marco Cawthorne | cb4ba0c201 | |
Marco Cawthorne | ca318e29f9 | |
Marco Cawthorne | c60012b757 | |
Marco Cawthorne | 8b2d484917 | |
Marco Cawthorne | 02551ed71b | |
Marco Cawthorne | ee58089a55 | |
Marco Cawthorne | 34884b68a3 | |
Marco Cawthorne | e2ee6987de | |
Marco Cawthorne | 7d58b4a96a | |
Marco Cawthorne | 8a18c2e992 | |
Marco Cawthorne | 0f86ba61a1 | |
Marco Cawthorne | 5c90692873 | |
Marco Cawthorne | 6319f6166e | |
Marco Cawthorne | 2f56725160 | |
Marco Cawthorne | 29a997dbcf | |
Marco Cawthorne | 33e5038881 | |
Marco Cawthorne | b2fc4d2918 | |
Marco Cawthorne | 3e182b3737 | |
Marco Cawthorne | 0e3eb491a6 | |
Marco Cawthorne | a9836563d1 | |
Marco Cawthorne | 9847f3828e | |
Marco Cawthorne | 08259f5652 | |
Marco Cawthorne | 0df1e78cc3 | |
Marco Cawthorne | ea0b365037 | |
Marco Cawthorne | f950dcaabb | |
Marco Cawthorne | 9e68e24d2e | |
Marco Cawthorne | 99f513efdb | |
Marco Cawthorne | 06d959ef02 | |
Marco Cawthorne | 7e8d1aacdb | |
Marco Cawthorne | 31b88f63f2 | |
Marco Cawthorne | 08cac51d5f | |
Marco Cawthorne | 4a8f4a6082 | |
Marco Cawthorne | ba4ddbd3f6 | |
Marco Cawthorne | 2332fdd45f | |
Marco Cawthorne | 30903f7683 | |
Marco Cawthorne | da194e8eed | |
Marco Cawthorne | d66ebc4fd9 | |
Marco Cawthorne | 05af28180e | |
Marco Cawthorne | fea60cd435 | |
Marco Cawthorne | 7b09f7cbc4 | |
Marco Cawthorne | e9700b31b9 | |
Marco Cawthorne | 5bdbe2cc47 | |
Marco Cawthorne | 40aee258ce | |
Marco Cawthorne | 2891bc061e | |
Marco Cawthorne | 2034eb1d45 | |
Marco Cawthorne | 0c7fc9abc6 | |
Marco Cawthorne | 1b21a6cf46 | |
Marco Cawthorne | 177a1638f7 | |
Xylemon | d662c12951 | |
Xylemon | dda946476f | |
Marco Cawthorne | eaee5f67a7 | |
Marco Cawthorne | 64a6a9007d | |
Marco Cawthorne | 21c27969f6 | |
Marco Cawthorne | cca461effe | |
Marco Cawthorne | 4600a03165 | |
Marco Cawthorne | bc05a07e50 | |
Marco Cawthorne | d16e096306 | |
Marco Cawthorne | 591d5821f9 | |
Marco Cawthorne | 6c1db1f4f6 | |
Marco Cawthorne | 2530608b1f | |
Xylemon | b8a56b3fb4 | |
Xylemon | 89cb5e5139 | |
Marco Cawthorne | 65e491ce9c | |
Marco Cawthorne | 4b69949385 | |
Marco Cawthorne | fa4f77aae0 | |
Marco Cawthorne | 277b453c40 | |
Marco Cawthorne | faba64ad28 | |
Marco Cawthorne | af4212987f | |
Marco Cawthorne | 1ccb640ce6 | |
Marco Cawthorne | 602fa9fd93 | |
Marco Cawthorne | 07173b3c7b | |
Marco Cawthorne | 29e7b84e4b | |
Marco Cawthorne | 0cd5d0e5a7 | |
Marco Cawthorne | 22460c5aa0 | |
Marco Cawthorne | 8566a9a5a7 | |
Marco Cawthorne | 32f9d974bb | |
Marco Cawthorne | bf705a9e31 | |
Marco Cawthorne | 4790e9d230 | |
Marco Cawthorne | 038265dd64 | |
Marco Cawthorne | 801742dd4c | |
Marco Cawthorne | e67d1b0da4 | |
Marco Cawthorne | 25cfc4938e | |
Marco Cawthorne | d65ab07cf1 | |
Marco Cawthorne | a6fb7767dc | |
Marco Cawthorne | 75d03f27fe | |
Marco Cawthorne | 97c2fdd778 | |
Marco Cawthorne | 01ebb973f2 | |
Marco Cawthorne | ca04a7d637 | |
Marco Cawthorne | 29b6a200b8 | |
Marco Cawthorne | 73bec53034 | |
Marco Cawthorne | 8cd6d3967d | |
Marco Cawthorne | b7167a553e | |
Marco Cawthorne | 11deea5b3d | |
Marco Cawthorne | 81a498d49e | |
Marco Cawthorne | ab9d66b2e4 | |
Marco Cawthorne | 900cf43bd0 | |
Marco Cawthorne | 05ed789f9a | |
Marco Cawthorne | baa22e732c | |
Marco Cawthorne | f96b41bc2e | |
Marco Cawthorne | b37afb1362 | |
Marco Cawthorne | 1bf829920f | |
Marco Cawthorne | 37eceb3677 | |
Marco Cawthorne | d75f5ec43b | |
Marco Cawthorne | 444d611068 | |
Marco Cawthorne | a623b1e301 | |
Marco Cawthorne | 7d9de3a2cc | |
Marco Cawthorne | 9602d5eac8 | |
Marco Cawthorne | 1d7b6fe25f | |
Marco Cawthorne | f183bfc571 | |
Marco Cawthorne | a5ecd18047 | |
Marco Cawthorne | 9896b652c8 | |
Marco Cawthorne | 818a1a2155 | |
Marco Cawthorne | 662e01c84d | |
Marco Cawthorne | 6f3b07ed34 | |
Marco Cawthorne | 07e70aa4c4 | |
Marco Cawthorne | 47eb4fb88f | |
Marco Cawthorne | 40adc77d66 | |
Marco Cawthorne | b37893e660 | |
Marco Cawthorne | 11797717ef | |
Marco Cawthorne | aadc23356d | |
Marco Cawthorne | 31553d9b5c | |
Marco Cawthorne | 3f0f6b2d0f | |
Marco Cawthorne | a48498e5cf | |
Marco Cawthorne | c59a76a53d | |
Marco Cawthorne | 19d6f22dc4 | |
Marco Cawthorne | 9110da2cec | |
Marco Cawthorne | 367289df84 | |
Marco Cawthorne | ae1f768689 | |
Marco Cawthorne | 51f572378f | |
Marco Cawthorne | 7d69ab96fc | |
Marco Cawthorne | 6f2115c45f | |
Marco Cawthorne | 530f25667b | |
Marco Cawthorne | c531efaaf9 | |
Marco Cawthorne | c1d6324153 | |
Marco Cawthorne | 5c5eedb665 | |
Marco Cawthorne | 70bb77d2bb | |
Marco Cawthorne | 2fb002aab1 | |
Marco Cawthorne | ee820f3ed1 | |
Marco Cawthorne | 4b36ec3bb0 | |
Marco Cawthorne | f76c169671 | |
Marco Cawthorne | 7d37cc228c | |
Marco Cawthorne | 7420df0ec6 | |
Marco Cawthorne | 2dbfeb06b6 | |
Marco Cawthorne | 3d92491e54 | |
Marco Cawthorne | 9d6133054c | |
Marco Cawthorne | 4dcaefe368 | |
Marco Cawthorne | cd8825c02a | |
Marco Cawthorne | 4ec4877360 | |
Marco Cawthorne | abea931460 | |
Marco Cawthorne | 3ea74c3c3d | |
Marco Cawthorne | a4693ff0f8 | |
Marco Cawthorne | 91519b2706 | |
Marco Cawthorne | 854c5907a6 | |
Marco Cawthorne | e820e74dbc | |
Marco Cawthorne | e8a64da700 | |
Marco Cawthorne | 5b52c57a56 | |
Marco Cawthorne | 9518a23f03 | |
Marco Cawthorne | d7ddfc1c87 | |
Marco Cawthorne | 49408b1342 | |
Marco Cawthorne | 01a7ffa56f | |
Marco Cawthorne | 33179a555d | |
Marco Cawthorne | d749241081 | |
Marco Cawthorne | 0be11bd948 | |
Marco Cawthorne | a91122ccbe | |
Marco Cawthorne | e1fd04de05 | |
Marco Cawthorne | b50b803b55 | |
Marco Cawthorne | 6298688e05 | |
Marco Cawthorne | 069557f350 | |
Marco Cawthorne | a90296864b | |
Marco Cawthorne | 4f699aae6e | |
Marco Cawthorne | 5f7ea594b8 | |
Marco Cawthorne | f5308f6e08 | |
Marco Cawthorne | a1500166be | |
Marco Cawthorne | 65400fea2c | |
Marco Cawthorne | e93dc09805 | |
Marco Cawthorne | c314e880fd | |
Marco Cawthorne | 724523ce2c | |
Marco Cawthorne | 4a8df93395 | |
Marco Cawthorne | d9d3220833 | |
Marco Cawthorne | b7126fbadb | |
Marco Cawthorne | e44f56a56d | |
Marco Cawthorne | c3f5e7a1c2 | |
Marco Cawthorne | c920dc2df0 | |
Marco Cawthorne | c8d29078da | |
Marco Cawthorne | c71daa033e | |
Marco Cawthorne | 4f35c7b6bf | |
Marco Cawthorne | 9d29ad6635 | |
Marco Cawthorne | 578a3038d0 | |
Marco Cawthorne | 8150f0c080 | |
Marco Cawthorne | 5db3db539a | |
Marco Cawthorne | b77ec906f6 | |
Marco Cawthorne | 5f070fa8c9 | |
Marco Cawthorne | 54b73b3386 | |
Marco Cawthorne | 6957ff67b7 | |
Marco Cawthorne | 62426ba5d3 | |
Marco Cawthorne | 59748adf86 | |
Marco Cawthorne | 071548a000 | |
Marco Cawthorne | f1141d3b11 | |
Marco Cawthorne | b7346e6593 | |
Marco Cawthorne | 0dc3f19b1a | |
Marco Cawthorne | ae8c2f16ba | |
Marco Cawthorne | 9871e93a10 | |
Marco Cawthorne | 225039f71f | |
Marco Cawthorne | 061cdbd257 | |
Marco Cawthorne | 412c8f984e | |
Marco Cawthorne | 8422ddd26b | |
Marco Cawthorne | 2576f803cd | |
Marco Cawthorne | 050db32a81 | |
Marco Cawthorne | 410e3fc34e | |
Marco Cawthorne | 60128c6b1e | |
Marco Cawthorne | 0ea41d9304 | |
Marco Cawthorne | 0bf9374016 | |
Marco Cawthorne | 83202a6174 | |
Marco Cawthorne | 571ef536a1 | |
Marco Cawthorne | 35b427b84d | |
Marco Cawthorne | 762d1667d0 | |
Marco Cawthorne | c9bd1eb514 | |
Marco Cawthorne | f93f79e18c |
|
@ -0,0 +1,97 @@
|
|||
# Bots
|
||||
|
||||
Bots are CPU controlled opponents. They can be useful for development, debugging but can also fun to play with.
|
||||
|
||||
They're fake clients, traversing the level, and acting upon objectives they either figure out themselves, or are told to to act a certain way.
|
||||
|
||||
We encourage any multiplayer game to support them, because they often also fill in the function of balancing teams. There's a whole slew of benefits of supporting bots, and players will generally thank you for including them.
|
||||
|
||||
## Technical Info
|
||||
|
||||
Bots are handled by BotLib, located under `src/botlib/` in the source tree.
|
||||
|
||||
Nuclide's BotLib takes some inspiration from **Quake III Arena** its bots, but shares no code or specific ideas or implementations. We do not use **AAS** for navigation, we leverage the route/pathfinding system **FTEQW** provides. Bots also share some code with regular NPC/Monster type entities through the use of the NSNavAI class.
|
||||
|
||||
Games are allowed to handle how they want to integrate bots themselves, but for development purposes there are ways to force bots to spawn also.
|
||||
|
||||
# Bot profiles
|
||||
|
||||
Nuclide has support for bot profiles, like in **Quake III Arena**. They work differently although they appear compatible by design. You can define them in a script that looks something like this and is located at `scripts/bots.txt` in your game directory:
|
||||
|
||||
```
|
||||
{
|
||||
name Albert
|
||||
model zombie01
|
||||
topcolor 0xeff
|
||||
bottomcolor 0xff0020
|
||||
}
|
||||
{
|
||||
name Susie
|
||||
model police02
|
||||
topcolor 0xff6b00
|
||||
bottomcolor 0xff0b00
|
||||
}
|
||||
{
|
||||
name Dog
|
||||
funname ^4D^2o^1g
|
||||
model dog01
|
||||
topcolor 0x9200ff
|
||||
bottomcolor 0xc800ff
|
||||
}
|
||||
```
|
||||
|
||||
Only the `name` key is required. The only other special key is `funname` which sets the nickname to be different from the internal name. The other keys are set as user info (setinfo) keys on the bot client.
|
||||
|
||||
This will allow games to add whatever extra keys they wish that they can then recognize anywhere in the client/server codebase. No additional networking or APIs necessary. Simply query bot properties via their userinfo.
|
||||
|
||||
# Bot Console Commands
|
||||
|
||||
## addBot [profile name]
|
||||
|
||||
Adds a bot to the current game.
|
||||
|
||||
## killAllBots
|
||||
|
||||
Force kills and respawns bots in the current game.
|
||||
|
||||
## resetAllBotsGoals
|
||||
|
||||
Force reset bots current trajectory and goals.
|
||||
|
||||
# Bot Console Variables
|
||||
|
||||
## bot_enable
|
||||
Enable (1) or disable (0) usage of bots in the game. Default is 1.
|
||||
|
||||
## bot_pause
|
||||
Enable (1) or disable (0) an interrupt for the Bot AIs thinking. Default is 0.
|
||||
|
||||
## bot_noChat
|
||||
Enable (1) or disable (0) a suppression of any bot chatter. Default is 0.
|
||||
|
||||
## bot_fastChat
|
||||
Enable (1) or disable (0) bot chatter that does not stop other inputs. Default is 0.
|
||||
|
||||
## bot_debug
|
||||
Enable (1) or disable (0) bot debug features that otherwise won't work. Default is 0.
|
||||
|
||||
## bot_developer
|
||||
Enable (1) or disable (0) bot debug text in console. Default is 0.
|
||||
|
||||
## bot_minClients
|
||||
When set, ensures to fill the server with this many players/bots. Default is -1.
|
||||
|
||||
## bot_aimless
|
||||
Enable (1) or disable (0) bot not knowing where to go. Will keep generating a new place to walk to.
|
||||
|
||||
## bot_crouch
|
||||
Enable (1) or disable (0) the forcing of bots crouching down.
|
||||
|
||||
## bot_walk
|
||||
Enable (1) or disable (0) the restriction of bots to walking speed.
|
||||
|
||||
## bot_prone
|
||||
Enable (1) or disable (0) the forcing of bots to crawl/prone.
|
||||
|
||||
## bot_dont_shoot
|
||||
Enable (1) or disable (0) bot pacifist mode.
|
|
@ -180,7 +180,7 @@ zypper in git
|
|||
#### FTE
|
||||
|
||||
```
|
||||
zypper in make gcc gcc-c++ mesa-libGL-devel libgnutls-devel
|
||||
zypper in make gcc gcc-c++ mesa-libGL-devel libgnutls-devel alsa-devel libopus-devel speex-devel libvorbis-devel
|
||||
```
|
||||
|
||||
#### SDL2
|
||||
|
@ -195,6 +195,12 @@ zypper in libSDL2-devel
|
|||
zypper in libX11-devel libXcursor-devel libXrandr-devel
|
||||
```
|
||||
|
||||
#### Plugin: ODE
|
||||
|
||||
```
|
||||
zypper in autoconf automake libtool zip
|
||||
```
|
||||
|
||||
#### Plugin: FFMPEG
|
||||
|
||||
```
|
||||
|
@ -212,7 +218,7 @@ zypper in make gtkglext-devel libxml2-devel libjpeg8-devel minizip-devel
|
|||
#### FTE
|
||||
|
||||
```
|
||||
dnf install make gcc gcc-c++ mesa-libGL-devel gnutls-devel
|
||||
dnf install make gcc gcc-c++ mesa-libGL-devel gnutls-devel alsa-devel libopus-devel speex-devel libvorbis-devel
|
||||
```
|
||||
|
||||
#### SDL2
|
||||
|
@ -230,7 +236,7 @@ dnf install libX11-devel libXcursor-devel libXrender-devel
|
|||
#### Plugin: ODE
|
||||
|
||||
```
|
||||
dnf install autoconf automake libtool
|
||||
dnf install autoconf automake libtool zip
|
||||
```
|
||||
|
||||
#### Plugin: FFMPEG
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
# Dedicated Server
|
||||
|
||||
# Usage
|
||||
|
||||
To initialize a dedicated server, you can run `./nuclide-ds -game yourGame`. It is generally advised to write and execute a server config file you have prepared ahead of time.
|
||||
|
||||
Here is an example:
|
||||
|
||||
```
|
||||
hostname "Nuclide Test Server"
|
||||
set sv_public 2 // 0 - not public, 1 = advertised on master server, 2 = ICE
|
||||
set deathmatch 1 // request multiplayer modus
|
||||
set coop 0 // deny coop modus
|
||||
set maxplayers 16 // 16 players max
|
||||
set timelimit 10 // 10 minutes per map
|
||||
set fraglimit 30 // 30 frags per map
|
||||
set pausable 0 // don't allow players to 'pause'
|
||||
set rcon_password "" // no rcon
|
||||
map dm_beck16 // start
|
||||
```
|
||||
|
||||
You can then run the dedicated server like this:
|
||||
|
||||
`./nuclide-ds -game yourGame +exec server.cfg`
|
||||
|
||||
In production, the exact same style of commands applies to release builds. So if you have a standard engine binary (**fteqwgl64.exe** or a branded executable) things will be identical.
|
||||
|
||||
Keep in mind to set any game specific console variables.
|
||||
|
||||
# Remote Console (RCon)
|
||||
|
||||
In the above config, if you've set rcon_password to anything other than `""` you have access to remotely control the game server.
|
||||
|
||||
For example, you can (as a client, once connected) use the command `rcon yourPassword changelevel dm_beck16` to forcefully change the level on the server. Anything that's possible in a conventional dedicated server console is now accessible.
|
|
@ -0,0 +1,364 @@
|
|||
# Entity Guide
|
||||
|
||||
# Overview
|
||||
|
||||
[ambient_generic](@ref ambient_generic)
|
||||
|
||||
[button_target](@ref button_target)
|
||||
|
||||
[cycler](@ref cycler)
|
||||
|
||||
[cycler_sprite](@ref cycler_sprite)
|
||||
|
||||
[cycler_weapon](@ref cycler_weapon)
|
||||
|
||||
[cycler_wreckage](@ref cycler_wreckage)
|
||||
|
||||
[env_beam](@ref env_beam)
|
||||
|
||||
[env_beverage](@ref env_beverage)
|
||||
|
||||
[env_bubbles](@ref env_bubbles)
|
||||
|
||||
[env_cascade_light](@ref env_cascade_light)
|
||||
|
||||
[env_cubemap](@ref env_cubemap)
|
||||
|
||||
[env_explosion](@ref env_explosion)
|
||||
|
||||
[env_fade](@ref env_fade)
|
||||
|
||||
[env_fire](@ref env_fire)
|
||||
|
||||
[env_fog](@ref env_fog)
|
||||
|
||||
[env_fog_controller](@ref env_fog_controller)
|
||||
|
||||
[env_funnel](@ref env_funnel)
|
||||
|
||||
[env_global](@ref env_global)
|
||||
|
||||
[env_glow](@ref env_glow)
|
||||
|
||||
[env_hudhint](@ref env_hudhint)
|
||||
|
||||
[env_instructor_hint](@ref env_instructor_hint)
|
||||
|
||||
[env_laser](@ref env_laser)
|
||||
|
||||
[env_message](@ref env_message)
|
||||
|
||||
[env_model](@ref env_model)
|
||||
|
||||
[env_muzzleflash](@ref env_muzzleflash)
|
||||
|
||||
[env_particle](@ref env_particle)
|
||||
|
||||
[env_physexplosion](@ref env_physexplosion)
|
||||
|
||||
[env_projectedtexture](@ref env_projectedtexture)
|
||||
|
||||
[env_render](@ref env_render)
|
||||
|
||||
[env_shake](@ref env_shake)
|
||||
|
||||
[env_shockwave](@ref env_shockwave)
|
||||
|
||||
[env_shooter](@ref env_shooter)
|
||||
|
||||
[env_smoker](@ref env_smoker)
|
||||
|
||||
[env_sound](@ref env_sound)
|
||||
|
||||
[env_soundscape](@ref env_soundscape)
|
||||
|
||||
[env_spark](@ref env_spark)
|
||||
|
||||
[env_sprite](@ref env_sprite)
|
||||
|
||||
[env_steam](@ref env_steam)
|
||||
|
||||
[env_sun](@ref env_sun)
|
||||
|
||||
[func_areaportal](@ref func_areaportal)
|
||||
|
||||
[func_areaportalwindow](@ref func_areaportalwindow)
|
||||
|
||||
[func_breakable](@ref func_breakable)
|
||||
|
||||
[func_brush](@ref func_brush)
|
||||
|
||||
[func_button](@ref func_button)
|
||||
|
||||
[func_conveyor](@ref func_conveyor)
|
||||
|
||||
[func_detail](@ref func_detail)
|
||||
|
||||
[func_detail_illusionary](@ref func_detail_illusionary)
|
||||
|
||||
[func_door](@ref func_door)
|
||||
|
||||
[func_door_rotating](@ref func_door_rotating)
|
||||
|
||||
[func_dustcloud](@ref func_dustcloud)
|
||||
|
||||
[func_dustmotes](@ref func_dustmotes)
|
||||
|
||||
[func_friction](@ref func_friction)
|
||||
|
||||
[func_group](@ref func_group)
|
||||
|
||||
[func_guntarget](@ref func_guntarget)
|
||||
|
||||
[func_healthcharger](@ref func_healthcharger)
|
||||
|
||||
[func_illusionary](@ref func_illusionary)
|
||||
|
||||
[func_ladder](@ref func_ladder)
|
||||
|
||||
[func_lod](@ref func_lod)
|
||||
|
||||
[func_monitor](@ref func_monitor)
|
||||
|
||||
[func_monsterclip](@ref func_monsterclip)
|
||||
|
||||
[func_mortar_field](@ref func_mortar_field)
|
||||
|
||||
[func_pendulum](@ref func_pendulum)
|
||||
|
||||
[func_physbox](@ref func_physbox)
|
||||
|
||||
[func_plat](@ref func_plat)
|
||||
|
||||
[func_platrot](@ref func_platrot)
|
||||
|
||||
[func_pushable](@ref func_pushable)
|
||||
|
||||
[func_recharge](@ref func_recharge)
|
||||
|
||||
[func_rot_button](@ref func_rot_button)
|
||||
|
||||
[func_rotating](@ref func_rotating)
|
||||
|
||||
[func_smokevolume](@ref func_smokevolume)
|
||||
|
||||
[func_tank](@ref func_tank)
|
||||
|
||||
[func_tankcontrols](@ref func_tankcontrols)
|
||||
|
||||
[func_tankmortar](@ref func_tankmortar)
|
||||
|
||||
[func_trackchange](@ref func_trackchange)
|
||||
|
||||
[func_tracktrain](@ref func_tracktrain)
|
||||
|
||||
[func_train](@ref func_train)
|
||||
|
||||
[func_traincontrols](@ref func_traincontrols)
|
||||
|
||||
[func_vehicle](@ref func_vehicle)
|
||||
|
||||
[func_vehiclecontrols](@ref func_vehiclecontrols)
|
||||
|
||||
[func_wall](@ref func_wall)
|
||||
|
||||
[func_wall_toggle](@ref func_wall_toggle)
|
||||
|
||||
[game_counter](@ref game_counter)
|
||||
|
||||
[game_counter_set](@ref game_counter_set)
|
||||
|
||||
[game_end](@ref game_end)
|
||||
|
||||
[game_player_equip](@ref game_player_equip)
|
||||
|
||||
[game_player_hurt](@ref game_player_hurt)
|
||||
|
||||
[game_player_team](@ref game_player_team)
|
||||
|
||||
[game_score](@ref game_score)
|
||||
|
||||
[game_team_master](@ref game_team_master)
|
||||
|
||||
[game_team_set](@ref game_team_set)
|
||||
|
||||
[game_text](@ref game_text)
|
||||
|
||||
[game_zone_player](@ref game_zone_player)
|
||||
|
||||
[gibshooter](@ref gibshooter)
|
||||
|
||||
[info_hint](@ref info_hint)
|
||||
|
||||
[info_intermission](@ref info_intermission)
|
||||
|
||||
[info_landmark](@ref info_landmark)
|
||||
|
||||
[info_node](@ref info_node)
|
||||
|
||||
[info_node_air](@ref info_node_air)
|
||||
|
||||
[info_notnull](@ref info_notnull)
|
||||
|
||||
[info_null](@ref info_null)
|
||||
|
||||
[info_particle_system](@ref info_particle_system)
|
||||
|
||||
[info_player_coop](@ref info_player_coop)
|
||||
|
||||
[info_player_deathmatch](@ref info_player_deathmatch)
|
||||
|
||||
[info_player_start](@ref info_player_start)
|
||||
|
||||
[info_teleport_destination](@ref info_teleport_destination)
|
||||
|
||||
[info_waypoint](@ref info_waypoint)
|
||||
|
||||
[infodecal](@ref infodecal)
|
||||
|
||||
[item_food](@ref item_food)
|
||||
|
||||
[light](@ref light)
|
||||
|
||||
[light_dynamic](@ref light_dynamic)
|
||||
|
||||
[light_environment](@ref light_environment)
|
||||
|
||||
[light_surface](@ref light_surface)
|
||||
|
||||
[logic_achievement](@ref logic_achievement)
|
||||
|
||||
[logic_auto](@ref logic_auto)
|
||||
|
||||
[logic_case](@ref logic_case)
|
||||
|
||||
[logic_relay](@ref logic_relay)
|
||||
|
||||
[logic_timer](@ref logic_timer)
|
||||
|
||||
[momentary_door](@ref momentary_door)
|
||||
|
||||
[momentary_rot_button](@ref momentary_rot_button)
|
||||
|
||||
[monster_furniture](@ref monster_furniture)
|
||||
|
||||
[monster_generic](@ref monster_generic)
|
||||
|
||||
[monstermaker](@ref monstermaker)
|
||||
|
||||
[multi_manager](@ref multi_manager)
|
||||
|
||||
[multisource](@ref multisource)
|
||||
|
||||
[path_corner](@ref path_corner)
|
||||
|
||||
[path_track](@ref path_track)
|
||||
|
||||
[phys_ballsocket](@ref phys_ballsocket)
|
||||
|
||||
[phys_constraint](@ref phys_constraint)
|
||||
|
||||
[phys_constraintsystem](@ref phys_constraintsystem)
|
||||
|
||||
[phys_convert](@ref phys_convert)
|
||||
|
||||
[phys_hinge](@ref phys_hinge)
|
||||
|
||||
[phys_keepupright](@ref phys_keepupright)
|
||||
|
||||
[phys_rope](@ref phys_rope)
|
||||
|
||||
[phys_slideconstraint](@ref phys_slideconstraint)
|
||||
|
||||
[player_loadsaved](@ref player_loadsaved)
|
||||
|
||||
[player_weaponstrip](@ref player_weaponstrip)
|
||||
|
||||
[point_camera](@ref point_camera)
|
||||
|
||||
[point_message](@ref point_message)
|
||||
|
||||
[point_servercommand](@ref point_servercommand)
|
||||
|
||||
[point_spotlight](@ref point_spotlight)
|
||||
|
||||
[point_trigger](@ref point_trigger)
|
||||
|
||||
[prop_dynamic](@ref prop_dynamic)
|
||||
|
||||
[prop_physics](@ref prop_physics)
|
||||
|
||||
[prop_physics_multiplayer](@ref prop_physics_multiplayer)
|
||||
|
||||
[prop_rope](@ref prop_rope)
|
||||
|
||||
[prop_static](@ref prop_static)
|
||||
|
||||
[prop_vehicle_driveable](@ref prop_vehicle_driveable)
|
||||
|
||||
[random_speaker](@ref random_speaker)
|
||||
|
||||
[random_trigger](@ref random_trigger)
|
||||
|
||||
[script_brushmodel](@ref script_brushmodel)
|
||||
|
||||
[script_model](@ref script_model)
|
||||
|
||||
[script_origin](@ref script_origin)
|
||||
|
||||
[script_struct](@ref script_struct)
|
||||
|
||||
[script_vehicle](@ref script_vehicle)
|
||||
|
||||
[scripted_sentence](@ref scripted_sentence)
|
||||
|
||||
[scripted_sequence](@ref scripted_sequence)
|
||||
|
||||
[sky_camera](@ref sky_camera)
|
||||
|
||||
[speaker](@ref speaker)
|
||||
|
||||
[targ_speaker](@ref targ_speaker)
|
||||
|
||||
[target_cdaudio](@ref target_cdaudio)
|
||||
|
||||
[trigger_auto](@ref trigger_auto)
|
||||
|
||||
[trigger_autosave](@ref trigger_autosave)
|
||||
|
||||
[trigger_camera](@ref trigger_camera)
|
||||
|
||||
[trigger_cdaudio](@ref trigger_cdaudio)
|
||||
|
||||
[trigger_changelevel](@ref trigger_changelevel)
|
||||
|
||||
[trigger_changetarget](@ref trigger_changetarget)
|
||||
|
||||
[trigger_counter](@ref trigger_counter)
|
||||
|
||||
[trigger_endsection](@ref trigger_endsection)
|
||||
|
||||
[trigger_gravity](@ref trigger_gravity)
|
||||
|
||||
[trigger_hurt](@ref trigger_hurt)
|
||||
|
||||
[trigger_look](@ref trigger_look)
|
||||
|
||||
[trigger_monsterjump](@ref trigger_monsterjump)
|
||||
|
||||
[trigger_multiple](@ref trigger_multiple)
|
||||
|
||||
[trigger_once](@ref trigger_once)
|
||||
|
||||
[trigger_playerfreeze](@ref trigger_playerfreeze)
|
||||
|
||||
[trigger_push](@ref trigger_push)
|
||||
|
||||
[trigger_relay](@ref trigger_relay)
|
||||
|
||||
[trigger_teleport](@ref trigger_teleport)
|
||||
|
||||
[trigger_transition](@ref trigger_transition)
|
||||
|
||||
[worldspawn](@ref worldspawn)
|
||||
|
|
@ -9,6 +9,8 @@ This is a software development kit (SDK) and development environment created by
|
|||
The Nuclide project produces a freely available game-logic component and
|
||||
development platform on top of [FTEQW](https://www.fteqw.org); which is the engine we happen to use.
|
||||
|
||||
**The general idea is that Nuclide takes care of ~90% of the code you shouldn't have to worry about.**
|
||||
|
||||
The goal is to create a modern research base for new advancements, as well
|
||||
as to have a stable base with a decent API for making games.
|
||||
|
||||
|
@ -16,13 +18,17 @@ It comes with a simple example game (simply referred to as 'Base') and some test
|
|||
|
||||
General feature overview:
|
||||
|
||||
- SDK in the spirit of 'id Tech' development environments
|
||||
- Client-side predicted movement, predicted weapons and vehicle systems
|
||||
- Implementations of well known, established entity classes as seen in popular and critically acclaimed games
|
||||
- Reference implementations for a lot of features exlusive to the FTEQW engine
|
||||
- Designed to be familar to developers who are used to GoldSrc and Source engine
|
||||
project workflows
|
||||
- Everything written from scratch with the modern QuakeC language advancements in mind
|
||||
- The 'missing' SDK for engines like FTEQW
|
||||
- Support for client-side predicted movement, weaponry and vehicles
|
||||
- Documented APIs for everything you need to interface with the engine
|
||||
- APIs and Frameworks for managing updates, mods, servers, and platform specific features
|
||||
- Complete re-implementations of hundreds of entities, from GoldSrc/Source engine games
|
||||
- Entity communication via traditional one-way triggers, or our Source Engine I/O compatible system
|
||||
- Includes BotLib, a framework for multiplayer-AI that can receive game-specific overrides
|
||||
- Includes VGUILib, a re-imagining of Valve's GUI library, which can also be used for in-game surface based interfaces
|
||||
- Designed to be familar to developers coming from GoldSrc/Source
|
||||
- VR/XR aware codebase
|
||||
- All permissively licensed
|
||||
|
||||
### 1. Why might I want to use it? {#why}
|
||||
|
||||
|
@ -67,9 +73,9 @@ If you do posess a basic knowledge of the following:
|
|||
|
||||
Then you will have a good time.
|
||||
We strive to keep the codebase portable and conform to open standards wherever possible.
|
||||
This means that if you develop on Windows, you probably want to install something like [Cygwin](https://www.cygwin.com/) to make this bearable.
|
||||
This means that if you develop on Windows, you probably want to install something like WSL or even [Cygwin](https://www.cygwin.com/) to make this bearable.
|
||||
|
||||
Please don't ask us how to learn UNIX/Cygwin.
|
||||
Please don't ask us how to use WSL or Cygwin. We do not provide support for either. We do not develop on Windows.
|
||||
|
||||
**This is a development kit and a development environment. This is not a game.**
|
||||
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
# MapC Scripting
|
||||
|
||||
**Notice: This is an uncomitted document and is subject to change.**
|
||||
|
||||
Powered by the engine's multi-progs capability, maps can run their own isolated logic.
|
||||
This is inspired by the original MapC effort by [Team Fortress Software/Valve](https://web.archive.org/web/19990221213004/http://www.teamfortress.com:80/tfii/mc2.html) that never got off the ground.
|
||||
|
||||
Ritual's ĂśberTools for Quake III also had a scripting system for each map, this is comparable to that also. The same extends to the **GSC** scripts found in Call of Duty that each map has.
|
||||
|
||||
If you're curious about use-cases, you should make yourself familar with what those games do.
|
||||
|
||||
## MapC versus QuakeC
|
||||
|
||||
MapC is basically a superset of QuakeC.
|
||||
You essentially write valid SSQC, but there's extra helper functions that you can use to communicate with entities from the server-side progs. Concepts that are alien to regular QuakeC code.
|
||||
|
||||
If a `mapscript.dat` is next to the map of the same name (`mapscript.bsp`), it will be included into the game.
|
||||
|
||||
An example source file from Nuclide's `base/test_maps.pk3dir/maps/mapscript.mapC`:
|
||||
|
||||
```cpp
|
||||
#pragma PROGS_DAT "mapscript.dat"
|
||||
|
||||
#include "../../../src/server/mapC.h"
|
||||
|
||||
void main()
|
||||
{
|
||||
entity spawnPoint = spawnClass("info_player_start", [0, 0, 128]);
|
||||
spawnPoint.angles = [0, random(-180, 180), 0];
|
||||
spawnPoint.targetname = "SPSpawn";
|
||||
|
||||
spawnPoint = spawnClass("info_player_deathmatch", [0, 0, 128]);
|
||||
spawnPoint.angles = [0, random(-180, 180), 0];
|
||||
spawnPoint.targetname = "MPSpawn";
|
||||
}
|
||||
```
|
||||
|
||||
Here you can see that while we stick to the `entity` base type, we do get to use a new function to spawn entities: `spawnclass(string className, desiredPosition)`.
|
||||
|
||||
This ensures that the server-side progs gets to load all available [EntityDef](EntityDef.md) based entities, as well as all internal, available, class-based entities - and sends those to our map-specific progs.
|
||||
|
||||
If you don't use spawnClass(), expect to not be able to use the I/O system with the entity.
|
||||
|
||||
To have access to all features, make sure to include `mapC.h` from Nuclide's `src/server` directory. That file will continously be updated to add more functionality.
|
||||
|
||||
You can compile the MapC file with fteqcc (`fteqcc mapscript.mapC`) to receive `mapscript.dat`.
|
||||
|
||||
Like with regular QuakeC progs, you only have to include the resulting .dat with your game - although we encourage you to release the sources to all progs for modders and tinkerers to enjoy. It's also a way for users to support the game themselves in case you're no longer able to support it.
|
||||
|
||||
## Use cases, benefits
|
||||
|
||||
When it comes to managing the complexity of events in games like the Call of Duty series, this is a desired substitute to hundreds (sometimes thousands) of entities.
|
||||
|
||||
Boxing the map-specific logic also aids portability. With less dependence on Nuclide or other internal functions to organize and schedule most of its logic, forward compatibility is easily achieved.
|
||||
|
||||
The design has been proven across dozens of games within the Call of Duty series, with little to no changes - serving for both single and multiplayer logic. Managing waves of enemies, or writing entire game-modes using this type of set-up has been proven.
|
||||
|
||||
## Extra features over Vanilla SSQC
|
||||
|
||||
These extra functions are available to MapC programs:
|
||||
|
||||
### spawnClass(className, desiredPos)
|
||||
|
||||
Spawns the specified entity class name at the desired position. If the classname does not exist, it will return a new info_notnull type entity with no model or collision for you to modify.
|
||||
|
||||
### sendInput(targetEntity, inputName, dataString, targetActivator)
|
||||
|
||||
Sends an input event to an NSEntity and with a specific activator. While that can be __NULL__, this, or world most of the time - some inputs very much depend on the activator being valid within their respective contexts.
|
||||
|
||||
## Map-specific entities
|
||||
|
||||
You can bundle an [EntityDef](EntityDef.md) file with your level, like with MapC progs they have to have the same filename as the map, but with the extension ending in '**def**' (e.g. `maps/mapscript.def`).
|
||||
|
||||
The entities within that EntityDef file will be exclusive to that map. No other map can spawn them. If you want to make an EntityDef available to all maps, move it into the `def/` directory of your game directory.
|
|
@ -0,0 +1,57 @@
|
|||
# Map Making
|
||||
|
||||
## Which Format You Should Use
|
||||
|
||||
That depends on the job. If you want to work with a modern format, comparable to that of a 2004 game engine and beyond, any variant of Quake III Arena's BSP format can do.
|
||||
We aim to support everything equally.
|
||||
|
||||
For a more authentic, 1990s experience you may want to use Quake II's format instead.
|
||||
|
||||
We have our own variant of the BSP format, which can be compiled by using [vmap](VMap.md).
|
||||
|
||||
### Quake BSP
|
||||
|
||||
This is the default format that all the Quake tools, such as [ericw-tools](https://ericwa.github.io/ericw-tools/) compile into. If you exceed limits, they generally will generate a **"BSP2"** file, which is something our engine also understands. The original engine and format only did monochrome color. This is no issue any longer because modern compilers output so called **lit** files, which contain colored lightmaps externally. If a Quake engine supports colored lights, they'll usually load them automatically.
|
||||
|
||||
However, creating non-planar surfaces or changing the lightmap quality on individual surfaces is not supported in this format. If you want to use features such as crouching or proning you have to compile your map with **BSPX** extensions. Other formats also include more features, which can help optimise the network and rendering performance of a level. So use of this format is discouraged by us.
|
||||
|
||||
You can totally use it if you're going for a certain aesthetic, just be aware of its limitations. You cannot optimise levels beyond a certain point due to a lack of area-portals which were introduced with Quake II BSP.
|
||||
|
||||
### Quake II BSP
|
||||
|
||||
A better choice over Quake's standard BSP format. These support area-portals and proper detail brushes can help optimise the level even further.
|
||||
|
||||
### Quake III Arena BSP
|
||||
|
||||
**The recommended format.** Support for everything Quake II's BSP does, but you can now put a lot of detailed geometry into so called triangle soup, and design your own content volumes (beyond water, lava, slime), and surface flags (make bullets ricochet, or leak water) - make use of curved surfaces, massive maps with terrain and texture blending. Support for different lightmap scales per surface, and alternative vertex-lit levels can also give you tigter controls about lighting performance and visual fidelity.
|
||||
|
||||
### VMAP compiled BSP
|
||||
|
||||
Our own version of the Quake III Arena BSP format. It supports a bunch of new things.
|
||||
The compiler doesn't read .shader files from `scripts/` but instead `.mat` files alongside the textures within the textures directory, as well as a custom patch/curve format.
|
||||
|
||||
Only use this if you really, really want to use the things we developed. You will have a smoother experience with most other formats right now.
|
||||
|
||||
### Other Formats
|
||||
|
||||
While the engine can read other formats, such as BSP30 and beyond - please ensure you do have the rights to use the tools in such fashion. For example, for developers coming from the Half-Life SDK you are not allowed to use compilers and versions deriving from the original sources to make maps for Nuclide based projects. You will have to negotiate a license with Valve or use a free-software tool such as [ericw-tools](https://ericwa.github.io/ericw-tools/).
|
||||
|
||||
## Recommended Tools
|
||||
|
||||
We don't require you to use WorldSpawn or VMAP. You can use any of the above formats, and whatever editor you like to use to get the job done.
|
||||
|
||||
Here's a list of popular editors we've seen people use successfully:
|
||||
|
||||
- NetRadiant-Custom
|
||||
- TrenchBroom
|
||||
- NetRadiant
|
||||
- GtkRadiant
|
||||
- QuArK
|
||||
- JACK (proprietary)
|
||||
|
||||
However we do not provide support for any of them. Please talk to the developers of the respective tools if you're experiencing issues. First ensure that you're able to make levels for your target format.
|
||||
|
||||
For example, create an example map for Quake, test it in Quake and then copy it into your Nuclide directory after verifying it works and that the workflow is right for you.
|
||||
You may need to switch tools if you're not comfortable, and only once you're fully set and familar with the map-making toolchain should you attempt to run the maps in Nuclide.
|
||||
|
||||
As map-making is a complicated process, a lot of issues you can run into while making levels for Nuclide, may actually be issues with the toolchain you're using to make the map. So verify it works in the target format's game of choice first.
|
|
@ -9,8 +9,8 @@
|
|||
Determines the alpha test function used when rendering this surface.
|
||||
|
||||
Valid values are **GT0**, **LT128**, and **GE128**. These correspond to
|
||||
**"GREATER THAN 0"**, **"LESS THAN 128"**, and **"GREATER THAN OR EQUAL
|
||||
TO 128"**.
|
||||
**GREATER THAN 0**, **LESS THAN 128**, and **GREATER THAN OR EQUAL
|
||||
TO 128**.
|
||||
|
||||
This function is used when determining if a pixel should be written to
|
||||
the frame-buffer. For example, if **GT0** is specified, the only the
|
||||
|
@ -18,13 +18,12 @@ portions of the texture map with corresponding alpha values greater than
|
|||
zero will be written to the framebuffer. **By default alpha testing is
|
||||
disabled.**
|
||||
|
||||
Both alpha testing and normal [alpha
|
||||
blending](blendFunc) can be used to get
|
||||
Both alpha testing and normal [alpha blending](blendfunc.md) can be used to get
|
||||
textures that have see-through parts. The difference is that
|
||||
**alphaFunc** is an all-or-nothing test, while blending smoothly blends
|
||||
between opaque and translucent at pixel edges.
|
||||
|
||||
Alpha test can also be used with
|
||||
[depthWrite](depthWrite), allowing other
|
||||
[depthWrite](depthwrite.md), allowing other
|
||||
effects to be conditionally layered on top of just the opaque pixels by
|
||||
setting [depthFunc](depthFunc) to equal.
|
||||
setting [depthFunc](depthfunc.md) to equal.
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
### Overview
|
||||
|
||||
The alpha channel can be specified like the [rgb
|
||||
channels](rgbGen). If not specified, it
|
||||
The alpha channel can be specified like the [rgb channels](rgbgen.md). If not specified, it
|
||||
defaults to 1.0.
|
||||
|
||||
### Functions {#functions}
|
||||
|
@ -15,7 +14,7 @@ defaults to 1.0.
|
|||
#### portal {#portal}
|
||||
|
||||
This rendering stage keyword is used in conjunction with the
|
||||
[surfaceparm](surfaceparm) keyword
|
||||
[surfaceparm](surfaceparm.md) keyword
|
||||
portal. The function accomplishes the "fade" that causes the scene in
|
||||
the portal to fade from view. Specifically, it means "Generate alpha
|
||||
values based on the distance from the viewer to the portal."
|
||||
|
|
|
@ -23,10 +23,10 @@ It accepts the standard **wave** functions of the type: **sin**,
|
|||
**triangle**, **square**, **sawtooth** or **inversesawtooth**.
|
||||
|
||||
The "div" parameter is used to control the wave "spread" - a value equal
|
||||
to the [tessSize](vmap_tessSize) of the
|
||||
to the [tessSize](vmap_tesssize.md) of the
|
||||
surface is a good default value.
|
||||
|
||||
#### normal <siv> <func> <base> <amplitude ~0.1-~0.5> <frequency ~1.0-~4.0> {#normal_amplitude_0.1_0.5_frequency_1.0_4.0}
|
||||
#### normal <siv> <func> <base> <amplitude> <frequency> {#normal_amplitude}
|
||||
|
||||
This deformation affects the normals of a vertex without actually moving
|
||||
it, which will effect later material options like lighting and
|
||||
|
@ -43,14 +43,14 @@ rain, flags.
|
|||
This forces a bulge to move along the given s and t directions. Designed
|
||||
for use on curved pipes.
|
||||
|
||||
#### move<x> <y> <z> <func> <base> <amplitude> <phase> <freq> {#move}
|
||||
#### move <x> <y> <z> <func> <base> <amplitude> <phase> <freq> {#move}
|
||||
|
||||
This keyword is used to make a brush, curve patch or model appear to
|
||||
move together as a unit. The **<x>** **<y>** and **<z>** values are the
|
||||
move together as a unit. The **x** **y** and **z** values are the
|
||||
distance and direction in game units the object appears to move relative
|
||||
to it's point of origin in the map.
|
||||
|
||||
The **<func> <base> <amplitude> <phase>** and **<freq>** values are the
|
||||
The **func base amplitude phase** and **freq** values are the
|
||||
same as found in other wave form manipulations.
|
||||
|
||||
The product of the function modifies the values x, y, and z.Therefore,
|
||||
|
@ -101,9 +101,9 @@ smaller wave forms occurring in a given area. Larger values create a
|
|||
lesser density of waves, or otherwise put, the appearance of larger
|
||||
waves. To look correct this value should closely correspond to the value
|
||||
(in pixels) set for
|
||||
[tessSize](vmap_tessSize) of the texture.
|
||||
[tessSize](vmap_tesssize.md) of the texture.
|
||||
A value of 100.0 is a good default value (which means your
|
||||
[tessSize](vmap_tessSize) should be close
|
||||
[tessSize](vmap_tesssize.md) should be close
|
||||
to that for things tolook "wavelike").
|
||||
|
||||
#### <func> {#section_1}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
### Overview
|
||||
|
||||
By default, writes to the depth buffer when
|
||||
[depthFunc](depthFunc) passes will happen
|
||||
[depthFunc](depthfunc.md) passes will happen
|
||||
for opaque surfaces and not for translucent surfaces.
|
||||
|
||||
Blended surfaces can have the depth writes forced with this function.
|
|
@ -7,15 +7,15 @@
|
|||
### Overview
|
||||
|
||||
**Note**: you must also specify "surfaceparm fog" to cause
|
||||
[vmap](vmap) to identify the surfaces inside the volume.
|
||||
[vmap](vmap.md) to identify the surfaces inside the volume.
|
||||
Fogparms only describes how to render the fog on the surfaces.
|
||||
|
||||
**<red value> <green value> <blue value>** These are normalized values.
|
||||
**red value, green value, blue value**: These are normalized values.
|
||||
To obtain the values that define fog color divide the desired color's
|
||||
Red, Green and Blue values by 255 to obtain three normalized numbers
|
||||
within the 0.0 to 1.0 range.
|
||||
|
||||
**<distance toopaque>** This is the distance, in game units, until the
|
||||
**distance to opaque**: This is the distance, in game units, until the
|
||||
fog becomes totally opaque, as measured from the point of view of the
|
||||
observer. By making the height of the fog brush shorter than the
|
||||
distance to opaque, the apparent density of the fog can be reduced
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
### Overview
|
||||
|
||||
Similar to [vmap_surfaceModel (Material
|
||||
Command)](vmap_surfaceModel), however
|
||||
Similar to [vmap_surfaceModel (vmap_surfacemodel.md), however
|
||||
it'll place models at runtime. The density can be controlled via the
|
||||
cvar `r_clutter_density`.
|
|
@ -9,17 +9,17 @@
|
|||
The texture is essentially a fullbright overlay on top of the
|
||||
diffuse/albedomap.
|
||||
|
||||
Not all [Shaders](Shaders) support them. In some, like the
|
||||
[unlit](unlit_(Shader)) shader, the
|
||||
[diffusemap](diffusemap) is always
|
||||
Not all [Shaders](Shaders.md) support them. In some, like the
|
||||
[unlit](unlit.md) shader, the
|
||||
[diffusemap](diffusemap.md) is always
|
||||
fullbright.
|
||||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [normalmap](normalmap)
|
||||
- [specularmap](specularmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectmask](reflectmask)
|
||||
- [reflectcube](reflectcube)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [normalmap](normalmap.md)
|
||||
- [specularmap](specularmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectmask](reflectmask.md)
|
||||
- [reflectcube](reflectcube.md)
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
### Overview
|
||||
|
||||
This implies [noPicMip](noPicMip), but
|
||||
This implies [noPicMip](nopicmip.md), but
|
||||
also prevents the generation of any lower resolution mipmaps for use by
|
||||
the 3d card. This will cause the texture to alias when it gets smaller,
|
||||
but there are some cases where you would rather have this than a blurry
|
||||
|
|
|
@ -18,10 +18,10 @@ Check out our [Normal mapping guide](Normal_mapping_guide).
|
|||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [specularmap](specularmap)
|
||||
- [fullbrightmap](fullbrightmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectmask](reflectmask)
|
||||
- [reflectcube](reflectcube)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [specularmap](specularmap.md)
|
||||
- [fullbrightmap](fullbrightmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectmask](reflectmask.md)
|
||||
- [reflectcube](reflectcube.md)
|
|
@ -4,11 +4,11 @@
|
|||
material. It also accepts arguments that will recompile a shader with
|
||||
certain permutations. This is kinda ugly,
|
||||
|
||||
Starting in [The Wastes](The_Wastes) 1.2, there are the
|
||||
Starting in **The Wastes 1.2**, there are the
|
||||
following shader programs available to you:
|
||||
|
||||
- program [unlit](unlit_(Shader))
|
||||
- program [lightmapped](lightmapped_(Shader))
|
||||
- program [vertexlit](vertexlit_(Shader))
|
||||
- program [water](water_(Shader))
|
||||
- program [refract](refract_(Shader))
|
||||
- program [unlit](unlit.md)
|
||||
- program [lightmapped](lightmapped.md)
|
||||
- program [vertexlit](vertexlit.md)
|
||||
- program [water](water.md)
|
||||
- program [refract](refract.md)
|
|
@ -11,10 +11,10 @@ will pass the nearest in-world cubemap instead.
|
|||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [normalmap](normalmap)
|
||||
- [specularmap](specularmap)
|
||||
- [fullbrightmap](fullbrightmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectmask](reflectmask)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [normalmap](normalmap.md)
|
||||
- [specularmap](specularmap.md)
|
||||
- [fullbrightmap](fullbrightmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectmask](reflectmask.md)
|
|
@ -8,18 +8,18 @@
|
|||
|
||||
Defines a texture that specifies which parts of a material will reveal a
|
||||
reflective material, such as a
|
||||
[cubemap](reflectcube). This applies to
|
||||
[cubemap](reflectcube.md). This applies to
|
||||
standard FTEQW. In Nuclide the reflectmask is currently unused with the
|
||||
included shaders. If you want to apply reflectivity to your materials,
|
||||
use the alpha channel of your
|
||||
[normalmap](normalmap) instead.
|
||||
[normalmap](normalmap.md) instead.
|
||||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [normalmap](normalmap)
|
||||
- [specularmap](specularmap)
|
||||
- [fullbrightmap](fullbrightmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectcube](reflectcube)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [normalmap](normalmap.md)
|
||||
- [specularmap](specularmap.md)
|
||||
- [fullbrightmap](fullbrightmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectcube](reflectcube.md)
|
|
@ -13,20 +13,20 @@ to use for color, intensity etc.
|
|||
The renderer will take it into account only if you do not supply any
|
||||
Stages in the material.
|
||||
|
||||
**<farbox>** Specifies a set of files to use as an environment box
|
||||
**farbox**: Specifies a set of files to use as an environment box
|
||||
behind all cloudlayers. Specify "-" for no farbox, or a file base name.
|
||||
A base name of "env/test" would look for files "env/test_rt.tga",
|
||||
"env/test_lf.tga", "env/test_ft.tga", "env/test_bk.tga",
|
||||
"env/test_up.tga", "env/test_dn.tga" to use as the right / left / front
|
||||
/ back / up / down sides.
|
||||
|
||||
**<cloudheight>** controls apparent curvature of the cloud layers -
|
||||
**cloudheight**: controls apparent curvature of the cloud layers -
|
||||
lower numbers mean more curvature (and thus more distortion at the
|
||||
horizons). Higher height values create "flatter" skies with less horizon
|
||||
distortion. Think of height as the radius of a sphere on which the
|
||||
clouds are mapped. Good ranges are 64 to 256. The default value is 128.
|
||||
|
||||
**<nearbox>** Specified as farbox, to be alpha blended ontop of the
|
||||
**nearbox**: Specified as farbox, to be alpha blended ontop of the
|
||||
clouds. This has not be tested in a long time, so it probably doesn't
|
||||
actually work. Set to "-" to ignore.
|
||||
|
||||
|
|
|
@ -13,10 +13,10 @@ texture it for other purposes, too.
|
|||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [normalmap](normalmap)
|
||||
- [fullbrightmap](fullbrightmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectmask](reflectmask)
|
||||
- [reflectcube](reflectcube)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [normalmap](normalmap.md)
|
||||
- [fullbrightmap](fullbrightmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectmask](reflectmask.md)
|
||||
- [reflectcube](reflectcube.md)
|
|
@ -8,9 +8,9 @@ by the renderer. A few keywords will only apply to any one of them.
|
|||
All surfaceparm keywords are preceded by the word surfaceparm as
|
||||
follows:
|
||||
|
||||
:
|
||||
|
||||
: surfaceparm **fog**
|
||||
```
|
||||
surfaceparm **fog**
|
||||
```
|
||||
|
||||
### Behaviour Keywords {#behaviour_keywords}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
## tcmod
|
||||
### Syntax
|
||||
|
||||
**tcMod <func> <…>**
|
||||
**tcMod <func> [...]**
|
||||
|
||||
### Overview
|
||||
|
||||
|
@ -26,7 +26,7 @@ specified. In otherwords, if you see:
|
|||
 tcMod scroll 1 1
|
||||
```
|
||||
|
||||
Then the texture coordinates will be **scaled then**scrolled'''.
|
||||
Then the texture coordinates will be **scaled** then **scrolled**.
|
||||
|
||||
### Functions {#functions}
|
||||
|
||||
|
@ -81,20 +81,20 @@ Stretches the texture coordinates with the given function. Stretching is
|
|||
defined as stretching the texture coordinate away from the center of the
|
||||
polygon and then compressing it towards the center of the polygon.
|
||||
|
||||
**<base>**: A base value of one is the original dimension of the texture
|
||||
**base**: A base value of one is the original dimension of the texture
|
||||
when it reaches the stretch stage. Inserting other '''values positive or
|
||||
negative in this variable will produce unknown effects.
|
||||
|
||||
**<amplitude>**: This is the measurement of distance the texture will
|
||||
**amplitude**: This is the measurement of distance the texture will
|
||||
stretch from the base size. It is measured, like scroll, in textures. A
|
||||
value of 1 here will double the size of the texture at its peak.
|
||||
|
||||
**<phase>**: See the explanation for phase under the deform vertexes
|
||||
**phase**: See the explanation for phase under the deform vertexes
|
||||
keyword.
|
||||
|
||||
**<frequency>**: this is wave peaks per second.
|
||||
**frequency**: this is wave peaks per second.
|
||||
|
||||
**<func>**:
|
||||
**func**:
|
||||
|
||||
- **Sin**: the texture expands smoothly to its peak dimension and then
|
||||
shrinks smoothly to its valley dimension in a flowing manner.
|
||||
|
@ -122,13 +122,13 @@ forth churning and swirling effect on the texture.
|
|||
|
||||
The parameters for this are defined as follows:
|
||||
|
||||
- **<base>**: Currently undefined.
|
||||
- **<amplitude>**: This is essentially the intensity of the
|
||||
- **base**: Currently undefined.
|
||||
- **amplitude**: This is essentially the intensity of the
|
||||
disturbance or twisting and squiggling of the texture.
|
||||
- **<phase>**: See the explanation for phase under the
|
||||
- **phase**: See the explanation for phase under the
|
||||
[deformvertexes](DeformVertexes)
|
||||
keyword.
|
||||
- **<freq>**: Frequency. This value is expressed as repetitions or
|
||||
- **freq**: Frequency. This value is expressed as repetitions or
|
||||
cycles of the wave per second. A value of one would cycle once per
|
||||
second. A value of 10 would cycle 10 times per second. A value of
|
||||
0.1 would cycle once every 10 seconds.
|
|
@ -126,4 +126,15 @@ destruction.
|
|||
this entity breaks.
|
||||
- **breakable_model <string>**: Which models to spawn when it breaks.
|
||||
- **breakable_count <int>**: The amount of models it'll spawn upon
|
||||
breaking.
|
||||
breaking.
|
||||
- **surfaceprop <string>**: Surfaceprop override for the object.
|
||||
|
||||
## Physics Object Commands {#physcommands}
|
||||
|
||||
These are only relevant for when you want to use a phyics object, or rather an object that's handled by NSPhysicsEntity, such as prop_physics.
|
||||
|
||||
- **mass <float>**: Mass of the object, in kilograms.
|
||||
- **volume <float>**: Volume of the object, in cubic meters.
|
||||
- **inertia <float>**: Inertia multiplier.
|
||||
- **damping <float>**: Linear movement damping multiplier.
|
||||
- **rotdamping <float>**: Angular movement damping multiplier.
|
|
@ -1,12 +1,7 @@
|
|||
# Sound: EAX
|
||||
# Sound: EFX {#EFX}
|
||||
|
||||
## EAX
|
||||
Creative Technology's **Environmental Audio Extensions**, also known as **EAX**, attempted to create more ambiance within video games by more accurately simulating a real-world audio environment.
|
||||
|
||||
|
||||
Due to the release of Windows Vista which deprecated the DirectSound3D API EAX was based on in 2007, Creative discouraged EAX implementation in favor of its [OpenAL](OpenAL.md)-based EFX equivalent.
|
||||
|
||||
|
||||
EFX is fully supported in **FTEQW** and exposed via user-friendly entities and scripting language in **Nuclide**.
|
||||
|
||||
## See also
|
||||
* [EFX](EFX.md)
|
||||
* [OpenAL](OpenAL.md)
|
||||
The release of Windows Vista deprecated the DirectSound3D API on which EAX relied on in 2007, so Creative Technology encouraged the move to OpenAL's EFX.
|
|
@ -1,16 +1,18 @@
|
|||
# Sound: EFX
|
||||
# Sound: EFX {#EFX}
|
||||
|
||||
## EFX
|
||||
|
||||
EFX is a system in [OpenAL](OpenAL.md) that delivers high quality sound reverberation. It is the successor to Creative's [Environmental Audio Extensions](EAX.md).
|
||||
|
||||
**Nuclide** offers abstraction for new and old entities relying on **digital signal processing**.
|
||||
|
||||
## Entities
|
||||
## Entities interacting with EFX
|
||||
|
||||
**env_sound** is most commonly used to change the environmental sound processing of a room/area.
|
||||
|
||||
In GoldSrc, it'll specify which enumeration of DSP preset to use for audio playback, in Nuclide however we just map it to a file in the filesystem.
|
||||
In GoldSrc, it'll specify which enumeration of DSP preset to use for audio playback, in Nuclide however we just map it to a definitions file in the filesystem. See **EFX files** below.
|
||||
|
||||
## EFX files
|
||||
## EFX defintion files
|
||||
|
||||
Entities that specify a EFX type, usually want to load one from a file.
|
||||
|
||||
|
@ -44,15 +46,17 @@ Here's an example one, `efx/city.efx`:
|
|||
|
||||
Most of the parameters are self explanatory.
|
||||
|
||||
## Debug cvars
|
||||
## Console Variables
|
||||
|
||||
With the cvar `>s_al_debug` you'll get an overlay of information about which EFX file is currently being used, as well as what every single parameter is set to.
|
||||
|
||||
You can refresh EFX definitions with a simple map restart.
|
||||
With the cvar `s_al_debug` set to 1 you'll get an overlay of information about which EFX file is currently being used, as well as what every single parameter is set to.
|
||||
|
||||
You can refresh EFX definitions with a map restart.
|
||||
|
||||
## Legacy translation table
|
||||
Here you can see which **.efx file** is responsible for handling a legacy **env_sound** room-type.
|
||||
|
||||
*This section describes behaviour specific to converting entities from Half-Life based levels into the Nuclide environment.*
|
||||
|
||||
Here you can see which **efx file** is responsible for handling a legacy **env_sound** room-type.
|
||||
|
||||
**roomtype ID**|**EFX file**
|
||||
:-----:|:-----:
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# The XR Subsystem
|
||||
|
||||
To support XR (which is the support for Virtual, Augmented or Mixed Reality output) we have a few routines that help deal with this.
|
||||
|
||||
## Classes related to XR
|
||||
|
||||
We have 3 NSXRInput class instances per NSClient class, which itself belongs to a NSXRSpace.
|
||||
|
||||
### Head
|
||||
|
||||
The head is an NSXRInput of type XR_INPUT_HEAD. Yes, a head is just like any other XR compatible controller. It has a gyro and it potentially has buttons the user can press.
|
||||
|
||||
### Hands
|
||||
|
||||
We have two hands available, that will identify themselves as XR_INPUT_LEFT or XR_INPUT_RIGHT respectively. These are your primary tools for interacting with the 3D world.
|
4
Doxyfile
4
Doxyfile
|
@ -878,8 +878,11 @@ INPUT = src/ \
|
|||
Documentation/Main.md \
|
||||
Documentation/Building.md \
|
||||
Documentation/Launching.md \
|
||||
Documentation/DedicatedServer.md \
|
||||
Documentation/Filesystem.md \
|
||||
Documentation/Networking.md \
|
||||
Documentation/Bots/BotOverview.md \
|
||||
Documentation/EntityGuide.md \
|
||||
Documentation/Classes.md \
|
||||
Documentation/Materials/MatOverview.md \
|
||||
Documentation/Materials/MatCommands.md \
|
||||
|
@ -890,6 +893,7 @@ INPUT = src/ \
|
|||
Documentation/Shaders/ \
|
||||
Documentation/Constants.md \
|
||||
Documentation/EntityDef.md \
|
||||
Documentation/MapC.md \
|
||||
Documentation/Surf_data.md \
|
||||
Documentation/Prop_data.md \
|
||||
Documentation/MapTweaks.md \
|
||||
|
|
28
README.md
28
README.md
|
@ -1,12 +1,27 @@
|
|||
# ![FTE Logo](Documentation/fte.svg) Nuclide - Software Development Kit
|
||||
|
||||
Software Development Kit, built around idTech with focus on advanced features and
|
||||
Software Development Kit, built around id Technology with focus on advanced features and
|
||||
clean-room implementations of true-and-tested game-logic frameworks.
|
||||
It's been used to ship a commercial product. So it's proven to some extent.
|
||||
|
||||
*It's been used to ship a commercial product. So it's proven to some extent.*
|
||||
|
||||
All of this is written in QuakeC, but there's also some GLSL and shell scripts
|
||||
in here. If you and your team are unfamilar with any of these, you may want something else.
|
||||
|
||||
## Features
|
||||
|
||||
- The missing SDK for engines like FTEQW
|
||||
- Support for client-side predicted movement, weaponry and vehicles
|
||||
- Documented APIs for everything you need to interface with the engine
|
||||
- APIs and Frameworks for managing updates, mods, servers, and platform specific features
|
||||
- Complete re-implementations of hundreds of entities, from GoldSrc/Source engine games
|
||||
- Entity communication via traditional one-way triggers, or our Source Engine I/O compatible system
|
||||
- Includes BotLib, a framework for multiplayer-AI that can receive game-specific overrides
|
||||
- Includes VGUILib, a re-imagining of Valve's GUI library, which can also be used for in-game surface based interfaces
|
||||
- Designed to be familar to developers coming from GoldSrc/Source
|
||||
- VR/XR aware codebase
|
||||
- All permissively licensed
|
||||
|
||||
## Documentation
|
||||
|
||||
You can find up-to-date documentation over at https://developer.vera-visions.com/
|
||||
|
@ -14,10 +29,17 @@ You can find up-to-date documentation over at https://developer.vera-visions.com
|
|||
This documentation is built entirely from this repository using doxygen.
|
||||
You do not need to be on-line to view the documentation.
|
||||
|
||||
You can build the HTML documentation by running `doxygen` inside the root
|
||||
of the repository. The output is located under `Documentation/html/index.html`
|
||||
|
||||
## Support
|
||||
|
||||
You can get personal support for Nuclide by negotiating a support contract with us. Reach out to marco@vera-visions.com if you want to know about our rates.
|
||||
|
||||
## Special Thanks
|
||||
|
||||
To id software and specifically John Carmack for having released the sources of
|
||||
various pieces of id Technology under free licenses.
|
||||
various works of id Technology under free licenses, without which a project like this would be unfeasible.
|
||||
|
||||
David Walton for **FTEQW** and the **FTEQCC** compiler, which is the brain of this SDK.
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
FTEMANIFEST 1
|
||||
NAME "Test Game"
|
||||
GAME base
|
||||
BASEGAME platform
|
||||
BASEGAME base
|
||||
|
||||
// you don't really want to change these
|
||||
RTCBROKER master.frag-net.com:27950
|
||||
PROTOCOLNAME "Nuclide"
|
||||
MAINCONFIG nuclide.cfg
|
||||
DOWNLOADSURL ""
|
||||
|
||||
-exec platform_default.cfg
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<game
|
||||
type="hl"
|
||||
name="Nuclide"
|
||||
enginepath_linux="/usr/local/games/nuclide/"
|
||||
enginepath_win32="c:/vera/nuclide/"
|
||||
engine_win32="fteqw.exe"
|
||||
engine_linux="fteqw"
|
||||
basegame="platform"
|
||||
basegamename="Nuclide"
|
||||
unknowngamename="Nuclide Game Directory"
|
||||
default_scale="0.5"
|
||||
no_patch="0"
|
||||
no_bsp_monitor="0"
|
||||
show_wads="0"
|
||||
archivetypes="pk3"
|
||||
texturetypes="tga ktx"
|
||||
modeltypes="iqm"
|
||||
maptypes="mapq3"
|
||||
shaders="quake3"
|
||||
entityclass="quake3"
|
||||
entityclasstype="def"
|
||||
entities="quake3"
|
||||
brushtypes="quake"
|
||||
patchtypes="quake3"
|
||||
/>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<project version="2.0">
|
||||
<var name="vmap">"[RadiantPath]vmap" -v<cond value="[MonitorAddress]"> -connect [MonitorAddress]</cond> -game platform -fs_basepath "[EnginePath]"<cond value="[GameName]"> -fs_game [GameName]</cond></var>
|
||||
|
||||
|
||||
<build name="Fast Fullbright">
|
||||
<command>[vmap] -custinfoparms -threads 4 -samplesize 8 "[MapFile]"</command>
|
||||
<command>[vmap] -vis -v -fast "[MapFile]"</command>
|
||||
</build>
|
||||
|
||||
<build name="Fast">
|
||||
<command>[vmap] -custinfoparms -threads 4 -samplesize 8 "[MapFile]"</command>
|
||||
<command>[vmap] -vis -v -fast "[MapFile]"</command>
|
||||
<command>[vmap] -light -custinfoparms -v -samplesize 8 -fast -threads 4 -samples 4 -shade -shadeangle 60 -patchshadows "[MapFile]"</command>
|
||||
</build>
|
||||
|
||||
<build name="Full">
|
||||
<command>[vmap] -custinfoparms -threads 4 -samplesize 8 "[MapFile]"</command>
|
||||
<command>[vmap] -vis "[MapFile]"</command>
|
||||
<command>[vmap] -light -custinfoparms -samplesize 8 -fast -threads 4 -samples 4 -shade -shadeangle 60 -patchshadows "[MapFile]"</command>
|
||||
</build>
|
||||
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2022 Vera Visions LLC.
|
||||
* Copyright (c) 2016-2021 Marco Cawthorne <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -12,7 +12,7 @@
|
|||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
*/
|
||||
|
||||
struct
|
||||
{
|
||||
|
@ -25,11 +25,11 @@ struct
|
|||
} g_camBobVars[4], *pCamBob;
|
||||
|
||||
/* tilts the camera for a head-bob like effect when moving */
|
||||
void
|
||||
Camera_RunBob(__inout vector camera_angle)
|
||||
vector
|
||||
Camera_RunBob(vector camera_angle)
|
||||
{
|
||||
if (!autocvar(v_cambob, 1, "Enables bobbing effect for the first-person camera"))
|
||||
return;
|
||||
return camera_angle;
|
||||
|
||||
int s = (float)getproperty(VF_ACTIVESEAT);
|
||||
pCamBob = &g_camBobVars[s];
|
||||
|
@ -39,13 +39,16 @@ Camera_RunBob(__inout vector camera_angle)
|
|||
speed[2] = 0.0f;
|
||||
pCamBob->m_flSpeed = vlen(speed);
|
||||
|
||||
if (pCamBob->m_flSpeed > 330.0f)
|
||||
pCamBob->m_flSpeed = 330.0f;
|
||||
|
||||
/* don't bother on low speeds */
|
||||
if ( pCamBob->m_flSpeed < 5.0f ) {
|
||||
pCamBob->m_flMove = 0.0f;
|
||||
pCamBob->m_flTime = 0.0f; /* progress has halted, start anew */
|
||||
return;
|
||||
} else if (pSeat->m_ePlayer.flags & FL_ONGROUND) {
|
||||
pCamBob->m_flMove = clframetime * (pCamBob->m_flSpeed * 0.01);
|
||||
return camera_angle;
|
||||
} else {
|
||||
pCamBob->m_flMove = frametime * (pCamBob->m_flSpeed * 0.01);
|
||||
}
|
||||
|
||||
pCamBob->m_flTime = (pCamBob->m_flTime += pCamBob->m_flMove);
|
||||
|
@ -60,14 +63,15 @@ Camera_RunBob(__inout vector camera_angle)
|
|||
}
|
||||
|
||||
camera_angle[2] += pCamBob->m_flDelta;
|
||||
return camera_angle;
|
||||
}
|
||||
|
||||
/* applies a tilt to the camera for when we're strafing left to right */
|
||||
void
|
||||
Camera_StrafeRoll(__inout vector camera_angle)
|
||||
vector
|
||||
Camera_StrafeRoll(vector camera_angle)
|
||||
{
|
||||
if (!autocvar(v_camroll, 0, "Enables strafe-roll for the first-person camera"))
|
||||
return;
|
||||
return camera_angle;
|
||||
|
||||
float roll;
|
||||
makevectors(camera_angle);
|
||||
|
@ -76,4 +80,38 @@ Camera_StrafeRoll(__inout vector camera_angle)
|
|||
roll *= 0.015f;
|
||||
|
||||
camera_angle[2] += roll;
|
||||
return camera_angle;
|
||||
}
|
||||
|
||||
vector
|
||||
Camera_AddLean(vector viewAngle)
|
||||
{
|
||||
vector shift = anglesToRight(viewAngle);
|
||||
vector output;
|
||||
vector srcPos;
|
||||
float heightChange;
|
||||
player pl = (player)pSeat->m_ePlayer;
|
||||
|
||||
if (pSeat->m_iLeanDir > 0i) {
|
||||
pSeat->m_flLeaning += frametime * 5;
|
||||
} else if (pSeat->m_iLeanDir < 0i) {
|
||||
pSeat->m_flLeaning -= frametime * 5;
|
||||
} else {
|
||||
pSeat->m_flLeaning = lerp(pSeat->m_flLeaning, 0.0, frametime * 10);
|
||||
}
|
||||
|
||||
if (pSeat->m_flLeaning > 1.0) {
|
||||
pSeat->m_flLeaning = 1.0f;
|
||||
}
|
||||
|
||||
if (pSeat->m_flLeaning < -1.0) {
|
||||
pSeat->m_flLeaning = -1.0f;
|
||||
}
|
||||
|
||||
heightChange = cos(pSeat->m_flLeaning) * 4;
|
||||
srcPos = pl.GetEyePos();
|
||||
output = shift * (pSeat->m_flLeaning * 15.0);
|
||||
tracebox(srcPos, [-8,-8,-8], [8,8,8], srcPos + output, MOVE_NORMAL, pl);
|
||||
|
||||
return output * trace_fraction + (shift * -1.0) + [0, 0, heightChange];
|
||||
}
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
const float baseIconSize = 32.0;
|
||||
const float baseIconPadding = 16.0;
|
||||
|
||||
/* main entry */
|
||||
void
|
||||
HUD_Init(void)
|
||||
|
@ -24,6 +27,18 @@ HUD_Init(void)
|
|||
void
|
||||
HUD_Draw(void)
|
||||
{
|
||||
vector hudSize = g_view.GetHUDCanvasSize();
|
||||
vector iconPos = g_view.GetHUDCanvasPos() + (hudSize / 2);
|
||||
iconPos[1] = (hudSize[1] - baseIconSize) - baseIconPadding;
|
||||
|
||||
/* health, armor icons */
|
||||
drawpic(iconPos + [-((baseIconSize/2) + (baseIconPadding/2)), 0], "gfx/hud/health", [baseIconSize, baseIconSize], [1,1,1], 1.0f);
|
||||
drawpic(iconPos + [(baseIconSize/2) + (baseIconPadding/2), 0], "gfx/hud/armor", [baseIconSize, baseIconSize], [1,1,1], 1.0f);
|
||||
|
||||
/* ammo icon */
|
||||
iconPos[0] = (hudSize[0] - baseIconSize) - baseIconPadding;
|
||||
drawpic(iconPos, "gfx/hud/armor", [baseIconSize, baseIconSize], [1,1,1], 1.0f);
|
||||
|
||||
Textmenu_Draw();
|
||||
}
|
||||
|
||||
|
@ -31,4 +46,5 @@ HUD_Draw(void)
|
|||
void
|
||||
HUD_DrawSpectator(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma target fte_5768
|
||||
//#pragma flag enable assumeint
|
||||
#pragma progs_dat "../../csprogs.dat"
|
||||
|
||||
#define CSQC
|
||||
|
@ -23,15 +22,14 @@ defs.h
|
|||
|
||||
/* mod specific functions */
|
||||
../shared/include.src
|
||||
../../../base/src/client/draw.qc
|
||||
|
||||
draw.qc
|
||||
init.qc
|
||||
entities.qc
|
||||
camera.qc
|
||||
cmds.qc
|
||||
game_event.qc
|
||||
modelevent.qc
|
||||
viewmodel.qc
|
||||
view.qc
|
||||
hud.qc
|
||||
hud_weaponselect.qc
|
||||
scoreboard.qc
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2022 Vera Visions LLC.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void
|
||||
View_UpdateWeapon(player pl, entity vm, entity mflash)
|
||||
{
|
||||
/* only bother upon change */
|
||||
if (pSeat->m_iLastWeapon == pl.activeweapon) {
|
||||
return;
|
||||
}
|
||||
pSeat->m_iOldWeapon = pSeat->m_iLastWeapon;
|
||||
pSeat->m_iLastWeapon = pl.activeweapon;
|
||||
|
||||
if (!pl.activeweapon) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* hack, we changed the wep, move this into Game_Input/PMove */
|
||||
Weapons_Draw(pl);
|
||||
|
||||
/* we forced a weapon call outside the prediction,
|
||||
* thus we need to update all the net variables to
|
||||
* make sure these updates are recognized. this is
|
||||
* vile but it'll have to do for now */
|
||||
SAVE_STATE(pl.w_attack_next);
|
||||
SAVE_STATE(pl.w_idle_next);
|
||||
SAVE_STATE(pl.viewzoom);
|
||||
SAVE_STATE(pl.weapontime);
|
||||
|
||||
/* figure out when the attachments start. in FTE attachments for
|
||||
* HLMDL are treated as bones. they start at numbones + 1 */
|
||||
skel_delete(mflash.skeletonindex);
|
||||
mflash.skeletonindex = skel_create(vm.modelindex);
|
||||
pSeat->m_iVMBones = skel_get_numbones(mflash.skeletonindex) + 1;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2022 Vera Visions LLC.
|
||||
* Copyright (c) 2016-2021 Marco Cawthorne <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -12,11 +12,18 @@
|
|||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
*/
|
||||
|
||||
var float autocvar_v_bob = 0.01f;
|
||||
var float autocvar_v_bobcycle = 1.0f;
|
||||
var float autocvar_v_bobup = 0.5f;
|
||||
#define BOB_STRENGTH 0.02
|
||||
#define BOB_CYCLE 1.0
|
||||
#define BOB_UP 0.60
|
||||
|
||||
var vector autocvar_bg_bobAmplitudeDucked = [0.0075, 0.0065, 0.0000];
|
||||
var vector autocvar_bg_bobAmplitudeProne = [0.02, 0.005, 0.0000];
|
||||
var vector autocvar_bg_bobAmplitudeSprinting = [0.02, 0.014, 0.0000];
|
||||
var vector autocvar_bg_bobAmplitudeStanding = [0.007, 0.007, 0.0000];
|
||||
var float autocvar_bg_bobMax = 8.0;
|
||||
var float autocvar_player_sprintCameraBob = 0.5;
|
||||
|
||||
struct
|
||||
{
|
||||
|
@ -27,6 +34,9 @@ struct
|
|||
float m_flBobCycle;
|
||||
float m_flBobCycle2;
|
||||
float m_flSpeed;
|
||||
|
||||
float m_flViewBob;
|
||||
float m_flViewBob2;
|
||||
} g_viewBobVars[4], *pViewBob;
|
||||
|
||||
|
||||
|
@ -45,13 +55,20 @@ Viewmodel_CalcBob(void)
|
|||
float var_bob;
|
||||
float var_cycle;
|
||||
float var_up;
|
||||
bool isSprinting = pSeat->m_ePlayer.vv_flags & VFL_SPRINTING;
|
||||
bool isCrouching = pSeat->m_ePlayer.vv_flags & VFL_CROUCHING;
|
||||
|
||||
var_bob = autocvar_v_bob;
|
||||
var_cycle = autocvar_v_bobcycle;
|
||||
var_up = autocvar_v_bobup;
|
||||
// if (pSeatLocal->m_iSprinting && vlen(pSeat->m_vecPredictedVelocity) > 240)
|
||||
// isSprinting = true;
|
||||
|
||||
pViewBob->m_flBobTime += clframetime;
|
||||
pViewBob->m_flBobTime2 += clframetime;
|
||||
var_bob = BOB_STRENGTH;
|
||||
var_cycle = BOB_CYCLE;
|
||||
var_up = BOB_UP;
|
||||
|
||||
if (isSprinting)
|
||||
var_cycle *= autocvar_player_sprintCameraBob;
|
||||
|
||||
pViewBob->m_flBobTime += frametime;
|
||||
pViewBob->m_flBobCycle = pViewBob->m_flBobTime - (int)(pViewBob->m_flBobTime / var_cycle) * var_cycle;
|
||||
pViewBob->m_flBobCycle /= var_cycle;
|
||||
|
||||
|
@ -66,10 +83,11 @@ Viewmodel_CalcBob(void)
|
|||
pViewBob->m_flSpeed = vlen(vecVel);
|
||||
|
||||
flBob = pViewBob->m_flSpeed * var_bob;
|
||||
flBob = flBob * 0.3 + flBob * 0.7 * sin(pViewBob->m_flBobCycle);
|
||||
pViewBob->m_flBob = bound(-7, flBob, 4);
|
||||
flBob = flBob * sin(pViewBob->m_flBobCycle);
|
||||
pViewBob->m_flBob = flBob;
|
||||
|
||||
/* BOB2, which is half the cycle of bob1 */
|
||||
pViewBob->m_flBobTime2 += frametime;
|
||||
pViewBob->m_flBobCycle2 = pViewBob->m_flBobTime2 - (int)(pViewBob->m_flBobTime2 / (var_cycle * 0.5f)) * (var_cycle * 0.5f);
|
||||
pViewBob->m_flBobCycle2 /= (var_cycle * 0.5f);
|
||||
|
||||
|
@ -79,12 +97,26 @@ Viewmodel_CalcBob(void)
|
|||
pViewBob->m_flBobCycle2 = MATH_PI + MATH_PI * (pViewBob->m_flBobCycle2 - var_up)/(1.0 - var_up);
|
||||
}
|
||||
|
||||
flBob = pViewBob->m_flSpeed * var_bob;
|
||||
flBob = flBob * 0.3 + flBob * 0.7 * sin(pViewBob->m_flBobCycle2);
|
||||
pViewBob->m_flBob2 = bound(-7, flBob, 4);
|
||||
flBob = pViewBob->m_flSpeed * (var_bob * 0.5);
|
||||
flBob = flBob * cos(pViewBob->m_flBobCycle2);
|
||||
pViewBob->m_flBob2 = flBob;
|
||||
|
||||
/* make sure it's adjusted for scale */
|
||||
pViewBob->m_flBob *= autocvar_cg_viewmodelScale;
|
||||
if (isSprinting) {
|
||||
pViewBob->m_flViewBob2 = pViewBob->m_flBob2 * autocvar_bg_bobAmplitudeSprinting[0] * 25.0f;
|
||||
pViewBob->m_flViewBob = pViewBob->m_flBob * autocvar_bg_bobAmplitudeSprinting[1] * 25.0f;
|
||||
pViewBob->m_flBob2 *= autocvar_bg_bobAmplitudeSprinting[0] * 20.0;
|
||||
pViewBob->m_flBob *= autocvar_bg_bobAmplitudeSprinting[1] * 20.0;
|
||||
} else if (isCrouching) {
|
||||
pViewBob->m_flViewBob2 = pViewBob->m_flBob2 * autocvar_bg_bobAmplitudeDucked[0] * 25.0f;
|
||||
pViewBob->m_flViewBob = pViewBob->m_flBob * autocvar_bg_bobAmplitudeDucked[1] * 25.0f;
|
||||
pViewBob->m_flBob2 *= autocvar_bg_bobAmplitudeDucked[0] * 20.0;
|
||||
pViewBob->m_flBob *= autocvar_bg_bobAmplitudeDucked[1] * 20.0;
|
||||
} else {
|
||||
pViewBob->m_flViewBob2 = pViewBob->m_flBob2 * autocvar_bg_bobAmplitudeStanding[0] * 25.0f;
|
||||
pViewBob->m_flViewBob = pViewBob->m_flBob * autocvar_bg_bobAmplitudeStanding[1] * 25.0f;
|
||||
pViewBob->m_flBob2 *= autocvar_bg_bobAmplitudeStanding[0] * 20.0;
|
||||
pViewBob->m_flBob *= autocvar_bg_bobAmplitudeStanding[1] * 20.0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -95,13 +127,18 @@ Viewmodel_ApplyBob(entity gun)
|
|||
|
||||
float sintime;
|
||||
float strength;
|
||||
gun.angles[2] = -pViewBob->m_flBob;
|
||||
float kickUp;
|
||||
//gun.angles[2] = pViewBob->m_flBob2 * -2.0f;
|
||||
gun.angles[2] = pViewBob->m_flViewBob * 4.0f;
|
||||
kickUp = pViewBob->m_flViewBob2 * 4.0f;
|
||||
|
||||
vector angmod = [0,0,0];
|
||||
angmod[0] -= pViewBob->m_flBob2 * 0.5f;
|
||||
angmod[1] += pViewBob->m_flBob * 2.5f;
|
||||
angmod[2] += pViewBob->m_flBob * 3.0f;
|
||||
gun.angles += angmod * 1.5f;
|
||||
|
||||
angmod[0] = pViewBob->m_flViewBob2 + kickUp;
|
||||
angmod[1] = pViewBob->m_flViewBob;
|
||||
|
||||
//angmod[2] += pViewBob->m_flBob * 3.0f;
|
||||
gun.angles += angmod;
|
||||
|
||||
/* sway with speed */
|
||||
sintime = sin(time);
|
||||
|
@ -111,19 +148,19 @@ Viewmodel_ApplyBob(entity gun)
|
|||
strength = 240;
|
||||
|
||||
strength = 240 - strength;
|
||||
strength *= 0.005f;
|
||||
strength *= 0.01f;
|
||||
|
||||
#ifdef WASTES
|
||||
float sprint;
|
||||
if (pSeatLocal->m_iSprinting && vlen(pSeat->m_vecPredictedVelocity) > 240) {
|
||||
pSeatLocal->m_flSprintLerp = bound(0.0f, pSeatLocal->m_flSprintLerp + clframetime, 1.0f);
|
||||
if (pSeat->m_ePlayer.vv_flags & VFL_SPRINTING) {
|
||||
pSeat->m_flSprintLerp = bound(0.0f, pSeat->m_flSprintLerp + clframetime, 1.0f);
|
||||
} else {
|
||||
pSeatLocal->m_flSprintLerp = bound(0.0f, pSeatLocal->m_flSprintLerp - clframetime, 1.0f);
|
||||
pSeat->m_flSprintLerp = bound(0.0f, pSeat->m_flSprintLerp - clframetime, 1.0f);
|
||||
}
|
||||
sprint = 20 * pSeatLocal->m_flSprintLerp;
|
||||
sprint = 20 * pSeat->m_flSprintLerp;
|
||||
gun.angles[0] += sprint;
|
||||
gun.angles[1] += sprint + (sprint * pViewBob->m_flBob) * 0.25f;
|
||||
|
||||
#ifdef WASTES
|
||||
if (pSeat->m_ePlayer.gflags & GF_IS_HEALING) {
|
||||
pSeatLocal->m_flHealLerp = bound(0.0f, pSeatLocal->m_flHealLerp + clframetime, 1.0f);
|
||||
} else {
|
||||
|
@ -135,6 +172,31 @@ Viewmodel_ApplyBob(entity gun)
|
|||
|
||||
gun.angles[0] += strength * sintime;
|
||||
gun.angles[1] += strength * sintime;
|
||||
gun.angles[2] += strength * sintime;
|
||||
//gun.angles[2] += strength * sintime;
|
||||
gun.origin += [0,0,-1];
|
||||
|
||||
makevectors(g_view.GetCameraAngle());
|
||||
gun.origin += v_forward * cvar("cl_gunx");
|
||||
gun.origin += v_right * cvar("cl_guny");
|
||||
gun.origin += v_up * cvar("cl_gunz");
|
||||
|
||||
/* lower gun when moving */
|
||||
if (pViewBob->m_flSpeed > 10.0) {
|
||||
gun.origin += (v_up * -pViewBob->m_flSpeed * 0.005f);
|
||||
gun.origin += (v_right * -pViewBob->m_flSpeed * 0.005f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
vector
|
||||
Camera_AddCamBob(vector cameraAngle)
|
||||
{
|
||||
vector angmod = g_vec_null;
|
||||
|
||||
makevectors(cameraAngle);
|
||||
|
||||
angmod = (pViewBob->m_flBob2 * -v_up);
|
||||
angmod += (pViewBob->m_flBob * -v_right);
|
||||
|
||||
return angmod;
|
||||
}
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#pragma sourcefile client/progs.src
|
||||
#pragma sourcefile server/progs.src
|
||||
#pragma sourcefile menu/progs.src
|
||||
|
|
|
@ -37,7 +37,7 @@ GameRules::LevelDecodeParms(NSClientPlayer pp)
|
|||
pl.activeweapon = parm11;
|
||||
pl.flags = parm64;
|
||||
|
||||
if (pl.flags & FL_CROUCHING) {
|
||||
if (pl.vv_flags & VFL_CROUCHING) {
|
||||
setsize(pl, VEC_CHULL_MIN, VEC_CHULL_MAX);
|
||||
} else {
|
||||
setsize(pl, VEC_HULL_MIN, VEC_HULL_MAX);
|
||||
|
|
|
@ -109,9 +109,6 @@ MultiplayerRules::ConsoleCommand(NSClientPlayer pp, string cmd)
|
|||
tokenize(cmd);
|
||||
|
||||
switch (argv(0)) {
|
||||
case "bot_add":
|
||||
Bot_AddQuick();
|
||||
break;
|
||||
default:
|
||||
return (0);
|
||||
}
|
||||
|
@ -129,4 +126,4 @@ Game_InitRules(void)
|
|||
} else {
|
||||
g_grMode = spawn(MultiplayerRules);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ SingleplayerRules::PlayerSpawn(NSClientPlayer pl)
|
|||
pl.viewzoom = 1.0;
|
||||
pl.model = "models/player.mdl";
|
||||
setmodel(pl, pl.model);
|
||||
pl.AddEffects(EF_NOSHADOW);
|
||||
|
||||
setsize(pl, VEC_HULL_MIN, VEC_HULL_MAX);
|
||||
pl.velocity = [0,0,0];
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
../../../src/shared/fteextensions.qc
|
||||
../../../src/shared/defs.h
|
||||
../../../src/server/defs.h
|
||||
../../../src/botlib/botinfo.h
|
||||
../../../src/gs-entbase/server.src
|
||||
../../../src/gs-entbase/shared.src
|
||||
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
#includelist
|
||||
player.qc
|
||||
weapon_common.h
|
||||
weapons.h
|
||||
flags.h
|
||||
fx_explosion.qc
|
||||
fx_spark.qc
|
||||
fx_blood.qc
|
||||
fx_breakmodel.qc
|
||||
fx_corpse.qc
|
||||
fx_gibhuman.qc
|
||||
fx_impact.qc
|
||||
weapons.qc
|
||||
weapon_common.qc
|
||||
#endlist
|
||||
|
|
|
@ -35,6 +35,7 @@ class player:NSClientPlayer
|
|||
virtual void(float,float) ReceiveEntity;
|
||||
virtual void(void) PredictPreFrame;
|
||||
virtual void(void) PredictPostFrame;
|
||||
virtual void(void) UpdateAliveCam;
|
||||
#else
|
||||
virtual void(void) EvaluateEntity;
|
||||
virtual float(entity, float) SendEntity;
|
||||
|
@ -42,6 +43,41 @@ class player:NSClientPlayer
|
|||
};
|
||||
|
||||
#ifdef CLIENT
|
||||
|
||||
|
||||
void Shake_Update(NSClientPlayer);
|
||||
vector Camera_RunBob(vector);
|
||||
vector Camera_StrafeRoll(vector);
|
||||
vector Camera_AddCamBob(vector);
|
||||
vector Camera_AddLean(vector);
|
||||
void View_DisableViewmodel(void);
|
||||
void
|
||||
player::UpdateAliveCam(void)
|
||||
{
|
||||
vector cam_pos = GetEyePos();
|
||||
|
||||
g_view.SetCameraAngle(view_angles);
|
||||
g_view.SetCameraOrigin(cam_pos + Camera_AddCamBob(view_angles) + Camera_AddLean(view_angles));
|
||||
|
||||
if (vehicle) {
|
||||
NSVehicle veh = (NSVehicle)vehicle;
|
||||
|
||||
if (veh.UpdateView)
|
||||
veh.UpdateView();
|
||||
} else if (health) {
|
||||
if (autocvar_pm_thirdPerson == TRUE) {
|
||||
makevectors(view_angles);
|
||||
vector vStart = [pSeat->m_vecPredictedOrigin[0], pSeat->m_vecPredictedOrigin[1], pSeat->m_vecPredictedOrigin[2] + 16] + (v_right * 4);
|
||||
vector vEnd = vStart + (v_forward * -48) + [0,0,16] + (v_right * 4);
|
||||
traceline(vStart, vEnd, FALSE, this);
|
||||
g_view.SetCameraOrigin(trace_endpos + (v_forward * 5));
|
||||
}
|
||||
}
|
||||
|
||||
Shake_Update(this);
|
||||
g_view.AddPunchAngle(punchangle);
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
player::ReceiveEntity
|
||||
|
|
|
@ -0,0 +1,268 @@
|
|||
59
|
||||
-496 -80 336.031 16.000000 2
|
||||
1 464.000000 0
|
||||
58 63.118530 0
|
||||
-32 -80 336.031 48.000000 2
|
||||
0 464.000000 0
|
||||
2 196.116043 0
|
||||
-32 -272 336 16.000000 2
|
||||
1 196.116043 0
|
||||
3 327.968750 0
|
||||
-32 -272 48.0312 32.000000 3
|
||||
2 327.968750 0
|
||||
4 96.332756 0
|
||||
25 260.461121 0
|
||||
32 -344 48.0312 16.000000 3
|
||||
3 96.332756 0
|
||||
5 72.000000 0
|
||||
25 320.898743 0
|
||||
32 -416 48.0312 16.000000 3
|
||||
4 72.000000 0
|
||||
6 321.993774 0
|
||||
47 448.000000 4
|
||||
-256 -416 -95.9688 16.000000 3
|
||||
5 321.993774 0
|
||||
7 128.000000 0
|
||||
9 324.863037 0
|
||||
-256 -288 -95.9688 32.000000 3
|
||||
6 128.000000 0
|
||||
8 256.000000 0
|
||||
9 265.932312 0
|
||||
0 -288 -95.9688 32.000000 2
|
||||
7 256.000000 0
|
||||
9 72.000000 0
|
||||
0 -216 -95.9688 16.000000 4
|
||||
6 324.863037 0
|
||||
7 265.932312 0
|
||||
8 72.000000 0
|
||||
10 72.000000 0
|
||||
0 -144 -95.9688 16.000000 4
|
||||
12 128.249756 0
|
||||
21 96.332756 0
|
||||
9 72.000000 0
|
||||
11 113.701363 0
|
||||
-88 -83 -95.9688 16.000000 6
|
||||
16 264.484406 0
|
||||
14 147.078217 0
|
||||
21 80.399002 0
|
||||
12 111.139549 0
|
||||
24 68.818604 2
|
||||
10 113.701363 0
|
||||
8 -16 -95.9688 16.000000 5
|
||||
10 128.249756 0
|
||||
21 171.207474 0
|
||||
13 115.377640 0
|
||||
11 111.139549 0
|
||||
24 104.000000 2
|
||||
-88 48 -95.9688 16.000000 5
|
||||
15 264.000000 0
|
||||
19 456.000000 0
|
||||
14 150.306351 0
|
||||
12 115.377640 0
|
||||
24 75.471855 2
|
||||
-224 -16 -95.9688 32.000000 7
|
||||
20 131.939377 0
|
||||
13 150.306351 0
|
||||
11 147.078217 0
|
||||
24 141.760361 2
|
||||
23 143.108353 6
|
||||
16 146.860474 0
|
||||
15 143.108353 0
|
||||
-352 48 -95.9688 16.000000 4
|
||||
13 264.000000 0
|
||||
19 192.000000 0
|
||||
23 90.509666 6
|
||||
14 143.108353 0
|
||||
-352 -88 -95.9688 16.000000 7
|
||||
11 264.484406 0
|
||||
17 146.860474 0
|
||||
20 111.139549 0
|
||||
22 132.181686 2
|
||||
18 200.000000 0
|
||||
14 146.860474 0
|
||||
23 96.332756 0
|
||||
-480 -16 -95.9688 16.000000 4
|
||||
19 90.509666 0
|
||||
16 146.860474 0
|
||||
23 143.108353 6
|
||||
22 71.554176 2
|
||||
-544 -144 -95.9688 16.000000 4
|
||||
20 288.000000 0
|
||||
19 192.000000 0
|
||||
22 96.000000 2
|
||||
16 200.000000 0
|
||||
-544 48 -95.9688 16.000000 4
|
||||
13 456.000000 0
|
||||
15 192.000000 0
|
||||
17 90.509666 0
|
||||
18 192.000000 0
|
||||
-256 -144 -95.9688 16.000000 4
|
||||
18 288.000000 0
|
||||
16 111.139549 0
|
||||
14 131.939377 0
|
||||
48 293.720947 0
|
||||
-96 -152 -95.9688 8.000000 3
|
||||
10 96.332756 0
|
||||
12 171.207474 0
|
||||
11 80.399002 0
|
||||
-480 -80 -63.9688 8.000000 1
|
||||
23 146.642426 6
|
||||
-352 -16 -31.9688 16.000000 4
|
||||
14 143.108353 0
|
||||
16 96.332756 0
|
||||
15 90.509666 0
|
||||
17 143.108353 0
|
||||
-88 -16 -55.9688 8.000000 4
|
||||
12 104.000000 0
|
||||
13 75.471855 0
|
||||
11 68.818604 0
|
||||
14 141.760361 0
|
||||
-288 -320 48.0312 32.000000 3
|
||||
3 260.461121 0
|
||||
4 320.898743 0
|
||||
26 416.000000 0
|
||||
-704 -320 48.0312 32.000000 4
|
||||
25 416.000000 0
|
||||
27 416.000000 0
|
||||
30 640.000000 0
|
||||
35 800.000000 0
|
||||
-704 -736 48.0312 32.000000 7
|
||||
26 416.000000 0
|
||||
28 385.331024 0
|
||||
30 224.000000 0
|
||||
31 558.855957 0
|
||||
34 257.992249 0
|
||||
35 384.000000 0
|
||||
29 390.609772 0
|
||||
-320 -768 48.0312 32.000000 3
|
||||
27 385.331024 0
|
||||
29 202.385773 0
|
||||
45 101.192886 0
|
||||
-384 -960 48.0312 16.000000 5
|
||||
28 202.385773 0
|
||||
30 320.000000 0
|
||||
36 160.000000 0
|
||||
45 135.764496 0
|
||||
27 390.609772 0
|
||||
-704 -960 48.0312 48.000000 5
|
||||
26 640.000000 0
|
||||
27 224.000000 0
|
||||
29 320.000000 0
|
||||
34 320.000000 0
|
||||
35 160.000000 0
|
||||
-928 -1248 48.0312 32.000000 4
|
||||
27 558.855957 0
|
||||
32 163.168625 0
|
||||
38 350.907410 0
|
||||
34 481.065491 0
|
||||
-960 -1408 48.0312 32.000000 2
|
||||
31 163.168625 0
|
||||
33 640.000000 0
|
||||
-320 -1408 48.0312 32.000000 4
|
||||
36 295.025421 0
|
||||
37 275.274414 0
|
||||
45 544.940369 0
|
||||
32 640.000000 0
|
||||
-960 -768 48.0312 32.000000 4
|
||||
27 257.992249 0
|
||||
30 320.000000 0
|
||||
35 435.247070 0
|
||||
31 481.065491 0
|
||||
-704 -1120 48.0312 32.000000 5
|
||||
26 800.000000 0
|
||||
27 384.000000 0
|
||||
30 160.000000 0
|
||||
34 435.247070 0
|
||||
37 204.899979 0
|
||||
-384 -1120 48.0312 32.000000 3
|
||||
29 160.000000 0
|
||||
33 295.025421 0
|
||||
45 273.408112 0
|
||||
-544 -1248 48.0312 32.000000 2
|
||||
33 275.274414 0
|
||||
35 204.899979 0
|
||||
-608 -1248 192.031 16.000000 2
|
||||
31 350.907410 0
|
||||
39 224.000000 0
|
||||
-384 -1248 192.031 16.000000 4
|
||||
38 224.000000 0
|
||||
40 128.000000 0
|
||||
41 416.000000 0
|
||||
43 167.044907 0
|
||||
-384 -1376 192.031 16.000000 2
|
||||
39 128.000000 0
|
||||
33 160.797836 2
|
||||
-384 -832 192.031 16.000000 3
|
||||
39 416.000000 0
|
||||
42 384.000000 0
|
||||
43 260.461121 0
|
||||
-768 -832 192.031 16.000000 3
|
||||
41 384.000000 0
|
||||
34 248.386688 2
|
||||
30 203.017105 2
|
||||
-432 -1088 192.031 16.000000 3
|
||||
39 167.044907 0
|
||||
41 260.461121 0
|
||||
44 65.969688 2
|
||||
-496 -1088 176.031 32.000000 4
|
||||
43 65.969688 0
|
||||
30 275.738922 0
|
||||
35 246.316772 0
|
||||
27 428.429626 0
|
||||
-288 -864 48.0312 16.000000 5
|
||||
28 101.192886 0
|
||||
29 135.764496 0
|
||||
33 544.940369 0
|
||||
36 273.408112 0
|
||||
46 96.000000 4
|
||||
-192 -864 48.0312 16.000000 2
|
||||
47 224.000000 0
|
||||
45 96.000000 0
|
||||
32 -864 48.0312 16.000000 2
|
||||
46 224.000000 0
|
||||
5 448.000000 0
|
||||
0 -144 48.0312 16.000000 4
|
||||
49 96.000000 0
|
||||
50 273.408112 0
|
||||
51 265.932312 0
|
||||
20 293.720947 0
|
||||
0 -48 48.0312 32.000000 3
|
||||
48 96.000000 0
|
||||
50 256.000000 0
|
||||
52 480.000000 0
|
||||
-256 -48 48.0312 32.000000 4
|
||||
48 273.408112 0
|
||||
49 256.000000 0
|
||||
51 108.811768 0
|
||||
52 224.000000 0
|
||||
-192 40 48.0312 16.000000 4
|
||||
48 265.932312 0
|
||||
50 108.811768 0
|
||||
52 301.144470 0
|
||||
56 266.413116 0
|
||||
-480 -48 48.0312 32.000000 3
|
||||
49 480.000000 0
|
||||
50 224.000000 0
|
||||
51 301.144470 0
|
||||
-552 -80 192.031 16.000000 2
|
||||
57 78.790863 0
|
||||
58 163.712769 0
|
||||
0 -48 192.031 32.000000 3
|
||||
55 256.000000 0
|
||||
56 101.192886 0
|
||||
57 480.000000 0
|
||||
-256 -48 192.031 32.000000 3
|
||||
54 256.000000 0
|
||||
57 224.000000 0
|
||||
56 303.578644 0
|
||||
32 48 192.031 16.000000 3
|
||||
54 101.192886 0
|
||||
51 266.413116 0
|
||||
55 303.578644 0
|
||||
-480 -48 192.031 32.000000 3
|
||||
53 78.790863 0
|
||||
54 480.000000 0
|
||||
55 224.000000 0
|
||||
-555.969 -78.9344 355.692 16.000000 2
|
||||
0 63.118530 0
|
||||
53 163.712769 0
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,6 @@
|
|||
// Vera Visions Material
|
||||
{
|
||||
program lightmapped
|
||||
program lightmapped#MASK=0.5
|
||||
surfaceParm alphashadow
|
||||
diffusemap textures/measure/rail.tga
|
||||
}
|
||||
|
|
|
@ -11,17 +11,21 @@ safe_copy()
|
|||
|
||||
radiant_build()
|
||||
{
|
||||
if [ "$SKIP_RADIANT" = "1" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
./make_mapdef.sh "$1"
|
||||
|
||||
# copy files over to RADIANT
|
||||
if [ ! -z "$RADIANT_PATH" ]
|
||||
then
|
||||
if [ -d "$RADIANT_PATH/gamepacks/games" ];
|
||||
then
|
||||
./make_mapdef.sh "$1"
|
||||
mkdir -p "$RADIANT_PATH/gamepacks/$1.game/$1/"
|
||||
safe_copy "./$1/radiant.game" "$RADIANT_PATH/gamepacks/games/$1.game"
|
||||
safe_copy "./$1/entities.def" "$RADIANT_PATH/gamepacks/$1.game/$1/entities.def"
|
||||
safe_copy "./$1/radiant.xml" "$RADIANT_PATH/gamepacks/$1.game/default_build_menu.xml"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -34,7 +38,7 @@ fi
|
|||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
if ! [ -x "$(command -v git)" ]; then
|
||||
printf "'git' is not installed.\n"
|
||||
exit
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
ed_for_def()
|
||||
{
|
||||
printf -- "" > "/tmp/def_name"
|
||||
printf -- "" > "/tmp/def_color"
|
||||
printf -- "1 0 1" > "/tmp/def_color"
|
||||
printf -- "" > "/tmp/def_mins"
|
||||
printf -- "" > "/tmp/def_mins"
|
||||
printf -- "" > "/tmp/def_maxs"
|
||||
|
@ -15,54 +15,88 @@ printf -- "" > "/tmp/def_model"
|
|||
do
|
||||
SEG1=$(echo "$LINE" | awk '{ print $1 }')
|
||||
SEG2=$(echo "$LINE" | awk '{ print $2 }')
|
||||
KEY=$(echo "$LINE" | awk -F"\"" '{ print $2 }')
|
||||
VAL=$(echo "$LINE" | awk -F"\"" '{ print $4 }')
|
||||
KEY="$(echo "$LINE" | awk -F"\"" '{ print $2 }')"
|
||||
VAL="$(echo "$LINE" | awk -F"\"" '{ print $4 }')"
|
||||
|
||||
if [ "$KEY" == "entityDef" ]
|
||||
if [ "$KEY" = "entityDef" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_name"
|
||||
fi
|
||||
|
||||
if [ "$SEG1" == "entityDef" ]
|
||||
if [ "$SEG1" = "entityDef" ]
|
||||
then
|
||||
printf -- "$SEG2" > "/tmp/def_name"
|
||||
fi
|
||||
|
||||
if [ "$KEY" == "editor_color" ]
|
||||
if [ "$KEY" = "editor_color" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_color"
|
||||
fi
|
||||
|
||||
if [ "$KEY" == "editor_mins" ]
|
||||
if [ "$KEY" = "editor_mins" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_mins"
|
||||
fi
|
||||
|
||||
if [ "$KEY" == "editor_maxs" ]
|
||||
if [ "$KEY" = "editor_maxs" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_maxs"
|
||||
fi
|
||||
|
||||
if [ "$KEY" == "editor_usage" ]
|
||||
if [ "$KEY" = "mins" ]
|
||||
then
|
||||
if [ -z "$(cat /tmp/def_mins)" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_mins"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$KEY" = "maxs" ]
|
||||
then
|
||||
if [ -z "$(cat /tmp/def_maxs)" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_maxs"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$KEY" = "editor_usage" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_usage"
|
||||
fi
|
||||
|
||||
if [ "$KEY" == "model" ]
|
||||
if [ "$KEY" = "netname" ]
|
||||
then
|
||||
if [ -z "$(cat /tmp/def_usage)" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_usage"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$KEY" = "editor_model" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_model"
|
||||
fi
|
||||
|
||||
if [ "$SEG1" == "}" ]
|
||||
if [ "$KEY" = "model" ]
|
||||
then
|
||||
KEY_NAME=$(cat "/tmp/def_name")
|
||||
KEY_COLOR=$(cat "/tmp/def_color")
|
||||
KEY_MINS=$(cat "/tmp/def_mins")
|
||||
KEY_MAXS=$(cat "/tmp/def_maxs")
|
||||
KEY_USAGE=$(cat "/tmp/def_usage")
|
||||
KEY_MODEL=$(cat "/tmp/def_model")
|
||||
if [ -z "$(cat /tmp/def_model)" ]
|
||||
then
|
||||
printf -- "$VAL" > "/tmp/def_model"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$SEG1" = "}" ]
|
||||
then
|
||||
KEY_NAME="$(cat /tmp/def_name)"
|
||||
KEY_COLOR="$(cat /tmp/def_color)"
|
||||
KEY_MINS="$(cat /tmp/def_mins)"
|
||||
KEY_MAXS="$(cat /tmp/def_maxs)"
|
||||
KEY_USAGE="$(cat /tmp/def_usage)"
|
||||
KEY_MODEL="$(cat /tmp/def_model)"
|
||||
|
||||
# reset defaults
|
||||
printf -- "" > "/tmp/def_name"
|
||||
printf -- "" > "/tmp/def_color"
|
||||
printf -- "1 0 1" > "/tmp/def_color"
|
||||
printf -- "" > "/tmp/def_mins"
|
||||
printf -- "" > "/tmp/def_mins"
|
||||
printf -- "" > "/tmp/def_maxs"
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Converts .mat files in a gamedir
|
||||
# to a bunch of .shader files.
|
||||
# It also overwrites scripts/shaderlist.txt
|
||||
# So don't mix environments!
|
||||
|
||||
ROOT_DIR="$(pwd)"
|
||||
LEGACY_OUT="$ROOT_DIR/$1/scripts"
|
||||
SHADERLIST="$ROOT_DIR/$1/scripts/shaderlist.txt"
|
||||
|
||||
mkdir -p "$LEGACY_OUT"
|
||||
|
||||
echo "Dumping all ..mat files into one..."
|
||||
|
||||
if [ -f "$SHADERLIST" ]
|
||||
then
|
||||
rm "$SHADERLIST"
|
||||
fi
|
||||
|
||||
# scan a dir inside textures/???/
|
||||
scan_dir()
|
||||
{
|
||||
SHADER_FILE="$LEGACY_OUT/$1.shader"
|
||||
cd "$1"
|
||||
MAT_COUNT=$(ls | grep \.mat | wc -l | tr -d '\n')
|
||||
|
||||
echo "...$MAT_COUNT .mat files counted"
|
||||
|
||||
if [ "$MAT_COUNT" -eq 0 ]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "// THIS FILE HAS BEEN AUTOMATICALLY GENERATED!" > "$SHADER_FILE"
|
||||
echo "// Please refer to the original documentation." >> "$SHADER_FILE"
|
||||
echo "// This shader is for development purposes ONLY." >> "$SHADER_FILE"
|
||||
echo "" >> "$SHADER_FILE"
|
||||
|
||||
find * -type f -name '*.mat'| while read SHADER_N; do
|
||||
BASENAME=$(echo "$SHADER_N" | cut -d '.' -f 1)
|
||||
NAME="textures/$1/$BASENAME"
|
||||
|
||||
echo "$NAME" >> "$SHADER_FILE"
|
||||
cat "$SHADER_N" >> "$SHADER_FILE"
|
||||
sed -i 's|$diffusemap|'"${NAME}".tga'|g' "$SHADER_FILE"
|
||||
done;
|
||||
|
||||
|
||||
#echo "Stripping GLSL parameters..."
|
||||
|
||||
sed -i '/Vera Visions Material/d' "$SHADER_FILE"
|
||||
sed -i 's/.mat//g' "$SHADER_FILE"
|
||||
sed -i '/if $programs/','/else/d' "$SHADER_FILE"
|
||||
sed -i '/endif/d' "$SHADER_FILE"
|
||||
sed -i '/nodraw2/d' "$SHADER_FILE"
|
||||
sed -i '/program /d' "$SHADER_FILE"
|
||||
sed -i '/normalmap/d' "$SHADER_FILE"
|
||||
sed -i '/alphaGen portal/d' "$SHADER_FILE"
|
||||
sed -i '/deformVertexes autoSprite/d' "$SHADER_FILE"
|
||||
|
||||
#echo "Replacing diffusemap calls with qer_editorimage..."
|
||||
sed -i 's/diffusemap /qer_editorimage /g' "$SHADER_FILE"
|
||||
|
||||
#echo "Swapping DDS references with TARGA..."
|
||||
sed -i 's/.dds/.tga/g' "$SHADER_FILE"
|
||||
sed -i 's/$rt:base/textures\/dev\/rtsurface.tga/g' "$SHADER_FILE"
|
||||
sed -i 's/.shader//g' "$SHADER_FILE"
|
||||
|
||||
echo "$1" >> "$SHADERLIST"
|
||||
echo "...written $SHADER_FILE"
|
||||
}
|
||||
|
||||
# iterate over all 'categories' inside textures/
|
||||
scan_textures()
|
||||
{
|
||||
NEW_ROOT="$(pwd)/$1/textures"
|
||||
cd "$NEW_ROOT"
|
||||
|
||||
ls | while read TEXTURE_DIR
|
||||
do
|
||||
cd "$NEW_ROOT"
|
||||
if [ -d "$TEXTURE_DIR" ]
|
||||
then
|
||||
echo "Texture dir: $TEXTURE_DIR ($1)"
|
||||
scan_dir "$TEXTURE_DIR" "$LEGACY_OUT"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
#mkdir -p "$(dirname "$LEGACY_OUT")"
|
||||
|
||||
# Start with any possible pk3dirs
|
||||
find "$1" -type d -name '*.pk3dir'| while read PKDIR; do
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
if [ -d "$PKDIR/textures/" ]
|
||||
then
|
||||
scan_textures "$PKDIR"
|
||||
fi
|
||||
done
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
# Then look into the loose dir
|
||||
if [ -d "$1/textures" ]
|
||||
then
|
||||
scan_textures "$1"
|
||||
fi
|
|
@ -53,11 +53,9 @@ varying mat3 invsurface;
|
|||
tex_c = v_texcoord;
|
||||
gl_Position = ftetransform();
|
||||
|
||||
#ifdef SCROLL
|
||||
/* HACK: func_conveyor needs us to scroll this surface! */
|
||||
if (e_glowmod.g == 0.5)
|
||||
tex_c[0] += (e_time * (e_glowmod.b * 1024.0)) * -0.01;
|
||||
#endif
|
||||
|
||||
#ifdef REFLECTCUBE
|
||||
invsurface[0] = v_svector;
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
//======= Copyright (c) 2015-2020 Vera Visions LLC. All rights reserved. =======
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// Non-lit surface that predominantly offers environment cube reflection
|
||||
// modulated by the diffusemap's RGB. This is used for glass, for example.
|
||||
//==============================================================================
|
||||
|
||||
!!ver 110
|
||||
!!permu FOG
|
||||
!!samps diffusemap=0 normalmap=1 reflect=2
|
||||
|
||||
#include "sys/defs.h"
|
||||
|
||||
varying vec2 tex_c;
|
||||
varying vec3 eyevector;
|
||||
varying mat3 invsurface;
|
||||
varying vec4 tf;
|
||||
|
||||
#ifdef VERTEX_SHADER
|
||||
void main ()
|
||||
{
|
||||
|
||||
tex_c = v_texcoord;
|
||||
invsurface[0] = v_svector;
|
||||
invsurface[1] = v_tvector;
|
||||
invsurface[2] = v_normal;
|
||||
vec3 eyeminusvertex = e_eyepos - v_position.xyz;
|
||||
eyevector.x = dot( eyeminusvertex, v_svector.xyz );
|
||||
eyevector.y = dot( eyeminusvertex, v_tvector.xyz );
|
||||
eyevector.z = dot( eyeminusvertex, v_normal.xyz );
|
||||
tf = ftetransform();
|
||||
gl_Position = tf;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FRAGMENT_SHADER
|
||||
#include "sys/fog.h"
|
||||
void main ()
|
||||
{
|
||||
vec2 stc;
|
||||
vec3 out_f;
|
||||
vec4 diffuse_f = texture2D(s_diffusemap, tex_c);
|
||||
vec3 norm_f;
|
||||
|
||||
norm_f = ( texture2D( s_normalmap, tex_c + vec2( e_time * 0.01, 0.0 ) ).xyz);
|
||||
norm_f += ( texture2D( s_normalmap, tex_c - vec2( 0, e_time * 0.01 ) ).xyz);
|
||||
norm_f -= 1.0 - ( 4.0 / 256.0 );
|
||||
norm_f = normalize( norm_f );
|
||||
|
||||
stc = (1.0 + (tf.xy / tf.w)) * 0.5;
|
||||
|
||||
diffuse_f.rgb = texture2D(s_reflect, stc + norm_f.st).rgb;
|
||||
gl_FragColor = diffuse_f;
|
||||
}
|
||||
#endif
|
|
@ -180,6 +180,12 @@ varying vec3 norm;
|
|||
discard;
|
||||
#endif
|
||||
|
||||
#if r_skipDetail == 0
|
||||
#if defined(UPPERLOWER)
|
||||
diffuse_f.rgb *= (texture2D(s_upper, tex_c * 4.0).rgb + 0.5);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef FAKESHADOWS
|
||||
diffuse_f.rgb *= ShadowmapFilter(s_shadowmap, vtexprojcoord);
|
||||
#endif
|
||||
|
@ -234,13 +240,6 @@ varying vec3 norm;
|
|||
if (alpha > 1.0)
|
||||
alpha = 1.0;
|
||||
|
||||
|
||||
#if r_skipDetail == 0
|
||||
#if defined(UPPERLOWER)
|
||||
diffuse_f.rgb *= (texture2D(s_upper, tex_c * 4.0).rgb + 0.5);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
gl_FragColor = vec4(fog3(diffuse_f.rgb), alpha);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
//======= Copyright (c) 2023 Vera Visions LLC. All rights reserved. =======
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// Unlit surface.
|
||||
//==============================================================================
|
||||
|
||||
!!ver 110
|
||||
!!permu FOG
|
||||
!!samps diffuse
|
||||
|
||||
#include "sys/defs.h"
|
||||
#include "sys/fog.h"
|
||||
|
||||
varying vec2 tex_c;
|
||||
|
||||
#ifdef VERTEX_SHADER
|
||||
void main ()
|
||||
{
|
||||
tex_c = v_texcoord;
|
||||
gl_Position = ftetransform();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FRAGMENT_SHADER
|
||||
void main ()
|
||||
{
|
||||
vec4 d_f = vec4(1.0, 1.0, 1.0, 1.0) - texture2D( s_diffuse, tex_c );
|
||||
|
||||
if (d_f.a > 0.5) {
|
||||
discard;
|
||||
}
|
||||
|
||||
gl_FragColor = fog4( d_f );
|
||||
}
|
||||
#endif
|
|
@ -21,6 +21,7 @@
|
|||
!!cvardf r_skipNormal
|
||||
!!cvardf r_skipEnvmap
|
||||
!!cvardf r_skipLightmap
|
||||
!!cvardf r_showEnvCubemap
|
||||
|
||||
!!permu FAKESHADOWS
|
||||
!!cvardf r_glsl_pcf
|
||||
|
@ -123,10 +124,16 @@ varying mat3 invsurface;
|
|||
#if defined(BUMP) && r_skipEnvmap==0
|
||||
vec3 cube_c;
|
||||
float refl = 1.0 - texture2D(s_normalmap, tex_c).a;
|
||||
cube_c = reflect(normalize(eyevector), normal_f.rgb);
|
||||
|
||||
cube_c = reflect(normalize(eyevector), norm);
|
||||
cube_c = cube_c.x * invsurface[0] + cube_c.y * invsurface[1] + cube_c.z * invsurface[2];
|
||||
cube_c = (m_model * vec4(cube_c.xyz, 0.0)).xyz;
|
||||
|
||||
#if r_showEnvCubemap == 0
|
||||
diff_f.rgb += textureCube(s_reflectcube, cube_c).rgb * refl;
|
||||
#else
|
||||
diff_f.rgb = textureCube(s_reflectcube, cube_c).rgb;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(FULLBRIGHT) && r_skipFullbright==0
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
entityDef bot
|
||||
{
|
||||
"spawnclass" "NSBot"
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
entityDef player
|
||||
{
|
||||
"spawnclass" "NSClientPlayer"
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
entityDef info_player_start
|
||||
{
|
||||
"editor_mins" "-16 -16 -36"
|
||||
"editor_maxs" "16 16 36"
|
||||
"editor_description" "Singleplayer Spawn Point"
|
||||
"editor_color" "1 0 0"
|
||||
"spawnclass" "NSSpawnPoint"
|
||||
}
|
||||
|
||||
entityDef info_player_deathmatch
|
||||
{
|
||||
"editor_mins" "-16 -16 -36"
|
||||
"editor_maxs" "16 16 36"
|
||||
"editor_description" "Deathmatch Spawn Point"
|
||||
"editor_color" "1 0 0"
|
||||
"spawnclass" "NSSpawnPoint"
|
||||
}
|
||||
|
||||
entityDef info_player_coop
|
||||
{
|
||||
"editor_mins" "-16 -16 -36"
|
||||
"editor_maxs" "16 16 36"
|
||||
"editor_description" "Cooperative Spawn Point"
|
||||
"editor_color" "1 0 0"
|
||||
"spawnclass" "NSSpawnPoint"
|
||||
}
|
|
@ -7,4 +7,9 @@ debugcone
|
|||
alphaGen vertex
|
||||
blendFunc blend
|
||||
}
|
||||
}
|
||||
|
||||
trigger
|
||||
{
|
||||
surfaceParm nodraw
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
{
|
||||
map "gfx/playericon.tga"
|
||||
rgbGen vertex
|
||||
blendFunc blend
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/ambient_generic.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_cubemap.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_explosion.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_global.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_laser.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_message.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_shake.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_spark.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_sprite.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/env_sun.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/game_counter.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/info_intermission.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/info_landmark.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/info_node.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/info_node_air.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/info_notnull.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/info_null.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
diffusemap textures/editor/info_player_deathmatch.tga
|
||||
|
||||
{
|
||||
map $diffuse
|
||||
alphaFunc GE128
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue