Commit Graph

1035 Commits

Author SHA1 Message Date
Ozkan Sezer 3d3d46887a tiny tidy-ups to snd_flac
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1404 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-30 08:51:34 +00:00
Eric Wasylishen 4bea6d51e2 UDP_Init: don't bother calling gethostbyname() if our hostname ends in ".local"
(a macOS thing), because it blocks for a few seconds and then fails
(on my system anyway), so it's pointless.

Fixes an annoying startup pause on macOS, which was reported as
https://sourceforge.net/p/quakespasm/bugs/15/

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1403 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-26 01:38:38 +00:00
Eric Wasylishen f92ce77fc9 PF_VarString: throttle "exceeds standard limit" warning message
Prevents console spam on "developer 1" if a mod calls PF_VarString often (e.g. In the Shadows textbooks).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1402 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-25 20:07:34 +00:00
Eric Wasylishen 3e4b9f8f6c Cbuf_Init: raise cmd_text from 8k to 256k to handle large .cfgs, from QS-Spike
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1400 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-21 20:43:05 +00:00
Eric Wasylishen 8011b3f9fd Host_Loadgame_f: rewritten version loads the whole .sav into memory
+ avoids "Loadgame buffer overflow" when loading saves from QS-Spike/DarkPlaces containing large comments
+ removes ugly } hack
+ should be a bit faster as we avoid calling fgetc for every byte

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1398 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-16 02:53:06 +00:00
Eric Wasylishen 83a0b5ae14 ED_ParseGlobals: switch strcpy() to q_strlcpy() to avoid crashing on certain bogus .sav's
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1397 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-15 22:18:41 +00:00
Eric Wasylishen 1f4c3514ad Host_Loadgame_f: block relative paths, like Host_Savegame_f does
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1396 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-09 20:42:22 +00:00
Eric Wasylishen a1c95a5978 gl_refrag.c: Hunk-allocate efrags and trim out unused functionality
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1394 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 19:39:18 +00:00
Eric Wasylishen 43b509ba4f Add "apropos" command from QS-Spike
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1393 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 18:18:57 +00:00
Eric Wasylishen 1c83b69cb6 CRC_Block: make input pointer const. From QS-Spike
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1392 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 07:14:53 +00:00
Eric Wasylishen 3cae0dae3f net_defs.h: add a preprocessor assertion that NET_MAXMESSAGE is sane
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1391 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 00:45:00 +00:00
Eric Wasylishen 2d394e7a29 PF_lightstyle: add bounds check to avoid clobbering memory
Found when trying to load e1-4.bsp from https://github.com/plankatron/quakemash

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1390 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-01 21:31:07 +00:00
Eric Wasylishen 182369ca03 BoundPoly: fix infinite recursion when loading e1-4.bsp from https://github.com/plankatron/quakemash
Fix from QS-Spike.
TODO: replace all 9999.. constants used for min/max calculations with FLT_MAX/-FLT_MAX

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1389 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-01 21:31:00 +00:00
Eric Wasylishen 198c828b03 client.h: raise MAX_STATIC_ENTITIES further to 4096, and MAX_EFRAGS from 4096 to 8192
this is for a limit breaking map in developement. TODO: these can both be made dynamically
allocated, MarkV has applied this patch.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1388 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-31 00:56:13 +00:00
Eric Wasylishen 4b6eb1bbe2 client.h: raise MAX_STATIC_ENTITIES from 512 to 2048
Rationale is AD was hitting this and just using non-static ents instead, which is counterproductive.
2048 matches QS-Spiked.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1387 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-30 20:35:31 +00:00
Eric Wasylishen 4fe5f6956f Adjust "exceeds standard limit of" debug warnings to include the actual QS limit.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1386 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-30 06:26:16 +00:00
Ozkan Sezer 8d919e5cd0 sys_win.c: properly check the returned value from GetCurrentDirectory()
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1384 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-10 20:01:47 +00:00
Ozkan Sezer 182ec759b8 snd_flac.c: removed unnecessary metadata.h include. fixed build and
run against legacy flac <= 1.1.2 with LP64 systems.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1381 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-09 22:41:55 +00:00
Ozkan Sezer 087222e8f5 snd_xmp.c: fix windows static linkage to libxmp.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1380 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-09 22:41:17 +00:00
Ozkan Sezer 3d4c9cd2b5 added _WINSOCK_DEPRECATED_NO_WARNINGS among the preprocessor definitions
in Visual Studio project files.  fixes C4996 warnings: "'inet_ntoa': Use
inet_ntop() or InetNtop() instead" from VS2013 and newer.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1377 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-02-14 11:00:29 +00:00
Eric Wasylishen 702b0decf1 in_debugkeys: print time, and log text input mode changes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1373 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-01-17 22:39:19 +00:00
Eric Wasylishen 197127fc97 Add autocompletion for "timedemo" command's demo name
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1372 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-01-17 22:38:12 +00:00
Ozkan Sezer bc5cc7094a add missing SDLCALL to SDL callback functions (it need not be nothing for every platform.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1367 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-12-17 12:10:07 +00:00
Ozkan Sezer 5025e9e457 added tracker music support using libxmp >= v4.2.0 (off by default.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1364 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-12-07 09:24:49 +00:00
Ozkan Sezer 6e1aa25e78 sync'ed arch_defs.h and filenames.h with uhexen2 tree (for sake of symmetry.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1363 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-12-07 06:55:04 +00:00
Eric Wasylishen fc78971b59 Only print "maps/*.lit loaded" messages on develoepr 2, the are spam on developer 1.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1357 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-22 18:38:58 +00:00
Ozkan Sezer b04a4a5fbd Makefile.darwin: removed bundle1.o from 10.6/i386 linkage (crashes. only needed for x86_64.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1353 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-16 09:32:25 +00:00
Ozkan Sezer 945be672af - rebuilt SDL2 for windows and osx from SDL hg rev.10541
to prepare for and test their upcoming 2.0.5 release.
- changed Makefile.darwin so that SDL2-386 builds target
  10.6+ which is an SDL2-2.0.5 requirement.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1351 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-15 19:28:47 +00:00
Ozkan Sezer 796f7b7601 changed version to 0.92.2, added placeholders for changelog in the readme.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1350 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-14 09:47:07 +00:00
Ozkan Sezer 2c034462e5 Fixed -Wformat-length warning from experimental gcc-7:
sbar.c: In function 'Sbar_DrawInventory':
sbar.c:673:18: warning: '%3i' directive writing between 3 and 11 bytes into a region of size 6 [-Wformat-length=]
   sprintf (num, "%3i", q_min(999,cl.stats[STAT_SHELLS+i])); //johnfitz -- cap displayed value to 999
                  ^~~
sbar.c:673:17: note: directive argument in the range [-2147483648, 999]
   sprintf (num, "%3i", q_min(999,cl.stats[STAT_SHELLS+i])); //johnfitz -- cap displayed value to 999
                 ^~~~~
sbar.c:673:3: note: format output between 4 and 12 bytes into a destination of size 6
   sprintf (num, "%3i", q_min(999,cl.stats[STAT_SHELLS+i])); //johnfitz -- cap displayed value to 999
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1346 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-07 20:00:27 +00:00
Ozkan Sezer f095cd1abf filenames.h: update copyright years from mainstream.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1344 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-10-01 11:00:35 +00:00
Ozkan Sezer c0d6f2e736 minor stuff..
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1343 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-09-12 14:03:01 +00:00
Ozkan Sezer c0b9eab645 meh..
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1339 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-08-23 11:47:12 +00:00
Ozkan Sezer ad055bf6fd minor updates to some files from uhexen2 (for sake of symmetry between the two trees.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1337 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-08-23 11:24:24 +00:00
Ozkan Sezer 633f009252 Fix out of bounds access to keybindings: K_PAUSE is 255. Noticed by Axel Gneiting (bug #14).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1336 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-08-21 17:37:21 +00:00
Ozkan Sezer 56c2e44b87 snd_mikmod.c: we don't truly need the high-quality mixer. (and it's slow too...)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1334 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-08-08 04:04:14 +00:00
Eric Wasylishen b683cd2fcd Fix for large menu scale factors, broken in r1293
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1333 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-07-20 04:15:02 +00:00
Ozkan Sezer d0bca18060 changed version to 0.92.1 for future development
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1329 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-07-02 05:41:25 +00:00
Eric Wasylishen 7897f0700e in_sdl.c: make new joy_* cvars CVAR_ARCHIVE
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1322 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-26 23:37:41 +00:00
Ozkan Sezer 2cdb92e63b just remove the if0'ed part..
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1320 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-25 05:24:11 +00:00
Ozkan Sezer 9c7eb2c6ff Host_Loadgame_f(): no need for entnum >= sv.max_edicts check
because EDICT_NUM() does it already. also move ent->free=false
statement to partial zero-fill case.
Host_ClearMemory(): remove check before free(sv.edicts)
SV_Init(): initialize sv.edicts to NULL (just paranoia)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1319 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-25 05:21:22 +00:00
Ozkan Sezer de4bea0e74 Loadgame_f() may go past sv.num_edicts, but it does not go through
ED_Alloc(), therefore such ents will have uninitialized members.
This used to lead to bad crashes with e.g. Rubicon Rumble Pack maps
since svn r1286 when we began allocating sv.edicts using malloc and
only zero-filling when necessary.  So, check against sv.num_edicts
and zero-fill the ent properly when necessary.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1318 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 16:04:25 +00:00
Ozkan Sezer e1c26de7fb silence pesky warnings from old compilers
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1316 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 07:40:08 +00:00
Ozkan Sezer 301630d8ac change version to 0.92.0
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1315 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 07:04:11 +00:00
Eric Wasylishen 3261dd1213 add -protocol [15/666/999] command line flag, patch from szo
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1314 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 06:15:47 +00:00
Eric Wasylishen 5b21d5935f RMQ protocol (999) support, adapted from RMQEngine
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1313 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 06:15:41 +00:00
Eric Wasylishen 316de63f98 limit increases to handle oms3 map pack.
MAX_MAP_LEAFS: 65535 -> 70000
MAX_LIGHTMAPS: 256 -> 512

TODO: maybe drop static arrays based on MAX_MAP_LEAFS like, see R_InitVisCache in RMQEngine.
TODO: dynamically allocate the static `lightmaps` array as well; with this last limit increase it's 32MB.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1312 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-24 06:15:33 +00:00
Ozkan Sezer 623f8c6698 bgmusic.c (BGM_UpdateStream): avoid a possible endless loop.
(just a paranoid safeguard, shouldn't happen in real life.)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1311 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-23 08:03:43 +00:00
Ozkan Sezer 917543bc50 sv_user.c: partially revert svn commit r182, move wishdir and wishspeed
from global to local context, and pass them as params to SV_Accelerate()
and SV_AirAccelerate().

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1309 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-11 05:36:05 +00:00
Eric Wasylishen 5660094d1d host_cmd.c: add new "setpos" command.
developer cheat to teleport to a given origin, optionally looking in a given direction.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1308 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-07 07:08:23 +00:00