Commit Graph

1785 Commits

Author SHA1 Message Date
Garux 1628abfd0f calm down -Wdelete-non-virtual-dtor warnings
remove -Wno-non-virtual-dtor from makefile (what does it do anyway? -Wdelete-non-virtual-dtor is part of -Wall)
2019-02-26 19:08:47 +03:00
Garux 812a8b6001 q3map2: follow ODR
enables compilation with -fno-common
2019-02-23 00:09:42 +03:00
Garux 202a05461f prevent shader name string overflow in ShaderInfoForShader 2019-02-23 00:06:57 +03:00
Garux e55e622d2f prevent buffer read overflow 2019-02-23 00:05:25 +03:00
Garux 6680d394e8 fix use after free (freed by realloc in EmitShader) 2019-02-23 00:02:58 +03:00
Garux 2dd78b7b97 fix use after free in RenderableCamWorkzone
somehow it was grabbed by ogl too late here, if sizing info wasn't rendering
2019-02-23 00:01:12 +03:00
Garux d2dceca361 fix constness 2019-02-22 23:56:17 +03:00
Garux 9f80983975 prevent buffer underflow in Vector4ClipPolygon 2019-02-22 23:55:20 +03:00
Garux 7c2d05f399 fix 'might be considered always true' warning 2019-02-22 23:53:39 +03:00
Garux 07d3008b96 calm down fall through warnings 2019-02-22 23:50:10 +03:00
Garux eb95c73416 Winding_Draw fix use after scope 2019-02-22 23:44:51 +03:00
Garux a7f0efdab5 prevent string overflow in radiant md2 loader 2019-02-22 23:31:56 +03:00
Garux ff4260c75a * picomodel: fix md2 loader
duplicates management algorithm isn't as quick, as in old code, but quick nuff + working
2019-02-22 23:29:04 +03:00
Garux aa6e80f5a4 add MBSPC documentation to the help menu 2019-02-13 02:39:37 +03:00
Garux d1ac937b50 mbspc: add -bsp2map220 switch, writting map in Valve 220 format with correct textures alignment for Quake 1/2, SiN and Half-Life BSPs
+various improvements of decompiling
2019-02-11 18:25:50 +03:00
Garux a21a5c7290 mbspc: bump hl limits (by Garey) 2019-02-10 19:35:52 +03:00
Garux c0f417b9cb mbspc: bump limits to handle complex maps (by SpaKK)
http://www.quake3world.com/forum/viewtopic.php?f=10&t=51522
2019-02-10 19:05:19 +03:00
Garux 0a09aff18a mbspc: fix fixes 2019-02-10 17:22:42 +03:00
Thomas Köppe 8875e2dd80 Change winding_t and bspbrush_t to use flexible array members rather than size-1 arrays.
The arrays were always meant to be variably sized, and objects are only ever allocated dynamically. Object size computations are simplified with this change.

Flexible arrays were introduced in C99, so this change means that we will require a C99-conforming compiler henceforth.
2019-02-10 17:07:42 +03:00
TTimo 5064c1f163 more cleanups 2019-02-10 16:46:50 +03:00
Thomas Köppe fee0e36602 [bspc.c] Change directory variables to have static storage; they're
quite large for automatic storage.
2019-02-10 16:41:04 +03:00
Thomas Köppe 13a3b91cc3 [l_bsp_{hl,q1}.c] Fix erroneous use of comma operator 2019-02-10 16:37:32 +03:00
Thomas Köppe 39c70072da [l_bsp_{q1,q2,sin}.c] Fix undefined behaviour in array access 2019-02-10 16:36:35 +03:00
Victor Luchits 39a3819765 Fix compilation warnings caused by abs/fabs confusion 2019-02-10 16:31:09 +03:00
Victor Luchits 8143f33548 Do not call CheckPlaneAgainstParents on tiny splits 2019-02-10 16:29:34 +03:00
Joel Baxter e8522ae2c9 make AAS_LoadAASFile work with zero-sized lumps
AAS_LoadAASLump will return 0/NULL in an error case. However it will also
return the input buffer pointer if length is 0, and the input buffer pointer
may be 0/NULL in the case where AAS_LoadAASLump is meant to allocate memory.

This means that it can return 0/NULL in a perfectly legal case where the lump
length is 0. Since AAS_LoadAASFile inteprets this as a fatal error, that's
bad.

