Commit Graph

508 Commits

Author SHA1 Message Date
Garux 12d010446b * Brush->AutoCaulk Selected (F4); camera must be there, where legit player respawn could be, i.e. close to selection and not inside of a brush 2019-03-23 19:10:41 +03:00
Garux 00bb22e458 q3map2 * fix unwanted culling of both matching brush faces 2019-03-19 16:54:23 +03:00
Garux b75d061ff0 fix mbspc linux compilation 2019-03-15 21:41:15 +03:00
Garux 4b1b789fa8 mbspc: use newer q_platform.h from ioq3, enables win64 compilation 2019-03-07 17:10:31 +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 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
maek 01962a5afe Fix a bug that prevent -fast to behave correctly 2019-01-16 23:13:56 +03:00
Garux 034f06f18d * brushexport plugin: write Kd (diffuse color) and map_Kd (diffuse map) data to .mtl
* brushexport plugin fix: invert Y during YZ swap; invert V of UV coords (correct texturing)
	* brushexport plugin: default to 'Don't collapse' option
q3map2:	* obj export: save in popular 'Y = Up, -Z = Forward' format
	* picomodel::obj: load as popular 'Y = Up, -Z = Forward' format
	* picomodel::obj: fix support of back references in faces
2019-01-10 00:44:27 +03:00
Garux 5e50ac9ccf q3map2 * allow maps with only point entity@( 0, 0, 0 )
more informative prints
2018-12-26 02:59:12 +03:00
Garux 048b4a50f2 q3map2 * model autoclip: handle 'triangle points almost on line' case 2018-12-22 13:03:22 +03:00
Garux 674eacf842 q3map2: * fix map region -light compilation: load lights from .reg, not .map 2018-12-21 14:52:47 +03:00
Garux d716c4d0b9 tweak new miniz 2018-10-23 19:43:04 +03:00
Garux 2384269177 update miniz to recent version https://github.com/richgel999/miniz 2018-10-23 19:32:18 +03:00
Garux 614885f1fb fix typos 2018-10-07 23:36:13 +03:00
Garux f99cf57f27 fix some strncpy use 2018-09-29 21:34:03 +03:00
Garux 6ad88b42fa Q3map2: * fix reading of old wolf, et, etut bsps 2018-08-12 19:18:43 +03:00