Commit Graph
3899 Commits
Author SHA1 Message Date
MrBruh dfc6ac5f9f Merge pull request #207 from ChupathingyCE/upstream-fix/lastmpmp-buffer
lastmpmp.txt written from a buffer of the size written
2026-10-09 18:46:28 +13:00
MrBruh 04f2610f8b Merge pull request #205 from ChupathingyCE/upstream-fix/gl-upload-bytes
GL: vertex and index uploads read only their own bytes
2026-10-09 18:46:28 +13:00
MrBruh dc9b3973f0 Merge pull request #204 from ChupathingyCE/upstream-fix/stb-vorbis-codebooks
stb_vorbis: refuse code books of no dimensions, compare large powers as floats
2026-10-09 18:46:28 +13:00
MrBruh 3bb4866fbf Merge pull request #203 from ChupathingyCE/upstream-fix/widget-menu-functions
Widgets: a map's widgets don't run the main menu's profile or settings functions
2026-10-09 18:46:28 +13:00
MrBruh 9407db4bc3 Merge pull request #202 from ChupathingyCE/upstream-fix/string-list-size
String lists: a one-byte string is not terminated before its data
2026-10-09 18:46:28 +13:00
MrBruh c45f6aefc7 Merge pull request #201 from ChupathingyCE/upstream-fix/tag-name-length
Validator: tag names no longer than a tag path
2026-10-09 18:46:28 +13:00
MrBruh 71f7fd7664 Merge pull request #200 from ChupathingyCE/upstream-fix/tag-name-copies
Bounded copies and formats of tag names
2026-10-09 18:46:27 +13:00
MrBruh f1b3829152 Merge pull request #196 from ChupathingyCE/upstream-fix/wide-format-bounds
Wide printf: bound conversion specifications
2026-10-09 18:46:27 +13:00
MrBruh f5fc3d76ef Scoreboard speaker just right of the name 2026-10-09 18:00:38 +13:00
MrBruh e7e5777a88 Voice chat list in name tag colours
The in-game list of who talks colours each name as the names above players' heads are (hud_player_name_color, now shared): allies in the HUD's blue, enemies red, this machine's own players white; in co-op every other player is an ally.
2026-10-09 17:55:00 +13:00
MrBruh 348f8ad4f8 Speaker beside talking players' name tags
A player talking in voice chat has the speaker just left of their name above their head, centred on its capitals, at the name's scale and fade; only where the name itself is shown (display.player_names, and the gametype's motion tracker rules).
2026-10-09 17:44:55 +13:00
MrBruh b08a95b3ba Smaller voice chat list
The in-game list of who talks is drawn at 0.8 times the HUD's text, its speakers with it.
2026-10-09 17:36:47 +13:00
MrBruh b2990d420d Leaving during a votekick passes it
A player who leaves during a vote against them is kept out for network.votekick_ban_minutes, as if the vote passed, and while a vote runs against them the host refuses them joining again, so no one dodges a vote by leaving.
2026-10-09 17:32:15 +13:00
MrBruh a7c8eac379 Lucide speaker icons for voice chat
Voice chat's speaker and muted speaker are Lucide's volume-2 and volume-x (1.53.0, ISC: port/assets/icons/lucide, credited in AUTHORS.md, its licence shipped beside the game), drawn white into the menus' bitmap voice/speaker by tools/ce_menus.py and tinted, in place of the speaker made of rectangles. In the lobby, on the scoreboard and in the list of who talks, the icon is centred on the middle of the text's capitals (draw_unicode_string_capital_middle).
2026-10-09 17:11:42 +13:00
MrBruh 75811cc2a3 Co-op setup options in categories
Co-op's Server Setup has CO-OP OPTIONS (friendly fire, the extra enemies, player collisions) and VOICE AND VOTING (voice chat and vote kick, as multiplayer's Teamplay Options has them) in screens of their own, as the gametype's options are, each choice with its help; their spinners set config.toml's settings on OK, and the co-op game starts from them.
2026-10-09 15:44:49 +13:00
MrBruh 887e2c11c4 Vote kick in Server Setup
Teamplay Options has a VOTE KICK row (on by default) under the voice chat rows, which sets network.votekick for the host's games, as they set theirs.
2026-10-09 15:01:36 +13:00
MrBruh 84cf2f8f19 Include stdio.h for snprintf in the voice code 2026-10-09 14:36:14 +13:00
MrBruh f97b33391b Voice chat
Opus voice chat (port/third_party/opus 1.5.2, port/linux/src/voice_audio.c, port/linux/game/network_voice.c), relayed by the host, in the lobby too. The host decides in Server Setup > Teamplay Options: lobby voice (on by default), the game's mode (off, team near, anyone near, team, team and enemies near: the default), the near distance, and the quality, 8 to 64 kbps (24). Each player picks push to talk (V), open mic or off, the voices' volume, and the output and input devices in Settings > Audio, and mutes others from the scoreboard's menu. A speaker icon marks who talks in the lobby, on the scoreboard and in a list in game. The host takes a machine's frames only with the key it gave it over its stream, within the quality's size, 50 a second and 8 talkers at once, and sends voices only to machines that asked for them, so the network version stays.
2026-10-09 14:20:57 +13:00
MrBruh 3b20ef879a Votes to kick
Any player of a network game can start a vote to kick another, on any team, by picking their name on the scoreboard (right-click while it is open frees the mouse) or with the console's votekick; the host's own scoreboard also has Kick and Ban (Ban picked twice). The host alone counts (port/linux/game/network_votekick.c): votes only from each voter's stream, one per real address and again per hardware id (which only removes votes), time played on the host before starting (network.votekick_minutes) and voting, more than half of everyone with the target counted and at least two, one vote at a time with cooldowns for a failed vote's starter and target, and a passed vote keeps the player out for network.votekick_ban_minutes. Builds without it drop the new messages, so the network version stays.
2026-10-09 10:07:51 +13:00
Milenko 5ec67a8db4 String lists: a string of one byte is not terminated before its data
unicode_string_list_get_string terminates a string at its last
character, size / 2 - 1, so a string whose data is one byte long had its
terminator written two bytes before its data. Strings shorter than one
character are now not used.
2026-10-08 08:36:10 -04:00
Milenko ea79111994 Bounded copies and formats of tag names
The scenario's tag name was copied with strcpy into the game state
header's 256-byte map_name, a tag's name was formatted with sprintf into
the out of objects message's 512 bytes, and csprintf bounded its output
at MAXIMUM_STRING_SIZE even when it formats into temporary, which is 256
bytes and where most callers put tag names. All three are bounded by
their buffers' sizes now.
2026-10-08 08:35:50 -04:00
Milenko debf9ca7da Validator: tag names no longer than a tag path
The validator let a tag's or a reference's name be any length, but the
game copies and formats tag names into buffers of 256 bytes (the game
state header's map name, objects.c's messages). A name that does not end
within 256 bytes is now given the empty name, as one outside the tags is.
2026-10-08 08:34:36 -04:00
Milenko 764044d4f2 GL: vertex and index uploads read only their own bytes
stream_upload and index_upload rounded the size up to 16 bytes and read
that many from the caller's data, so a draw whose vertices or indices
were not a multiple of 16 bytes read past their allocation (a quad
list's indices on every frame with transparent geometry). Only the
data's own bytes are uploaded now; the room it takes stays rounded.
2026-10-08 08:34:10 -04:00
Milenko 33804e0fe6 stb_vorbis: refuse code books of no dimensions, and compare large powers as floats
lookup1_values divided by a code book's dimensions, which a stream may
give as 0, and cast powers past an int's range to int; both are undefined.
A code book of no dimensions or entries now has no values (the stream is
refused), and the powers are compared without the cast.
2026-10-08 08:33:44 -04:00
Milenko 99257442f7 Wide printf: bounded conversion specifications
wide_format copied a conversion's flags and width digits into a fixed
buffer as it read them, with no bound, and a large width padded for a
long time. Formats include map text (ui strings, HUD messages), so the
specification is now built from the parsed values, width and precision
are capped at 4096, and a count conversion's argument is passed over
rather than written.
2026-10-08 08:33:28 -04:00
Milenko 6f0f2992cb Widgets: a game map's run none of the main menu's profile functions
A widget's event handlers name their function by its index in the table,
which nothing checked, so a game map's widget could run the main menu's
profile functions (deleting and saving player and playlist profiles, the
demos) and the port's own menu functions (writing config.toml, quitting,
connecting), on its created event too. The shipped maps' widgets run none
of these. Now only the port's own menu tags run the port's functions, and
only the main menu runs its profile functions; a refusal is logged once.
2026-10-08 08:33:20 -04:00
Milenko 22bb651e68 Write the last multiplayer map's name from a buffer of the size written
saved_game_file_remember_last_used_multiplayer_map wrote 256 bytes from
the caller's name, which the menus' map list keeps in 64, so whatever
followed it in memory went into lastmpmp.txt. The name is now copied into
a zeroed buffer of the written size first.
2026-10-08 08:31:13 -04:00
MrBruh 73dc01d09a Stereo sounds in the world fade as mono ones do
#191's inverse-distance gain replaces the linear fade for a positioned stereo sound rather than adding to it, so it is as loud as a mono sound at the same distance (both curves together left it some 7 dB quieter at 40 units and 15 at 60), and it is the fade the reverb send takes back out, so the reverb follows the 3D room rolloff as a mono sound's does. A 3D sound is not cut off at the tag's maximum distance either: none starts past it.
2026-10-08 23:35:08 +13:00
MrBruh 274282c184 Merge pull request #191 from meowsandstuff/audio/upstream-distancefade-fix 2026-10-08 23:31:48 +13:00
meowsandstuff 0e220b8831 Fix positional stereo audio distance attenuation 2026-10-08 21:19:46 +11:00
MrBruh 2d2348cd7d Reverberate and muffle stereo sounds in the world
A stereo channel's positioned sound is now given what a 3D channel's is: the same occlusion, obstruction and underwater listener (as the 3D call passes them) and its class's wet gain make its I3DL2 source, so the mixer muffles its direct path and sends it to the reverb as it does a 3D voice. The room send rolls off with distance as a 3D voice's does, the game's own fade of the stereo voice's volume taken back out of it. Unpositioned stereo stays unpanned and dry.
2026-10-08 22:21:13 +13:00
MrBruh a14401ac7d Pan stereo sounds towards where they are
A sound with a position plays on a 3D channel, but those are mono: a stereo one (a Custom Edition map's gunfire, a bullet's impact) fell back to a stereo channel, which the Xbox never panned, so it was only faded with distance and came from nowhere. update_channels now gives a stereo channel's sound in the world a pan towards it, as the mixer pans a 3D voice; the mixer pans the channels' middle and keeps their difference as wide as the far ear's gain. Unpositioned stereo plays as before, and no channel pools change.
2026-10-08 21:35:40 +13:00
MrBruh 71bf206bd0 Sound tags from files over a map's, and a 16 MB sound cache
Our version of #147. With audio.loose_sounds (off by default), each of a map's sounds that has a Halo PC sound tag file of its name in the data root's tags folder plays from it (port/linux/game/loose_sounds.c); loose_sounds_reload and loose_sounds at the console read them again or give the map's back. The files' samples are made the Xbox ADPCM this build plays through the Custom Edition converter, so no channel pools change and stock maps play as before. The override is written into the map's definition in place, keeping the counters the game updates; a change stops every sound and flushes the sound cache first, and old samples are freed once no cache block holds them. A split sound's length is its chain's.