I'm not sure how to best disambiguate this, but a low-touch fix is for the
caller of AAS_LoadAASLump to be OK with a returned NULL pointer if the lump
length is 0.

Also: added a missing break statement to avoid a spurious "don't know what to
do" message when using the aasinfo switch.
2019-02-10 16:24:16 +03:00
Joel Baxter 4443f667cf update fields in the example custom config file
The settings in cfgq3.c had diverged from the actual fields and defaults in
these ways:
- extra field phys_maxacceleration
- missing fields phys_walkaccelerate, phys_swimaccelerate, rs_maxfallheight
- different defaults for phys_airaccelerate, phys_maxstep, phys_maxwaterjump

Also the code in aas_cfg.[ch] for reading the settings was missing
rs_maxfallheight.

It's brittle to require multiple different files to agree on these fields, but
rather than fix that issue this is just a band-aid to bring things back into
alignment so that custom configs based on the example file can be used again.
2019-02-10 16:22:18 +03:00
Chris Brooke 777cd9e09a QuakeLive fix-ups. 2019-02-10 16:17:16 +03:00
Chris Brooke 2d96a0053e Initial QuakeLive support. 2019-02-10 16:15:31 +03:00
Ben Noordhuis d8462c5831 Include func_static in AAS calculations unless spawnflags has bit 1 set. 2019-02-10 15:35:51 +03:00
Ben Noordhuis c897b97e01 Source and destination should not overlap in call to strcpy(), use memmove(). 2019-02-10 15:34:31 +03:00
Ben Noordhuis 2cba675936 Fix warning: format not a string literal and no format arguments. 2019-02-10 15:30:30 +03:00
Ben Noordhuis 91bcbfc593 Export function Q_strncpyz(). 2019-02-10 15:22:53 +03:00
Ben Noordhuis 693be64e51 Remove unused variables. 2019-02-10 15:12:40 +03:00
Ben Noordhuis d15f8e4baa Fix warning: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’. 2019-02-10 14:59:22 +03:00
Ben Noordhuis 11f606b68a Fix warning: array subscript is above array bounds. 2019-02-10 14:51:00 +03:00
Ben Noordhuis 5dbe479244 Fix warnings: cast from pointer to integer of different size. 2019-02-10 14:45:24 +03:00
Ben Noordhuis fd22d6abbf Add #include, fixes 'implicit declaration of function' warnings. 2019-02-10 14:42:25 +03:00
Ben Noordhuis b6ebec81cb Fix warning: format not a string literal and no format arguments. Also: use vsnprintf(), not vsprintf() - that's a buffer overrun waiting to happen. 2019-02-10 14:15:34 +03:00
Ben Noordhuis a265802dff Fix warning: cast from pointer to integer of different size. 2019-02-10 14:09:43 +03:00
Ben Noordhuis ca7fb9b9ed Replace non-standard #include <malloc.h> with <stdlib.h> 2019-02-10 13:50:57 +03:00
Ben Noordhuis 9cfed859cf Fix potential buffer overflow. 2019-02-10 13:42:03 +03:00
Garux 4485ebf780 apply mbspc changes
http://linradiant.intron-trans.hu/downloads/mbspc.tar.gz
cfgq3.c, gldraw.c, botlib\l_log.c are not used
2019-02-10 01:36:18 +03:00
Garux a91a1c510f add bspc sources from Q3A 1.32 release 2019-02-10 01:18:46 +03:00
Garux 43a5b5513f fix indentation and typos 2019-01-27 21:37:37 +03:00
Garux 7884d9f1cd q3map2 * assign surfaceflags to brush 'bevel' planes, so physics like slick/nodamage/metalsteps function at brush edges and vertices
non bitwise materials in certain games are not handled
2019-01-27 19:41:16 +03:00
Garux 74a3da969c * ctrl + r: clone stuff and repeat recent transforms; clipper tool toggle resets transforms stack 2019-01-18 15:00:06 +03:00
Garux 7bcb57562f preserve brush detail state during vertex manipulations 2019-01-17 00:00:14 +03:00
maek 01962a5afe Fix a bug that prevent -fast to behave correctly 2019-01-16 23:13:56 +03:00
Garux b7bfa11b55 * entity inspector::smartEdit: display real key names
* entity inspector::smartEdit: show tooltips with extended names and descriptions for keys and flags
2019-01-11 21:25:31 +03:00