Commit Graph

2151 Commits

Author SHA1 Message Date
Zack Middleton 1a7628126a OpenGL2: Fix shadow cubemap segfault
Changed image size to 512, but 'data' buffer is only 16x16 resulting
in libGL segfault. Use NULL instead like other dynamic images.
2015-03-24 03:39:53 -05:00
Zack Middleton f47d148b72 Add a comment about non-functional bot code 2015-03-23 20:36:27 -05:00
/dev/humancontroller 1ce8ba0cdb Fix return values in nested system calls from QVMs
When the engine is compiled with Clang it appears that the return value
is being written to the WRONG address, either due to the vm_ variables being
changed (unexpectedly) elsewhere, or as a result of bad assembly assumptions;
having a stack variable pointing to where to write the return value seems
to do the trick.

This fixes the case where, for a trap_Register()-like call, weird numbers
are being returned when, during the process, an error message is printed
(which in Tremulous results in a QVM call and (nested) system call).
2015-03-23 20:17:07 -05:00
Author: Xycaleth 33efe82de9 OpenGL2: Fix shadow cubemap size 2015-03-23 20:05:35 -05:00
Zack Middleton 7a39f4a30c Fix attacker icon being default image if attacker left
With cg_draw3dicons 0 if attacker is kicked or disconnects, the
attacker icon becomes the default image.
2015-03-23 19:54:26 -05:00
Zack Middleton 1897afbd3a Fix crosshair drawing not clearing color
The renderer color is set to health color when drawing crosshair. After
drawing the crosshair, the renderer color was not cleared and could affect
other things. With cg_draw3dicons 0 and cg_drawCrosshairNames 0 it affected
the attacker icon.
2015-03-23 19:33:56 -05:00
Zack Middleton 5fb49acda8 Clean up CG_DrawProxWarning design
Hopefully fixes the following warning
cg_draw.c:2315 assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
2015-03-20 21:21:47 -05:00
/dev/humancontroller c4a2836269 Fix Com_RandomBytes weak-random case
255 is valid for unsigned char too.
2015-03-20 18:50:58 -05:00
SmileTheory 40cfbc9a82 OpenGL2: Fix culling again. 2015-03-12 21:44:06 -07:00
Zack Middleton 148603c951 Don't run vid_restart when "resized" to current size 2015-02-28 18:35:41 -06: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 99b74fc5bf OpenGL2: Remove unused function prototype from tr_fbo.c 2015-02-07 18:52:03 -06:00
Zack Middleton 4fb053b8e7 Fix incorrect strncpy in S_AL_StartBackgroundTrack
Error is loop argument is NULL.
Ensure that s_backgroundTrack is a null terminated string.
2015-02-05 04:37:26 -06:00
Ensiform 43c7f1e734 Inform how many shader stages the max is in the warning message 2015-01-26 02:39:59 -06:00
Xycaleth 2742dfad26 Add arrow key support for win32 console 2015-01-26 02:39:59 -06:00
Ensiform b9e97b3857 Move Event processor call down below the mouse checks.
Only send mouse events if both values are non-zero.

Hopefully this helps with the event overflow spam that can sometimes
happen on loads or laggy situations.
2015-01-26 02:39:58 -06:00
vloup d7f00e2b65 Fix Team Arena tauntGauntlet command 2015-01-26 02:39:58 -06:00
Zack Middleton 10e2caad46 Fix crash in MSVC x64 qsnapvectorsse, bug #5905
Make MASM x64 qsnapvectorsse the same as the inline version.
Remove leftover OP code, see commit 8a500d71da.
2015-01-14 15:29:45 -06:00
Zack Middleton af8acbd7a9 Make barrel/flash model name buffer safe 2015-01-12 22:35:20 -06:00
Zack Middleton af617bc0e6 Fix possible levelPicNames buffer overflow in q3_ui 2015-01-12 21:28:03 -06:00
Zack Middleton daa604ae9b Fix parsing bots in arena info with trailing spaces
q3_ui would shown bot at index of number of bots in list.
game would send empty name to addbot command and command would think skill
(i.e., 2.000000) was the bot name.
2015-01-12 21:28:03 -06:00
Zack Middleton 9c4b75c499 Remove logically dead code from UI_GetServerStatusInfo 2015-01-12 21:28:03 -06:00
Zack Middleton 78e7656900 Make Window_Paint check if w is NULL before dereference 2015-01-12 21:28:03 -06:00
Zack Middleton 84e792f453 Fix (unused) "orders" menu script logic
"orders" menu script is not used by Team Arena.

The same C format string was given an int or string argument depending on if
ordering a single person or everyone. Make it always use int.
2015-01-12 21:28:03 -06:00
Zack Middleton f74479afe8 Fix handling too many characters or aliases in Team Arena UI 2015-01-12 21:28:02 -06:00
Zack Middleton 07eb0f6dc9 Fix possible string buffer overflows in Team Arena UI 2015-01-12 21:28:02 -06:00
Zack Middleton 5020361be4 Fix off-by-one range checks in Team Arena UI 2015-01-12 18:31:39 -06:00
Zack Middleton d62dfd87f9 Set float rounding mode on non-Windows platforms
Sys_SetFloatEnv in sys_unix.c existed but was not called. It sets the
rounding mode to "to nearest" which is the default on Linux. Might be
required on other platforms, I don't know.
2015-01-12 17:03:13 -06:00
Zack Middleton 1ff28f2389 Merge pull request #22 from zturtleman/cvar_modified
Add cvar_modified command
2015-01-07 19:48:16 -06:00
Zack Middleton e7c7ca1309 Merge pull request #100 from Pan7/q3lcc
q3lcc option -lcppdir and -lrccdir.

