Commit graph

135 commits

Author SHA1 Message Date
Zack Middleton
755b2f38f0 Offer post-crash safe settings on a per-mod basis
Offer to restore settings when loading a mod that crashed, not the first
mod that gets loaded after a crash. Before the first mod loaded (usually
baseq3) would get the option even if missionpack or some other mod crashed.

- Make pid files separate for each fs_game.
- Remove/write pid every time switching fs_game.
- Create path before writing pid file otherwise it fails on first run.
- Show mod description.txt or fs_game instead of engine name in abnormal
  exit message.
- Check com_fullyInitialized in Com_Error before removing PID,
  otherwise "ioquake3 --version" segfaults when accessing fs_gamevar->string
  (plus not fully initialized isn't really a normal shutdown).
2016-10-09 18:18:08 -05:00
Victor Roemer
398dea397c Fix Makefile for OSX
Bump base SDK from 10.5 -> 10.7
Just use the builtin __APPLE__
2016-06-12 17:17:33 -04:00
SmileTheory
3bd7a8d842 Search for mods in steam path as well as home and base paths. 2015-09-25 04:52:17 -07:00
SmileTheory
f860a753e0 Add Steam's Quake 3 Arena dir to game dirs on Windows. 2015-09-17 02:53:19 -07:00
Zachary J. Slater
87e0bf6eaf Better language, less tense 2015-08-28 18:19:29 -07:00
Zachary J. Slater
4667210e1d more helpful error message
Can’t find your pak0.pk3? Here’s where we tried looking.
2015-08-28 10:36:46 -07:00
Zack Middleton
c7500bb28e Don't segfault in FS_CreatePath when there are no path seperators 2015-07-12 20:06:24 -05:00
Zack Middleton
67d9ecd070 Fix FS_FOpenFileReadDir non-zero file handle when file not found in pk3
If a pk3 search path is passed to FS_FOpenFileReadDir, a non-zero
file handle is returned if file is not found. This causes incorrect
behavior in FS_ReadFileDir (when a pk3 search path is passed in)
which only checks file handle, not length, for seeing if file exists.

I don't know of any issues in ioq3 caused by this.
2014-03-18 20:49:52 -05:00
Zack Middleton
2d45e57068 Support FS_SEEK_END and negative offset for zipped files in FS_Seek
Use FS_SEEK_END in sound code instead of working around it.
If FS_SEEK_SET and going to current position, just return.
2013-11-08 18:43:34 -06:00
Zack Middleton
c69db4a400 Remove unused variable baseOffset from fsh[] 2013-11-08 18:43:20 -06:00
Zack Middleton
90c98c90a3 Fix VM FOpenFile( FS_READ ) files seeking twice in FS_Seek 2013-11-08 18:42:56 -06:00
/dev/humancontroller
120e296a74 fix some OOB enumerator usages
(should be no-op with usual compiler workings)
2013-05-30 15:48:49 -05:00
/dev/humancontroller
9d626b6a12 drop some useless return statements 2013-05-30 15:43:21 -05:00
Harley Laue
1b2a6abed9 Rename FS_CheckFilenameIsNotImmutable to ..IsMutable 2013-04-24 14:45:37 -05:00
Zack Middleton
6c88bf8aee Rename FS_CheckFilenameIsNotExecutable to ..NotImmutable 2013-04-24 14:14:13 -05:00
Zack Middleton
936db459ee Don't allow modifying qvms or pk3s
Exception for allowing pk3s to be downloaded.
2013-04-24 14:11:18 -05:00
Zack Middleton
b95d8a91aa Fix referencing pk3 with only qagame QVM 2013-04-22 16:21:46 -05:00
Zack Middleton
a7317ac0d5 Add fallback for __func__ (ioq3 isn't compiled as c99 by default)
Using Debian gcc version 4.7.2 and clang 3.0-6.1 anyway.
2013-04-20 21:28:21 -05:00
Tim Angus
98360bcd57 Fix some of the things clang --analyze flagged 2013-03-26 16:50:03 +00:00
Ensiform
9a752ce8cd Use PATH_SEP for a debug message in FS_FOpenFileReadDir 2013-03-18 14:44:34 -05:00
Zack Middleton
2e45edb550 5717 - Gamecode can open file "" for reading 2013-02-15 21:08:47 -06:00
Zack Middleton
6f88df262c Don't add pk3dirs if connecting to a pure server
Only .cfg etc would be read from pk3dirs, but they should be treated like pk3s that are not on the pure list.
2013-02-11 19:15:14 -06:00
Zack Middleton
ebee21157c Change pk3dir README / comments to fit in better 2013-02-11 18:02:40 -06:00
Andrew Browne
37a9614179 5289 - Support for .pk3dir 2013-02-11 17:58:24 -06:00
Tim Angus
70b165ee33 Fix screwed up whitespace in files.c
Apologies to anyone merging this :(
2013-01-13 22:26:09 +00:00
Tim Angus
5fd456ff7c Fix FS_FOpenFileRead corner case
FS_FOpenFileRead is a fairly mental function that changes its return
behaviour depending on whether or not file is NULL or not. It turns out
in the case where file is NULL, we were returning the wrong value when
the file didn't exist.
2013-01-13 22:26:09 +00:00
Zack Middleton
82f83cd092 Fix some "> MAX_*" to be ">= MAX_*". 2012-11-18 19:09:54 +00:00
Zack Middleton
d092ba6627 Fix restoring fs_game when default.cfg is missing. 2012-10-26 01:27:16 +00:00
Thilo Schulz
b5456faaea Revert pk3dir patch because some users report the code gets stuck in an infinite loop in the new code 2012-07-02 01:03:55 +00:00
Thilo Schulz
b757968839 Support for .pk3dir (#5298) - Patch by Andrew (dersaidin@gmail.com) 2012-07-01 18:00:18 +00:00
Zack Middleton
ad5c5c32a6 REFACTOR [reletive -> relative]
From /dev/humancontroller.
2012-06-18 16:32:03 +00:00
Zack Middleton
c211114cb0 #5462 - do not require clients to have a matching qagame.qvm (adapted from OpenArena) 2012-05-07 22:26:03 +00:00
Thilo Schulz
7eba074ce4 Allow VM_Restart to load unpure qagame.qvm so that local server won't crash after map_restart if server operator has qagame.qvm residing outside pak file (#5196)
Thanks to "rg3" for providing a shell account
2011-09-27 22:16:07 +00:00
Zack Middleton
b14c6d581c Use correct variable for getting buffer length, reported by Ensiform. 2011-09-19 02:10:17 +00:00
Zack Middleton
2b50313c9a Use platform's path separator in FS_Path_f (for consistent output on Windows), reported by Ensiform. 2011-09-18 18:07:57 +00:00
Zack Middleton
3774a8aeee Restored loading ".dat" journal files from disk when connect to pure servers. Accidentally broke in r1911, reported by Ensiform. 2011-09-12 14:54:01 +00:00
Thilo Schulz
de182882f1 Fix auto game-restart when disconnecting from a server that explicitly set fs_game to "baseq3" instead of "" 2011-08-24 14:47:57 +00:00
Thilo Schulz
06628af7c5 Don't do game_restart if game directory changed from "" to "baseq3" or "baseq3" to "" 2011-08-03 00:58:33 +00:00
Thilo Schulz
8ab958fab9 Fix pak order when reconnecting to a server.
When /connect to the same server is issued while already connected, an initial call to CL_Disconnect will remove all pak file references
and reset the pak order.
Reordering only occurs through FS_Restart, which in turn is called when checksum feed changes. Because we reconnect to the same server,
checksum feed never changes and pak file order is not restored to server order again. With certain pak file constellations between client/server,
this may result in an inability to load files from paks which are not correctly detected as referenced paks.
2011-08-01 01:14:26 +00:00
Thilo Schulz
23f6fd1633 Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings 2011-07-29 12:27:00 +00:00
Thilo Schulz
c4f739b8d0 Fix extension name comparison for DLL files 2011-07-24 22:12:21 +00:00
Thilo Schulz
e06c117e9e - Implement dual protocol support (#4962)
- Fix several UDP spoofing security issues
2011-07-12 11:59:48 +00:00
Thilo Schulz
d57ba6a57b - Automatically reset fs_game to "" if it was supplied by the user and is equal to com_basegame
- Fix problem where users could change values of CVAR_INIT variables after the call to Cvar_Get() via Com_StartupVariable()
- Move sound shutdown after client shutdown so VMs don't hold invalid sound handles in memory
2011-06-22 23:00:36 +00:00
Thilo Schulz
dee3724a13 - Improve game_restart:
* differing screen resolutions and network settings are now honoured when changing fs_game
  * Fix hunk memory leak on game_restart
  * Move cls.state and cls.servername to clc so connection state is fully preserved over game_restart
  * Revert back to previous fs_game after disconnecting from a server that triggered a game_restart
  * Fix error dialog popping up after every game_restart if an error happened previously (reported by Ensiform)
- Fixed that not all commands added by CL_Init() would be removed by CL_Shutdown()
2011-06-21 11:18:35 +00:00
Thilo Schulz
af5020c57c - Don't try to load QVM/DLL files on pure servers
- Fallback after failed DLL load will be VMI_COMPILED, not INTERPRETED
2011-06-15 22:25:13 +00:00
Thilo Schulz
9219cde4e8 - Small change to search path order - local files not in .pk3s take precedence over files in pk3s. Should make life easier for modders/mappers wanting to override textures that are already contained in some older pk3
- Make VM loading more robust, change loading order: when vm_* == 0 first try loading DLL, then QVM in *each* search directory/path
- Fix FS_FileForHandle that would return a FILE pointer to invalid file handle 0
2011-06-15 22:09:26 +00:00
Thilo Schulz
698a9c51ec Fix newlines in Com_Error, patch by Zack Middleton (#5023) 2011-06-06 14:51:02 +00:00
Thilo Schulz
b509d770a7 - Remove Q_strrchr(), replace with standard, portable strrchr()
- Add strrchr() to bg_lib.c, patch by DevHC
2011-05-15 14:08:03 +00:00
Thilo Schulz
c95bd0a684 Remove newlines from Com_Error message format strings, patch by DevHC 2011-05-12 14:02:48 +00:00
Thilo Schulz
d34c6b7e0b Revert protocol 69 pending further discussion (#4962) 2011-04-27 20:17:45 +00:00