Commit graph

2920 commits

Author SHA1 Message Date
Bill Currie
6da725d510 Simplify and slightly improve Cmd_StuffCmds().
Make use of dstring to manage the built command mini-script.
Ensure + and - that do not come after whitespace do not start a new
command.
2011-09-08 12:37:52 +09:00
Bill Currie
e8e8dad535 Fix a potential crash with the cvar reset command. 2011-09-07 21:07:52 +09:00
Bill Currie
2ae33a753a Support non-interleaved mmap sound.
Unfortuanately, I can't test this properly as I don't have any such
hardware, but as the code is mosly an edited copy of the interleaved code,
any errors should be easy to fix.
2011-09-07 17:00:57 +09:00
Bill Currie
a8ea3aaad9 Allow dma sound targets to specify an xfer function. 2011-09-07 17:00:18 +09:00
Bill Currie
9ffa1f410a Detect the silent death of the jack client thread.
When jackd gets an unhandled xrun, it stops all processing but neglects to
tell the client about it. Thus, add a bit of a watchdog function to
s_update() and assume the client thread is dead if there's no sign of life
after one second. No more hanging on exit.
2011-09-07 15:16:27 +09:00
Bill Currie
581539f7af Make debug printing a little smarter.
When a field or global name is used, the printed value reflects the type
of that variable.
2011-09-07 09:41:06 +09:00
Bill Currie
91f6b7f555 Better use of Sys_Printf. 2011-09-07 09:41:06 +09:00
Bill Currie
39190c5e2c Remove an unnecessary include.
Don't need that :P
2011-09-07 09:41:05 +09:00
Bill Currie
deddb5cb6a Partially document the message api. 2011-09-04 09:58:12 +09:00
Bill Currie
9afb691dd9 Change MSG_ReadShort to return an unsigned short.
Avoiding the sign extension by default seems to be more useful.
2011-09-04 09:58:12 +09:00
Bill Currie
12e238f806 Add a function to convert quake angles to a quaternion.
The test works by comparing the result of AngleVectors with forward,
right, and up vectors rotated by the quaternion resulting from AngleQuat.
2011-09-04 09:58:12 +09:00
Bill Currie
1c47f9e16d Kill some magic numbers. 2011-09-04 09:58:12 +09:00
Bill Currie
fe3cdbcf5a fix a snafu in quattomat 2011-09-04 09:58:12 +09:00
Bill Currie
eb205d73fd Add a function to convert a quaternion to a rotation matrix. 2011-09-04 09:58:12 +09:00
Bill Currie
5c9ab2832f Fix win32 cross-building.
No idea if the code actually works :(
2011-09-04 09:48:16 +09:00
Bill Currie
e50f0e18ba Make netmain use netadr_t, same as netchan.
Having sockaddr and friends in a header file was bad news for portability
(especially windows).
2011-09-04 09:45:19 +09:00
Bill Currie
5ee01879ec Missed a spot for net_family. 2011-09-03 16:28:00 +09:00
Bill Currie
80b2b82092 Add a cvar to control the address family.
OpenBSD doesn't allow mixed binding of ipv4 and ipv6, but being able to use
ipv6 enabled qf with ipv4 addresses would be nice...
2011-09-03 13:04:47 +09:00
Bill Currie
29a52a8cc8 FIx it for IPv4, too.
Oops, I forgot about that :P
2011-08-31 18:32:47 +09:00
Bill Currie
bfcdc5ed17 Fix qw networking on OpenBSD.
OpenBSD is very picky about the address size, but does provide sa_len and
friends to make life easier. Use them as appropriate :)
2011-08-31 18:07:41 +09:00
Bill Currie
f75b0a611b Some compile fixes for OpenBSD 2011-08-25 22:35:20 +09:00
Bill Currie
0d5bebabe2 Replace qsockaddr with AF_address_t.
It seems qsockaddr's assumptions aren't necessarily portable, as OpenBSD
seems to be doing weird things with qsa_family. Even if that's not the
case, this is cleaner.
2011-08-24 09:14:02 +09:00
Jeff Teunissen
1cc2b1b178 whitespace 2011-08-23 01:39:40 -04:00
Jeff Teunissen
d2fa1e2479 QW IPv6: lose a pointless assign
We already assign a->family earlier, no need to do it again.
2011-08-23 01:39:40 -04:00
Bill Currie
87ad73f146 Add even more info to the address comparison failure.
It turns out the family check is failing. Why?
2011-08-22 18:34:52 +09:00
Bill Currie
ce07000054 Make the address comparison a little more informative.
Still hunting the openbsd connection issues. It seems the address
comparision isn't working.
2011-08-22 10:30:35 +09:00
Bill Currie
1402feafd2 Kill some magic numbers and clean up some whitespace. 2011-08-20 16:30:43 +09:00
Bill Currie
cf2845a387 Ensure Sys_Error can not form an infinite loop.
I don't remember what propted this change, but it seems like a good idea
anyway, so get it into the repository and clean out my stash :)
2011-08-20 13:13:43 +09:00
Bill Currie
bb065bd233 Be a little leniant with vector param stores.
qcc always used vector stores to load values into the function parameters,
but if the location of the value is too close to the end of the global data
block (the vector spans the end of the block), it would trigger the bounds
check code. Thus, allow such instructions without a murmer, so long as it
actually is a parameter write.
2011-08-16 12:10:05 +09:00
Bill Currie
53049e33eb Make the interface code more portable.
It turns out SIOCGIFINDEX isn't (readily?) available in BSD, but
if_nametoindex() is defined by posix, so use that instead.
2011-08-16 10:03:43 +09:00
Bill Currie
4cec4b9f96 Rewrite the interface detection code.
Turns out SIOCGIFCONF is rather painful to get working cross-platform. This
should work better, and can be used even with ipv6 :)
2011-08-11 18:32:39 +09:00
Bill Currie
c1a60551ae Clean up default rate setting and add explicit support for 48kHz. 2011-08-11 17:22:14 +09:00
Bill Currie
5feb0454ca Add and use SYS_SND for both sound and cd debug prints. 2011-08-11 17:20:33 +09:00
Bill Currie
290ac30efc Fix x11 gamma control.
Seems we lost a header include at one stage.
2011-08-11 16:08:20 +09:00
Bill Currie
d3c2afc5d7 Handle old global vector compontents.
In the original save gave format, global vectors were saved as individual
components rather than as a single vector, using the _x/_y/_z tags on the
vector name. However, recent qfcc completely dumped vector components as
separate defs, so old save games would have trouble loading with progs
built with a recent qfcc. Thus, do the component translation if necessary.
2011-08-11 15:36:51 +09:00
Bill Currie
ff857a9c71 Permit control of single character tokens. 2011-08-11 14:22:27 +09:00
Bill Currie
805256ff65 Use the last used interface address for the socket address.
This allows the correct address to be put in the server info packet
allowing nq to work on multi-homed hosts. More testing needs to be done to
ensure nothing is broken, or better yet, a rewrite of the networking code
to properly associate the information with the packets.
2011-08-06 21:47:57 +09:00
Bill Currie
ae9404cc27 Obtain the interface on which the packet arrived.
Once I sort out just how to get the information to the right place, this
should fix a lot of the problems with nq on multi-homed nodes.
2011-08-06 20:33:20 +09:00
Bill Currie
3088566502 Replace get_address() with get_iface_list(). 2011-08-06 18:57:53 +09:00
Bill Currie
6f0ab844ea Some more nq networking debug prints. 2011-08-06 16:54:01 +09:00
Bill Currie
eba66b1dde Doc tweaks and some whitespace. 2011-08-02 17:32:36 +09:00
Bill Currie
76f894a29f Add some debug prints for nq networking. 2011-08-02 15:22:57 +09:00
Bill Currie
e5876752f3 Document the datagram net driver interface. 2011-08-02 15:22:33 +09:00
Bill Currie
e89532cb9f Fix a couple of missed view.h->clview.h changes. 2011-08-02 11:29:20 +09:00
Bill Currie
8e140bc97e Use SYS_NET instead of SYS_DEV for networking debug prints. 2011-07-30 17:44:03 +09:00
Bill Currie
28610c08e3 Do not try to build testsound when not building sound libs. 2011-07-30 15:03:19 +09:00
Bill Currie
bf58ad9d80 And silence a "set but not used" warning. 2011-07-29 17:21:33 +09:00
Bill Currie
77dcd07b37 Remove a dead function. 2011-07-29 14:30:54 +09:00
Bill Currie
50341d0972 Whitespace. 2011-07-29 13:51:58 +09:00
Bill Currie
07d5b114bc Clean out some dead code and variables.
We haven't had serial or ipx support for a long time.
2011-07-29 10:11:14 +09:00