Enabled using `q3lcc -Wo-lrccdir=/path/to/dir -Wo-cppdir=/path/to/dir`.
2015-01-07 19:45:12 -06:00
Zack Middleton bd2af6e4ea Use MSVC mode marcos for creat in q3cpp on Windows
Using unix mode 0666 for creat was causing crashes when compiled with MSVC.
So use the marcos recommended by MSDN. MinGW also has the marcos, so apply
to Windows builds in general.
2015-01-07 19:27:59 -06:00
Zack Middleton aa1aad928e Merge pull request #98 from Pan7/lcc
Windows header files for q3lcc
2015-01-07 19:31:51 -06:00
Zack Middleton 010821384c Merge pull request #97 from Pan7/outp
Renaming outp to outbufp because outp() is an existing function
2015-01-07 19:27:53 -06:00
Simon McVittie ff7ff32b0e Ensure that mbstowcs does not overflow its buffer
Similar to one of the changes by Tim Angus in fd986da: mbstowcs' third
argument is the number of wchar_t available in dest, not the number
of bytes.

This does not appear to be exploitable, because ioquake3 does
not actually call mumble_set_identity() or mumble_set_description()
anywhere, but it might be relevant to derivatives.

Spotted via compiler warnings.
2015-01-07 23:37:11 +00:00
Jun Woong 8469c40c2b Stop LCC from warning about null pointer conversion to function pointer
Fixed LCC to correctly diagnose expressions with NPC. It no longer reports messages such as

    warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
2015-01-06 23:43:04 -06:00
Pan7 c4f851668b q3lcc option -lcppdir and -lrccdir 2015-01-07 03:43:18 +01:00
Tim Angus dd82b9d1a8 Fix case where interval overflows (thanks jackeri)
[17:58] <Jacker> hey, you might be interested in checking out this
4da5a397b5 (diff-acaedc9d8b492f9af8966ae68597392cR615)
[17:58] <Jacker> its related to the ddos protection code you wrote
[17:59] <Jacker> in continuation to:
ab9b08e584
[17:59] <Jacker> in a case if the client has in the past connected to
the server days/weeks earlier and time wraps the client wont be able to
connect
[18:00] <Jacker> since in that case if the bucket of that clients ip
still exists it wont get checked correctly
2014-12-29 19:08:42 +00:00
Zack Middleton 7de09c3490 Include stdint.h instead of inttypes.h in libmumblelink.c
MSVC 2010 has stdint.h but not inttypes.h.
Debian (GCC, MinGW) and OS X (Clang) can compile using stdint.h.
2014-12-28 15:08:02 -06:00
Zack Middleton 3cc16d6b92 Merge pull request #94 from wombat23/asmfix
Fix compile error with ml64 assembler
2014-12-28 15:06:29 -06:00
Tim Angus a2bbb74cae Unfix warning 2014-12-28 15:47:40 +00:00
Tim Angus 4756826521 Fix warning 2014-12-28 12:44:59 +00:00
Zack Middleton 70e3d61006 Fix cg.intermissionStarted only being enabled at first intermission
Game sets CS_INTERMISSION to 1 at intermission, but does not clear it at
map_restart so it's only sent the first time. CG_MapRestart manually clears
cg.intermissionStarted (which is set to value of CS_INTERMISSION when it's
modified). So subsequent intermissions do not have cg.intermissionStarted
enabled.

Now CS_INTERMISSION is cleared and sent each time intermission is started
and cg.intermissionStarted is enabled each time.

This makes subsequent intermissions not play sounds in CG_CheckLocalSounds
during the 1 second between intermission starting and switching to scoreboard
(PM_INTERMISSION) and makes Team Arena voice chats not play.
2014-12-27 18:32:49 -06:00
Pan7 a82fb6d1b1 Windows header files for q3lcc 2014-12-26 23:33:52 +01:00
Pan7 6de3f51c23 Renaming outp to outbufp because outp() is an existing function 2014-12-26 12:52:10 +01:00
Zack Middleton 4463af85fb When player stops following a player, keep view angles
Now player keeps looking the same direction instead of facing somewhere else
which is slightly disorienting.
2014-12-19 22:09:26 -06:00
Zack Middleton 5cf45c5937 Don't use dead view angles after stop following a dead player
If ps.stats[STAT_HEALTH] is less or equal to 0, cgame uses fixed view angles.
When stop following a player, make sure health isn't less or equal to 0.
2014-12-19 22:08:06 -06:00
Zack Middleton a700b76722 Fix reading 4 byte UTF-8 text input 2014-12-19 21:56:54 -06:00
Zack Middleton 65121c62c9 Add weapon barrel to gauntlet/mg/bfg items in baseq3 too 2014-12-10 19:29:36 -06:00
Zack Middleton b0561e5fb4 Fix weapon barrel angle on Gauntlet and BFG items in Team Arena
The barrels were rotated 90 degrees from what they should be.
Used barrel code from CG_AddPlayerWeapon to fix them.
2014-12-10 19:23:35 -06:00