Commit Graph

111 Commits

Author SHA1 Message Date
Zack Middleton e1f0a69716 Merge branch 'master' into game/eliteforce
Conflicts:
	Makefile
	code/qcommon/msg.c
	make-macosx-app.sh
2018-05-18 04:40:21 -05:00
Zack Middleton a82a99f68d Fix uninitialized bot_goal_t fields 2018-04-26 11:22:55 -05:00
Zack Middleton e9e11f1605 Fix possible bot goal state NULL pointer dereference 2018-04-26 11:22:55 -05:00
Zack Middleton e45538b1c5 Merge branch 'master' into game/eliteforce
Conflicts:
	README.md
	code/server/sv_client.c
2018-03-03 19:27:28 -06:00
Zack Middleton fc16ac6bd2 Fix invalid access to cluster 0 in AAS_AreaRouteToGoalArea()
Newer versions of BSPC such as 2.1h included with the Quake 3 GPL source
code create AAS files containing areas in cluster 0 if the area has no
reachabilities.

The AAS files included with Quake 3 and Team Arena do not contain areas
in cluster 0. It's apparent that BSPC would not create them. Instead it
created clusters with no reachability areas.

It seems the intention was to check if the areanum and goalareanum have
reachable areas using AAS_AreaReachability(areanum) everywhere before
calling AAS_AreaRouteToGoalArea(). This prevents adding cluster 0 to
the routing cache and portal cache. However, it is not checked
everywhere and including some places in the Game VM.

Fix AAS_AreaRouteToGoalArea() instead of trying to wack-a-mole with all
the places that call it.

Cluster 0 access reported by Thomas Köppe (github @tkoeppe) as causing
crashes in rare cases.
2018-02-04 09:07:44 -06:00
Zack Middleton 22fcd82965 Make FS_BuildOSPath for botlib.log consistent with typical usage
I don't think anywhere else uses "" to mean current game directory.
Though it's only an issue for my fork where I removed that behavior.
2017-12-23 17:01:08 -06:00
Eugene C f3bdd6f022 Don't allow qagame module to create "botlib.log" at ANY filesystem location 2017-12-23 16:41:13 -06:00
Zack Middleton d40b047f13 Correct spelling of two more words
Thanks Undeference for pointing out abreviations.
2017-11-22 20:17:21 -06:00
Edward Betts fe42b8653d Correct spelling mistakes. 2017-11-22 01:40:20 -06:00
Zack Middleton e46e9846fc Fix memory leak in (unused) AAS_FloodAreas() 2017-10-07 08:02:24 -05:00
Zack Middleton 815c898bf5 Don't redefine MAX_PATH in bot code 2017-10-04 22:13:50 -05:00
Thomas Köppe 39b0702550 [botlib/be_aas_def.h] Change array size from MAX_PATH to MAX_QPATH
The array is part of a structure and should have a fixed size that does
not depend on inclusion order.
2017-10-04 21:41:41 -05:00
Zack Middleton 4837f4619e Merge branch 'master' into game/eliteforce
Conflicts:
	code/client/cl_main.c
	code/qcommon/common.c
	code/qcommon/files.c
	code/qcommon/msg.c
	code/qcommon/q_shared.h
	code/renderercommon/tr_common.h
	code/renderergl2/tr_extensions.c
	code/sdl/sdl_glimp.c
2017-09-17 23:16:55 -05:00
Tobias Kuehnhammer 9c4c363ccc Fix friction in AAS_ClientMovementPrediction
Ground and water friction were reversed.
2017-08-02 15:05:46 -05:00
Zack Middleton c12b81a273 Fix strncpy usage in botlib
All usage of strncpy in botlib should now either set string
terminator or use Q_strncpyz.
2017-06-07 21:48:01 -05:00
Zack Middleton 9aae0948ab Remove unused define MAX_COMMANDARGUMENTS from be_ea.c 2017-06-07 21:11:38 -05:00
Zack Middleton d1631d6ea3 Use const char pointers when possible in botlib's libvar code 2017-06-07 18:54:49 -05:00
Zack Middleton cd41690fc3 Fix swapping AAS bboxes
Found in RTCW SP.
2017-02-27 18:18:15 -06:00
Zack Middleton da747fc291 Fix source filename/includepath length in l_precomp.c
source_t filename and includepath are 1024 but MAX_PATH is 64. As far as
I know the paths don't exceed that so this probably doesn't fix anything.
Similar changes were already made to l_script.c so this makes things
consistent. This was found because it was fixed in RTCW's code.
2017-02-19 09:24:50 -06:00
Simon McVittie 2ab109b772 Avoid 'register' declarations
gcc 6 with -Wall -Wextra warns:

code/botlib/l_precomp.c: In function ‘PC_NameHash’:
code/botlib/l_precomp.c:551:2: warning: ‘register’ is not at beginning of declaration [-Wold-style-declaration]
  int register hash, i;
  ^~~

Modern compilers either ignore the register storage class when
generating code, or generate better code without it, so just remove
most of them.