The sound cache is HALO_PORT_SOUND_CACHE_SIZE: 16 MB on desktop, the Xbox's 4 MB on Android, with the debug view's buffer sized to match.
2026-10-08 20:22:16 +13:00
MrBruh 544ee497b6 Resampler comments as the file writes them
#186's comment over the constants goes, and the resampling section says again what the low pass does in figures: a 22 kHz voice 0.5 dB down at 10 kHz, its images 80 dB down but for those of the band's last few hundred hertz, about 20 dB.
2026-10-08 17:19:18 +13:00
MrBruh 895d4cb59e Merge pull request #186 from meowsandstuff/audio/sinc-passband-pr 2026-10-08 17:14:34 +13:00
MrBruh 5b3282d465 Merge pull request #188 from xshxdex98/upstream-hud-no-secondary-elements 2026-10-08 16:46:20 +13:00
xshxdex98 57038d51c9 Weapon HUD: no secondary magazine drawn for a weapon without one
#180 gave a weapon without a second magazine the secondary's overlays at
rest (default and always) and states at rest (not disabled). The Xbox
never set those overlays, and an empty magazine's total ammunition state
is disabled, so the stock HUDs' secondary numbers and icons, which never
showed, drew over the campaign HUD's ammunition and grenade panels.

Such a weapon now leaves the secondary overlays unset, as the Xbox did,
and its states read the cleared, empty magazine. #180's fix stays: the
secondary's overlays no longer write over the primary's.
2026-10-07 22:27:32 -05:00
meowsandstuff 9ec3d47cea Preserve source treble in the native sinc resampler 2026-10-08 13:55:24 +11:00
MrBruh 6d840473da sv_say: leave out '|'
The HUD's text takes '|' and the character after it as one escape (draw_string.c, parse_unicode_string), so a map's message ending in '|' had its drawing read past the terminator. sv_say leaves '|' out of what it shows.
2026-10-08 15:35:54 +13:00
MrBruh 11b937653c Merge pull request #182 from xshxdex98/upstream-script-sv-say-end-game 2026-10-08 15:34:13 +13:00
MrBruh 66541c670d Merge pull request #181 from xshxdex98/upstream-particle-missing-sequence 2026-10-08 15:34:12 +13:00
MrBruh 1588addbb1 Merge pull request #180 from xshxdex98/upstream-hud-secondary-magazine 2026-10-08 15:34:10 +13:00
MrBruh 3ef06395be Merge pull request #179 from xshxdex98/upstream-script-none-object 2026-10-08 15:34:08 +13:00
MrBruh a1fdbacb8c Merge pull request #157 from xshxdex98/upstream-menu-max-players 2026-10-08 15:34:05 +13:00
MrBruh 81be9a5dfa Barrier before copying the visibility counters
ES 3.1 makes atomic counter writes visible to a buffer copy only after glMemoryBarrier(GL_BUFFER_UPDATE_BARRIER_BIT); Zink and Turnip, where #122 was measured, add the barrier themselves, other drivers need not. glMemoryBarrier joins the Android GL list (a driver without it is only called with atomic counters, which need ES 3.1).
2026-10-08 15:05:30 +13:00
MrBruh e6c970a099 Merge pull request #122 from startupfoundry/es-visibility-snapshots 2026-10-08 15:04:33 +13:00
MrBruh 8fca9ef427 Mark the short camera track fallback as the port's
#152's fallback gets a port: comment and includes cseries/errors.h, as the rest of source/ does, and clamps t with PIN; a pitch not a number still samples the first point.
2026-10-08 15:04:27 +13:00
MrBruh 078901a907 Merge pull request #152 from innerhat-dev/following-camera-track 2026-10-08 15:02:13 +13:00
MrBruh 388cb86aa9 Read open's mode only when it is passed
The trace_marker interposer read a mode whenever any bit of O_TMPFILE was set, which O_DIRECTORY's bit is, so opening a directory read an argument never passed. It tests as glibc's __OPEN_NEEDS_MODE does. The comment no longer says the Steam Deck was measured.
2026-10-08 15:02:09 +13:00
MrBruh 63a758658c Merge pull request #128 from startupfoundry/steamos-trace-marker 2026-10-08 15:00:54 +13:00