The remaining uses are in third-party bundled libraries (libjpeg, zlib),
and in a PowerPC-specific inline function consisting of inline
assembler (because I'm not 100% confident that it doesn't have
some practical use there).
2016-11-01 16:37:38 +00:00
Simon McVittie 7d4f9525df Fix mis-spellings of "separating" as "seperating"
Found by Debian's Lintian tool.
2016-09-22 08:56:30 +01:00
Thomas Köppe 90f2f02c55 [code/botlib/l_precomp.c] Fix string buffer overflow 2016-09-13 13:37:19 +01:00
Thomas Köppe 18d6c8fda2 [botlib] Use floating point absolute value rather than truncate to integer 2016-07-25 18:36:31 +01:00
Zack Middleton 6b9a3a47db Merge branch 'master' into game/eliteforce
Conflicts:
	code/renderergl1/tr_main.c
	code/renderergl2/tr_main.c
2015-07-09 18:42:11 -05:00
Zack Middleton 1d09a7d578 Fix abs() being used for long int in l_precomp.c 2015-06-28 18:13:06 -05:00
Zack Middleton c4f5176af4 Set bsp_trace_t::surface.flags to surfaceFlags in server and game
Revert last commit so that grapple sky check is compatible with BSPC
BotImport_Trace in (removed from repo) code/bspc/be_aas_bspq3.c.

Set bsp_trace_t::surface.flags instead of surface.value to trace_t::surfaceFlags.
surface.flags is only used for the sky check for grapple AAS reachability.
surface.value is not used at all.

bsp_trace_t is not part of the game VM API, so this does not affect VM compatibility.
BotAI_Trace in game was changed to match server. surface.value/flags are not used in game.
2015-02-18 15:17:57 -06:00
Zack Middleton dbd6f6d8b1 Fix AAS_Reachability_Grapple's sky surface check
Surface flags are stored in bsptrace.surface.value not flags.
2015-02-18 13:39:59 -06:00
Zack Middleton b7cd6b6088 Elite Force white space clean up
Also fixed some code to match ioq3 (a few comments, a printf, ..).
2014-10-29 10:13:12 -05:00
Zack Middleton c6e5f060fe Port Elite Force iorev2231 patch to latest ioq3
Port Thilo Schulz's Elite Force Holomatch patch to latest ioq3.
Patch for ioq3 svn r2231.

No support for OpenGL2 renderer yet.
2014-10-29 07:15:12 -05:00
Tim Angus 621a72e698 Fix a few warnings 2014-08-30 17:29:23 +01:00
Tim Angus 7d026177ad Fix assorted warnings 2014-08-25 14:48:49 +01:00
Zack Middleton eea9fbdb61 Fix unchecked buffer size issues in l_script.c and l_precomp.c
Found by Coverity.
2014-05-25 18:41:24 -05:00
Zack Middleton 078d004dc2 Fix potential buffer overflow in PS_ReadPrimitive
Found by Coverity.
2014-05-25 16:28:38 -05:00
/dev/humancontroller 9e9d6fa52c clean up return statements a bit more 2013-05-30 15:43:21 -05:00
/dev/humancontroller 9d626b6a12 drop some useless return statements 2013-05-30 15:43:21 -05:00
/dev/humancontroller bbd17d75ce reduce the amount of compiler warnings for variable shadowing 2013-05-30 15:43:20 -05:00
Zack Middleton feb012152c Give botlib com_basegame for botlib.log path
Before it always used BASEGAME fallback code.
2013-04-22 23:11:10 -05:00
Tim Angus 6983187a99 Remove old .mak files from botlib 2013-04-13 11:26:42 +01:00
Tim Angus 12115c28cd Fix the warning caused by fixing the warnings 2013-03-26 18:32:36 +00:00
Tim Angus 98360bcd57 Fix some of the things clang --analyze flagged 2013-03-26 16:50:03 +00:00
Zack Middleton 4cd60e5af7 Fix BotExportTest's args for BotGetReachabilityToGoal 2013-02-27 15:57:55 -06:00
Zack Middleton b9a33f84be Remove unused config string code from botlib 2013-02-27 15:55:01 -06:00
Zack Middleton 57cb0b2d89 be_ai_weap.c: s/move state/weapon state/g 2013-02-27 15:39:28 -06:00
Zack Middleton 372b07a97a Fix freeing source while parsing botfiles/items.c 2013-02-16 04:40:27 -06:00
Zack Middleton 82f83cd092 Fix some "> MAX_*" to be ">= MAX_*". 2012-11-18 19:09:54 +00:00
Thilo Schulz 56f16e10d6 Various bugfixes by Tobias Kuehnhammer (#5270)
- A stupid bug where bots re-trigger jumppads if they fell onto it.
- A small "memset" bug concerning player animations.
- Reward sounds were never cleared and thus they are played on a map restart.
- Safer and more secure handling of disconnected clients and clients with 
  malformed or illegal info strings.
- first_gauntlet_hit.wav was not played (ops/ps) bug
- capturelimit not hit (from OAX)
2012-07-01 17:27:52 +00:00
Zack Middleton 68b3b0922b static-ize inline functions for Clang/LLVM
From /dev/humancontroller.
2012-06-19 15:56:21 +00:00
Zack Middleton 945f01d4af more '\n' business
From /dev/humancontroller.
2012-06-19 15:14:57 +00:00
Zack Middleton a375f898f5 REFACTOR [anough to enough] 2012-06-18 16:39:58 +00:00
Zack Middleton f3e7012bdb REFACTOR [a vs an]
From /dev/humancontroller.
2012-06-18 16:31:16 +00:00