2011-10-27 16:42:53 +00:00
/*
Copyright ( C ) 2011 Id Software , Inc .
This program is free software ; you can redistribute it and / or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .
See the GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program ; if not , write to the Free Software
Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
*/
2005-01-17 17:43:13 +00:00
# include "quakedef.h"
2008-05-25 22:23:43 +00:00
/*
EXT_CSQC is the ' root ' extension
EXT_CSQC_1 are a collection of additional features to cover omissions in the original spec
2018-01-22 19:18:04 +00:00
simplecsqc lacks CSQC_UpdateView and has CSQC_DrawHud + CSQC_DrawScores instead .
if we ' re running arbitrary csqc , we block things that require too much game interaction . . .
2008-05-25 22:23:43 +00:00
*/
2005-01-17 17:43:13 +00:00
# ifdef CSQC_DAT
2005-01-24 05:10:11 +00:00
# include "glquake.h" //evil to include this
2006-02-11 14:51:36 +00:00
# include "shader.h"
2005-01-24 05:10:11 +00:00
2005-10-07 16:27:20 +00:00
# include "pr_common.h"
2017-08-29 02:29:06 +00:00
extern usercmd_t cl_pendingcmd [ MAX_SPLITS ] ;
2018-10-13 06:20:49 +00:00
extern cvar_t sv_demo_write_csqc ;
2017-08-29 02:29:06 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static pubprogfuncs_t * csqcprogs ;
2005-01-24 05:10:11 +00:00
2005-07-14 01:57:34 +00:00
typedef struct csqctreadstate_s {
float resumetime ;
struct qcthread_s * thread ;
int self ;
int other ;
struct csqctreadstate_s * next ;
} csqctreadstate_t ;
2011-12-06 00:39:39 +00:00
static qboolean csprogs_promiscuous ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static unsigned int csprogs_checksum ;
2018-09-23 19:35:24 +00:00
static size_t csprogs_checksize ;
static char csprogs_checkname [ MAX_QPATH ] ;
2005-07-14 01:57:34 +00:00
static csqctreadstate_t * csqcthreads ;
qboolean csqc_resortfrags ;
2009-11-04 21:16:50 +00:00
world_t csqc_world ;
2005-03-10 03:55:18 +00:00
2013-06-23 02:17:02 +00:00
int csqc_playerseat ; //can be negative.
static playerview_t * csqc_playerview ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
qboolean csqc_dp_lastwas3d ; //to emulate DP correctly, we need to track whether drawpic/drawfill or clearscene was called last. blame 515.
2019-04-16 22:40:05 +00:00
# ifndef HAVE_LEGACY
2017-08-29 02:29:06 +00:00
# define csqc_isdarkplaces false //hopefully this will allow a smart enough compiler to optimise it out cleanly
# else
2009-04-01 22:03:56 +00:00
static qboolean csqc_isdarkplaces ;
2017-08-29 02:29:06 +00:00
# endif
2018-01-22 19:18:04 +00:00
static qboolean csqc_nogameaccess ; /*the module is not trusted by the server, so isn't allowed to access origins+stuffcmds+etc*/
static qboolean csqc_singlecheats ; /*single player or cheats active, allowing custom addons*/
static qboolean csqc_mayread ; /*csqc is allowed to ReadByte();*/
static qboolean csqc_worldchanged ; /*make sure any caches are rebuilt properly before the next renderscene*/
2008-11-28 20:34:51 +00:00
2009-05-24 10:11:17 +00:00
static char csqc_printbuffer [ 8192 ] ;
2005-08-19 19:06:22 +00:00
# define CSQCPROGSGROUP "CSQC progs control"
2017-11-15 12:38:20 +00:00
cvar_t pr_csqc_maxedicts = CVAR ( " pr_csqc_maxedicts " , " 65536 " ) ; //not tied to protocol nor server. can be set arbitrarily high, except for memory allocations.
2011-07-30 14:14:56 +00:00
cvar_t pr_csqc_memsize = CVAR ( " pr_csqc_memsize " , " -1 " ) ;
2010-07-11 02:22:39 +00:00
cvar_t cl_csqcdebug = CVAR ( " cl_csqcdebug " , " 0 " ) ; //prints entity numbers which arrive (so I can tell people not to apply it to players...)
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
static cvar_t cl_csqc_nodeprecate = CVARAD ( " cl_csqc_nodeprecate " , " 0 " , " dpcompat_nocsqcwarnings " , " When set, disables deprecation warnings. " ) ;
2010-07-11 02:22:39 +00:00
cvar_t cl_nocsqc = CVAR ( " cl_nocsqc " , " 0 " ) ;
cvar_t pr_csqc_coreonerror = CVAR ( " pr_csqc_coreonerror " , " 1 " ) ;
2017-02-19 00:15:42 +00:00
# if defined(NOBUILTINMENUS) && !defined(MENU_DAT)
2015-09-06 03:30:28 +00:00
cvar_t pr_csqc_formenus = CVARF ( " pr_csqc_formenus " , " 1 " , CVAR_NOSET ) ;
# else
2014-03-30 08:55:06 +00:00
cvar_t pr_csqc_formenus = CVAR ( " pr_csqc_formenus " , " 0 " ) ;
2015-09-06 03:30:28 +00:00
# endif
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
static cvar_t dpcompat_csqcinputeventtypes = CVARD ( " dpcompat_csqcinputeventtypes " , " 999999 " , " Specifies the first csqc input event that the mod does not recognise. This should never have been a thing, but some mods are simply too buggy. " ) ;
2011-05-20 04:10:46 +00:00
extern cvar_t dpcompat_stats ;
2021-05-09 13:02:49 +00:00
extern cvar_t in_vraim ;
2008-01-09 00:27:59 +00:00
2005-08-26 21:59:36 +00:00
// standard effect cvars/sounds
extern cvar_t r_explosionlight ;
extern sfx_t * cl_sfx_wizhit ;
extern sfx_t * cl_sfx_knighthit ;
extern sfx_t * cl_sfx_tink1 ;
extern sfx_t * cl_sfx_ric1 ;
extern sfx_t * cl_sfx_ric2 ;
extern sfx_t * cl_sfx_ric3 ;
extern sfx_t * cl_sfx_r_exp3 ;
2005-02-28 07:16:19 +00:00
typedef struct {
2020-09-08 05:11:09 +00:00
# define globalfloatdep(name,dep) globalfloat(name)
# define globalfloat(name) float *name;
# define globalint(name) int *name;
2021-04-14 05:21:04 +00:00
# define globaluint(name) unsigned int *name;
2024-04-25 05:57:34 +00:00
# define globaluint64(name) puint64_t *name;
2020-09-08 05:11:09 +00:00
# define globalvector(name) float *name;
# define globalentity(name) int *name;
# define globalstring(name) string_t *name;
# define globalfunction(name,type) func_t name;
2005-02-28 07:16:19 +00:00
//These are the functions the engine will call to, found by name.
2005-03-10 03:55:18 +00:00
csqcglobals
# undef globalfloat
2015-04-14 23:12:17 +00:00
# undef globalint
2021-04-14 05:21:04 +00:00
# undef globaluint
2024-04-25 05:57:34 +00:00
# undef globaluint64
2005-03-10 03:55:18 +00:00
# undef globalvector
# undef globalentity
# undef globalstring
# undef globalfunction
2005-02-28 07:16:19 +00:00
} csqcglobals_t ;
static csqcglobals_t csqcg ;
2013-06-23 02:17:02 +00:00
playerview_t csqc_nullview ;
2016-07-12 00:40:13 +00:00
static void VARGS CSQC_Abort ( char * format , . . . ) ; //an error occured.
2015-02-02 08:01:53 +00:00
static void cs_set_input_state ( usercmd_t * cmd ) ;
2013-09-06 22:57:44 +00:00
2013-06-23 02:17:02 +00:00
//fixme: we should be using entity numbers, not view numbers.
static void CSQC_ChangeLocalPlayer ( int seat )
2008-11-28 20:34:51 +00:00
{
2013-06-23 02:17:02 +00:00
if ( seat < 0 | | seat > = MAX_SPLITS )
{
csqc_playerseat = - 1 ;
csqc_playerview = & csqc_nullview ;
}
else
{
csqc_playerseat = seat ;
csqc_playerview = & cl . playerview [ seat ] ;
}
2008-11-28 20:34:51 +00:00
if ( csqcg . player_localentnum )
2011-08-16 04:12:15 +00:00
{
2013-06-23 02:17:02 +00:00
if ( csqc_playerview - > viewentity )
* csqcg . player_localentnum = csqc_playerview - > viewentity ;
2017-05-28 15:42:32 +00:00
else if ( csqc_playerview - > spectator & & Cam_TrackNum ( csqc_playerview ) > = 0 )
2013-06-23 02:17:02 +00:00
* csqcg . player_localentnum = Cam_TrackNum ( csqc_playerview ) + 1 ;
2015-04-27 06:19:33 +00:00
else if ( csqc_playerview = = & csqc_nullview )
* csqcg . player_localentnum = 0 ;
2011-08-16 04:12:15 +00:00
else
2013-06-23 02:17:02 +00:00
* csqcg . player_localentnum = csqc_playerview - > playernum + 1 ;
2011-08-16 04:12:15 +00:00
}
2008-11-28 20:34:51 +00:00
if ( csqcg . player_localnum )
2013-06-23 02:17:02 +00:00
* csqcg . player_localnum = csqc_playerview - > playernum ;
2008-11-28 20:34:51 +00:00
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess )
return ; //don't give much info otherwise.
2008-11-28 20:34:51 +00:00
if ( csqcg . view_angles )
{
2013-06-23 02:17:02 +00:00
csqcg . view_angles [ 0 ] = csqc_playerview - > viewangles [ 0 ] ;
csqcg . view_angles [ 1 ] = csqc_playerview - > viewangles [ 1 ] ;
csqcg . view_angles [ 2 ] = csqc_playerview - > viewangles [ 2 ] ;
2008-11-28 20:34:51 +00:00
}
2016-07-12 00:40:13 +00:00
if ( ( unsigned int ) seat < MAX_SPLITS )
2011-05-20 04:10:46 +00:00
{
2017-08-29 02:29:06 +00:00
// int i;
usercmd_t * cmd = & cl_pendingcmd [ seat ] ;
// usercmd_t tmp;
// for (i=0 ; i<3 ; i++)
// cmd->angles[i] = ((int)(csqc_playerview->viewangles[i]*65536.0/360)&65535);
// if (!cmd->msec)
// CL_BaseMove (cmd, seat, cmd->msec, newtime);
// tmp = *cmd;
// cmd = &tmp;
// cmd->msec = (realtime - cl.outframes[(cl.movesequence-1)&UPDATE_MASK].senttime)*1000;
2015-02-02 08:01:53 +00:00
cs_set_input_state ( cmd ) ;
2011-05-20 04:10:46 +00:00
if ( csqcg . pmove_org )
2017-08-29 02:29:06 +00:00
VectorCopy ( csqc_playerview - > simorg , csqcg . pmove_org ) ;
if ( csqc_isdarkplaces )
{ //dp mods tend to require these to be totally unlerped
if ( csqcg . pmove_vel )
VectorCopy ( cl . inframes [ cl . validsequence & UPDATE_MASK ] . playerstate [ csqc_playerview - > playernum ] . velocity , csqcg . pmove_vel ) ;
if ( csqcg . pmove_onground )
* csqcg . pmove_onground = cl . inframes [ cl . validsequence & UPDATE_MASK ] . playerstate [ csqc_playerview - > playernum ] . onground ;
2011-05-20 04:10:46 +00:00
}
2017-08-29 02:29:06 +00:00
else
2011-05-20 04:10:46 +00:00
{
2017-08-29 02:29:06 +00:00
if ( csqcg . pmove_vel )
VectorCopy ( csqc_playerview - > simvel , csqcg . pmove_vel ) ;
if ( csqcg . pmove_onground )
* csqcg . pmove_onground = csqc_playerview - > onground ;
2011-05-20 04:10:46 +00:00
}
}
2008-11-28 20:34:51 +00:00
}
2005-02-28 07:16:19 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
static void CSQC_FindGlobals ( qboolean nofuncs )
2005-02-28 07:16:19 +00:00
{
2016-07-21 19:27:59 +00:00
static eval_t junk ;
2011-10-27 15:46:36 +00:00
static float csphysicsmode = 0 ;
2015-06-04 06:15:14 +00:00
static float dimension_default = 255 ;
2015-11-18 07:37:39 +00:00
static vec3_t defaultgravity = { 0 , 0 , - 1 } ;
2024-04-25 05:57:34 +00:00
etype_t typ ;
2020-09-08 05:11:09 +00:00
# define globalfloat(name) csqcg.name = (float*)PR_FindGlobal(csqcprogs, #name, 0, NULL);
# define globalint(name) csqcg.name = (int*)PR_FindGlobal(csqcprogs, #name, 0, NULL);
2021-04-14 05:21:04 +00:00
# define globaluint(name) csqcg.name = (unsigned int*)PR_FindGlobal(csqcprogs, #name, 0, NULL);
2024-04-25 05:57:34 +00:00
# define globaluint64(name) csqcg.name = (puint64_t*)PR_FindGlobal(csqcprogs, #name, 0, &typ); if ((typ&0xfff) != ev_uint64 && csqcg.name) {Con_Printf(CON_WARNING"csqc global "#name" wrongly defined as type %i\n", typ&0xfff); csqcg.name = NULL;}
2020-09-08 05:11:09 +00:00
# define globalvector(name) csqcg.name = (float*)PR_FindGlobal(csqcprogs, #name, 0, NULL);
# define globalentity(name) csqcg.name = (int*)PR_FindGlobal(csqcprogs, #name, 0, NULL);
# define globalstring(name) csqcg.name = (string_t*)PR_FindGlobal(csqcprogs, #name, 0, NULL);
# define globalfunction(name,typestr) csqcg.name = nofuncs?0:PR_FindFunction(csqcprogs,#name,PR_ANY);
2005-03-10 03:55:18 +00:00
csqcglobals
# undef globalfloat
2015-04-14 23:12:17 +00:00
# undef globalint
2021-04-14 05:21:04 +00:00
# undef globaluint
2024-04-25 05:57:34 +00:00
# undef globaluint64
2005-03-10 03:55:18 +00:00
# undef globalvector
# undef globalentity
# undef globalstring
# undef globalfunction
2005-04-16 16:21:27 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
# define ensurefloat(name) do{if (!csqcg.name) csqcg.name = &junk._float;}while(0)
# define ensureint(name) do{if (!csqcg.name) csqcg.name = &junk._int; }while(0)
# define ensurevector(name) do{if (!csqcg.name) csqcg.name = junk._vector;}while(0)
# define ensureentity(name) do{if (!csqcg.name) csqcg.name = &junk.edict; }while(0)
2016-07-21 19:27:59 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
# define ensureprivfloat(name) do{if (!csqcg.name) {static pvec_t f; csqcg.name = &f;}}while(0)
# define ensureprivint(name) do{if (!csqcg.name) {static pint_t i; csqcg.name = &i;}}while(0)
# define ensureprivvector(name) do{if (!csqcg.name) {static pvec3_t v; csqcg.name = v;}}while(0)
# define ensurepriventity(name) do{if (!csqcg.name) {static pint_t e; csqcg.name = &e;}}while(0)
2022-02-07 14:34:30 +00:00
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess )
{
2020-09-08 05:11:09 +00:00
csqcg . CSQC_UpdateView = 0 ; //would fail
csqcg . CSQC_UpdateViewLoading = 0 ; //would fail
csqcg . CSQC_Parse_StuffCmd = 0 ; //could block cvar changes, thus allow cheats
csqcg . CSQC_Parse_SetAngles = 0 ; //too evil
csqcg . CSQC_Input_Frame = 0 ; //no aimbot writing
csqcg . CSQC_Event_Sound = csqcg . CSQC_ServerSound = 0 ; //no sound snooping
csqcg . CSQC_Parse_TempEntity = 0 ; //compat nightmare
2018-01-22 19:18:04 +00:00
csqcg . view_angles = NULL ;
csqcg . physics_mode = NULL ; //no thinks stuff
csqcg . pmove_org = NULL ; //can't make aimbots if you don't know where you're aiming from.
csqcg . pmove_vel = NULL ; //no dead reckoning please
csqcg . pmove_mins = csqcg . pmove_maxs = csqcg . pmove_jump_held = csqcg . pmove_waterjumptime = csqcg . pmove_onground = NULL ; //I just want to kill theses
2021-09-15 20:33:54 +00:00
csqcg . input_sequence = NULL ;
2021-04-14 05:21:04 +00:00
csqcg . input_angles = csqcg . input_movevalues = csqcg . input_buttons = csqcg . input_impulse = csqcg . input_lightlevel = csqcg . input_servertime = NULL ;
csqcg . input_weapon = NULL ;
2020-09-08 05:11:09 +00:00
csqcg . input_clienttime = csqcg . input_cursor_screen = csqcg . input_cursor_trace_start = csqcg . input_cursor_trace_endpos = csqcg . input_cursor_entitynumber = NULL ;
2021-04-14 05:21:04 +00:00
csqcg . input_head_status = csqcg . input_left_status = csqcg . input_right_status = NULL ;
csqcg . input_head_angles = csqcg . input_left_angles = csqcg . input_right_angles = NULL ;
csqcg . input_head_origin = csqcg . input_left_origin = csqcg . input_right_origin = NULL ;
2021-08-19 06:02:03 +00:00
csqcg . input_head_weapon = csqcg . input_left_weapon = csqcg . input_right_weapon = NULL ;
2018-01-22 19:18:04 +00:00
}
2020-09-08 05:11:09 +00:00
else if ( csqcg . CSQC_UpdateView | | csqcg . CSQC_UpdateViewLoading )
2018-01-22 19:18:04 +00:00
{ //full csqc AND simplecsqc's entry points at the same time are a bad idea that just result in confusion.
//full csqc mods should just disable engine hud drawing
2020-09-08 05:11:09 +00:00
csqcg . CSQC_DrawHud = 0 ;
csqcg . CSQC_DrawScores = 0 ;
2018-01-22 19:18:04 +00:00
}
2019-04-16 22:40:05 +00:00
# ifndef HAVE_LEGACY
2017-08-29 02:29:06 +00:00
{
etype_t etype = ev_void ;
if ( ! csqcg . trace_surfaceflagsi )
2017-09-20 11:27:13 +00:00
csqcg . trace_surfaceflagsi = ( int * ) PR_FindGlobal ( csqcprogs , " trace_surfaceflags " , 0 , & etype ) ;
2017-08-29 02:29:06 +00:00
if ( ! csqcg . trace_endcontentsi )
2017-09-20 11:27:13 +00:00
csqcg . trace_endcontentsi = ( int * ) PR_FindGlobal ( csqcprogs , " trace_endcontents " , 0 , & etype ) ;
2017-08-29 02:29:06 +00:00
}
# else
2016-07-21 19:27:59 +00:00
if ( ! csqcg . trace_surfaceflagsf & & ! csqcg . trace_surfaceflagsi )
{
2016-07-28 15:57:22 +00:00
etype_t etype = ev_void ;
2016-07-21 19:27:59 +00:00
eval_t * v = PR_FindGlobal ( csqcprogs , " trace_surfaceflags " , 0 , & etype ) ;
if ( etype = = ev_float )
csqcg . trace_surfaceflagsf = & v - > _float ;
else if ( etype = = ev_integer )
csqcg . trace_surfaceflagsi = & v - > _int ;
}
if ( ! csqcg . trace_endcontentsf & & ! csqcg . trace_endcontentsi )
{
2016-07-28 15:57:22 +00:00
etype_t etype = ev_void ;
2016-07-21 19:27:59 +00:00
eval_t * v = PR_FindGlobal ( csqcprogs , " trace_endcontents " , 0 , & etype ) ;
if ( etype = = ev_float )
csqcg . trace_endcontentsf = & v - > _float ;
else if ( etype = = ev_integer )
csqcg . trace_endcontentsi = & v - > _int ;
}
2017-08-29 02:29:06 +00:00
ensurefloat ( trace_surfaceflagsf ) ;
ensurefloat ( trace_endcontentsf ) ;
# endif
2016-07-21 19:27:59 +00:00
ensurefloat ( trace_allsolid ) ;
ensurefloat ( trace_startsolid ) ;
ensurefloat ( trace_fraction ) ;
ensurefloat ( trace_inwater ) ;
ensurefloat ( trace_inopen ) ;
ensurevector ( trace_endpos ) ;
ensurevector ( trace_plane_normal ) ;
ensurefloat ( trace_plane_dist ) ;
ensureint ( trace_surfaceflagsi ) ;
ensureint ( trace_endcontentsi ) ;
ensureint ( trace_brush_id ) ;
ensureint ( trace_brush_faceid ) ;
ensureint ( trace_surface_id ) ;
ensureint ( trace_bone_id ) ;
ensureint ( trace_triangle_id ) ;
2018-10-13 12:19:58 +00:00
ensurefloat ( trace_networkentity ) ;
2016-07-21 19:27:59 +00:00
ensureentity ( trace_ent ) ;
2022-02-07 14:34:30 +00:00
ensureprivfloat ( clientcommandframe ) ;
ensureprivfloat ( input_timelength ) ;
ensureprivvector ( input_angles ) ;
ensureprivvector ( input_movevalues ) ;
ensureprivfloat ( input_buttons ) ;
// ensureprivfloat(input_impulse);
2016-07-21 19:27:59 +00:00
2020-09-08 05:11:09 +00:00
if ( csqcg . time )
* csqcg . time = cl . servertime ;
2008-11-28 20:34:51 +00:00
if ( csqcg . cltime )
2022-01-28 10:48:14 +00:00
* csqcg . cltime = realtime - cl . mapstarttime ;
2005-04-16 16:21:27 +00:00
2015-11-18 07:37:39 +00:00
if ( ! csqcg . global_gravitydir )
csqcg . global_gravitydir = defaultgravity ;
2015-03-03 00:14:43 +00:00
CSQC_ChangeLocalPlayer ( cl_forceseat . ival ? ( cl_forceseat . ival - 1 ) % cl . splitclients : 0 ) ;
2005-04-26 16:04:12 +00:00
2011-09-03 03:49:43 +00:00
csqc_world . g . self = csqcg . self ;
csqc_world . g . other = csqcg . other ;
csqc_world . g . force_retouch = ( float * ) PR_FindGlobal ( csqcprogs , " force_retouch " , 0 , NULL ) ;
2011-10-27 15:46:36 +00:00
csqc_world . g . physics_mode = csqcg . physics_mode ;
2011-09-03 03:49:43 +00:00
csqc_world . g . frametime = csqcg . frametime ;
csqc_world . g . newmis = ( int * ) PR_FindGlobal ( csqcprogs , " newmis " , 0 , NULL ) ;
2020-09-08 05:11:09 +00:00
csqc_world . g . time = csqcg . time ;
csqc_world . g . v_forward = csqcg . v_forward ;
csqc_world . g . v_right = csqcg . v_right ;
csqc_world . g . v_up = csqcg . v_up ;
2015-11-18 07:37:39 +00:00
csqc_world . g . defaultgravitydir = csqcg . global_gravitydir ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
csqc_world . g . drawfont = ( float * ) PR_FindGlobal ( csqcprogs , " drawfont " , 0 , NULL ) ;
csqc_world . g . drawfontscale = ( float * ) PR_FindGlobal ( csqcprogs , " drawfontscale " , 0 , NULL ) ;
2011-10-27 15:46:36 +00:00
if ( ! csqc_world . g . physics_mode )
2013-03-12 23:24:15 +00:00
{
2015-02-03 09:44:27 +00:00
csphysicsmode = 0 ; /*note: dp handles think functions as part of addentity rather than elsewhere. if we're in a compat mode, we don't want to have to duplicate work*/
2011-10-27 15:46:36 +00:00
csqc_world . g . physics_mode = & csphysicsmode ;
2013-03-12 23:24:15 +00:00
}
2011-09-03 03:49:43 +00:00
2015-06-04 06:15:14 +00:00
if ( ! csqcg . dimension_default )
csqcg . dimension_default = & dimension_default ;
2005-04-26 16:04:12 +00:00
if ( csqcg . maxclients )
2011-04-25 03:25:22 +00:00
* csqcg . maxclients = cl . allocated_client_slots ;
2005-02-28 07:16:19 +00:00
}
2005-04-26 16:04:12 +00:00
static void CSQC_InitFields ( void )
2005-01-24 05:10:11 +00:00
{ //CHANGING THIS FUNCTION REQUIRES CHANGES TO csqcentvars_t
2013-08-21 07:14:39 +00:00
# define comfieldfloat(name,desc) PR_RegisterFieldVar(csqcprogs, ev_float, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
2016-07-12 00:40:13 +00:00
# define comfieldint(name,desc) PR_RegisterFieldVar(csqcprogs, ev_integer, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
2013-08-21 07:14:39 +00:00
# define comfieldvector(name,desc) PR_RegisterFieldVar(csqcprogs, ev_vector, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
# define comfieldentity(name,desc) PR_RegisterFieldVar(csqcprogs, ev_entity, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
# define comfieldstring(name,desc) PR_RegisterFieldVar(csqcprogs, ev_string, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
# define comfieldfunction(name, typestr,desc) PR_RegisterFieldVar(csqcprogs, ev_function, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
2009-11-04 21:16:50 +00:00
comqcfields
# undef comfieldfloat
2016-07-12 00:40:13 +00:00
# undef comfieldint
2009-11-04 21:16:50 +00:00
# undef comfieldvector
# undef comfieldentity
# undef comfieldstring
# undef comfieldfunction
# ifdef VM_Q1
2013-08-21 07:14:39 +00:00
# define comfieldfloat(name,desc) PR_RegisterFieldVar(csqcprogs, ev_float, #name, sizeof(csqcentvars_t) + (size_t)&((csqcextentvars_t*)0)->name, -1);
2016-07-12 00:40:13 +00:00
# define comfieldint(name,desc) PR_RegisterFieldVar(csqcprogs, ev_integer, #name, sizeof(csqcentvars_t) + (size_t)&((csqcextentvars_t*)0)->name, -1);
2013-08-21 07:14:39 +00:00
# define comfieldvector(name,desc) PR_RegisterFieldVar(csqcprogs, ev_vector, #name, sizeof(csqcentvars_t) + (size_t)&((csqcextentvars_t*)0)->name, -1);
# define comfieldentity(name,desc) PR_RegisterFieldVar(csqcprogs, ev_entity, #name, sizeof(csqcentvars_t) + (size_t)&((csqcextentvars_t*)0)->name, -1);
# define comfieldstring(name,desc) PR_RegisterFieldVar(csqcprogs, ev_string, #name, sizeof(csqcentvars_t) + (size_t)&((csqcextentvars_t*)0)->name, -1);
# define comfieldfunction(name, typestr,desc) PR_RegisterFieldVar(csqcprogs, ev_function, #name, sizeof(csqcentvars_t) + (size_t)&((csqcextentvars_t*)0)->name, -1);
2009-11-04 21:16:50 +00:00
# else
2013-08-21 07:14:39 +00:00
# define comfieldfloat(name,desc) PR_RegisterFieldVar(csqcprogs, ev_float, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
2016-07-12 00:40:13 +00:00
# define comfieldint(name,desc) PR_RegisterFieldVar(csqcprogs, ev_integer, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
2013-08-21 07:14:39 +00:00
# define comfieldvector(name,desc) PR_RegisterFieldVar(csqcprogs, ev_vector, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
# define comfieldentity(name,desc) PR_RegisterFieldVar(csqcprogs, ev_entity, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
# define comfieldstring(name,desc) PR_RegisterFieldVar(csqcprogs, ev_string, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
# define comfieldfunction(name, typestr,desc) PR_RegisterFieldVar(csqcprogs, ev_function, #name, (size_t)&((csqcentvars_t*)0)->name, -1);
2009-11-04 21:16:50 +00:00
# endif
comextqcfields
csqcextfields
2005-02-28 07:16:19 +00:00
# undef fieldfloat
2016-07-12 00:40:13 +00:00
# undef fieldint
2005-02-28 07:16:19 +00:00
# undef fieldvector
# undef fieldentity
# undef fieldstring
# undef fieldfunction
2017-08-14 16:38:44 +00:00
PR_RegisterFieldVar ( csqcprogs , ev_void , NULL , pr_fixbrokenqccarrays . ival , - 1 ) ;
2005-01-24 05:10:11 +00:00
}
2005-08-03 23:14:59 +00:00
static csqcedict_t * * csqcent ;
static int maxcsqcentities ;
2005-02-28 07:16:19 +00:00
2005-04-26 16:04:12 +00:00
static int csqcentsize ;
2005-01-17 17:43:13 +00:00
2014-03-30 08:55:06 +00:00
static const char * csqcmapentitydata ;
2008-05-25 22:23:43 +00:00
static qboolean csqcmapentitydataloaded ;
2015-02-02 08:01:53 +00:00
static unsigned int csqc_deprecated_warned ;
2018-09-23 19:35:24 +00:00
# define csqc_deprecated(s) do {if (!csqc_deprecated_warned++){Con_Printf(CON_WARNING"csqc deprecation warning: %s\n", s); PR_StackTrace (prinst, false);}}while(0)
2008-12-23 02:55:20 +00:00
2005-08-07 18:08:13 +00:00
static model_t * CSQC_GetModelForIndex ( int index ) ;
2008-11-09 22:29:28 +00:00
static void CS_CheckVelocity ( csqcedict_t * ent )
2005-08-07 18:08:13 +00:00
{
}
2005-07-01 19:23:00 +00:00
2008-12-23 02:55:20 +00:00
2018-09-23 19:35:24 +00:00
static void cs_getframestate ( csqcedict_t * in , unsigned int rflags , framestate_t * fte_restrict out )
2008-12-23 02:55:20 +00:00
{
//FTE_CSQC_HALFLIFE_MODELS
# ifdef HALFLIFEMODELS
2009-11-04 21:16:50 +00:00
out - > bonecontrols [ 0 ] = in - > xv - > bonecontrol1 ;
out - > bonecontrols [ 1 ] = in - > xv - > bonecontrol2 ;
out - > bonecontrols [ 2 ] = in - > xv - > bonecontrol3 ;
out - > bonecontrols [ 3 ] = in - > xv - > bonecontrol4 ;
out - > bonecontrols [ 4 ] = in - > xv - > bonecontrol5 ;
out - > g [ FS_REG ] . subblendfrac = in - > xv - > subblendfrac ;
2017-11-30 17:59:11 +00:00
out - > g [ FS_REG ] . subblend2frac = in - > xv - > subblend2frac ;
2009-11-04 21:16:50 +00:00
out - > g [ FST_BASE ] . subblendfrac = in - > xv - > subblendfrac ;
2017-11-30 17:59:11 +00:00
out - > g [ FST_BASE ] . subblend2frac = in - > xv - > subblend2frac ;
2008-12-23 02:55:20 +00:00
# endif
//FTE_CSQC_BASEFRAME
2009-11-04 21:16:50 +00:00
out - > g [ FST_BASE ] . endbone = in - > xv - > basebone ;
2008-12-23 02:55:20 +00:00
if ( out - > g [ FST_BASE ] . endbone )
{ //small optimisation.
2009-04-01 22:03:56 +00:00
out - > g [ FST_BASE ] . endbone - = 1 ;
2009-11-04 21:16:50 +00:00
out - > g [ FST_BASE ] . frame [ 0 ] = in - > xv - > baseframe ;
out - > g [ FST_BASE ] . frame [ 1 ] = in - > xv - > baseframe2 ;
2015-02-02 08:01:53 +00:00
out - > g [ FST_BASE ] . lerpweight [ 1 ] = in - > xv - > baselerpfrac ;
2018-09-23 19:35:24 +00:00
//out->g[FST_BASE].frame[3] = in->xv->baseframe4;
#if 0 //FRAME_BLENDS >= 4
// out->g[FST_BASE].frame[2] = in->xv->baseframe3;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
// out->g[FST_BASE].lerpweight[2] = in->xv->baselerpfrac3;
2018-09-23 19:35:24 +00:00
// out->g[FST_BASE].frame[3] = in->xv->baseframe3;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
// out->g[FST_BASE].lerpweight[3] = in->xv->baselerpfrac4;
2018-09-23 19:35:24 +00:00
out - > g [ FST_BASE ] . lerpweight [ 0 ] = 1 - ( out - > g [ FST_BASE ] . lerpweight [ 1 ] + out - > g [ FST_BASE ] . lerpweight [ 2 ] + out - > g [ FST_BASE ] . lerpweight [ 3 ] ) ;
# else
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
out - > g [ FST_BASE ] . lerpweight [ 0 ] = 1 - ( out - > g [ FST_BASE ] . lerpweight [ 1 ] ) ;
2018-09-23 19:35:24 +00:00
# endif
2008-12-23 02:55:20 +00:00
if ( rflags & CSQCRF_FRAMETIMESARESTARTTIMES )
{
2020-09-08 05:11:09 +00:00
out - > g [ FST_BASE ] . frametime [ 0 ] = * csqcg . time - in - > xv - > baseframe1time ;
out - > g [ FST_BASE ] . frametime [ 1 ] = * csqcg . time - in - > xv - > baseframe2time ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
//out->g[FST_BASE].frametime[2] = *csqcg.simtime - in->xv->baseframe3time;
//out->g[FST_BASE].frametime[3] = *csqcg.simtime - in->xv->baseframe4time;
2008-12-23 02:55:20 +00:00
}
else
{
2009-11-04 21:16:50 +00:00
out - > g [ FST_BASE ] . frametime [ 0 ] = in - > xv - > baseframe1time ;
out - > g [ FST_BASE ] . frametime [ 1 ] = in - > xv - > baseframe2time ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
//out->g[FST_BASE].frametime[2] = in->xv->baseframe3time;
//out->g[FST_BASE].frametime[3] = in->xv->baseframe4time;
2008-12-23 02:55:20 +00:00
}
}
//and the normal frames.
2015-06-04 06:15:14 +00:00
out - > g [ FS_REG ] . endbone = 0x7fffffff ;
2008-12-23 02:55:20 +00:00
out - > g [ FS_REG ] . frame [ 0 ] = in - > v - > frame ;
2009-11-04 21:16:50 +00:00
out - > g [ FS_REG ] . frame [ 1 ] = in - > xv - > frame2 ;
2015-02-02 08:01:53 +00:00
out - > g [ FS_REG ] . lerpweight [ 1 ] = in - > xv - > lerpfrac ;
2018-09-23 19:35:24 +00:00
# if FRAME_BLENDS >= 4
out - > g [ FS_REG ] . frame [ 2 ] = in - > xv - > frame3 ;
2015-02-02 08:01:53 +00:00
out - > g [ FS_REG ] . lerpweight [ 2 ] = in - > xv - > lerpfrac3 ;
2018-09-23 19:35:24 +00:00
out - > g [ FS_REG ] . frame [ 3 ] = in - > xv - > frame4 ;
2015-02-02 08:01:53 +00:00
out - > g [ FS_REG ] . lerpweight [ 3 ] = in - > xv - > lerpfrac4 ;
out - > g [ FS_REG ] . lerpweight [ 0 ] = 1 - ( out - > g [ FS_REG ] . lerpweight [ 1 ] + out - > g [ FS_REG ] . lerpweight [ 2 ] + out - > g [ FS_REG ] . lerpweight [ 3 ] ) ;
2018-09-23 19:35:24 +00:00
# else
out - > g [ FS_REG ] . lerpweight [ 0 ] = 1 - ( out - > g [ FS_REG ] . lerpweight [ 1 ] ) ;
# endif
2015-02-02 08:01:53 +00:00
if ( ( rflags & CSQCRF_FRAMETIMESARESTARTTIMES ) | | csqc_isdarkplaces )
2008-12-23 02:55:20 +00:00
{
2020-09-08 05:11:09 +00:00
out - > g [ FS_REG ] . frametime [ 0 ] = * csqcg . time - in - > xv - > frame1time ;
out - > g [ FS_REG ] . frametime [ 1 ] = * csqcg . time - in - > xv - > frame2time ;
2018-09-23 19:35:24 +00:00
# if FRAME_BLENDS >= 4
2020-09-08 05:11:09 +00:00
out - > g [ FS_REG ] . frametime [ 2 ] = * csqcg . time - in - > xv - > frame3time ;
out - > g [ FS_REG ] . frametime [ 3 ] = * csqcg . time - in - > xv - > frame4time ;
2018-09-23 19:35:24 +00:00
# endif
2008-12-23 02:55:20 +00:00
}
else
{
2009-11-04 21:16:50 +00:00
out - > g [ FS_REG ] . frametime [ 0 ] = in - > xv - > frame1time ;
out - > g [ FS_REG ] . frametime [ 1 ] = in - > xv - > frame2time ;
2018-09-23 19:35:24 +00:00
# if FRAME_BLENDS >= 4
out - > g [ FS_REG ] . frametime [ 2 ] = in - > xv - > frame3time ;
out - > g [ FS_REG ] . frametime [ 3 ] = in - > xv - > frame4time ;
# endif
2008-12-23 02:55:20 +00:00
}
2014-10-05 20:04:11 +00:00
# if defined(SKELETALOBJECTS) || defined(RAGDOLL)
2008-12-23 02:55:20 +00:00
out - > bonecount = 0 ;
out - > bonestate = NULL ;
2009-11-04 21:16:50 +00:00
if ( in - > xv - > skeletonindex )
2017-01-13 00:39:50 +00:00
skel_lookup ( & csqc_world , in - > xv - > skeletonindex , out ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# endif
2008-12-23 02:55:20 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_remove ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
csqcedict_t * ed ;
2005-11-21 21:47:53 +00:00
2005-02-28 07:16:19 +00:00
ed = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
2016-07-21 19:27:59 +00:00
if ( ED_ISFREE ( ed ) )
2005-02-28 07:16:19 +00:00
{
2010-02-06 01:25:04 +00:00
csqc_deprecated ( " Tried removing free entity " ) ;
2005-02-28 07:16:19 +00:00
return ;
}
2014-05-30 03:57:30 +00:00
if ( ! ed - > entnum )
{
2021-10-12 04:41:41 +00:00
Con_Printf ( " Unable to remove the world. \n " ) ;
2014-05-30 03:57:30 +00:00
PR_StackTrace ( prinst , false ) ;
return ;
}
if ( ed - > readonly )
{
2020-02-11 18:06:10 +00:00
Con_Printf ( " Entity %i is readonly. \n " , ed - > entnum ) ;
2014-05-30 03:57:30 +00:00
return ;
}
2019-09-04 08:32:22 +00:00
if ( pe )
pe - > DelinkTrailstate ( & ed - > trailstate ) ;
2009-11-07 13:29:15 +00:00
World_UnlinkEdict ( ( wedict_t * ) ed ) ;
2005-02-28 07:16:19 +00:00
ED_Free ( prinst , ( void * ) ed ) ;
}
2020-02-11 18:06:10 +00:00
static void QCBUILTIN PF_cs_removeinstant ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
csqcedict_t * ed ;
ed = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
if ( ED_ISFREE ( ed ) )
{
csqc_deprecated ( " Tried removing free entity " ) ;
return ;
}
if ( ! ed - > entnum )
{
Con_Printf ( " Unable to remove the world. Try godmode. \n " ) ;
PR_StackTrace ( prinst , false ) ;
return ;
}
if ( ed - > readonly )
{
Con_Printf ( " Entity %i is readonly. \n " , ed - > entnum ) ;
return ;
}
if ( pe )
pe - > DelinkTrailstate ( & ed - > trailstate ) ;
World_UnlinkEdict ( ( wedict_t * ) ed ) ;
prinst - > EntFree ( prinst , ( void * ) ed , true ) ;
}
2005-02-28 07:16:19 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cvar ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-01-17 17:43:13 +00:00
{
cvar_t * var ;
2014-03-30 08:55:06 +00:00
const char * str ;
2005-01-17 17:43:13 +00:00
str = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2009-11-17 00:15:44 +00:00
if ( ! strcmp ( str , " vid_conwidth " ) )
{
2018-10-11 10:31:23 +00:00
if ( ! csqc_isdarkplaces ) //don't warn when its unfixable...
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
csqc_deprecated ( " vid_conwidth - use (vector)getviewprop(VF_SCREENVSIZE) " ) ;
2009-11-17 00:15:44 +00:00
G_FLOAT ( OFS_RETURN ) = vid . width ;
}
else if ( ! strcmp ( str , " vid_conheight " ) )
{
2018-10-11 10:31:23 +00:00
if ( ! csqc_isdarkplaces )
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
csqc_deprecated ( " vid_conheight - use (vector)getviewprop(VF_SCREENVSIZE) " ) ;
2009-11-17 00:15:44 +00:00
G_FLOAT ( OFS_RETURN ) = vid . height ;
}
else
2005-01-17 17:43:13 +00:00
{
2018-09-23 19:35:24 +00:00
var = PF_Cvar_FindOrGet ( str ) ;
2014-09-20 04:11:39 +00:00
if ( var & & ! ( var - > flags & CVAR_NOUNSAFEEXPAND ) )
2005-01-17 17:43:13 +00:00
G_FLOAT ( OFS_RETURN ) = var - > value ;
else
G_FLOAT ( OFS_RETURN ) = 0 ;
}
}
//too specific to the prinst's builtins.
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_Fixme ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-01-17 17:43:13 +00:00
{
2015-02-02 08:01:53 +00:00
int binum ;
char fname [ MAX_QPATH ] ;
if ( ! prinst - > GetBuiltinCallInfo ( prinst , & binum , fname , sizeof ( fname ) ) )
{
binum = 0 ;
strcpy ( fname , " ?unknown? " ) ;
}
2005-01-17 17:43:13 +00:00
Con_Printf ( " \n " ) ;
2015-02-02 08:01:53 +00:00
prinst - > RunError ( prinst , " \n Builtin %i:%s not implemented. \n CSQC is not compatible. " , binum , fname ) ;
2005-01-17 17:43:13 +00:00
PR_BIError ( prinst , " bulitin not implemented " ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_NoCSQC ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-05 23:46:10 +00:00
{
2015-02-02 08:01:53 +00:00
int binum ;
char fname [ MAX_QPATH ] ;
if ( ! prinst - > GetBuiltinCallInfo ( prinst , & binum , fname , sizeof ( fname ) ) )
{
binum = 0 ;
strcpy ( fname , " ?unknown? " ) ;
}
2005-07-05 23:46:10 +00:00
Con_Printf ( " \n " ) ;
2015-02-02 08:01:53 +00:00
prinst - > RunError ( prinst , " \n Builtin %i:%s does not make sense in csqc. \n CSQC is not compatible. " , binum , fname ) ;
2005-07-05 23:46:10 +00:00
PR_BIError ( prinst , " bulitin not implemented " ) ;
}
2016-01-18 05:22:07 +00:00
static void QCBUILTIN PF_checkbuiltin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
func_t funcref = G_INT ( OFS_PARM0 ) ;
char * funcname = NULL ;
int args ;
int builtinno ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( prinst - > GetFunctionInfo ( prinst , funcref , & args , NULL , & builtinno , funcname , sizeof ( funcname ) ) )
2016-01-18 05:22:07 +00:00
{ //qc defines the function at least. nothing weird there...
if ( builtinno > 0 & & builtinno < prinst - > parms - > numglobalbuiltins )
{
if ( ! prinst - > parms - > globalbuiltins [ builtinno ] | | prinst - > parms - > globalbuiltins [ builtinno ] = = PF_Fixme | | prinst - > parms - > globalbuiltins [ builtinno ] = = PF_NoCSQC )
G_FLOAT ( OFS_RETURN ) = false ; //the builtin with that number isn't defined.
else
{
G_FLOAT ( OFS_RETURN ) = true ; //its defined, within the sane range, mapped, everything. all looks good.
//we should probably go through the available builtins and validate that the qc's name matches what would be expected
//this is really intended more for builtins defined as #0 though, in such cases, mismatched assumptions are impossible.
}
}
else
G_FLOAT ( OFS_RETURN ) = false ; //not a valid builtin (#0 builtins get remapped according to the function name)
}
else
{ //not valid somehow.
G_FLOAT ( OFS_RETURN ) = false ;
}
}
2005-01-17 17:43:13 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_cprint ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-03-07 08:40:03 +00:00
{
2017-08-14 16:38:44 +00:00
const char * str = PF_VarString ( prinst , 0 , pr_globals ) ;
2013-06-23 02:17:02 +00:00
if ( csqc_playerseat > = 0 )
SCR_CenterPrint ( csqc_playerseat , str , true ) ;
2005-03-07 08:40:03 +00:00
}
2005-01-17 17:43:13 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_makevectors ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-01-17 17:43:13 +00:00
{
2020-09-08 05:11:09 +00:00
if ( ! csqcg . v_forward | | ! csqcg . v_right | | ! csqcg . v_up )
2005-02-28 07:16:19 +00:00
Host_EndGame ( " PF_makevectors: one of v_forward, v_right or v_up was not defined \n " ) ;
2020-09-08 05:11:09 +00:00
AngleVectors ( G_VECTOR ( OFS_PARM0 ) , csqcg . v_forward , csqcg . v_right , csqcg . v_up ) ;
2005-01-17 17:43:13 +00:00
}
2009-03-07 05:05:54 +00:00
2020-06-01 01:31:46 +00:00
static int CS_FindModel ( const char * name , int * free )
{
int i ;
const char * fixedname ;
* free = 0 ;
if ( ! name | | ! * name )
return 0 ;
fixedname = Mod_FixName ( name , csqc_world . worldmodel - > publicname ) ;
for ( i = 1 ; i < MAX_CSMODELS ; i + + )
{
if ( ! * cl . model_csqcname [ i ] )
{
* free = - i ;
break ;
}
if ( ! strcmp ( cl . model_csqcname [ i ] , fixedname ) )
return - i ;
}
for ( i = 1 ; i < MAX_PRECACHE_MODELS ; i + + )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . model_name [ i ] )
break ;
2020-06-01 01:31:46 +00:00
if ( ! strcmp ( cl . model_name [ i ] , name ) )
return i ;
}
return 0 ;
}
2005-08-03 23:14:59 +00:00
static model_t * CSQC_GetModelForIndex ( int index )
{
if ( index = = 0 )
return NULL ;
2014-09-17 03:04:08 +00:00
else if ( index > 0 & & index < MAX_PRECACHE_MODELS )
2005-08-03 23:14:59 +00:00
return cl . model_precache [ index ] ;
2013-03-12 22:44:00 +00:00
else if ( index < 0 & & index > - MAX_CSMODELS )
2009-11-04 21:16:50 +00:00
{
if ( ! cl . model_csqcprecache [ - index ] )
2023-02-20 08:47:45 +00:00
cl . model_csqcprecache [ - index ] = Mod_ForName ( Mod_FixName ( cl . model_csqcname [ - index ] , csqc_world . worldmodel ? csqc_world . worldmodel - > publicname : NULL ) , MLV_WARN ) ;
2005-08-03 23:14:59 +00:00
return cl . model_csqcprecache [ - index ] ;
2009-11-04 21:16:50 +00:00
}
2005-08-03 23:14:59 +00:00
else
return NULL ;
}
2020-06-01 01:31:46 +00:00
static model_t * CSQC_GetModelForName ( const char * modelname )
{
int modelindex , freei ;
if ( ! modelname & & * modelname )
return NULL ; //zomg, no name
modelindex = CS_FindModel ( modelname , & freei ) ;
//make sure it has an index.
if ( ! modelindex )
{
if ( ! freei )
Host_EndGame ( " CSQC ran out of model slots \n " ) ;
Con_DPrintf ( " Late caching model \" %s \" \n " , modelname ) ;
Q_strncpyz ( cl . model_csqcname [ - freei ] , modelname , sizeof ( cl . model_csqcname [ - freei ] ) ) ; //allocate a slot now
modelindex = freei ;
cl . model_csqcprecache [ - freei ] = NULL ;
}
return CSQC_GetModelForIndex ( modelindex ) ;
}
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
static float CSQC_PitchScaleForModelIndex ( int index )
{
model_t * mod = CSQC_GetModelForIndex ( index ) ;
if ( mod & & ( mod - > type = = mod_alias | | mod - > type = = mod_halflife ) )
return r_meshpitch . value ; //these are buggy.
return 1 ;
}
2018-03-24 04:02:09 +00:00
# ifdef SKELETALOBJECTS
2017-08-14 16:38:44 +00:00
wedict_t * skel_gettaginfo_args ( pubprogfuncs_t * prinst , vec3_t axis [ 3 ] , vec3_t origin , int tagent , int tagnum ) ;
2018-03-24 04:02:09 +00:00
# endif
2017-08-14 16:38:44 +00:00
2019-04-07 16:41:09 +00:00
static qboolean CopyCSQCEdictToEntity ( csqcedict_t * fte_restrict in , entity_t * fte_restrict out )
2005-01-24 05:10:11 +00:00
{
2011-04-25 13:48:30 +00:00
int ival ;
2005-02-28 07:16:19 +00:00
model_t * model ;
2008-12-23 02:55:20 +00:00
unsigned int rflags ;
2011-10-27 15:46:36 +00:00
unsigned int effects ;
2005-02-28 07:16:19 +00:00
2011-04-23 20:37:20 +00:00
ival = in - > v - > modelindex ;
model = CSQC_GetModelForIndex ( ival ) ;
2005-10-01 03:01:12 +00:00
if ( ! model )
2005-08-03 23:14:59 +00:00
return false ; //there might be other ent types later as an extension that stop this.
2005-02-28 07:16:19 +00:00
2005-08-03 23:14:59 +00:00
memset ( out , 0 , sizeof ( * out ) ) ;
out - > model = model ;
2019-04-07 16:41:09 +00:00
out - > pvscache = in - > pvsinfo ;
2005-08-03 23:14:59 +00:00
2011-10-27 15:46:36 +00:00
rflags = in - > xv - > renderflags ;
2013-06-23 02:17:02 +00:00
if ( csqc_isdarkplaces )
rflags ^ = CSQCRF_FRAMETIMESARESTARTTIMES ;
2011-10-27 15:46:36 +00:00
if ( rflags )
2005-07-01 19:23:00 +00:00
{
2009-11-04 21:16:50 +00:00
rflags = in - > xv - > renderflags ;
2008-11-09 22:29:28 +00:00
if ( rflags & CSQCRF_VIEWMODEL )
2019-04-07 16:41:09 +00:00
{
2014-03-31 17:06:41 +00:00
out - > flags | = RF_DEPTHHACK | RF_WEAPONMODEL ;
2019-04-07 16:41:09 +00:00
out - > pvscache . num_leafs = - 1 ;
}
2008-11-09 22:29:28 +00:00
if ( rflags & CSQCRF_EXTERNALMODEL )
2014-03-31 17:06:41 +00:00
out - > flags | = RF_EXTERNALMODEL ;
2020-12-25 03:07:07 +00:00
if ( rflags & CSQCRF_FIRSTPERSON )
out - > flags | = RF_FIRSTPERSON ;
2008-11-09 22:29:28 +00:00
if ( rflags & CSQCRF_DEPTHHACK )
2014-03-31 17:06:41 +00:00
out - > flags | = RF_DEPTHHACK ;
2008-11-09 22:29:28 +00:00
if ( rflags & CSQCRF_ADDITIVE )
2014-03-31 17:06:41 +00:00
out - > flags | = RF_ADDITIVE ;
2005-07-01 19:23:00 +00:00
//CSQCRF_USEAXIS is below
2008-11-09 22:29:28 +00:00
if ( rflags & CSQCRF_NOSHADOW )
2005-08-03 23:14:59 +00:00
out - > flags | = RF_NOSHADOW ;
2013-06-23 02:17:02 +00:00
//CSQCRF_FRAMETIMESARESTARTTIMES is handled by cs_getframestate below
2020-09-08 05:11:09 +00:00
// if (rflags & CSQCRF_REMOVED)
// Con_Printf("Warning: CSQCRF_NOAUTOADD is no longer supported\n");
2005-07-01 19:23:00 +00:00
}
2008-11-09 22:29:28 +00:00
2011-10-27 15:46:36 +00:00
effects = in - > v - > effects ;
2018-09-01 04:18:08 +00:00
if ( effects & EF_FULLBRIGHT )
out - > flags | = RF_FULLBRIGHT ;
2011-10-27 15:46:36 +00:00
if ( effects & NQEF_ADDITIVE )
2014-03-31 17:06:41 +00:00
out - > flags | = RF_ADDITIVE ;
2016-01-18 05:22:07 +00:00
if ( effects & EF_NOSHADOW )
2011-10-27 15:46:36 +00:00
out - > flags | = RF_NOSHADOW ;
if ( effects & EF_NODEPTHTEST )
2010-08-28 17:14:38 +00:00
out - > flags | = RF_NODEPTHTEST ;
2016-07-12 00:40:13 +00:00
if ( ( effects & DPEF_NOGUNBOB ) & & ( out - > flags & RF_WEAPONMODEL ) )
out - > flags | = RF_WEAPONMODELNOBOB ;
2010-08-28 17:14:38 +00:00
2008-12-23 02:55:20 +00:00
cs_getframestate ( in , rflags , & out - > framestate ) ;
2008-11-09 22:29:28 +00:00
2005-08-03 23:14:59 +00:00
VectorCopy ( in - > v - > origin , out - > origin ) ;
2012-11-27 03:23:19 +00:00
VectorCopy ( in - > v - > oldorigin , out - > oldorigin ) ;
if ( in - > v - > enemy )
{
csqcedict_t * ed = ( csqcedict_t * ) PROG_TO_EDICT ( csqcprogs , in - > v - > enemy ) ;
VectorSubtract ( out - > oldorigin , ed - > v - > oldorigin , out - > oldorigin ) ;
}
2008-11-09 22:29:28 +00:00
if ( rflags & CSQCRF_USEAXIS )
2005-07-01 19:23:00 +00:00
{
2020-09-08 05:11:09 +00:00
VectorCopy ( csqcg . v_forward , out - > axis [ 0 ] ) ;
VectorNegate ( csqcg . v_right , out - > axis [ 1 ] ) ;
VectorCopy ( csqcg . v_up , out - > axis [ 2 ] ) ;
2005-10-01 03:01:12 +00:00
out - > scale = 1 ;
2005-07-01 19:23:00 +00:00
}
else
{
2005-08-03 23:14:59 +00:00
VectorCopy ( in - > v - > angles , out - > angles ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
if ( model & & model - > type = = mod_alias )
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
out - > angles [ 0 ] * = r_meshpitch . value ;
2005-08-03 23:14:59 +00:00
AngleVectors ( out - > angles , out - > axis [ 0 ] , out - > axis [ 1 ] , out - > axis [ 2 ] ) ;
VectorInverse ( out - > axis [ 1 ] ) ;
2005-10-01 03:01:12 +00:00
2011-09-03 03:49:43 +00:00
if ( ! in - > xv - > scale )
2005-10-01 03:01:12 +00:00
out - > scale = 1 ;
else
2009-11-04 21:16:50 +00:00
out - > scale = in - > xv - > scale ;
2005-07-01 19:23:00 +00:00
}
2005-01-24 05:10:11 +00:00
2017-08-14 16:38:44 +00:00
if ( csqc_isdarkplaces & & in - > xv - > tag_entity )
{
2018-03-24 04:02:09 +00:00
# ifdef SKELETALOBJECTS
2017-08-14 16:38:44 +00:00
csqcedict_t * p = ( csqcedict_t * ) skel_gettaginfo_args ( csqcprogs , out - > axis , out - > origin , in - > xv - > tag_entity , in - > xv - > tag_index ) ;
if ( p & & ( int ) p - > xv - > renderflags & CSQCRF_VIEWMODEL )
out - > flags | = RF_DEPTHHACK | RF_WEAPONMODEL ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
out - > pvscache = p - > pvsinfo ; //for the areas.
2019-04-07 16:41:09 +00:00
out - > pvscache . num_leafs = - 1 ; //make visible globally
2020-04-19 01:23:32 +00:00
# if defined(Q2BSPS) || defined(Q3BSPS) || defined(TERRAIN)
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
out - > pvscache . headnode = 0 ;
2020-04-19 01:23:32 +00:00
# endif
2018-03-24 04:02:09 +00:00
# endif
2017-08-14 16:38:44 +00:00
}
2011-04-23 20:37:20 +00:00
ival = in - > v - > colormap ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
out - > playerindex = - 1 ;
2011-04-23 20:37:20 +00:00
if ( ival > 0 & & ival < = MAX_CLIENTS )
2005-08-07 18:08:13 +00:00
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
out - > playerindex = ival - 1 ;
2018-03-04 14:41:16 +00:00
out - > topcolour = cl . players [ ival - 1 ] . dtopcolor ;
out - > bottomcolour = cl . players [ ival - 1 ] . dbottomcolor ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
}
2017-08-29 02:29:06 +00:00
else if ( ival /*>= 1024*/ )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
//DP COLORMAP extension
out - > topcolour = ( ival > > 4 ) & 0x0f ;
out - > bottomcolour = ival & 0xf ;
}
else
{
out - > topcolour = TOP_DEFAULT ;
out - > bottomcolour = BOTTOM_DEFAULT ;
2011-04-23 20:37:20 +00:00
}
2005-08-07 18:08:13 +00:00
2011-09-03 03:49:43 +00:00
if ( ! in - > xv - > colormod [ 0 ] & & ! in - > xv - > colormod [ 1 ] & & ! in - > xv - > colormod [ 2 ] )
2017-08-29 02:29:06 +00:00
VectorSet ( out - > shaderRGBAf , 1 , 1 , 1 ) ;
2011-09-03 03:49:43 +00:00
else
{
2012-04-09 19:12:12 +00:00
out - > flags | = RF_FORCECOLOURMOD ;
2017-08-29 02:29:06 +00:00
VectorCopy ( in - > xv - > colormod , out - > shaderRGBAf ) ;
2011-09-03 03:49:43 +00:00
}
2011-04-23 20:37:20 +00:00
if ( ! in - > xv - > alpha | | in - > xv - > alpha = = 1 )
out - > shaderRGBAf [ 3 ] = 1.0f ;
2005-08-03 23:14:59 +00:00
else
2011-04-23 20:37:20 +00:00
{
2014-03-31 17:06:41 +00:00
out - > flags | = RF_TRANSLUCENT ;
2009-11-04 21:16:50 +00:00
out - > shaderRGBAf [ 3 ] = in - > xv - > alpha ;
2011-04-23 20:37:20 +00:00
}
2005-10-01 03:01:12 +00:00
2017-08-29 02:29:06 +00:00
if ( ! in - > xv - > glowmod [ 0 ] & & ! in - > xv - > glowmod [ 1 ] & & ! in - > xv - > glowmod [ 2 ] )
VectorSet ( out - > glowmod , 1 , 1 , 1 ) ;
else
VectorCopy ( in - > xv - > glowmod , out - > glowmod ) ;
2011-09-03 03:49:43 +00:00
2017-02-19 00:15:42 +00:00
# ifdef HEXEN2
out - > drawflags = in - > xv - > drawflags ;
out - > abslight = in - > xv - > abslight ;
# endif
2005-08-03 23:14:59 +00:00
out - > skinnum = in - > v - > skin ;
2009-11-04 21:16:50 +00:00
out - > fatness = in - > xv - > fatness ;
2011-04-23 20:37:20 +00:00
ival = in - > xv - > forceshader ;
2013-10-29 17:38:22 +00:00
if ( ival > = 1 & & ival < = r_numshaders )
out - > forcedshader = r_shaders [ ( ival - 1 ) ] ;
2006-02-11 14:51:36 +00:00
else
out - > forcedshader = NULL ;
2014-03-30 08:55:06 +00:00
out - > customskin = ( in - > skinobject < 0 ) ? - in - > skinobject : in - > skinobject ;
2005-08-03 23:14:59 +00:00
2014-05-30 16:37:20 +00:00
if ( in - > xv - > entnum & & ! in - > xv - > camera_transform ) //yes, camera_transform is this hacky
2014-05-30 03:57:30 +00:00
out - > keynum = in - > xv - > entnum ;
else
out - > keynum = - in - > entnum ;
2005-08-03 23:14:59 +00:00
return true ;
}
2020-03-25 21:29:30 +00:00
const char * CSQC_GetExtraFieldInfo ( void * went , char * out , size_t outsize )
{
csqcedict_t * ent = went ;
char * r = out ;
char * e = out + outsize ;
int i ;
skinfile_t * sk = Mod_LookupSkin ( ( ent - > skinobject < 0 ) ? - ent - > skinobject : ent - > skinobject ) ;
if ( sk )
{
Q_snprintfz ( out , e - out , " skin %s \n refs %i \n " , sk - > skinname , sk - > refcount ) ;
out + = strlen ( out ) ;
for ( i = 0 ; i < sk - > nummappings ; i + + )
{
Q_snprintfz ( out , e - out , " replace \" %s \" \" %s \" \n " , sk - > mappings [ i ] . surface , sk - > mappings [ i ] . shader ? sk - > mappings [ i ] . shader - > name : " NULL SHADER " ) ;
out + = strlen ( out ) ;
}
for ( i = 0 ; i < MAX_GEOMSETS ; i + + )
{
if ( sk - > geomset [ i ] )
{
Q_snprintfz ( out , e - out , " geomset %i %i \n " , i , sk - > geomset [ i ] ) ;
out + = strlen ( out ) ;
}
}
# ifdef QWSKINS
if ( * sk - > qwskinname )
{
Q_snprintfz ( out , e - out , " qwskin %s \n " , sk - > qwskinname ) ;
out + = strlen ( out ) ;
}
if ( sk - > q1upper ! = Q1UNSPECIFIED )
{
Q_snprintfz ( out , e - out , " q1upper %#x \n " , sk - > q1upper ) ;
out + = strlen ( out ) ;
}
if ( sk - > q1lower ! = Q1UNSPECIFIED )
{
Q_snprintfz ( out , e - out , " q1lower %#x \n " , sk - > q1lower ) ;
out + = strlen ( out ) ;
}
2023-11-18 03:17:06 +00:00
# ifdef HEXEN2
if ( sk - > h2class ! = Q1UNSPECIFIED )
{
Q_snprintfz ( out , e - out , " h2class %i \n " , sk - > h2class ) ;
out + = strlen ( out ) ;
}
# endif
2020-03-25 21:29:30 +00:00
# endif
return r ;
}
return r = = out ? NULL : r ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_makestatic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{ //still does a remove.
csqcedict_t * in = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
entity_t * ent ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
if ( cl . num_statics = = cl_max_static_entities )
2005-08-03 23:14:59 +00:00
{
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
cl_max_static_entities + = 16 ;
cl_static_entities = BZ_Realloc ( cl_static_entities , sizeof ( * cl_static_entities ) * cl_max_static_entities ) ;
2005-08-03 23:14:59 +00:00
}
2010-07-11 02:22:39 +00:00
ent = & cl_static_entities [ cl . num_statics ] . ent ;
2005-08-03 23:14:59 +00:00
if ( CopyCSQCEdictToEntity ( in , ent ) )
{
2016-07-12 00:40:13 +00:00
entity_state_t * state = & cl_static_entities [ cl . num_statics ] . state ;
memset ( state , 0 , sizeof ( * state ) ) ;
2021-08-27 04:29:25 +00:00
cl_static_entities [ cl . num_statics ] . emit = trailkey_null ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
cl_static_entities [ cl . num_statics ] . mdlidx = in - > v - > modelindex ;
2014-10-05 20:04:11 +00:00
if ( cl . worldmodel & & cl . worldmodel - > funcs . FindTouchedLeafs )
2019-04-07 16:41:09 +00:00
cl . worldmodel - > funcs . FindTouchedLeafs ( cl . worldmodel , & cl_static_entities [ cl . num_statics ] . ent . pvscache , in - > v - > absmin , in - > v - > absmax ) ;
2014-10-05 20:04:11 +00:00
else
2019-04-07 16:41:09 +00:00
memset ( & cl_static_entities [ cl . num_statics ] . ent . pvscache , 0 , sizeof ( cl_static_entities [ cl . num_statics ] . ent . pvscache ) ) ;
2005-08-03 23:14:59 +00:00
cl . num_statics + + ;
2016-07-12 00:40:13 +00:00
//rtlights kinda need all this junk
VectorCopy ( ent - > origin , state - > origin ) ;
VectorCopy ( ent - > angles , state - > angles ) ;
state - > modelindex = in - > v - > modelindex ;
state - > light [ 3 ] = in - > xv - > light_lev ;
VectorCopy ( in - > xv - > color , state - > light ) ;
state - > lightpflags = in - > xv - > pflags ;
state - > lightstyle = in - > xv - > style ;
state - > skinnum = in - > v - > skin ;
2005-08-03 23:14:59 +00:00
}
PF_cs_remove ( prinst , pr_globals ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_R_AddEntity ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
csqcedict_t * in = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
entity_t ent ;
2016-07-21 19:27:59 +00:00
if ( ED_ISFREE ( in ) | | in - > entnum = = 0 )
2010-02-06 01:25:04 +00:00
{
csqc_deprecated ( " Tried drawing a free/removed/world entity \n " ) ;
return ;
}
2005-08-03 23:14:59 +00:00
if ( CopyCSQCEdictToEntity ( in , & ent ) )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
CLQ1_AddShadow ( & ent ) ;
2005-08-03 23:14:59 +00:00
V_AddAxisEntity ( & ent ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
}
}
2022-06-26 08:08:50 +00:00
static void QCBUILTIN PF_R_AddEntityLighting ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
csqcedict_t * in = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
entity_t ent ;
if ( ED_ISFREE ( in ) | | in - > entnum = = 0 )
{
csqc_deprecated ( " Tried drawing a free/removed/world entity \n " ) ;
return ;
}
if ( CopyCSQCEdictToEntity ( in , & ent ) )
{
ent . light_known = true ;
VectorCopy ( G_VECTOR ( OFS_PARM1 ) , ent . light_dir ) ;
VectorCopy ( G_VECTOR ( OFS_PARM2 ) , ent . light_avg ) ;
VectorCopy ( G_VECTOR ( OFS_PARM3 ) , ent . light_range ) ;
CLQ1_AddShadow ( & ent ) ;
V_AddAxisEntity ( & ent ) ;
}
}
2017-11-16 22:20:40 +00:00
static void QCBUILTIN PF_R_RemoveEntity ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
csqcedict_t * in = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
2017-11-24 18:40:17 +00:00
int keynum , i ;
2017-11-16 22:20:40 +00:00
if ( ED_ISFREE ( in ) | | in - > entnum = = 0 )
{
csqc_deprecated ( " Tried drawing a free/removed/world entity \n " ) ;
return ;
}
2017-11-24 18:40:17 +00:00
//work out the internal key that relates to the given ent. we'll remove all ents with the same key.
if ( in - > xv - > entnum & & ! in - > xv - > camera_transform ) //yes, camera_transform is this hacky
keynum = in - > xv - > entnum ;
else
keynum = - in - > entnum ;
for ( i = 0 ; i < cl_numvisedicts ; )
2017-11-16 22:20:40 +00:00
{
2017-11-24 18:40:17 +00:00
if ( cl_visedicts [ i ] . keynum = = keynum )
{
cl_numvisedicts - - ;
memmove ( & cl_visedicts [ i ] , & cl_visedicts [ i + 1 ] , sizeof ( * cl_visedicts ) * ( cl_numvisedicts - i ) ) ;
}
else
i + + ;
2017-11-16 22:20:40 +00:00
}
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void CL_AddDecal ( shader_t * shader , vec3_t origin , vec3_t up , vec3_t side , vec3_t rgbvalue , float alphavalue ) ;
static void QCBUILTIN PF_R_AddDecal ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
2017-11-30 17:59:11 +00:00
shader_t * shader = R_RegisterShader ( PR_GetStringOfs ( prinst , OFS_PARM0 ) , SUF_NONE ,
" { \n "
" polygonOffset \n "
" surfaceparms nodlight \n "
" { \n "
" map $diffuse \n "
" rgbgen vertex \n "
" alphagen vertex \n "
" blendfunc gl_one gl_one_minus_src_alpha \n "
" } \n "
" } \n " ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
float * org = G_VECTOR ( OFS_PARM1 ) ;
float * up = G_VECTOR ( OFS_PARM2 ) ;
float * side = G_VECTOR ( OFS_PARM3 ) ;
float * rgb = G_VECTOR ( OFS_PARM4 ) ;
float alpha = G_FLOAT ( OFS_PARM5 ) ;
if ( shader )
CL_AddDecal ( shader , org , up , side , rgb , alpha ) ;
2005-06-04 04:20:20 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_R_DynamicLight_Set ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-04 21:16:50 +00:00
{
2014-03-30 08:55:06 +00:00
const char * s ;
2009-11-04 21:16:50 +00:00
dlight_t * l ;
2018-11-19 06:37:25 +00:00
size_t lno = G_FLOAT ( OFS_PARM0 ) ;
2009-11-04 21:16:50 +00:00
int field = G_FLOAT ( OFS_PARM1 ) ;
2011-07-30 14:14:56 +00:00
while ( lno > = cl_maxdlights )
{
if ( lno > 1000 )
return ;
CL_AllocSlight ( ) ;
}
2009-11-04 21:16:50 +00:00
l = cl_dlights + lno ;
switch ( field )
2005-06-04 04:20:20 +00:00
{
2011-12-05 15:23:40 +00:00
case lfield_origin :
2010-08-28 17:14:38 +00:00
VectorCopy ( G_VECTOR ( OFS_PARM2 ) , l - > origin ) ;
l - > rebuildcache = true ;
2009-11-04 21:16:50 +00:00
break ;
2011-12-05 15:23:40 +00:00
case lfield_colour :
2009-11-04 21:16:50 +00:00
VectorCopy ( G_VECTOR ( OFS_PARM2 ) , l - > color ) ;
break ;
2011-12-05 15:23:40 +00:00
case lfield_radius :
2010-08-28 17:14:38 +00:00
l - > radius = G_FLOAT ( OFS_PARM2 ) ;
l - > rebuildcache = true ;
2011-07-30 14:14:56 +00:00
if ( lno > = rtlights_max )
rtlights_max = lno + 1 ;
2010-08-28 17:14:38 +00:00
break ;
2011-12-05 15:23:40 +00:00
case lfield_flags :
2010-08-28 17:14:38 +00:00
l - > flags = G_FLOAT ( OFS_PARM2 ) ;
l - > rebuildcache = true ;
break ;
2011-12-05 15:23:40 +00:00
case lfield_style :
2019-09-10 15:40:04 +00:00
l - > style = G_FLOAT ( OFS_PARM2 ) ;
2010-08-28 17:14:38 +00:00
break ;
2011-12-05 15:23:40 +00:00
case lfield_angles :
2018-11-19 06:37:25 +00:00
VectorCopy ( G_VECTOR ( OFS_PARM2 ) , l - > angles ) ;
AngleVectors ( l - > angles , l - > axis [ 0 ] , l - > axis [ 1 ] , l - > axis [ 2 ] ) ;
2013-10-29 17:38:22 +00:00
VectorInverse ( l - > axis [ 1 ] ) ;
2011-07-30 14:14:56 +00:00
break ;
2011-12-05 15:23:40 +00:00
case lfield_fov :
2011-07-30 14:14:56 +00:00
l - > fov = G_FLOAT ( OFS_PARM2 ) ;
break ;
2019-04-01 10:16:36 +00:00
case lfield_nearclip :
l - > nearclip = G_FLOAT ( OFS_PARM2 ) ;
break ;
2011-12-26 15:19:13 +00:00
case lfield_corona :
l - > corona = G_FLOAT ( OFS_PARM2 ) ;
break ;
case lfield_coronascale :
l - > coronascale = G_FLOAT ( OFS_PARM2 ) ;
break ;
case lfield_cubemapname :
s = PR_GetStringOfs ( prinst , OFS_PARM2 ) ;
Q_strncpyz ( l - > cubemapname , s , sizeof ( l - > cubemapname ) ) ;
if ( * l - > cubemapname )
2019-10-18 08:37:38 +00:00
l - > cubetexture = R_LoadReplacementTexture ( l - > cubemapname , " " , IF_TEXTYPE_CUBE , NULL , 0 , 0 , TF_INVALID ) ;
2011-12-26 15:19:13 +00:00
else
l - > cubetexture = r_nulltex ;
break ;
2013-10-09 01:00:24 +00:00
# ifdef RTLIGHTS
2018-11-19 06:37:25 +00:00
case lfield_stylestring :
s = PR_GetStringOfs ( prinst , OFS_PARM2 ) ;
Z_Free ( l - > customstyle ) ;
l - > customstyle = ( s & & * s ) ? Z_StrDup ( s ) : NULL ;
break ;
2012-01-01 11:22:24 +00:00
case lfield_ambientscale :
l - > lightcolourscales [ 0 ] = G_FLOAT ( OFS_PARM2 ) ;
break ;
case lfield_diffusescale :
l - > lightcolourscales [ 1 ] = G_FLOAT ( OFS_PARM2 ) ;
break ;
case lfield_specularscale :
l - > lightcolourscales [ 2 ] = G_FLOAT ( OFS_PARM2 ) ;
break ;
2014-10-05 20:04:11 +00:00
case lfield_rotation :
l - > rotation [ 0 ] = G_FLOAT ( OFS_PARM2 + 0 ) ;
l - > rotation [ 1 ] = G_FLOAT ( OFS_PARM2 + 1 ) ;
l - > rotation [ 2 ] = G_FLOAT ( OFS_PARM2 + 2 ) ;
break ;
2013-10-09 01:00:24 +00:00
# endif
2015-03-03 00:14:43 +00:00
case lfield_dietime :
l - > die = G_FLOAT ( OFS_PARM2 ) ;
break ;
case lfield_rgbdecay :
l - > channelfade [ 0 ] = G_FLOAT ( OFS_PARM2 + 0 ) ;
l - > channelfade [ 1 ] = G_FLOAT ( OFS_PARM2 + 1 ) ;
l - > channelfade [ 2 ] = G_FLOAT ( OFS_PARM2 + 2 ) ;
break ;
case lfield_radiusdecay :
l - > decay = G_FLOAT ( OFS_PARM2 ) ;
break ;
2021-04-14 05:21:04 +00:00
case lfield_owner :
{
csqcedict_t * ed = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM2 ) ;
if ( ed - > xv - > entnum > 0 )
l - > key = ed - > xv - > entnum ; //attach it to the indicated ssqc ent.
else
l - > key = - ed - > entnum ; //use the csqc index for it.
}
break ;
2009-11-04 21:16:50 +00:00
default :
break ;
}
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_R_DynamicLight_Get ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-04 21:16:50 +00:00
{
dlight_t * l ;
unsigned int lno = G_FLOAT ( OFS_PARM0 ) ;
2011-12-05 15:23:40 +00:00
enum lightfield_e field = G_FLOAT ( OFS_PARM1 ) ;
2010-08-28 17:14:38 +00:00
if ( lno > = rtlights_max )
2009-11-04 21:16:50 +00:00
{
2014-09-22 17:49:45 +00:00
if ( ( int ) field = = - 1 )
2010-08-28 17:14:38 +00:00
G_FLOAT ( OFS_RETURN ) = rtlights_max ;
2009-11-04 21:16:50 +00:00
else
G_INT ( OFS_RETURN ) = 0 ;
return ;
}
l = cl_dlights + lno ;
switch ( field )
{
2011-12-05 15:23:40 +00:00
case lfield_origin :
2009-11-04 21:16:50 +00:00
VectorCopy ( l - > origin , G_VECTOR ( OFS_RETURN ) ) ;
break ;
2011-12-05 15:23:40 +00:00
case lfield_colour :
2009-11-04 21:16:50 +00:00
VectorCopy ( l - > color , G_VECTOR ( OFS_RETURN ) ) ;
break ;
2011-12-05 15:23:40 +00:00
case lfield_radius :
2010-08-28 17:14:38 +00:00
G_FLOAT ( OFS_RETURN ) = l - > radius ;
break ;
2011-12-05 15:23:40 +00:00
case lfield_flags :
2010-08-28 17:14:38 +00:00
G_FLOAT ( OFS_RETURN ) = l - > flags ;
break ;
2011-12-05 15:23:40 +00:00
case lfield_style :
2019-09-10 15:40:04 +00:00
G_FLOAT ( OFS_RETURN ) = l - > style ;
2010-08-28 17:14:38 +00:00
break ;
2011-12-05 15:23:40 +00:00
case lfield_angles :
2018-11-19 06:37:25 +00:00
VectorCopy ( l - > angles , G_VECTOR ( OFS_RETURN ) ) ;
2011-07-30 14:14:56 +00:00
break ;
2011-12-05 15:23:40 +00:00
case lfield_fov :
2011-07-30 14:14:56 +00:00
G_FLOAT ( OFS_RETURN ) = l - > fov ;
break ;
2019-04-01 10:16:36 +00:00
case lfield_nearclip :
G_FLOAT ( OFS_PARM2 ) = l - > nearclip ;
break ;
2011-12-26 15:19:13 +00:00
case lfield_corona :
G_FLOAT ( OFS_RETURN ) = l - > corona ;
break ;
case lfield_coronascale :
G_FLOAT ( OFS_RETURN ) = l - > coronascale ;
break ;
case lfield_cubemapname :
RETURN_TSTRING ( l - > cubemapname ) ;
break ;
2013-10-09 01:00:24 +00:00
# ifdef RTLIGHTS
2018-11-19 06:37:25 +00:00
case lfield_stylestring :
if ( l - > customstyle )
RETURN_TSTRING ( l - > customstyle ) ;
else
RETURN_TSTRING ( " " ) ;
break ;
2012-01-01 11:22:24 +00:00
case lfield_ambientscale :
G_FLOAT ( OFS_RETURN ) = l - > lightcolourscales [ 0 ] ;
break ;
case lfield_diffusescale :
G_FLOAT ( OFS_RETURN ) = l - > lightcolourscales [ 1 ] ;
break ;
case lfield_specularscale :
G_FLOAT ( OFS_RETURN ) = l - > lightcolourscales [ 2 ] ;
break ;
2014-10-05 20:04:11 +00:00
case lfield_rotation :
G_FLOAT ( OFS_RETURN + 0 ) = l - > rotation [ 0 ] ;
G_FLOAT ( OFS_RETURN + 1 ) = l - > rotation [ 1 ] ;
G_FLOAT ( OFS_RETURN + 2 ) = l - > rotation [ 2 ] ;
break ;
2013-10-09 01:00:24 +00:00
# endif
2015-03-03 00:14:43 +00:00
case lfield_dietime :
G_FLOAT ( OFS_RETURN ) = l - > die ;
break ;
case lfield_rgbdecay :
G_FLOAT ( OFS_RETURN + 0 ) = l - > channelfade [ 0 ] ;
G_FLOAT ( OFS_RETURN + 1 ) = l - > channelfade [ 1 ] ;
G_FLOAT ( OFS_RETURN + 2 ) = l - > channelfade [ 2 ] ;
break ;
case lfield_radiusdecay :
G_FLOAT ( OFS_RETURN ) = l - > decay ;
break ;
2021-04-14 05:21:04 +00:00
case lfield_owner :
if ( l - > key < 0 & & - l - > key < prinst - > edicttable_length & & prinst - > edicttable [ - l - > key ] ) //csqc ent
RETURN_EDICT ( prinst , prinst - > edicttable [ - l - > key ] ) ;
else if ( l - > key > 0 & & l - > key < maxcsqcentities & & csqcent [ l - > key ] ) //ssqc ent
RETURN_EDICT ( prinst , csqcent [ l - > key ] ) ;
else
RETURN_EDICT ( prinst , prinst - > edicttable [ 0 ] ) ; //probably an ssqc ent not known to the csqc, so we can't report this info.
break ;
2009-11-04 21:16:50 +00:00
default :
G_INT ( OFS_RETURN ) = 0 ;
break ;
2005-06-04 04:20:20 +00:00
}
}
2005-01-24 05:10:11 +00:00
2018-03-05 11:35:58 +00:00
static void PF_R_DynamicLight_AddInternal ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals , qboolean isstatic )
2005-02-28 07:16:19 +00:00
{
float * org = G_VECTOR ( OFS_PARM0 ) ;
float radius = G_FLOAT ( OFS_PARM1 ) ;
float * rgb = G_VECTOR ( OFS_PARM2 ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
float style = ( prinst - > callargc > 3 ) ? G_FLOAT ( OFS_PARM3 ) : 0 ;
2014-03-30 08:55:06 +00:00
const char * cubemapname = ( prinst - > callargc > 4 ) ? PR_GetStringOfs ( prinst , OFS_PARM4 ) : " " ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
int pflags = ( prinst - > callargc > 5 ) ? G_FLOAT ( OFS_PARM5 ) : PFLAGS_CORONA ;
2009-11-04 21:16:50 +00:00
2018-01-22 19:18:04 +00:00
# ifdef RTLIGHTS
// float *ambientdiffusespec = (prinst->callargc > 5)?{0,1,1}:G_VECTOR(OFS_PARM6);
2018-03-05 11:35:58 +00:00
// fov, orientation, corona, coronascale, rotation, die, etc, just use dynamiclight_set
2018-01-22 19:18:04 +00:00
# endif
2014-05-30 03:57:30 +00:00
wedict_t * self ;
2011-12-26 15:19:13 +00:00
dlight_t * dl ;
2014-05-30 03:57:30 +00:00
int dlkey ;
if ( prinst = = csqc_world . progs )
{
self = PROG_TO_WEDICT ( prinst , * csqcg . self ) ;
dlkey = VectorCompare ( self - > v - > origin , org ) ? - self - > entnum : 0 ;
}
else
dlkey = 0 ;
2009-11-04 21:16:50 +00:00
2018-03-05 11:35:58 +00:00
if ( isstatic )
{
dl = CL_AllocSlight ( ) ;
dl - > die = 0 ;
dl - > flags = LFLAG_NORMALMODE | LFLAG_REALTIMEMODE ;
}
else
{
dl = CL_AllocDlight ( dlkey ) ;
2018-03-29 18:34:07 +00:00
dl - > die = cl . time - 0.1 ;
2018-03-05 11:35:58 +00:00
dl - > flags = LFLAG_DYNAMIC ;
}
VectorCopy ( org , dl - > origin ) ;
dl - > radius = radius ;
VectorCopy ( rgb , dl - > color ) ;
2011-12-26 15:19:13 +00:00
2014-10-05 20:04:11 +00:00
if ( * dl - > cubemapname )
{
2020-09-08 05:11:09 +00:00
VectorCopy ( csqcg . v_forward , dl - > axis [ 0 ] ) ;
VectorCopy ( csqcg . v_right , dl - > axis [ 1 ] ) ;
VectorCopy ( csqcg . v_up , dl - > axis [ 2 ] ) ;
2014-10-05 20:04:11 +00:00
}
2013-06-23 02:17:02 +00:00
2011-12-26 15:19:13 +00:00
if ( pflags & PFLAGS_NOSHADOW )
dl - > flags | = LFLAG_NOSHADOWS ;
if ( pflags & PFLAGS_CORONA )
dl - > corona = 1 ;
2009-11-04 21:16:50 +00:00
else
2011-12-26 15:19:13 +00:00
dl - > corona = 0 ;
2013-03-12 22:47:42 +00:00
dl - > style = style ;
Q_strncpyz ( dl - > cubemapname , cubemapname , sizeof ( dl - > cubemapname ) ) ;
if ( * dl - > cubemapname )
2019-10-18 08:37:38 +00:00
dl - > cubetexture = R_LoadReplacementTexture ( dl - > cubemapname , " " , IF_TEXTYPE_CUBE , NULL , 0 , 0 , TF_INVALID ) ;
2013-03-12 22:47:42 +00:00
else
dl - > cubetexture = r_nulltex ;
2011-12-26 15:19:13 +00:00
G_FLOAT ( OFS_RETURN ) = dl - cl_dlights ;
2005-02-28 07:16:19 +00:00
}
2018-03-05 11:35:58 +00:00
void QCBUILTIN PF_R_DynamicLight_AddStatic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
PF_R_DynamicLight_AddInternal ( prinst , pr_globals , true ) ;
}
void QCBUILTIN PF_R_DynamicLight_AddDynamic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
PF_R_DynamicLight_AddInternal ( prinst , pr_globals , false ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_R_AddEntityMask ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-09 19:32:09 +00:00
{
int mask = G_FLOAT ( OFS_PARM0 ) ;
csqcedict_t * ent ;
2008-11-09 22:29:28 +00:00
entity_t rent ;
2005-02-09 19:32:09 +00:00
int e ;
2011-10-27 15:46:36 +00:00
int maxe ;
2005-02-09 19:32:09 +00:00
2008-11-09 22:29:28 +00:00
int oldself = * csqcg . self ;
2017-08-29 02:29:06 +00:00
RSpeedMark ( ) ;
2009-04-01 22:03:56 +00:00
if ( cl . worldmodel )
{
if ( mask & MASK_DELTA )
{
2013-12-02 14:30:30 +00:00
# ifdef Q2CLIENT
if ( cls . protocol = = CP_QUAKE2 )
CLQ2_AddEntities ( ) ;
else
# endif
{
CL_LinkPlayers ( ) ;
CL_LinkPacketEntities ( ) ;
}
2009-04-01 22:03:56 +00:00
}
}
2013-06-23 02:17:02 +00:00
if ( csqc_isdarkplaces )
2005-02-09 19:32:09 +00:00
{
2013-06-23 02:17:02 +00:00
//hopelessly inefficient version for compat with DP.
2020-04-29 10:43:22 +00:00
maxe = * prinst - > parms - > num_edicts ;
2013-06-23 02:17:02 +00:00
for ( e = 1 ; e < maxe ; e + + )
2005-02-09 19:32:09 +00:00
{
2018-04-06 17:21:15 +00:00
ent = ( void * ) EDICT_NUM_PB ( prinst , e ) ;
2016-07-21 19:27:59 +00:00
if ( ED_ISFREE ( ent ) )
2013-06-23 02:17:02 +00:00
continue ;
2013-10-08 14:28:11 +00:00
if ( ent - > v - > think )
{
WPhys_RunThink ( & csqc_world , ( wedict_t * ) ent ) ;
2016-07-21 19:27:59 +00:00
if ( ED_ISFREE ( ent ) )
2013-10-08 14:28:11 +00:00
continue ;
}
2013-05-03 04:28:08 +00:00
if ( ent - > xv - > predraw )
{
* csqcg . self = EDICT_TO_PROG ( prinst , ( void * ) ent ) ;
PR_ExecuteProgram ( prinst , ent - > xv - > predraw ) ;
2016-07-21 19:27:59 +00:00
if ( ED_ISFREE ( ent ) )
2013-05-03 04:28:08 +00:00
continue ; //bummer...
}
2013-06-23 02:17:02 +00:00
if ( ( int ) ent - > xv - > drawmask & mask )
{
if ( CopyCSQCEdictToEntity ( ent , & rent ) )
{
CLQ1_AddShadow ( & rent ) ;
V_AddAxisEntity ( & rent ) ;
}
}
}
}
else
{
2020-04-29 10:43:22 +00:00
maxe = * prinst - > parms - > num_edicts ;
2013-06-23 02:17:02 +00:00
for ( e = 1 ; e < maxe ; e + + )
{
2018-04-06 17:21:15 +00:00
ent = ( void * ) EDICT_NUM_PB ( prinst , e ) ;
2016-07-21 19:27:59 +00:00
if ( ED_ISFREE ( ent ) )
2013-06-23 02:17:02 +00:00
continue ;
2008-11-09 22:29:28 +00:00
2013-06-23 02:17:02 +00:00
if ( ( int ) ent - > xv - > drawmask & mask )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
2013-06-23 02:17:02 +00:00
if ( ent - > xv - > predraw )
{
* csqcg . self = EDICT_TO_PROG ( prinst , ( void * ) ent ) ;
PR_ExecuteProgram ( prinst , ent - > xv - > predraw ) ;
2016-07-21 19:27:59 +00:00
if ( ED_ISFREE ( ent ) | | G_FLOAT ( OFS_RETURN ) )
2013-06-23 02:17:02 +00:00
continue ; //bummer...
}
if ( CopyCSQCEdictToEntity ( ent , & rent ) )
{
CLQ1_AddShadow ( & rent ) ;
V_AddAxisEntity ( & rent ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
}
2005-02-09 19:32:09 +00:00
}
}
2008-11-09 22:29:28 +00:00
* csqcg . self = oldself ;
2005-02-09 19:32:09 +00:00
2008-05-25 22:23:43 +00:00
if ( cl . worldmodel )
2005-02-09 19:32:09 +00:00
{
2008-05-25 22:23:43 +00:00
if ( mask & MASK_STDVIEWMODEL )
{
2008-01-09 00:27:59 +00:00
CL_LinkViewModel ( ) ;
2008-05-25 22:23:43 +00:00
}
2011-12-05 15:23:40 +00:00
if ( mask & MASK_DELTA )
{
CL_LinkProjectiles ( ) ;
CL_UpdateTEnts ( ) ;
}
2005-02-09 19:32:09 +00:00
}
2017-08-29 02:29:06 +00:00
RSpeedEnd ( RSPEED_LINKENTITIES ) ;
2005-02-09 19:32:09 +00:00
}
2014-12-08 21:18:32 +00:00
//enum {vb_vertexcoord, vb_texcoord, vb_rgba, vb_normal, vb_sdir, vb_tdir, vb_indexes, vb_rgb, vb_alpha};
//vboidx = vbuff_create(numverts, numidx, flags)
//vbuff_updateptr(vboidx, datatype, ptr, firstvert, numverts)
//vbuff_updateone(vboidx, datatype, index, __variant data)
//vbuff_render(vboidx, shaderid, uniforms, uniformssize)
//vbuff_delete(vboidx), vboidx=0
2012-02-13 09:24:01 +00:00
static shader_t * csqc_poly_shader ;
2015-07-30 16:26:15 +00:00
static int csqc_poly_origvert ;
static int csqc_poly_origidx ;
2012-02-13 09:24:01 +00:00
static int csqc_poly_startvert ;
static int csqc_poly_startidx ;
static int csqc_poly_flags ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
static int csqc_poly_2d ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
2015-07-30 16:26:15 +00:00
static void CSQC_PolyFlush ( void )
{
mesh_t mesh ;
R2D_Flush = NULL ;
//make sure there's actually something there...
if ( cl_numstrisvert = = csqc_poly_origvert )
return ;
if ( ! csqc_poly_2d )
{
scenetris_t * t ;
if ( cl_numstris = = cl_maxstris )
{
cl_maxstris + = 8 ;
cl_stris = BZ_Realloc ( cl_stris , sizeof ( * cl_stris ) * cl_maxstris ) ;
}
t = & cl_stris [ cl_numstris + + ] ;
t - > shader = csqc_poly_shader ;
t - > flags = csqc_poly_flags ;
t - > firstidx = csqc_poly_origidx ;
t - > firstvert = csqc_poly_origvert ;
t - > numidx = cl_numstrisidx - t - > firstidx ;
2018-11-19 06:37:25 +00:00
t - > numvert = cl_numstrisvert - t - > firstvert ;
2015-07-30 16:26:15 +00:00
}
else
{
/*2d polys need to be flushed now*/
memset ( & mesh , 0 , sizeof ( mesh ) ) ;
mesh . istrifan = ( csqc_poly_origvert = = csqc_poly_startvert ) ;
mesh . xyz_array = cl_strisvertv + csqc_poly_origvert ;
mesh . st_array = cl_strisvertt + csqc_poly_origvert ;
mesh . colors4f_array [ 0 ] = cl_strisvertc + csqc_poly_origvert ;
mesh . indexes = cl_strisidx + csqc_poly_origidx ;
mesh . numindexes = cl_numstrisidx - csqc_poly_origidx ;
mesh . numvertexes = cl_numstrisvert - csqc_poly_origvert ;
/*undo the positions so we don't draw the same verts more than once*/
cl_numstrisvert = csqc_poly_origvert ;
cl_numstrisidx = csqc_poly_origvert ;
BE_DrawMesh_Single ( csqc_poly_shader , & mesh , NULL , csqc_poly_flags ) ;
}
//must call begin before the next poly
csqc_poly_shader = NULL ;
}
2019-02-19 06:49:03 +00:00
static shader_t * PR_R_PolygonShader ( const char * shadername , qboolean twod )
{
extern shader_t * shader_draw_fill_trans ;
shader_t * shader ;
if ( ! * shadername )
shader = shader_draw_fill_trans ; //dp compat...
else if ( twod )
shader = R_RegisterPic ( shadername , NULL ) ;
else
2021-06-22 14:40:53 +00:00
shader = R_RegisterCustom ( NULL , shadername , 0 , Shader_PolygonShader , NULL ) ;
2019-02-19 06:49:03 +00:00
return shader ;
}
2009-11-04 21:16:50 +00:00
// #306 void(string texturename) R_BeginPolygon (EXT_CSQC_???)
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void QCBUILTIN PF_R_PolygonBegin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-04 21:16:50 +00:00
{
2017-08-29 02:29:06 +00:00
const char * shadername = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2016-07-12 00:40:13 +00:00
int qcflags = ( prinst - > callargc > 1 ) ? G_FLOAT ( OFS_PARM1 ) : 0 ;
2017-08-29 02:29:06 +00:00
shader_t * shader ;
2016-07-12 00:40:13 +00:00
int beflags ;
2015-07-30 16:26:15 +00:00
qboolean twod ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( prinst - > callargc > 2 )
2015-07-30 16:26:15 +00:00
twod = G_FLOAT ( OFS_PARM2 ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
else if ( csqc_isdarkplaces )
{
2015-07-30 16:26:15 +00:00
twod = ! csqc_dp_lastwas3d ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
csqc_deprecated ( " guessing 2d mode based upon random builtin calls " ) ;
}
else
2016-07-12 00:40:13 +00:00
twod = qcflags & DRAWFLAG_2D ;
2018-07-05 16:21:44 +00:00
2016-07-12 00:40:13 +00:00
if ( ( qcflags & 3 ) = = DRAWFLAG_ADD )
beflags = BEF_NOSHADOWS | BEF_FORCEADDITIVE ;
2020-09-08 05:11:09 +00:00
else if ( ( qcflags & 3 ) = = DRAWFLAG_MODULATE )
beflags = BEF_NOSHADOWS | BEF_FORCETRANSPARENT ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
else
2016-07-12 00:40:13 +00:00
beflags = BEF_NOSHADOWS ;
if ( csqc_isdarkplaces | | ( qcflags & DRAWFLAG_TWOSIDED ) )
beflags | = BEF_FORCETWOSIDED ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
2019-02-19 06:49:03 +00:00
shader = PR_R_PolygonShader ( shadername , twod ) ;
2015-07-30 16:26:15 +00:00
2016-07-12 00:40:13 +00:00
if ( R2D_Flush & & ( R2D_Flush ! = CSQC_PolyFlush | | csqc_poly_shader ! = shader | | csqc_poly_flags ! = beflags | | csqc_poly_2d ! = twod ) )
2015-07-30 16:26:15 +00:00
R2D_Flush ( ) ;
if ( ! R2D_Flush )
{ //this is where our current (2d) batch starts
csqc_poly_origvert = cl_numstrisvert ;
csqc_poly_origidx = cl_numstrisidx ;
}
R2D_Flush = CSQC_PolyFlush ;
csqc_poly_shader = shader ;
2016-07-12 00:40:13 +00:00
csqc_poly_flags = beflags ;
2015-07-30 16:26:15 +00:00
csqc_poly_2d = twod ;
//this is where our current poly starts
2012-02-13 09:24:01 +00:00
csqc_poly_startvert = cl_numstrisvert ;
csqc_poly_startidx = cl_numstrisidx ;
2009-11-04 21:16:50 +00:00
}
// #307 void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex (EXT_CSQC_???)
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void QCBUILTIN PF_R_PolygonVertex ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-04 21:16:50 +00:00
{
if ( cl_numstrisvert = = cl_maxstrisvert )
2019-02-19 06:49:03 +00:00
cl_stris_ExpandVerts ( cl_numstrisvert + 64 ) ;
2009-11-04 21:16:50 +00:00
VectorCopy ( G_VECTOR ( OFS_PARM0 ) , cl_strisvertv [ cl_numstrisvert ] ) ;
Vector2Copy ( G_VECTOR ( OFS_PARM1 ) , cl_strisvertt [ cl_numstrisvert ] ) ;
VectorCopy ( G_VECTOR ( OFS_PARM2 ) , cl_strisvertc [ cl_numstrisvert ] ) ;
cl_strisvertc [ cl_numstrisvert ] [ 3 ] = G_FLOAT ( OFS_PARM3 ) ;
cl_numstrisvert + + ;
}
// #308 void() R_EndPolygon (EXT_CSQC_???)
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void QCBUILTIN PF_R_PolygonEnd ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-04 21:16:50 +00:00
{
int i ;
int nv ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
int flags = csqc_poly_flags ;
2015-07-30 16:26:15 +00:00
int first ;
2012-02-13 09:24:01 +00:00
if ( ! csqc_poly_shader )
return ;
2015-04-14 23:12:17 +00:00
nv = cl_numstrisvert - csqc_poly_startvert ;
if ( nv = = 2 )
flags | = BEF_LINES ;
2009-11-04 21:16:50 +00:00
else
2015-07-30 16:26:15 +00:00
flags & = ~ BEF_LINES ;
2018-02-04 13:16:25 +00:00
if ( flags ! = csqc_poly_flags | | ( cl_numstrisvert - csqc_poly_origvert ) > = 32768 )
2009-11-04 21:16:50 +00:00
{
2015-07-30 16:26:15 +00:00
int sv = cl_numstrisvert - nv ;
cl_numstrisvert - = nv ;
CSQC_PolyFlush ( ) ;
csqc_poly_origvert = cl_numstrisvert ;
csqc_poly_origidx = cl_numstrisidx ;
R2D_Flush = CSQC_PolyFlush ;
csqc_poly_flags = flags ;
csqc_poly_startvert = cl_numstrisvert ;
csqc_poly_startidx = cl_numstrisidx ;
memcpy ( cl_strisvertv + cl_numstrisvert , cl_strisvertv + sv , sizeof ( * cl_strisvertv ) * nv ) ;
memcpy ( cl_strisvertt + cl_numstrisvert , cl_strisvertt + sv , sizeof ( * cl_strisvertt ) * nv ) ;
memcpy ( cl_strisvertc + cl_numstrisvert , cl_strisvertc + sv , sizeof ( * cl_strisvertc ) * nv ) ;
cl_numstrisvert + = nv ;
2009-11-04 21:16:50 +00:00
}
2015-04-14 23:12:17 +00:00
if ( flags & BEF_LINES )
2009-11-04 21:16:50 +00:00
{
2015-04-14 23:12:17 +00:00
nv = cl_numstrisvert - csqc_poly_startvert ;
if ( cl_numstrisidx + nv > cl_maxstrisidx )
{
cl_maxstrisidx = cl_numstrisidx + nv + 64 ;
cl_strisidx = BZ_Realloc ( cl_strisidx , sizeof ( * cl_strisidx ) * cl_maxstrisidx ) ;
}
2009-11-04 21:16:50 +00:00
2015-07-30 16:26:15 +00:00
first = csqc_poly_startvert - csqc_poly_origvert ;
2015-04-14 23:12:17 +00:00
/*build the line list fan out of triangles*/
for ( i = 1 ; i < nv ; i + + )
{
2015-07-30 16:26:15 +00:00
cl_strisidx [ cl_numstrisidx + + ] = first + i - 1 ;
cl_strisidx [ cl_numstrisidx + + ] = first + i ;
2015-04-14 23:12:17 +00:00
}
}
else
2009-11-04 21:16:50 +00:00
{
2015-04-14 23:12:17 +00:00
nv = cl_numstrisvert - csqc_poly_startvert ;
if ( cl_numstrisidx + ( nv - 2 ) * 3 > cl_maxstrisidx )
{
cl_maxstrisidx = cl_numstrisidx + ( nv - 2 ) * 3 + 64 ;
cl_strisidx = BZ_Realloc ( cl_strisidx , sizeof ( * cl_strisidx ) * cl_maxstrisidx ) ;
}
2015-07-30 16:26:15 +00:00
first = csqc_poly_startvert - csqc_poly_origvert ;
2015-04-14 23:12:17 +00:00
/*build the triangle fan out of triangles*/
for ( i = 2 ; i < nv ; i + + )
{
2015-07-30 16:26:15 +00:00
cl_strisidx [ cl_numstrisidx + + ] = first + 0 ;
cl_strisidx [ cl_numstrisidx + + ] = first + i - 1 ;
cl_strisidx [ cl_numstrisidx + + ] = first + i ;
2015-04-14 23:12:17 +00:00
}
2009-11-04 21:16:50 +00:00
}
2015-07-30 16:26:15 +00:00
/*set up ready for the next poly*/
csqc_poly_startvert = cl_numstrisvert ;
csqc_poly_startidx = cl_numstrisidx ;
2009-11-04 21:16:50 +00:00
}
2009-06-11 21:09:39 +00:00
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
//input is a line of verts, output is a quad strip
void QCBUILTIN PF_R_PolygonEndRibbon ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int i ;
int nv ;
int flags = csqc_poly_flags ;
int first ;
vec3_t tang ;
vec3_t dir ;
vec3_t eyedir ;
float separation = G_FLOAT ( OFS_PARM0 ) ;
float sseparation = G_FLOAT ( OFS_PARM1 + 0 ) ;
float tseparation = G_FLOAT ( OFS_PARM1 + 1 ) ;
if ( ! csqc_poly_shader )
return ;
nv = cl_numstrisvert - csqc_poly_startvert ;
if ( nv < 2 )
{
csqc_poly_startvert = cl_numstrisvert ;
csqc_poly_startidx = cl_numstrisidx ;
return ; //sod off.
}
flags & = ~ BEF_LINES ;
if ( flags ! = csqc_poly_flags | | ( cl_numstrisvert - csqc_poly_origvert ) > = 32768 )
{
int sv = cl_numstrisvert - nv ;
cl_numstrisvert - = nv ;
CSQC_PolyFlush ( ) ;
csqc_poly_origvert = cl_numstrisvert ;
csqc_poly_origidx = cl_numstrisidx ;
R2D_Flush = CSQC_PolyFlush ;
csqc_poly_flags = flags ;
csqc_poly_startvert = cl_numstrisvert ;
csqc_poly_startidx = cl_numstrisidx ;
memcpy ( cl_strisvertv + cl_numstrisvert , cl_strisvertv + sv , sizeof ( * cl_strisvertv ) * nv ) ;
memcpy ( cl_strisvertt + cl_numstrisvert , cl_strisvertt + sv , sizeof ( * cl_strisvertt ) * nv ) ;
memcpy ( cl_strisvertc + cl_numstrisvert , cl_strisvertc + sv , sizeof ( * cl_strisvertc ) * nv ) ;
cl_numstrisvert + = nv ;
}
nv = cl_numstrisvert - csqc_poly_startvert ;
//dupe the verts
if ( cl_numstrisvert + nv < cl_maxstrisvert )
cl_stris_ExpandVerts ( cl_numstrisvert + nv ) ;
memcpy ( & cl_strisvertv [ cl_numstrisvert ] , & cl_strisvertv [ csqc_poly_startvert ] , sizeof ( * cl_strisvertv ) * nv ) ;
memcpy ( & cl_strisvertt [ cl_numstrisvert ] , & cl_strisvertt [ csqc_poly_startvert ] , sizeof ( * cl_strisvertt ) * nv ) ;
memcpy ( & cl_strisvertc [ cl_numstrisvert ] , & cl_strisvertc [ csqc_poly_startvert ] , sizeof ( * cl_strisvertc ) * nv ) ;
//apply separation
VectorSubtract ( cl_strisvertv [ csqc_poly_startvert + 0 + 1 ] , cl_strisvertv [ csqc_poly_startvert + 0 ] , dir ) ;
VectorSubtract ( cl_strisvertv [ csqc_poly_startvert + 0 ] , r_refdef . vieworg , eyedir ) ;
VectorNormalize ( dir ) ; VectorNormalize ( eyedir ) ;
CrossProduct ( dir , eyedir , tang ) ;
VectorMA ( cl_strisvertv [ csqc_poly_startvert + 0 ] , separation , tang , cl_strisvertv [ csqc_poly_startvert + 0 ] ) ;
VectorMA ( cl_strisvertv [ cl_numstrisvert + 0 ] , - separation , tang , cl_strisvertv [ cl_numstrisvert + 0 ] ) ;
cl_strisvertt [ csqc_poly_startvert + 0 ] [ 0 ] + = sseparation ; //and update the generated s coord.
cl_strisvertt [ csqc_poly_startvert + 0 ] [ 1 ] + = tseparation ; //and update the generated t coord.
for ( i = 1 ; i < nv - 1 ; i + + )
{ //direction comes from its two neighbours, rather than itself and one of those neighbours
VectorSubtract ( cl_strisvertv [ csqc_poly_startvert + i + 1 ] , cl_strisvertv [ csqc_poly_startvert + i - 1 ] , dir ) ;
VectorSubtract ( cl_strisvertv [ csqc_poly_startvert + i ] , r_refdef . vieworg , eyedir ) ;
VectorNormalize ( dir ) ; VectorNormalize ( eyedir ) ;
CrossProduct ( dir , eyedir , tang ) ;
VectorMA ( cl_strisvertv [ csqc_poly_startvert + i ] , separation , tang , cl_strisvertv [ csqc_poly_startvert + i ] ) ;
VectorMA ( cl_strisvertv [ cl_numstrisvert + i ] , - separation , tang , cl_strisvertv [ cl_numstrisvert + i ] ) ;
cl_strisvertt [ csqc_poly_startvert + i ] [ 0 ] + = sseparation ; //and update the generated s coord.
cl_strisvertt [ csqc_poly_startvert + i ] [ 1 ] + = tseparation ; //and update the generated t coord.
}
//don't wrap over
VectorSubtract ( cl_strisvertv [ csqc_poly_startvert + i ] , cl_strisvertv [ csqc_poly_startvert + i - 1 ] , dir ) ;
VectorSubtract ( cl_strisvertv [ csqc_poly_startvert + i ] , r_refdef . vieworg , eyedir ) ;
VectorNormalize ( dir ) ; VectorNormalize ( eyedir ) ;
CrossProduct ( dir , eyedir , tang ) ;
VectorMA ( cl_strisvertv [ csqc_poly_startvert + i ] , separation , tang , cl_strisvertv [ csqc_poly_startvert + i ] ) ;
VectorMA ( cl_strisvertv [ cl_numstrisvert + i ] , - separation , tang , cl_strisvertv [ cl_numstrisvert + i ] ) ;
cl_strisvertt [ csqc_poly_startvert + i ] [ 0 ] + = sseparation ; //and update the generated s coord.
cl_strisvertt [ csqc_poly_startvert + i ] [ 1 ] + = tseparation ; //and update the generated t coord.
//verts are all set up right
cl_numstrisvert + = nv ;
if ( cl_numstrisidx + ( nv - 1 ) * 6 > cl_maxstrisidx )
{
cl_maxstrisidx = cl_numstrisidx + ( nv - 1 ) * 6 + 64 ;
cl_strisidx = BZ_Realloc ( cl_strisidx , sizeof ( * cl_strisidx ) * cl_maxstrisidx ) ;
}
first = csqc_poly_startvert - csqc_poly_origvert ;
/*build a double-triangle strip out of our lined verts*/
for ( i = 1 ; i < nv ; i + + )
{
cl_strisidx [ cl_numstrisidx + + ] = first + i - 1 ;
cl_strisidx [ cl_numstrisidx + + ] = first + i ;
cl_strisidx [ cl_numstrisidx + + ] = first + i + nv ;
cl_strisidx [ cl_numstrisidx + + ] = first + i + nv ;
cl_strisidx [ cl_numstrisidx + + ] = first + i - 1 + nv ;
cl_strisidx [ cl_numstrisidx + + ] = first + i - 1 ;
}
/*set up ready for the next poly*/
csqc_poly_startvert = cl_numstrisvert ;
csqc_poly_startidx = cl_numstrisidx ;
}
2016-07-12 00:40:13 +00:00
typedef struct
{
vec3_t xyz ;
vec2_t st ;
vec4_t rgba ;
// vec3_t norm;
// vec3_t sdir;
// vec3_t tdir;
} qcvertex_t ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
void QCBUILTIN PF_R_AddTrisoup_Simple ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2016-07-12 00:40:13 +00:00
{
shader_t * shader ; //parm 0
2019-02-19 06:49:03 +00:00
const char * shadername = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2016-07-12 00:40:13 +00:00
unsigned int qcflags = G_INT ( OFS_PARM1 ) ;
unsigned int vertsptr = G_INT ( OFS_PARM2 ) ;
unsigned int indexesptr = G_INT ( OFS_PARM3 ) ;
unsigned int numindexes = G_INT ( OFS_PARM4 ) ;
2016-12-07 18:45:25 +00:00
qboolean twod = qcflags & DRAWFLAG_2D ;
2016-07-12 00:40:13 +00:00
unsigned int beflags ;
2021-04-14 05:21:04 +00:00
unsigned int maxverts ;
2019-02-16 19:09:07 +00:00
const qcvertex_t * fte_restrict vert ;
const unsigned int * fte_restrict idx ;
2016-07-12 00:40:13 +00:00
unsigned int i , j , first ;
if ( ( qcflags & 3 ) = = DRAWFLAG_ADD )
beflags = BEF_NOSHADOWS | BEF_FORCEADDITIVE ;
else if ( ( qcflags & 3 ) = = DRAWFLAG_MODULATE )
beflags = BEF_NOSHADOWS | BEF_FORCETRANSPARENT ;
else
beflags = BEF_NOSHADOWS ;
if ( qcflags & DRAWFLAG_TWOSIDED )
beflags | = BEF_FORCETWOSIDED ;
2017-04-18 11:12:17 +00:00
if ( qcflags & DRAWFLAG_LINES )
beflags | = BEF_LINES ;
2016-07-12 00:40:13 +00:00
2019-02-19 06:49:03 +00:00
shader = PR_R_PolygonShader ( shadername , twod ) ;
2016-07-12 00:40:13 +00:00
if ( R2D_Flush & & ( R2D_Flush ! = CSQC_PolyFlush | | csqc_poly_shader ! = shader | | csqc_poly_flags ! = beflags | | csqc_poly_2d ! = twod ) )
R2D_Flush ( ) ;
if ( ! R2D_Flush )
{ //this is where our current (2d) batch starts
csqc_poly_origvert = cl_numstrisvert ;
csqc_poly_origidx = cl_numstrisidx ;
}
//validates the pointer.
2021-04-14 05:21:04 +00:00
maxverts = ( prinst - > stringtablesize - vertsptr ) / sizeof ( qcvertex_t ) ;
if ( maxverts < 1 | | vertsptr < = 0 | | vertsptr + maxverts * sizeof ( qcvertex_t ) > prinst - > stringtablesize )
2016-07-12 00:40:13 +00:00
{
PR_BIError ( prinst , " PF_R_AddTrisoup: invalid vertexes pointer \n " ) ;
return ;
}
2019-02-16 19:09:07 +00:00
vert = ( const qcvertex_t * ) ( prinst - > stringtable + vertsptr ) ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
if ( indexesptr < = 0 | | indexesptr + numindexes * sizeof ( int ) > prinst - > stringtablesize )
2016-07-12 00:40:13 +00:00
{
PR_BIError ( prinst , " PF_R_AddTrisoup: invalid indexes pointer \n " ) ;
return ;
}
2019-02-16 19:09:07 +00:00
idx = ( const int * ) ( prinst - > stringtable + indexesptr ) ;
2016-07-12 00:40:13 +00:00
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
first = cl_numstrisvert - csqc_poly_origvert ;
2016-07-12 00:40:13 +00:00
if ( first + numindexes > MAX_INDICIES )
{
if ( numindexes > MAX_INDICIES )
{
PR_BIError ( prinst , " PF_R_AddTrisoup: single batch exceeds MAX_INDICIES \n " ) ;
return ;
}
else if ( R2D_Flush ) //should always be true
{
R2D_Flush ( ) ;
first = 0 ;
2021-04-14 05:21:04 +00:00
csqc_poly_origvert = cl_numstrisvert ;
csqc_poly_origidx = cl_numstrisidx ;
2016-07-12 00:40:13 +00:00
}
}
R2D_Flush = CSQC_PolyFlush ;
csqc_poly_shader = shader ;
csqc_poly_flags = beflags ;
csqc_poly_2d = twod ;
//hacky crappy solution - make a copy of each used vert rather than copying the entire data out.
if ( cl_numstrisidx + numindexes > cl_maxstrisidx )
{
cl_maxstrisidx = cl_numstrisidx + numindexes ;
cl_strisidx = BZ_Realloc ( cl_strisidx , sizeof ( * cl_strisidx ) * cl_maxstrisidx ) ;
}
if ( cl_numstrisvert + numindexes > cl_maxstrisvert )
2019-02-19 06:49:03 +00:00
cl_stris_ExpandVerts ( cl_numstrisvert + numindexes ) ;
2016-07-12 00:40:13 +00:00
for ( i = 0 ; i < numindexes ; i + + )
{
j = * idx + + ;
2021-04-14 05:21:04 +00:00
if ( j > = maxverts )
2016-07-12 00:40:13 +00:00
j = 0 ; //out of bounds.
VectorCopy ( vert [ j ] . xyz , cl_strisvertv [ cl_numstrisvert ] ) ;
Vector2Copy ( vert [ j ] . st , cl_strisvertt [ cl_numstrisvert ] ) ;
Vector4Copy ( vert [ j ] . rgba , cl_strisvertc [ cl_numstrisvert ] ) ;
cl_numstrisvert + + ;
cl_strisidx [ cl_numstrisidx + + ] = first + + ;
}
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
//in case someone calls polygonvertex+end without beginpolygon
2016-07-12 00:40:13 +00:00
csqc_poly_startvert = cl_numstrisvert ;
csqc_poly_startidx = cl_numstrisidx ;
}
2009-06-11 21:09:39 +00:00
2005-08-11 04:14:33 +00:00
qboolean csqc_rebuildmatricies ;
2009-06-11 21:09:39 +00:00
float csqc_proj_matrix [ 16 ] ;
float csqc_proj_matrix_inverse [ 16 ] ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
float csqc_proj_frustum [ 2 ] ;
2013-12-29 22:48:28 +00:00
void V_ApplyAFov ( playerview_t * pv ) ;
2023-01-09 05:15:31 +00:00
static void cs_buildmatricies ( void )
2005-08-11 04:14:33 +00:00
{
float modelview [ 16 ] ;
float proj [ 16 ] ;
2013-12-29 22:48:28 +00:00
float ofovx = r_refdef . fov_x , ofovy = r_refdef . fov_y ;
2018-10-11 10:31:23 +00:00
float ofovvx = r_refdef . fovv_x , ofovvy = r_refdef . fovv_y ;
2005-08-11 04:14:33 +00:00
2013-12-29 22:48:28 +00:00
V_ApplyAFov ( csqc_playerview ) ;
2013-06-29 21:08:09 +00:00
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( csqc_isdarkplaces )
{
/*doesn't bother to use the projection matrix. it isn't much of a transform.*/
Matrix4x4_CM_ModelViewMatrix ( csqc_proj_matrix , r_refdef . viewangles , r_refdef . vieworg ) ;
csqc_proj_frustum [ 0 ] = tan ( r_refdef . fov_x * M_PI / 360.0 ) ;
csqc_proj_frustum [ 1 ] = tan ( r_refdef . fov_y * M_PI / 360.0 ) ;
}
2015-06-12 14:44:50 +00:00
else
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
{
/*build view and projection matricies*/
Matrix4x4_CM_ModelViewMatrix ( modelview , r_refdef . viewangles , r_refdef . vieworg ) ;
if ( r_refdef . useperspective )
Matrix4x4_CM_Projection2 ( proj , r_refdef . fov_x , r_refdef . fov_y , 4 ) ;
else
Matrix4x4_CM_Orthographic ( proj , - r_refdef . fov_x / 2 , r_refdef . fov_x / 2 , - r_refdef . fov_y / 2 , r_refdef . fov_y / 2 , r_refdef . mindist , r_refdef . maxdist > = 1 ? r_refdef . maxdist : 9999 ) ;
2009-06-11 21:09:39 +00:00
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
/*build the vp matrix*/
Matrix4_Multiply ( proj , modelview , csqc_proj_matrix ) ;
}
2009-06-11 21:09:39 +00:00
2015-06-12 14:44:50 +00:00
/*build the unproject matrix (inverted vp matrix)*/
2009-06-11 21:09:39 +00:00
Matrix4_Invert ( csqc_proj_matrix , csqc_proj_matrix_inverse ) ;
2005-08-11 04:14:33 +00:00
csqc_rebuildmatricies = false ;
2013-12-29 22:48:28 +00:00
r_refdef . fov_x = ofovx ,
r_refdef . fov_y = ofovy ;
2018-10-11 10:31:23 +00:00
r_refdef . fovv_x = ofovvx ,
r_refdef . fovv_y = ofovvy ;
2005-08-11 04:14:33 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_project ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-11 04:14:33 +00:00
{
if ( csqc_rebuildmatricies )
2023-01-09 05:15:31 +00:00
cs_buildmatricies ( ) ;
2005-08-11 04:14:33 +00:00
{
float * in = G_VECTOR ( OFS_PARM0 ) ;
float * out = G_VECTOR ( OFS_RETURN ) ;
float v [ 4 ] , tempv [ 4 ] ;
v [ 0 ] = in [ 0 ] ;
v [ 1 ] = in [ 1 ] ;
v [ 2 ] = in [ 2 ] ;
v [ 3 ] = 1 ;
2011-07-30 14:14:56 +00:00
Matrix4x4_CM_Transform4 ( csqc_proj_matrix , v , tempv ) ;
2005-08-11 04:14:33 +00:00
tempv [ 0 ] / = tempv [ 3 ] ;
tempv [ 1 ] / = tempv [ 3 ] ;
tempv [ 2 ] / = tempv [ 3 ] ;
2018-09-23 19:35:24 +00:00
if ( csqc_isdarkplaces )
{ /*sigh*/
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
tempv [ 0 ] = - tempv [ 0 ] / tempv [ 2 ] / csqc_proj_frustum [ 0 ] ;
tempv [ 1 ] = tempv [ 1 ] / tempv [ 2 ] / csqc_proj_frustum [ 1 ] ;
out [ 0 ] = ( 1 + tempv [ 0 ] ) / 2 ;
out [ 1 ] = ( 1 + tempv [ 1 ] ) / 2 ;
out [ 2 ] = - tempv [ 2 ] ;
out [ 0 ] = out [ 0 ] * vid . width ;
out [ 1 ] = out [ 1 ] * vid . height ;
2018-09-23 19:35:24 +00:00
}
else
{
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
out [ 0 ] = ( 1 + tempv [ 0 ] ) / 2 ;
out [ 1 ] = 1 - ( 1 + tempv [ 1 ] ) / 2 ;
out [ 2 ] = tempv [ 2 ] ;
2018-09-23 19:35:24 +00:00
out [ 0 ] = out [ 0 ] * r_refdef . vrect . width + r_refdef . vrect . x ;
out [ 1 ] = out [ 1 ] * r_refdef . vrect . height + r_refdef . vrect . y ;
}
2009-06-11 21:09:39 +00:00
if ( tempv [ 3 ] < 0 )
out [ 2 ] * = - 1 ;
2005-08-11 04:14:33 +00:00
}
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_unproject ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-11 04:14:33 +00:00
{
if ( csqc_rebuildmatricies )
2023-01-09 05:15:31 +00:00
cs_buildmatricies ( ) ;
2005-08-11 04:14:33 +00:00
{
float * in = G_VECTOR ( OFS_PARM0 ) ;
float * out = G_VECTOR ( OFS_RETURN ) ;
2017-10-12 12:02:25 +00:00
float tx = in [ 0 ] , ty = in [ 1 ] ;
2005-11-21 21:47:53 +00:00
2005-08-11 04:14:33 +00:00
float v [ 4 ] , tempv [ 4 ] ;
2005-08-12 11:26:29 +00:00
2018-09-23 19:35:24 +00:00
if ( csqc_isdarkplaces )
{ /*sigh*/
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
tx = ( ( tx ) / vid . width ) ;
ty = ( ( ty ) / vid . height ) ;
//this is kinda screwy
v [ 2 ] = - in [ 2 ] ;
v [ 0 ] = - ( tx * 2 - 1 ) * v [ 2 ] * csqc_proj_frustum [ 0 ] ;
v [ 1 ] = ( ty * 2 - 1 ) * v [ 2 ] * csqc_proj_frustum [ 1 ] ;
2018-09-23 19:35:24 +00:00
}
else
{
tx = ( ( tx - r_refdef . vrect . x ) / r_refdef . vrect . width ) ;
ty = ( ( ty - r_refdef . vrect . y ) / r_refdef . vrect . height ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
ty = 1 - ty ;
v [ 0 ] = tx * 2 - 1 ;
v [ 1 ] = ty * 2 - 1 ;
v [ 2 ] = in [ 2 ] * 2 - 1 ; //gl projection matrix scales -1 to 1 (unlike d3d, which is 0 to 1)
//don't use 1, because the far clip plane really is an infinite distance away. and that tends to result division by infinity.
if ( v [ 2 ] > = 1 )
v [ 2 ] = 0.999999 ;
2018-09-23 19:35:24 +00:00
}
2005-08-11 04:14:33 +00:00
v [ 3 ] = 1 ;
2011-07-30 14:14:56 +00:00
Matrix4x4_CM_Transform4 ( csqc_proj_matrix_inverse , v , tempv ) ;
2009-06-11 21:09:39 +00:00
out [ 0 ] = tempv [ 0 ] / tempv [ 3 ] ;
out [ 1 ] = tempv [ 1 ] / tempv [ 3 ] ;
out [ 2 ] = tempv [ 2 ] / tempv [ 3 ] ;
2005-08-11 04:14:33 +00:00
}
}
2005-01-24 05:10:11 +00:00
//clear scene, and set up the default stuff.
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_R_ClearScene ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-01-24 05:10:11 +00:00
{
2015-07-30 16:26:15 +00:00
if ( R2D_Flush )
R2D_Flush ( ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( prinst - > callargc > 0 )
2008-11-28 20:34:51 +00:00
CSQC_ChangeLocalPlayer ( G_FLOAT ( OFS_PARM0 ) ) ;
2005-08-11 04:14:33 +00:00
csqc_rebuildmatricies = true ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
csqc_dp_lastwas3d = true ; //cleared by the next drawpic.
csqc_poly_shader = NULL ;
2005-08-11 04:14:33 +00:00
2005-02-12 18:56:04 +00:00
CL_DecayLights ( ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# if defined(SKELETALOBJECTS) || defined(RAGDOLLS)
2017-01-13 00:39:50 +00:00
skel_dodelete ( & csqc_world ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# endif
CL_ClearEntityLists ( ) ;
2005-02-09 19:32:09 +00:00
2013-06-23 02:17:02 +00:00
V_ClearRefdef ( csqc_playerview ) ;
2013-06-23 03:59:48 +00:00
r_refdef . drawsbar = false ; //csqc defaults to no sbar.
2014-05-30 03:57:30 +00:00
r_refdef . drawcrosshair = false ;
2013-06-23 02:17:02 +00:00
V_CalcRefdef ( csqc_playerview ) ; //set up the defaults
2005-01-24 05:10:11 +00:00
}
2014-05-30 03:57:30 +00:00
void QCBUILTIN PF_R_GetViewFlag ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-01-24 05:10:11 +00:00
{
2005-07-14 01:57:34 +00:00
viewflags parametertype = G_FLOAT ( OFS_PARM0 ) ;
2011-05-20 04:10:46 +00:00
float * r = G_VECTOR ( OFS_RETURN ) ;
2005-07-01 19:23:00 +00:00
2011-05-20 04:10:46 +00:00
r [ 0 ] = 0 ;
r [ 1 ] = 0 ;
r [ 2 ] = 0 ;
2005-08-11 04:14:33 +00:00
2020-04-19 01:23:32 +00:00
# ifdef HAVE_LEGACY
if ( csqc_isdarkplaces & & prinst = = csqc_world . progs )
{
switch ( parametertype )
{
case VF_VIEWPORT :
r [ 0 ] = r_refdef . grect . width * ( float ) vid . pixelwidth / vid . width ; ;
r [ 1 ] = r_refdef . grect . height * ( float ) vid . pixelheight / vid . height ;
return ;
case VF_SIZE_X :
* r = r_refdef . grect . width * ( float ) vid . pixelwidth / vid . width ;
return ;
case VF_SIZE_Y :
* r = r_refdef . grect . height * ( float ) vid . pixelheight / vid . height ;
return ;
case VF_SIZE :
r [ 0 ] = r_refdef . grect . width * ( float ) vid . pixelwidth / vid . width ; ;
r [ 1 ] = r_refdef . grect . height * ( float ) vid . pixelheight / vid . height ;
r [ 2 ] = 0 ;
return ;
case VF_DP_MAINVIEW :
r [ 0 ] = 1 ;
return ;
case VF_DP_MINFPS_QUALITY :
r [ 0 ] = 1 ;
return ;
case VF_DP_CLEARSCREEN :
r [ 0 ] = 0 ;
return ;
case VF_DP_FOG_DENSITY :
r [ 0 ] = r_refdef . globalfog . density ;
return ;
case VF_DP_FOG_COLOR :
r [ 0 ] = r_refdef . globalfog . colour [ 0 ] ;
r [ 1 ] = r_refdef . globalfog . colour [ 1 ] ;
r [ 2 ] = r_refdef . globalfog . colour [ 2 ] ;
return ;
case VF_DP_FOG_COLOR_R :
r [ 0 ] = r_refdef . globalfog . colour [ 0 ] ;
return ;
case VF_DP_FOG_COLOR_G :
r [ 0 ] = r_refdef . globalfog . colour [ 1 ] ;
return ;
case VF_DP_FOG_COLOR_B :
r [ 0 ] = r_refdef . globalfog . colour [ 2 ] ;
return ;
case VF_DP_FOG_ALPHA :
r [ 0 ] = r_refdef . globalfog . alpha ;
return ;
case VF_DP_FOG_START :
case VF_DP_FOG_END :
case VF_DP_FOG_HEIGHT :
case VF_DP_FOG_FADEDEPTH :
return ;
default :
break ;
}
}
# endif
2005-07-14 01:57:34 +00:00
switch ( parametertype )
2005-01-24 05:10:11 +00:00
{
2018-01-22 19:18:04 +00:00
nogameaccess :
csqc_deprecated ( " PF_R_GetViewFlag: game access is blocked " ) ;
break ;
2015-04-14 23:12:17 +00:00
case VF_ACTIVESEAT :
2014-05-30 03:57:30 +00:00
if ( prinst = = csqc_world . progs )
* r = csqc_playerseat ;
2013-06-23 02:17:02 +00:00
break ;
2005-07-14 01:57:34 +00:00
case VF_FOV :
2011-05-20 04:10:46 +00:00
r [ 0 ] = r_refdef . fov_x ;
r [ 1 ] = r_refdef . fov_y ;
2005-01-24 05:10:11 +00:00
break ;
2005-07-14 01:57:34 +00:00
2021-06-21 13:45:14 +00:00
case VF_FOV_X :
2011-05-20 04:10:46 +00:00
* r = r_refdef . fov_x ;
2005-01-24 05:10:11 +00:00
break ;
2005-11-21 21:47:53 +00:00
2021-06-21 13:45:14 +00:00
case VF_FOV_Y :
2011-05-20 04:10:46 +00:00
* r = r_refdef . fov_y ;
2005-07-14 01:57:34 +00:00
break ;
2008-11-28 20:34:51 +00:00
case VF_AFOV :
2013-06-23 02:17:02 +00:00
* r = r_refdef . afov ;
2008-11-28 20:34:51 +00:00
break ;
2019-04-01 10:16:36 +00:00
case VF_SKYROOM_CAMERA :
if ( r_refdef . skyroom_enabled )
VectorCopy ( r_refdef . skyroom_pos , r ) ;
else
VectorClear ( r ) ; //not really correct, but no other way to really signal this. -0? yuck.
break ;
2005-07-14 01:57:34 +00:00
case VF_ORIGIN :
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess & & prinst = = csqc_world . progs )
goto nogameaccess ;
2011-05-20 04:10:46 +00:00
VectorCopy ( r_refdef . vieworg , r ) ;
2005-07-14 01:57:34 +00:00
break ;
2006-01-28 19:04:13 +00:00
case VF_ORIGIN_Z :
2005-07-14 01:57:34 +00:00
case VF_ORIGIN_X :
case VF_ORIGIN_Y :
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess & & prinst = = csqc_world . progs )
goto nogameaccess ;
2011-05-20 04:10:46 +00:00
* r = r_refdef . vieworg [ parametertype - VF_ORIGIN_X ] ;
2005-07-14 01:57:34 +00:00
break ;
case VF_ANGLES :
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess & & prinst = = csqc_world . progs )
goto nogameaccess ;
2011-05-20 04:10:46 +00:00
VectorCopy ( r_refdef . viewangles , r ) ;
2005-07-14 01:57:34 +00:00
break ;
case VF_ANGLES_X :
case VF_ANGLES_Y :
case VF_ANGLES_Z :
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess & & prinst = = csqc_world . progs )
goto nogameaccess ;
2011-05-20 04:10:46 +00:00
* r = r_refdef . viewangles [ parametertype - VF_ANGLES_X ] ;
2005-01-24 05:10:11 +00:00
break ;
2005-11-21 21:47:53 +00:00
2021-05-09 13:02:49 +00:00
case VF_VRBASEORIENTATION :
if ( csqc_nogameaccess & & prinst = = csqc_world . progs )
goto nogameaccess ;
VectorCopy ( r_refdef . base_angles , r ) ;
break ;
2008-11-28 20:34:51 +00:00
case VF_CL_VIEWANGLES_V :
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess & & prinst = = csqc_world . progs )
goto nogameaccess ;
2014-10-05 20:04:11 +00:00
if ( csqc_playerview )
VectorCopy ( csqc_playerview - > viewangles , r ) ;
2008-11-28 20:34:51 +00:00
break ;
case VF_CL_VIEWANGLES_X :
case VF_CL_VIEWANGLES_Y :
case VF_CL_VIEWANGLES_Z :
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess & & prinst = = csqc_world . progs )
goto nogameaccess ;
2014-10-05 20:04:11 +00:00
if ( csqc_playerview )
* r = csqc_playerview - > viewangles [ parametertype - VF_CL_VIEWANGLES_X ] ;
2008-11-28 20:34:51 +00:00
break ;
2005-11-21 21:47:53 +00:00
case VF_CARTESIAN_ANGLES :
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess & & prinst = = csqc_world . progs )
goto nogameaccess ;
2007-09-23 15:28:06 +00:00
Con_Printf ( CON_WARNING " WARNING: CARTESIAN ANGLES ARE NOT YET SUPPORTED! \n " ) ;
2005-11-21 21:47:53 +00:00
break ;
2005-07-14 01:57:34 +00:00
case VF_VIEWPORT :
2013-11-21 23:02:28 +00:00
r [ 0 ] = r_refdef . grect . width ;
r [ 1 ] = r_refdef . grect . height ;
2005-01-24 05:10:11 +00:00
break ;
2005-07-14 01:57:34 +00:00
case VF_SIZE_X :
2013-11-21 23:02:28 +00:00
* r = r_refdef . grect . width ;
2005-01-24 05:10:11 +00:00
break ;
2005-07-14 01:57:34 +00:00
case VF_SIZE_Y :
2013-11-21 23:02:28 +00:00
* r = r_refdef . grect . height ;
2005-01-24 05:10:11 +00:00
break ;
2005-07-14 01:57:34 +00:00
case VF_SIZE :
2013-11-21 23:02:28 +00:00
r [ 0 ] = r_refdef . grect . width ;
r [ 1 ] = r_refdef . grect . height ;
Android: fat presses, vibrator, onscreen keyboard, keep-screen-on, console scaling, touch-based console scrolling, additional bindables.
Some memory leaks fixed.
latency with the nq protocol over loopback is much reduced.
Terrain: now mostly a property of a (q1 for now) bsp map, file format changed, glsl now built in, terrain editor builtin improved/changed, holes supported.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4067 fc73d0e0-1445-4013-8a0c-d673dee63da5
2012-07-14 16:25:18 +00:00
r [ 2 ] = 0 ;
2005-07-14 01:57:34 +00:00
break ;
case VF_MIN_X :
2013-11-21 23:02:28 +00:00
* r = r_refdef . grect . x ;
2005-07-14 01:57:34 +00:00
break ;
case VF_MIN_Y :
2013-11-21 23:02:28 +00:00
* r = r_refdef . grect . y ;
2005-01-24 05:10:11 +00:00
break ;
2005-07-14 01:57:34 +00:00
case VF_MIN :
2013-11-21 23:02:28 +00:00
r [ 0 ] = r_refdef . grect . x ;
r [ 1 ] = r_refdef . grect . y ;
2005-07-14 01:57:34 +00:00
break ;
2016-10-22 07:06:51 +00:00
case VF_MINDIST :
* r = r_refdef . mindist ;
break ;
case VF_MAXDIST :
* r = r_refdef . maxdist ;
break ;
2005-08-03 23:14:59 +00:00
case VF_DRAWWORLD :
2014-03-31 17:06:41 +00:00
* r = ! ( r_refdef . flags & RDF_NOWORLDMODEL ) ;
2005-08-03 23:14:59 +00:00
break ;
2005-10-01 03:01:12 +00:00
case VF_ENGINESBAR :
2013-06-23 02:17:02 +00:00
* r = r_refdef . drawsbar ;
2005-08-03 23:14:59 +00:00
break ;
case VF_DRAWCROSSHAIR :
2014-05-30 03:57:30 +00:00
* r = r_refdef . drawcrosshair ;
2005-08-03 23:14:59 +00:00
break ;
2005-07-14 01:57:34 +00:00
case VF_PERSPECTIVE :
2011-05-20 04:10:46 +00:00
* r = r_refdef . useperspective ;
2005-07-14 01:57:34 +00:00
break ;
2020-02-11 18:06:10 +00:00
case VF_PROJECTIONOFFSET :
r [ 0 ] = r_refdef . projectionoffset [ 0 ] ;
r [ 1 ] = r_refdef . projectionoffset [ 1 ] ;
break ;
2012-10-13 00:56:31 +00:00
case VF_SCREENVSIZE :
r [ 0 ] = vid . width ;
r [ 1 ] = vid . height ;
break ;
case VF_SCREENPSIZE :
r [ 0 ] = vid . rotpixelwidth ;
r [ 1 ] = vid . rotpixelheight ;
break ;
2020-06-01 01:31:46 +00:00
case VF_PIXELPSCALE :
r [ 0 ] = vid . dpi_x ;
r [ 1 ] = vid . dpi_y ;
r [ 2 ] = vid . dpi_y / vid . dpi_x ; //aspect
break ;
2012-10-13 00:56:31 +00:00
2005-01-24 05:10:11 +00:00
default :
2011-05-20 04:10:46 +00:00
Con_DPrintf ( " GetViewFlag: %i not recognised \n " , parametertype ) ;
2005-01-24 05:10:11 +00:00
break ;
}
}
2018-07-05 16:21:44 +00:00
uploadfmt_t PR_TranslateTextureFormat ( int qcformat )
2014-11-01 09:09:58 +00:00
{
switch ( qcformat )
{
2019-04-07 16:41:09 +00:00
case 1 : return PTI_RGBA8 ;
case 2 : return PTI_RGBA16F ;
case 3 : return PTI_RGBA32F ;
case 4 : return PTI_DEPTH16 ;
case 5 : return PTI_DEPTH24 ;
case 6 : return PTI_DEPTH32 ;
case 7 : return PTI_R8 ;
case 8 : return PTI_R16F ;
case 9 : return PTI_R32F ;
case 10 : return PTI_A2BGR10 ;
case 11 : return PTI_RGB565 ;
case 12 : return PTI_RGBA4444 ;
case 13 : return PTI_RG8 ;
2019-10-06 01:59:13 +00:00
case 14 : return PTI_RGB32F ;
2019-04-07 16:41:09 +00:00
2022-02-07 14:34:11 +00:00
default :
qcformat = - qcformat ;
if ( qcformat < PTI_MAX )
return qcformat ;
return PTI_INVALID ;
}
}
int PR_UnTranslateTextureFormat ( uploadfmt_t pixelformat )
{
switch ( pixelformat )
{
case PTI_RGBA8 : return 1 ;
case PTI_RGBA16F : return 2 ;
case PTI_RGBA32F : return 3 ;
case PTI_DEPTH16 : return 4 ;
case PTI_DEPTH24 : return 5 ;
case PTI_DEPTH32 : return 6 ;
case PTI_R8 : return 7 ;
case PTI_R16F : return 8 ;
case PTI_R32F : return 9 ;
case PTI_A2BGR10 : return 10 ;
case PTI_RGB565 : return 11 ;
case PTI_RGBA4444 : return 12 ;
case PTI_RG8 : return 13 ;
case PTI_RGB32F : return 14 ;
default : return - pixelformat ;
2014-11-01 09:09:58 +00:00
}
}
2014-05-30 03:57:30 +00:00
void QCBUILTIN PF_R_SetViewFlag ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2008-05-25 22:23:43 +00:00
{
viewflags parametertype = G_FLOAT ( OFS_PARM0 ) ;
2011-05-20 04:10:46 +00:00
float * p = G_VECTOR ( OFS_PARM1 ) ;
2008-05-25 22:23:43 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( prinst - > callargc < 2 )
2011-05-20 04:10:46 +00:00
{
csqc_deprecated ( " PF_R_SetViewFlag called with wrong argument count \n " ) ;
PF_R_GetViewFlag ( prinst , pr_globals ) ;
return ;
}
2008-05-25 22:23:43 +00:00
2015-07-30 16:26:15 +00:00
if ( R2D_Flush )
R2D_Flush ( ) ;
2011-05-20 04:10:46 +00:00
csqc_rebuildmatricies = true ;
G_FLOAT ( OFS_RETURN ) = 1 ;
2020-04-19 01:23:32 +00:00
# ifdef HAVE_LEGACY
if ( csqc_isdarkplaces & & prinst = = csqc_world . progs )
{
switch ( parametertype )
{
case VF_VIEWPORT :
r_refdef . grect . x = p [ 0 ] * ( float ) vid . width / vid . pixelwidth ;
r_refdef . grect . y = p [ 1 ] * ( float ) vid . height / vid . pixelheight ;
p = G_VECTOR ( OFS_PARM2 ) ;
r_refdef . grect . width = p [ 0 ] * ( float ) vid . width / vid . pixelwidth ;
r_refdef . grect . height = p [ 1 ] * ( float ) vid . height / vid . pixelheight ;
r_refdef . dirty | = RDFD_FOV ;
return ;
case VF_SIZE_X :
r_refdef . grect . width = * p * ( float ) vid . width / vid . pixelwidth ;
r_refdef . dirty | = RDFD_FOV ;
return ;
case VF_SIZE_Y :
r_refdef . grect . height = * p * ( float ) vid . height / vid . pixelheight ;
r_refdef . dirty | = RDFD_FOV ;
return ;
case VF_SIZE :
r_refdef . grect . width = p [ 0 ] * ( float ) vid . width / vid . pixelwidth ;
r_refdef . grect . height = p [ 1 ] * ( float ) vid . height / vid . pixelheight ;
r_refdef . dirty | = RDFD_FOV ;
return ;
case VF_DP_MAINVIEW :
case VF_DP_MINFPS_QUALITY :
case VF_DP_CLEARSCREEN :
case VF_DP_FOG_DENSITY :
case VF_DP_FOG_COLOR :
case VF_DP_FOG_COLOR_R :
case VF_DP_FOG_COLOR_G :
case VF_DP_FOG_COLOR_B :
case VF_DP_FOG_ALPHA :
case VF_DP_FOG_START :
case VF_DP_FOG_END :
case VF_DP_FOG_HEIGHT :
case VF_DP_FOG_FADEDEPTH :
return ;
default :
break ;
}
}
# endif
2008-05-25 22:23:43 +00:00
switch ( parametertype )
{
2015-04-14 23:12:17 +00:00
case VF_ACTIVESEAT :
2014-05-30 03:57:30 +00:00
if ( prinst = = csqc_world . progs )
{
2018-11-19 06:37:25 +00:00
if ( csqc_playerseat ! = ( int ) * p )
2015-04-27 06:19:33 +00:00
{
CSQC_ChangeLocalPlayer ( * p ) ;
if ( prinst - > callargc < 3 | | G_FLOAT ( OFS_PARM2 ) )
V_CalcRefdef ( csqc_playerview ) ; //set up the default position+angles for the named player.
}
2014-05-30 03:57:30 +00:00
}
2013-06-23 02:17:02 +00:00
break ;
case VF_VIEWENTITY :
//switches over EXTERNALMODEL flags and clears WEAPONMODEL flagged entities.
//FIXME: make affect addentities(MASK_ENGINE) calls too.
2016-07-12 00:40:13 +00:00
V_EditExternalModels ( * p , NULL , 0 ) ;
2013-06-23 02:17:02 +00:00
break ;
2008-05-25 22:23:43 +00:00
case VF_FOV :
2013-06-23 02:17:02 +00:00
//explicit fov overrides aproximate fov
r_refdef . afov = 0 ;
2011-05-20 04:10:46 +00:00
r_refdef . fov_x = p [ 0 ] ;
r_refdef . fov_y = p [ 1 ] ;
2018-10-11 10:31:23 +00:00
r_refdef . fovv_x = r_refdef . fovv_y = 0 ;
2013-06-23 02:17:02 +00:00
r_refdef . dirty | = RDFD_FOV ;
2008-05-25 22:23:43 +00:00
break ;
2021-06-21 13:45:14 +00:00
case VF_FOV_X :
2013-06-23 02:17:02 +00:00
r_refdef . afov = 0 ;
2011-05-20 04:10:46 +00:00
r_refdef . fov_x = * p ;
2018-10-11 10:31:23 +00:00
r_refdef . fovv_x = r_refdef . fovv_y = 0 ;
2013-06-23 02:17:02 +00:00
r_refdef . dirty | = RDFD_FOV ;
2008-05-25 22:23:43 +00:00
break ;
2021-06-21 13:45:14 +00:00
case VF_FOV_Y :
2013-06-23 02:17:02 +00:00
r_refdef . afov = 0 ;
2011-05-20 04:10:46 +00:00
r_refdef . fov_y = * p ;
2018-10-11 10:31:23 +00:00
r_refdef . fovv_x = r_refdef . fovv_y = 0 ;
2013-06-23 02:17:02 +00:00
r_refdef . dirty | = RDFD_FOV ;
2008-05-25 22:23:43 +00:00
break ;
2008-11-28 20:34:51 +00:00
case VF_AFOV :
2013-06-23 02:17:02 +00:00
r_refdef . afov = * p ;
2018-10-11 10:31:23 +00:00
r_refdef . fov_x = r_refdef . fov_y = 0 ;
r_refdef . fovv_x = r_refdef . fovv_y = 0 ;
2013-06-23 02:17:02 +00:00
r_refdef . dirty | = RDFD_FOV ;
2008-11-28 20:34:51 +00:00
break ;
2019-04-01 10:16:36 +00:00
case VF_SKYROOM_CAMERA :
r_refdef . skyroom_enabled = true ;
VectorCopy ( p , r_refdef . skyroom_pos ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( prinst - > callargc > = 4 )
{
VectorCopy ( G_VECTOR ( OFS_PARM2 ) , r_refdef . skyroom_spin ) ;
r_refdef . skyroom_spin [ 3 ] = G_FLOAT ( OFS_PARM3 ) ;
}
else
Vector4Set ( r_refdef . skyroom_spin , 0 , 0 , 0 , 0 ) ;
2019-04-01 10:16:36 +00:00
break ;
2008-05-25 22:23:43 +00:00
case VF_ORIGIN :
2011-05-20 04:10:46 +00:00
VectorCopy ( p , r_refdef . vieworg ) ;
2014-10-05 20:04:11 +00:00
if ( csqc_playerview )
csqc_playerview - > crouch = 0 ;
2008-05-25 22:23:43 +00:00
break ;
case VF_ORIGIN_Z :
2014-10-05 20:04:11 +00:00
if ( csqc_playerview )
csqc_playerview - > crouch = 0 ;
2008-05-25 22:23:43 +00:00
case VF_ORIGIN_X :
case VF_ORIGIN_Y :
2011-05-20 04:10:46 +00:00
r_refdef . vieworg [ parametertype - VF_ORIGIN_X ] = * p ;
2008-05-25 22:23:43 +00:00
break ;
case VF_ANGLES :
2011-05-20 04:10:46 +00:00
VectorCopy ( p , r_refdef . viewangles ) ;
2008-05-25 22:23:43 +00:00
break ;
case VF_ANGLES_X :
case VF_ANGLES_Y :
case VF_ANGLES_Z :
2011-05-20 04:10:46 +00:00
r_refdef . viewangles [ parametertype - VF_ANGLES_X ] = * p ;
2008-05-25 22:23:43 +00:00
break ;
2021-05-09 13:02:49 +00:00
case VF_VRBASEORIENTATION :
in_vraim . ival = 0 ; //csqc mod with explicit vr stuff.
r_refdef . base_known = true ;
VectorCopy ( p , r_refdef . base_angles ) ;
VectorCopy ( G_VECTOR ( OFS_PARM2 ) , r_refdef . base_origin ) ;
break ;
2008-11-28 20:34:51 +00:00
case VF_CL_VIEWANGLES_V :
2014-10-05 20:04:11 +00:00
if ( csqc_playerview )
VectorCopy ( p , csqc_playerview - > viewangles ) ;
2008-11-28 20:34:51 +00:00
break ;
case VF_CL_VIEWANGLES_X :
case VF_CL_VIEWANGLES_Y :
case VF_CL_VIEWANGLES_Z :
2014-10-05 20:04:11 +00:00
if ( csqc_playerview )
csqc_playerview - > viewangles [ parametertype - VF_CL_VIEWANGLES_X ] = * p ;
2008-11-28 20:34:51 +00:00
break ;
2008-05-25 22:23:43 +00:00
case VF_CARTESIAN_ANGLES :
Con_Printf ( CON_WARNING " WARNING: CARTESIAN ANGLES ARE NOT YET SUPPORTED! \n " ) ;
break ;
case VF_VIEWPORT :
2013-06-23 02:17:02 +00:00
r_refdef . grect . x = p [ 0 ] ;
r_refdef . grect . y = p [ 1 ] ;
2013-03-12 22:44:00 +00:00
p = G_VECTOR ( OFS_PARM2 ) ;
2013-06-23 02:17:02 +00:00
r_refdef . grect . width = p [ 0 ] ;
r_refdef . grect . height = p [ 1 ] ;
r_refdef . dirty | = RDFD_FOV ;
2008-05-25 22:23:43 +00:00
break ;
case VF_SIZE_X :
2013-06-23 02:17:02 +00:00
r_refdef . grect . width = * p ;
r_refdef . dirty | = RDFD_FOV ;
2008-05-25 22:23:43 +00:00
break ;
case VF_SIZE_Y :
2013-06-23 02:17:02 +00:00
r_refdef . grect . height = * p ;
r_refdef . dirty | = RDFD_FOV ;
2008-05-25 22:23:43 +00:00
break ;
case VF_SIZE :
2013-06-23 02:17:02 +00:00
r_refdef . grect . width = p [ 0 ] ;
r_refdef . grect . height = p [ 1 ] ;
r_refdef . dirty | = RDFD_FOV ;
2008-05-25 22:23:43 +00:00
break ;
case VF_MIN_X :
2013-06-23 02:17:02 +00:00
r_refdef . grect . x = * p ;
2008-05-25 22:23:43 +00:00
break ;
case VF_MIN_Y :
2013-06-23 02:17:02 +00:00
r_refdef . grect . y = * p ;
2008-05-25 22:23:43 +00:00
break ;
case VF_MIN :
2013-06-23 02:17:02 +00:00
r_refdef . grect . x = p [ 0 ] ;
r_refdef . grect . y = p [ 1 ] ;
2008-05-25 22:23:43 +00:00
break ;
2016-10-22 07:06:51 +00:00
case VF_MINDIST :
r_refdef . mindist = * p ;
break ;
case VF_MAXDIST :
r_refdef . maxdist = * p ;
break ;
2008-05-25 22:23:43 +00:00
case VF_DRAWWORLD :
2014-03-31 17:06:41 +00:00
r_refdef . flags = ( r_refdef . flags & ~ RDF_NOWORLDMODEL ) | ( * p ? 0 : RDF_NOWORLDMODEL ) ;
2008-05-25 22:23:43 +00:00
break ;
case VF_ENGINESBAR :
2013-06-23 02:17:02 +00:00
r_refdef . drawsbar = ! ! * p ;
2008-05-25 22:23:43 +00:00
break ;
case VF_DRAWCROSSHAIR :
2014-05-30 03:57:30 +00:00
r_refdef . drawcrosshair = * p ;
2008-05-25 22:23:43 +00:00
break ;
case VF_PERSPECTIVE :
2011-05-20 04:10:46 +00:00
r_refdef . useperspective = * p ;
2008-05-25 22:23:43 +00:00
break ;
2020-02-11 18:06:10 +00:00
case VF_PROJECTIONOFFSET :
r_refdef . projectionoffset [ 0 ] = p [ 0 ] ;
r_refdef . projectionoffset [ 1 ] = p [ 1 ] ;
break ;
2014-08-03 14:47:47 +00:00
case VF_RT_DESTCOLOUR0 :
2015-01-07 13:34:05 +00:00
case VF_RT_DESTCOLOUR1 :
case VF_RT_DESTCOLOUR2 :
case VF_RT_DESTCOLOUR3 :
case VF_RT_DESTCOLOUR4 :
case VF_RT_DESTCOLOUR5 :
case VF_RT_DESTCOLOUR6 :
case VF_RT_DESTCOLOUR7 :
2014-02-07 08:38:40 +00:00
{
2014-08-03 14:47:47 +00:00
int i = parametertype - VF_RT_DESTCOLOUR0 ;
Q_strncpyz ( r_refdef . rt_destcolour [ i ] . texname , PR_GetStringOfs ( prinst , OFS_PARM1 ) , sizeof ( r_refdef . rt_destcolour [ i ] . texname ) ) ;
if ( prinst - > callargc > = 4 & & * r_refdef . rt_destcolour [ i ] . texname )
{
float fmt = G_FLOAT ( OFS_PARM2 ) ;
float * size = G_VECTOR ( OFS_PARM3 ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
if ( fmt < 0 )
R2D_RT_Configure ( r_refdef . rt_destcolour [ i ] . texname , size [ 0 ] , size [ 1 ] , PR_TranslateTextureFormat ( - fmt ) , ( RT_IMAGEFLAGS & ~ IF_LINEAR ) | IF_NEAREST ) ;
else
R2D_RT_Configure ( r_refdef . rt_destcolour [ i ] . texname , size [ 0 ] , size [ 1 ] , PR_TranslateTextureFormat ( fmt ) , RT_IMAGEFLAGS ) ;
2014-08-03 14:47:47 +00:00
}
BE_RenderToTextureUpdate2d ( true ) ;
2014-02-07 08:38:40 +00:00
}
break ;
case VF_RT_SOURCECOLOUR :
2014-08-03 14:47:47 +00:00
Q_strncpyz ( r_refdef . rt_sourcecolour . texname , PR_GetStringOfs ( prinst , OFS_PARM1 ) , sizeof ( r_refdef . rt_sourcecolour ) ) ;
if ( prinst - > callargc > = 4 & & * r_refdef . rt_sourcecolour . texname )
2014-02-07 08:38:40 +00:00
{
float fmt = G_FLOAT ( OFS_PARM2 ) ;
float * size = G_VECTOR ( OFS_PARM3 ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
if ( fmt < 0 )
R2D_RT_Configure ( r_refdef . rt_sourcecolour . texname , size [ 0 ] , size [ 1 ] , PR_TranslateTextureFormat ( - fmt ) , ( RT_IMAGEFLAGS & ~ IF_LINEAR ) | IF_NEAREST ) ;
else
R2D_RT_Configure ( r_refdef . rt_sourcecolour . texname , size [ 0 ] , size [ 1 ] , PR_TranslateTextureFormat ( fmt ) , RT_IMAGEFLAGS ) ;
2014-02-07 08:38:40 +00:00
}
2014-02-07 14:57:07 +00:00
BE_RenderToTextureUpdate2d ( false ) ;
2014-02-07 08:38:40 +00:00
break ;
case VF_RT_DEPTH :
2014-08-03 14:47:47 +00:00
Q_strncpyz ( r_refdef . rt_depth . texname , PR_GetStringOfs ( prinst , OFS_PARM1 ) , sizeof ( r_refdef . rt_depth . texname ) ) ;
if ( prinst - > callargc > = 4 & & * r_refdef . rt_depth . texname )
2014-02-07 08:38:40 +00:00
{
float fmt = G_FLOAT ( OFS_PARM2 ) ;
float * size = G_VECTOR ( OFS_PARM3 ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
if ( fmt < 0 )
R2D_RT_Configure ( r_refdef . rt_depth . texname , size [ 0 ] , size [ 1 ] , PR_TranslateTextureFormat ( - fmt ) , ( RT_IMAGEFLAGS & ~ IF_LINEAR ) | IF_NEAREST ) ;
else
R2D_RT_Configure ( r_refdef . rt_depth . texname , size [ 0 ] , size [ 1 ] , PR_TranslateTextureFormat ( fmt ) , RT_IMAGEFLAGS ) ;
2014-02-07 08:38:40 +00:00
}
2014-02-07 14:57:07 +00:00
BE_RenderToTextureUpdate2d ( false ) ;
2014-02-07 08:38:40 +00:00
break ;
case VF_RT_RIPPLE :
2014-08-03 14:47:47 +00:00
Q_strncpyz ( r_refdef . rt_ripplemap . texname , PR_GetStringOfs ( prinst , OFS_PARM1 ) , sizeof ( r_refdef . rt_ripplemap . texname ) ) ;
if ( prinst - > callargc > = 4 & & * r_refdef . rt_ripplemap . texname )
2014-02-07 08:38:40 +00:00
{
float fmt = G_FLOAT ( OFS_PARM2 ) ;
float * size = G_VECTOR ( OFS_PARM3 ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
if ( fmt < 0 )
R2D_RT_Configure ( r_refdef . rt_ripplemap . texname , size [ 0 ] , size [ 1 ] , PR_TranslateTextureFormat ( - fmt ) , ( RT_IMAGEFLAGS & ~ IF_LINEAR ) | IF_NEAREST ) ;
else
R2D_RT_Configure ( r_refdef . rt_ripplemap . texname , size [ 0 ] , size [ 1 ] , PR_TranslateTextureFormat ( fmt ) , RT_IMAGEFLAGS ) ;
2014-02-07 08:38:40 +00:00
}
2014-02-07 14:57:07 +00:00
BE_RenderToTextureUpdate2d ( false ) ;
2014-02-07 08:38:40 +00:00
break ;
2016-07-12 00:40:13 +00:00
case VF_ENVMAP :
2018-07-05 16:21:44 +00:00
Q_strncpyz ( r_refdef . nearenvmap . texname , PR_GetStringOfs ( prinst , OFS_PARM1 ) , sizeof ( r_refdef . nearenvmap . texname ) ) ;
2016-07-12 00:40:13 +00:00
BE_RenderToTextureUpdate2d ( false ) ;
break ;
2017-12-03 08:27:27 +00:00
case VF_USERDATA :
{
int qcptr = G_INT ( OFS_PARM1 ) ;
int size = G_INT ( OFS_PARM2 ) ;
void * ptr ;
if ( size > sizeof ( r_refdef . userdata ) )
size = sizeof ( r_refdef . userdata ) ;
//validates the pointer.
if ( qcptr < 0 | | qcptr + size > = prinst - > stringtablesize | | size < 0 )
{
PR_BIError ( prinst , " PF_R_SetViewFlag: invalid pointer \n " ) ;
return ;
}
2021-07-17 15:09:34 +00:00
ptr = ( prinst - > stringtable + qcptr ) ;
2017-12-03 08:27:27 +00:00
memcpy ( r_refdef . userdata , ptr , size ) ;
}
break ;
2008-05-25 22:23:43 +00:00
default :
2011-05-20 04:10:46 +00:00
Con_DPrintf ( " SetViewFlag: %i not recognised \n " , parametertype ) ;
G_FLOAT ( OFS_RETURN ) = 0 ;
2008-05-25 22:23:43 +00:00
break ;
}
}
2012-11-27 03:23:19 +00:00
void R2D_PolyBlend ( void ) ;
2015-06-04 06:15:14 +00:00
void R_DrawNameTags ( void ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_R_RenderScene ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-01-24 05:10:11 +00:00
{
2015-08-04 15:16:24 +00:00
qboolean scissored ;
2015-07-30 16:26:15 +00:00
if ( R2D_Flush )
R2D_Flush ( ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
csqc_poly_shader = NULL ;
2014-10-05 20:04:11 +00:00
if ( csqc_worldchanged )
{
csqc_worldchanged = false ;
2020-08-13 08:39:48 +00:00
cl . worldmodel = r_worldentity . model = csqc_world . worldmodel ;
2023-02-20 08:47:45 +00:00
if ( cl . worldmodel )
FS_LoadMapPackFile ( cl . worldmodel - > name , cl . worldmodel - > archive ) ;
2022-03-08 05:31:34 +00:00
Surf_NewMap ( csqc_world . worldmodel ) ;
2015-09-01 04:45:15 +00:00
CL_UpdateWindowTitle ( ) ;
2015-10-11 11:34:58 +00:00
World_RBE_Shutdown ( & csqc_world ) ;
World_RBE_Start ( & csqc_world ) ;
2014-10-05 20:04:11 +00:00
}
2005-02-28 07:16:19 +00:00
if ( cl . worldmodel )
R_PushDlights ( ) ;
2005-02-09 19:32:09 +00:00
2013-06-23 02:17:02 +00:00
r_refdef . playerview = csqc_playerview ;
2008-11-28 20:34:51 +00:00
2018-10-11 10:31:23 +00:00
V_ApplyRefdef ( ) ;
2013-06-23 02:17:02 +00:00
V_CalcGunPositionAngle ( csqc_playerview , V_CalcBob ( csqc_playerview , true ) ) ;
2005-04-26 16:04:12 +00:00
2005-01-24 05:10:11 +00:00
R_RenderView ( ) ;
2012-11-27 03:23:19 +00:00
R2D_PolyBlend ( ) ;
2005-01-24 05:10:11 +00:00
2015-08-04 15:16:24 +00:00
if ( r_refdef . grect . x | | r_refdef . grect . y | | r_refdef . grect . width ! = vid . fbvwidth | | r_refdef . grect . height ! = vid . fbvheight )
2013-06-23 02:17:02 +00:00
{
srect_t srect ;
2014-02-07 08:38:40 +00:00
srect . x = ( float ) r_refdef . grect . x / vid . fbvwidth ;
srect . y = ( float ) r_refdef . grect . y / vid . fbvheight ;
srect . width = ( float ) r_refdef . grect . width / vid . fbvwidth ;
srect . height = ( float ) r_refdef . grect . height / vid . fbvheight ;
2013-06-23 02:17:02 +00:00
srect . dmin = - 99999 ;
srect . dmax = 99999 ;
srect . y = ( 1 - srect . y ) - srect . height ;
BE_Scissor ( & srect ) ;
2015-08-04 15:16:24 +00:00
scissored = true ;
2013-06-23 02:17:02 +00:00
}
2015-08-04 15:16:24 +00:00
else
scissored = false ;
2005-08-03 23:14:59 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! vrui . enabled ) //when we're using the vrui, this stuff needs to be part of the scene, drawn seperately for each eye
{
R_DrawNameTags ( ) ;
2018-11-19 06:37:25 +00:00
# ifdef RTLIGHTS
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
R_EditLights_DrawInfo ( ) ;
2018-11-19 06:37:25 +00:00
# endif
2016-01-18 05:22:07 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( r_refdef . drawsbar )
{
2005-08-06 07:18:29 +00:00
# ifdef PLUGINS
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Plug_SBar ( r_refdef . playerview ) ;
2005-08-06 07:18:29 +00:00
# else
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( Sbar_ShouldDraw ( r_refdef . playerview ) )
2016-07-12 00:40:13 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
SCR_TileClear ( sb_lines ) ;
Sbar_Draw ( r_refdef . playerview ) ;
Sbar_DrawScoreboard ( r_refdef . playerview ) ;
2016-07-12 00:40:13 +00:00
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else
SCR_TileClear ( 0 ) ;
# endif
if ( ! Key_Dest_Has ( kdm_menu | kdm_cwindows ) )
2016-07-12 00:40:13 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cl . intermissionmode = = IM_NQFINALE | | cl . intermissionmode = = IM_NQCUTSCENE | | cl . intermissionmode = = IM_H2FINALE )
{
SCR_CheckDrawCenterString ( ) ;
}
else if ( cl . intermissionmode ! = IM_NONE )
{
Sbar_IntermissionOverlay ( r_refdef . playerview ) ;
}
2016-07-12 00:40:13 +00:00
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
SCR_ShowPics_Draw ( ) ;
2016-07-12 00:40:13 +00:00
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( r_refdef . drawcrosshair )
R2D_DrawCrosshair ( ) ;
2007-02-26 03:00:25 +00:00
}
2005-08-06 07:18:29 +00:00
2015-08-04 15:16:24 +00:00
if ( scissored )
{
if ( R2D_Flush )
R2D_Flush ( ) ;
BE_Scissor ( NULL ) ;
}
2005-01-24 05:10:11 +00:00
}
2005-01-17 17:43:13 +00:00
2020-09-08 05:11:09 +00:00
static void QCBUILTIN PF_cs_getstat_int ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-10 00:14:10 +00:00
{
int stnum = G_FLOAT ( OFS_PARM0 ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( stnum < 0 | | stnum > = MAX_CL_STATS )
{
2018-10-23 07:09:06 +00:00
G_INT ( OFS_RETURN ) = 0 ;
2020-09-08 05:11:09 +00:00
PR_RunWarning ( prinst , " PF_cs_getstat_int: invalid stat index (%i) \n " , stnum ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
2017-08-14 16:38:44 +00:00
else if ( stnum > = 128 & & csqc_isdarkplaces & & cls . protocol ! = CP_NETQUAKE & & ! CPNQ_IS_DP )
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
{ //dpp7 stats are fucked.
2013-10-08 14:28:11 +00:00
G_FLOAT ( OFS_RETURN ) = csqc_playerview - > statsf [ stnum ] ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
csqc_deprecated ( " hacked stat type " ) ;
}
2013-10-08 14:28:11 +00:00
else
G_INT ( OFS_RETURN ) = csqc_playerview - > stats [ stnum ] ;
2005-02-10 00:14:10 +00:00
}
2020-09-08 05:11:09 +00:00
static void QCBUILTIN PF_cs_getstat_float ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2013-10-08 14:28:11 +00:00
{ //read a numeric stat into a qc float.
//if bits offsets are specified, reads explicitly the integer version of the stat, allowing high bits to be read for items2/serverflags. the float stat should have the same value, just with lower precision as a float can't hold a 32bit value. maybe we should just use doubles.
2005-02-12 18:56:04 +00:00
2005-02-10 00:14:10 +00:00
int stnum = G_FLOAT ( OFS_PARM0 ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( stnum < 0 | | stnum > = MAX_CL_STATS )
{
G_FLOAT ( OFS_RETURN ) = 0 ;
2020-09-08 05:11:09 +00:00
PR_RunWarning ( prinst , " PF_cs_getstat_float: invalid stat index (%i) \n " , stnum ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
else if ( prinst - > callargc > 1 )
2020-09-08 05:11:09 +00:00
{ //like getstati but with partial itof
2013-10-08 14:28:11 +00:00
int val = csqc_playerview - > stats [ stnum ] ;
2005-02-12 18:56:04 +00:00
int first , count ;
first = G_FLOAT ( OFS_PARM1 ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( prinst - > callargc > 2 )
2007-09-01 02:09:54 +00:00
count = G_FLOAT ( OFS_PARM2 ) ;
else
count = 1 ;
2005-02-12 18:56:04 +00:00
G_FLOAT ( OFS_RETURN ) = ( ( ( unsigned int ) val ) & ( ( ( 1 < < count ) - 1 ) < < first ) ) > > first ;
}
2017-08-14 16:38:44 +00:00
else if ( csqc_isdarkplaces & & cls . protocol ! = CP_NETQUAKE & & ! CPNQ_IS_DP )
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
{
G_FLOAT ( OFS_RETURN ) = ( int ) csqc_playerview - > statsf [ stnum ] ; //stupid. mods like xonotic end up with an ugly hud if they're actually given any precision
if ( G_FLOAT ( OFS_RETURN ) ! = csqc_playerview - > statsf [ stnum ] )
2020-09-08 05:11:09 +00:00
csqc_deprecated ( " getstat_float stat truncation " ) ; //this is a common call. only get pissy if there's a reason to get pissy.
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
2005-02-10 00:14:10 +00:00
else
2013-06-23 02:17:02 +00:00
G_FLOAT ( OFS_RETURN ) = csqc_playerview - > statsf [ stnum ] ;
2005-02-10 00:14:10 +00:00
}
2020-09-08 05:11:09 +00:00
static void QCBUILTIN PF_cs_getstat_string ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-10 00:14:10 +00:00
{
int stnum = G_FLOAT ( OFS_PARM0 ) ;
2008-12-07 00:04:12 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( stnum < 0 | | stnum > = MAX_CL_STATS )
{
G_INT ( OFS_RETURN ) = 0 ;
2018-10-23 07:09:06 +00:00
PR_RunWarning ( prinst , " PF_cs_getstats: invalid stat index (%i) \n " , stnum ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
else if ( cls . fteprotocolextensions & PEXT_CSQC )
RETURN_TSTRING ( csqc_playerview - > statsstr [ stnum ] ) ;
2018-10-23 07:09:06 +00:00
else if ( stnum > = MAX_CL_STATS - 3 ) //we'll be reading the following 3 extra stats too.
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
{
G_INT ( OFS_RETURN ) = 0 ;
2018-10-23 07:09:06 +00:00
PR_RunWarning ( prinst , " PF_cs_getstats: invalid packed-string stat index (%i) \n " , stnum ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
else
{
char out [ 17 ] ;
2005-02-10 00:14:10 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
//the network protocol byteswaps
2005-02-10 00:14:10 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
( ( unsigned int * ) out ) [ 0 ] = LittleLong ( csqc_playerview - > stats [ stnum + 0 ] ) ;
( ( unsigned int * ) out ) [ 1 ] = LittleLong ( csqc_playerview - > stats [ stnum + 1 ] ) ;
( ( unsigned int * ) out ) [ 2 ] = LittleLong ( csqc_playerview - > stats [ stnum + 2 ] ) ;
( ( unsigned int * ) out ) [ 3 ] = LittleLong ( csqc_playerview - > stats [ stnum + 3 ] ) ;
2020-07-14 00:48:56 +00:00
out [ sizeof ( out ) - 1 ] = 0 ; //make sure it's null terminated
2005-02-10 00:14:10 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
RETURN_TSTRING ( out ) ;
}
2005-02-10 00:14:10 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_SetOrigin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-12 18:56:04 +00:00
{
2014-10-05 20:04:11 +00:00
world_t * w = prinst - > parms - > user ;
wedict_t * ent = ( void * ) G_WEDICT ( prinst , OFS_PARM0 ) ;
2005-02-12 18:56:04 +00:00
float * org = G_VECTOR ( OFS_PARM1 ) ;
2014-10-05 20:04:11 +00:00
if ( ent - > readonly )
{
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
PR_RunWarning ( prinst , " setorigin on entity %i \n " , ent - > entnum ) ;
2014-10-05 20:04:11 +00:00
return ;
}
2005-03-28 00:11:59 +00:00
VectorCopy ( org , ent - > v - > origin ) ;
2014-10-05 20:04:11 +00:00
World_LinkEdict ( w , ( wedict_t * ) ent , false ) ;
2005-02-12 18:56:04 +00:00
}
2014-10-05 20:04:11 +00:00
static void QCBUILTIN PF_cs_SetSize ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-03-10 03:55:18 +00:00
{
2014-10-05 20:04:11 +00:00
world_t * w = prinst - > parms - > user ;
wedict_t * e ;
float * min , * max ;
2005-03-10 03:55:18 +00:00
2014-10-05 20:04:11 +00:00
e = G_WEDICT ( prinst , OFS_PARM0 ) ;
2016-07-21 19:27:59 +00:00
if ( ED_ISFREE ( e ) )
2014-10-05 20:04:11 +00:00
{
2015-02-02 08:01:53 +00:00
PR_RunWarning ( prinst , " %s edict was free \n " , " setsize " ) ;
2014-10-05 20:04:11 +00:00
return ;
}
if ( e - > readonly )
{
2015-02-02 08:01:53 +00:00
PR_RunWarning ( prinst , " setsize on entity %i \n " , e - > entnum ) ;
2014-10-05 20:04:11 +00:00
return ;
}
min = G_VECTOR ( OFS_PARM1 ) ;
max = G_VECTOR ( OFS_PARM2 ) ;
VectorCopy ( min , e - > v - > mins ) ;
VectorCopy ( max , e - > v - > maxs ) ;
VectorSubtract ( max , min , e - > v - > size ) ;
World_LinkEdict ( w , ( wedict_t * ) e , false ) ;
2005-03-10 03:55:18 +00:00
}
2018-09-23 19:35:24 +00:00
static void cs_settracevars ( pubprogfuncs_t * prinst , trace_t * tr )
2005-08-11 04:14:33 +00:00
{
* csqcg . trace_allsolid = tr - > allsolid ;
* csqcg . trace_startsolid = tr - > startsolid ;
* csqcg . trace_fraction = tr - > fraction ;
* csqcg . trace_inwater = tr - > inwater ;
* csqcg . trace_inopen = tr - > inopen ;
VectorCopy ( tr - > endpos , csqcg . trace_endpos ) ;
VectorCopy ( tr - > plane . normal , csqcg . trace_plane_normal ) ;
2005-11-21 21:47:53 +00:00
* csqcg . trace_plane_dist = tr - > plane . dist ;
2016-07-21 19:27:59 +00:00
* csqcg . trace_surfaceflagsi = tr - > surface ? tr - > surface - > flags : 0 ;
2015-09-02 03:12:25 +00:00
if ( csqcg . trace_surfacename )
prinst - > SetStringField ( prinst , NULL , csqcg . trace_surfacename , tr - > surface ? tr - > surface - > name : NULL , true ) ;
2016-07-21 19:27:59 +00:00
* csqcg . trace_endcontentsi = tr - > contents ;
* csqcg . trace_brush_id = tr - > brush_id ;
* csqcg . trace_brush_faceid = tr - > brush_face ;
* csqcg . trace_surface_id = tr - > surface_id ;
* csqcg . trace_bone_id = tr - > bone_id ;
* csqcg . trace_triangle_id = tr - > triangle_id ;
2005-08-11 04:14:33 +00:00
if ( tr - > ent )
* csqcg . trace_ent = EDICT_TO_PROG ( csqcprogs , ( void * ) tr - > ent ) ;
else
2009-11-07 13:29:15 +00:00
* csqcg . trace_ent = EDICT_TO_PROG ( csqcprogs , ( void * ) csqc_world . edicts ) ;
2018-10-13 12:19:58 +00:00
* csqcg . trace_networkentity = tr - > entnum ;
2017-08-29 02:29:06 +00:00
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2017-08-29 02:29:06 +00:00
* csqcg . trace_endcontentsf = tr - > contents ;
* csqcg . trace_surfaceflagsf = tr - > surface ? tr - > surface - > flags : 0 ;
if ( csqcg . trace_dphittexturename )
prinst - > SetStringField ( prinst , NULL , csqcg . trace_dphittexturename , tr - > surface ? tr - > surface - > name : NULL , true ) ;
if ( csqcg . trace_dpstartcontents )
* csqcg . trace_dpstartcontents = FTEToDPContents ( 0 ) ; //fixme, maybe
if ( csqcg . trace_dphitcontents )
* csqcg . trace_dphitcontents = FTEToDPContents ( tr - > contents ) ;
if ( csqcg . trace_dphitq3surfaceflags )
* csqcg . trace_dphitq3surfaceflags = tr - > surface ? tr - > surface - > flags : 0 ;
# endif
2005-08-11 04:14:33 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_traceline ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
float * v1 , * v2 , * mins , * maxs ;
trace_t trace ;
int nomonsters ;
2005-07-01 19:23:00 +00:00
csqcedict_t * ent ;
2005-02-28 07:16:19 +00:00
v1 = G_VECTOR ( OFS_PARM0 ) ;
v2 = G_VECTOR ( OFS_PARM1 ) ;
nomonsters = G_FLOAT ( OFS_PARM2 ) ;
2005-07-01 19:23:00 +00:00
ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM3 ) ;
2005-02-28 07:16:19 +00:00
// if (*prinst->callargc == 6)
// {
// mins = G_VECTOR(OFS_PARM4);
// maxs = G_VECTOR(OFS_PARM5);
// }
// else
{
mins = vec3_origin ;
maxs = vec3_origin ;
}
2005-07-01 19:23:00 +00:00
2016-07-12 00:40:13 +00:00
trace = World_Move ( & csqc_world , v1 , mins , maxs , v2 , nomonsters | MOVE_IGNOREHULL , ( wedict_t * ) ent ) ;
2005-08-11 04:14:33 +00:00
2018-09-23 19:35:24 +00:00
cs_settracevars ( prinst , & trace ) ;
2005-07-01 19:23:00 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_tracebox ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-01 19:23:00 +00:00
{
float * v1 , * v2 , * mins , * maxs ;
trace_t trace ;
int nomonsters ;
csqcedict_t * ent ;
2005-02-28 07:16:19 +00:00
2005-07-01 19:23:00 +00:00
v1 = G_VECTOR ( OFS_PARM0 ) ;
mins = G_VECTOR ( OFS_PARM1 ) ;
maxs = G_VECTOR ( OFS_PARM2 ) ;
v2 = G_VECTOR ( OFS_PARM3 ) ;
nomonsters = G_FLOAT ( OFS_PARM4 ) ;
ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM5 ) ;
2016-07-12 00:40:13 +00:00
trace = World_Move ( & csqc_world , v1 , mins , maxs , v2 , nomonsters | MOVE_IGNOREHULL , ( wedict_t * ) ent ) ;
2005-11-21 21:47:53 +00:00
2018-09-23 19:35:24 +00:00
cs_settracevars ( prinst , & trace ) ;
2005-02-28 07:16:19 +00:00
}
2005-08-07 18:08:13 +00:00
static trace_t CS_Trace_Toss ( csqcedict_t * tossent , csqcedict_t * ignore )
{
int i ;
float gravity ;
vec3_t move , end ;
trace_t trace ;
2006-03-04 20:43:48 +00:00
// float maxvel = Cvar_Get("sv_maxvelocity", "2000", 0, "CSQC physics")->value;
2005-08-07 18:08:13 +00:00
vec3_t origin , velocity ;
// this has to fetch the field from the original edict, since our copy is truncated
gravity = 1 ; //tossent->v->gravity;
if ( ! gravity )
gravity = 1.0 ;
gravity * = Cvar_Get ( " sv_gravity " , " 800 " , 0 , " CSQC physics " ) - > value * 0.05 ;
VectorCopy ( tossent - > v - > origin , origin ) ;
VectorCopy ( tossent - > v - > velocity , velocity ) ;
CS_CheckVelocity ( tossent ) ;
for ( i = 0 ; i < 200 ; i + + ) // LordHavoc: sanity check; never trace more than 10 seconds
{
velocity [ 2 ] - = gravity ;
VectorScale ( velocity , 0.05 , move ) ;
VectorAdd ( origin , move , end ) ;
2016-07-12 00:40:13 +00:00
trace = World_Move ( & csqc_world , origin , tossent - > v - > mins , tossent - > v - > maxs , end , MOVE_NORMAL | MOVE_IGNOREHULL , ( wedict_t * ) tossent ) ;
2005-08-07 18:08:13 +00:00
VectorCopy ( trace . endpos , origin ) ;
CS_CheckVelocity ( tossent ) ;
if ( trace . fraction < 1 & & trace . ent & & ( void * ) trace . ent ! = ignore )
break ;
}
trace . fraction = 0 ; // not relevant
return trace ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_tracetoss ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-07 18:08:13 +00:00
{
trace_t trace ;
csqcedict_t * ent ;
csqcedict_t * ignore ;
ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
2009-11-07 13:29:15 +00:00
if ( ent = = ( csqcedict_t * ) csqc_world . edicts )
2005-08-07 18:08:13 +00:00
Con_DPrintf ( " tracetoss: can not use world entity \n " ) ;
ignore = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM1 ) ;
trace = CS_Trace_Toss ( ent , ignore ) ;
2018-09-23 19:35:24 +00:00
cs_settracevars ( prinst , & trace ) ;
2005-08-07 18:08:13 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_pointcontents ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2012-05-09 15:30:53 +00:00
world_t * w = prinst - > parms - > user ;
2005-02-28 07:16:19 +00:00
float * v ;
int cont ;
2005-11-21 21:47:53 +00:00
2005-02-28 07:16:19 +00:00
v = G_VECTOR ( OFS_PARM0 ) ;
2020-08-13 08:39:48 +00:00
cont = w - > worldmodel ? World_PointContentsWorldOnly ( w , v ) : FTECONTENTS_EMPTY ;
2005-02-28 07:16:19 +00:00
if ( cont & FTECONTENTS_SOLID )
G_FLOAT ( OFS_RETURN ) = Q1CONTENTS_SOLID ;
else if ( cont & FTECONTENTS_SKY )
G_FLOAT ( OFS_RETURN ) = Q1CONTENTS_SKY ;
else if ( cont & FTECONTENTS_LAVA )
G_FLOAT ( OFS_RETURN ) = Q1CONTENTS_LAVA ;
else if ( cont & FTECONTENTS_SLIME )
G_FLOAT ( OFS_RETURN ) = Q1CONTENTS_SLIME ;
else if ( cont & FTECONTENTS_WATER )
G_FLOAT ( OFS_RETURN ) = Q1CONTENTS_WATER ;
else
G_FLOAT ( OFS_RETURN ) = Q1CONTENTS_EMPTY ;
}
2021-04-14 05:21:04 +00:00
static void QCBUILTIN PF_cs_pointcontentsmask ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
world_t * w = prinst - > parms - > user ;
float * v ;
int cont ;
v = G_VECTOR ( OFS_PARM0 ) ;
if ( ! w - > worldmodel | | w - > worldmodel - > loadstate ! = MLS_LOADED )
cont = FTECONTENTS_EMPTY ;
else if ( prinst - > callargc < 1 | | G_FLOAT ( OFS_PARM1 ) )
cont = World_PointContentsWorldOnly ( w , v ) ;
else
cont = World_PointContentsAllBSPs ( w , v ) ;
G_UINT ( OFS_RETURN ) = cont ;
}
2005-02-28 07:16:19 +00:00
2014-10-05 20:04:11 +00:00
static model_t * csqc_setmodel ( pubprogfuncs_t * prinst , csqcedict_t * ent , int modelindex )
2005-10-07 16:27:20 +00:00
{
model_t * model ;
2014-10-05 20:04:11 +00:00
if ( ent - > readonly )
{
Con_Printf ( " setmodel on readonly entity %i \n " , ent - > entnum ) ;
return NULL ;
}
2005-10-07 16:27:20 +00:00
ent - > v - > modelindex = modelindex ;
if ( modelindex < 0 )
{
2013-03-12 22:44:00 +00:00
if ( modelindex < = - MAX_CSMODELS )
2014-10-05 20:04:11 +00:00
return NULL ;
2015-01-21 18:18:37 +00:00
prinst - > SetStringField ( prinst , ( void * ) ent , & ent - > v - > model , cl . model_csqcname [ - modelindex ] , true ) ;
2008-05-25 22:23:43 +00:00
if ( ! cl . model_csqcprecache [ - modelindex ] )
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
cl . model_csqcprecache [ - modelindex ] = Mod_ForName ( Mod_FixName ( cl . model_csqcname [ - modelindex ] , csqc_world . worldmodel - > publicname ) , MLV_WARN ) ;
2005-10-07 16:27:20 +00:00
model = cl . model_csqcprecache [ - modelindex ] ;
}
else
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( modelindex > = MAX_PRECACHE_MODELS | | ! cl . model_name [ modelindex ] )
2014-10-05 20:04:11 +00:00
return NULL ;
2015-01-21 18:18:37 +00:00
prinst - > SetStringField ( prinst , ( void * ) ent , & ent - > v - > model , cl . model_name [ modelindex ] , true ) ;
2005-10-07 16:27:20 +00:00
model = cl . model_precache [ modelindex ] ;
}
2005-10-10 21:04:19 +00:00
if ( model )
{
2014-10-05 20:04:11 +00:00
//csqc probably needs to know the actual model size for any entity. it might as well.
while ( model - > loadstate = = MLS_LOADING )
COM_WorkerPartialSync ( model , & model - > loadstate , MLS_LOADING ) ;
2005-10-10 21:04:19 +00:00
VectorCopy ( model - > mins , ent - > v - > mins ) ;
VectorCopy ( model - > maxs , ent - > v - > maxs ) ;
2014-10-05 20:04:11 +00:00
VectorSubtract ( model - > maxs , model - > mins , ent - > v - > size ) ;
if ( ! ent - > entnum )
2020-08-13 08:39:48 +00:00
{ //setmodel(world, "maps/foo.bsp"); may be used to switch the csqc's worldmodel.
csqc_world . worldmodel = model ;
2014-10-05 20:04:11 +00:00
csqc_worldchanged = true ;
2015-09-01 04:45:15 +00:00
VectorAdd ( ent - > v - > origin , ent - > v - > mins , ent - > v - > absmin ) ;
VectorAdd ( ent - > v - > origin , ent - > v - > maxs , ent - > v - > absmax ) ;
2020-08-13 08:39:48 +00:00
World_ClearWorld ( & csqc_world , true ) ; //make sure any pvs stuff is rebuilt.
cl . num_statics = 0 ; //has pvs indexes that can cause crashes.
return model ;
2014-10-05 20:04:11 +00:00
}
2005-10-10 21:04:19 +00:00
}
else
{
VectorClear ( ent - > v - > mins ) ;
VectorClear ( ent - > v - > maxs ) ;
}
2009-04-19 00:50:42 +00:00
2009-11-07 13:29:15 +00:00
World_LinkEdict ( & csqc_world , ( wedict_t * ) ent , false ) ;
2014-10-05 20:04:11 +00:00
return model ;
2005-10-07 16:27:20 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_SetModel ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-12 18:56:04 +00:00
{
csqcedict_t * ent = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
2014-03-30 08:55:06 +00:00
const char * modelname = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2005-02-12 18:56:04 +00:00
int freei ;
2014-10-05 20:04:11 +00:00
int modelindex = CS_FindModel ( modelname , & freei ) ;
model_t * mod ;
2005-02-12 18:56:04 +00:00
2005-10-07 16:27:20 +00:00
if ( ! modelindex & & modelname & & * modelname )
2005-02-12 18:56:04 +00:00
{
if ( ! freei )
Host_EndGame ( " CSQC ran out of model slots \n " ) ;
Con_DPrintf ( " Late caching model \" %s \" \n " , modelname ) ;
Q_strncpyz ( cl . model_csqcname [ - freei ] , modelname , sizeof ( cl . model_csqcname [ - freei ] ) ) ; //allocate a slot now
modelindex = freei ;
2008-05-25 22:23:43 +00:00
cl . model_csqcprecache [ - freei ] = NULL ;
2005-02-12 18:56:04 +00:00
}
2014-10-05 20:04:11 +00:00
mod = csqc_setmodel ( prinst , ent , modelindex ) ;
if ( mod )
ent - > xv - > modelflags = mod - > flags ;
2005-02-12 18:56:04 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_SetModelIndex ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-12 18:56:04 +00:00
{
csqcedict_t * ent = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
int modelindex = G_FLOAT ( OFS_PARM1 ) ;
2005-10-07 16:27:20 +00:00
csqc_setmodel ( prinst , ent , modelindex ) ;
2005-02-12 18:56:04 +00:00
}
2018-02-04 13:16:25 +00:00
static int PF_cs_PrecacheModel_Internal ( pubprogfuncs_t * prinst , const char * modelname , qboolean queryonly )
2005-02-12 18:56:04 +00:00
{
2005-02-28 07:16:19 +00:00
int modelindex , freei ;
2014-10-05 20:04:11 +00:00
const char * fixedname ;
2005-02-12 18:56:04 +00:00
int i ;
2010-04-09 10:50:14 +00:00
if ( ! * modelname )
2018-02-04 13:16:25 +00:00
return 0 ;
2010-04-09 10:50:14 +00:00
2014-09-17 03:04:08 +00:00
for ( i = 1 ; i < MAX_PRECACHE_MODELS ; i + + ) //Make sure that the server specified model is loaded..
2005-02-12 18:56:04 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . model_name [ i ] )
2005-02-12 18:56:04 +00:00
break ;
2019-09-17 19:49:39 +00:00
if ( ! strcmp ( cl . model_name [ i ] , modelname ) )
2005-02-12 18:56:04 +00:00
{
2014-10-05 20:04:11 +00:00
if ( ! cl . model_precache [ i ] )
2019-09-17 19:49:39 +00:00
cl . model_precache [ i ] = Mod_ForName ( Mod_FixName ( modelname , csqc_world . worldmodel - > publicname ) , MLV_WARN ) ;
2005-02-12 18:56:04 +00:00
break ;
}
}
2005-02-28 07:16:19 +00:00
2014-10-05 20:04:11 +00:00
modelindex = CS_FindModel ( modelname , & freei ) ; //now load it
2005-02-28 07:16:19 +00:00
2018-02-04 13:16:25 +00:00
if ( ! modelindex & & ! queryonly )
2005-02-28 07:16:19 +00:00
{
if ( ! freei )
Host_EndGame ( " CSQC ran out of model slots \n " ) ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
fixedname = Mod_FixName ( modelname , csqc_world . worldmodel - > publicname ) ;
2014-10-05 20:04:11 +00:00
Q_strncpyz ( cl . model_csqcname [ - freei ] , fixedname , sizeof ( cl . model_csqcname [ - freei ] ) ) ; //allocate a slot now
2005-02-28 07:16:19 +00:00
modelindex = freei ;
2008-11-09 22:29:28 +00:00
CL_CheckOrEnqueDownloadFile ( modelname , modelname , 0 ) ;
2014-10-05 20:04:11 +00:00
cl . model_csqcprecache [ - freei ] = Mod_ForName ( fixedname , MLV_WARN ) ;
2005-02-28 07:16:19 +00:00
}
2005-07-14 01:57:34 +00:00
2018-02-04 13:16:25 +00:00
return modelindex ;
}
static void QCBUILTIN PF_cs_PrecacheModel ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * s = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
G_INT ( OFS_RETURN ) = G_INT ( OFS_PARM0 ) ;
PF_cs_PrecacheModel_Internal ( prinst , s , false ) ;
}
static void QCBUILTIN PF_cs_getmodelindex ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * s = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
qboolean queryonly = ( prinst - > callargc > = 2 ) ? G_FLOAT ( OFS_PARM1 ) : false ;
G_FLOAT ( OFS_RETURN ) = PF_cs_PrecacheModel_Internal ( prinst , s , queryonly ) ;
2005-02-28 07:16:19 +00:00
}
2022-06-19 15:17:41 +00:00
static void QCBUILTIN PF_cs_getsoundindex ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * s = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
qboolean queryonly = ( prinst - > callargc > = 2 ) ? G_FLOAT ( OFS_PARM1 ) : false ;
int i ;
G_FLOAT ( OFS_RETURN ) = 0 ;
//look for the server's names first...
for ( i = 1 ; i < MAX_PRECACHE_SOUNDS ; i + + )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . sound_name [ i ] )
2022-06-19 15:17:41 +00:00
break ;
if ( ! strcmp ( cl . sound_name [ i ] , s ) )
{
G_FLOAT ( OFS_RETURN ) = i ;
return ;
}
}
//FIXME: we don't track clientside sound precaches (the sound system has its own, but can be flushed at any time forgetting/reordering them)
//can still make sure its cached though.
if ( ! queryonly )
S_PrecacheSound ( s ) ;
}
2014-03-30 08:55:06 +00:00
static void QCBUILTIN PF_cs_precachefile ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * filename = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
G_FLOAT ( OFS_RETURN ) = CL_CheckOrEnqueDownloadFile ( filename , NULL , 0 ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_PrecacheSound ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2014-03-30 08:55:06 +00:00
const char * soundname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2017-08-14 16:38:44 +00:00
if ( ! * soundname ) //invalid
return ;
2011-04-20 21:32:43 +00:00
Sound_CheckDownload ( soundname ) ;
2005-02-28 07:16:19 +00:00
S_PrecacheSound ( soundname ) ;
2005-02-12 18:56:04 +00:00
}
2005-02-28 07:16:19 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_ModelnameForIndex ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-12 18:56:04 +00:00
{
int modelindex = G_FLOAT ( OFS_PARM0 ) ;
2022-06-19 15:17:41 +00:00
if ( modelindex < 0 & & ( - modelindex ) < MAX_CSMODELS )
2005-02-12 18:56:04 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_SetString ( prinst , cl . model_csqcname [ - modelindex ] ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else if ( modelindex > = 0 & & modelindex < MAX_PRECACHE_MODELS & & cl . model_name [ modelindex ] )
2005-02-12 18:56:04 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_SetString ( prinst , cl . model_name [ modelindex ] ) ;
2022-06-19 15:17:41 +00:00
else
G_INT ( OFS_RETURN ) = 0 ;
}
static void QCBUILTIN PF_cs_SoundnameForIndex ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int soundindex = G_FLOAT ( OFS_PARM0 ) ;
//FIXME: no private indexes. still useful for sending sound names from the ssqc via indexes.
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( soundindex > = 0 & & soundindex < MAX_PRECACHE_SOUNDS & & cl . sound_name [ soundindex ] )
2022-06-19 15:17:41 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_SetString ( prinst , cl . sound_name [ soundindex ] ) ;
else
G_INT ( OFS_RETURN ) = 0 ;
2005-02-12 18:56:04 +00:00
}
2020-06-01 01:31:46 +00:00
static void QCBUILTIN PF_cs_spriteframe ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * modelname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
int frame = G_INT ( OFS_PARM1 ) ;
float frametime = G_INT ( OFS_PARM2 ) ;
model_t * mod = NULL ;
G_INT ( OFS_RETURN ) = 0 ; //default result
mod = CSQC_GetModelForName ( modelname ) ;
if ( ! mod )
return ;
if ( mod - > loadstate = = MLS_NOTLOADED ) //pull it back in if it was flushed.
Mod_LoadModel ( mod , MLV_WARN ) ;
while ( mod - > loadstate = = MLS_LOADING ) //wait for it if its still loading.
COM_WorkerPartialSync ( mod , & mod - > loadstate , MLS_LOADING ) ;
if ( mod - > type ! = mod_sprite )
return ;
{ //okay, its in memory, and its a sprite. actually do what we're here for.
msprite_t * psprite = mod - > meshinfo ;
mspritegroup_t * pspritegroup ;
mspriteframe_t * pspriteframe ;
int i , numframes ;
float * pintervals , fullinterval ;
if ( ( frame > = psprite - > numframes ) | | ( frame < 0 ) )
return ;
if ( psprite - > frames [ frame ] . type = = SPR_SINGLE )
pspriteframe = psprite - > frames [ frame ] . frameptr ;
else if ( psprite - > frames [ frame ] . type = = SPR_ANGLED )
{ //just take frametime as 0-1
pspritegroup = ( mspritegroup_t * ) psprite - > frames [ frame ] . frameptr ;
2023-08-13 00:27:24 +00:00
i = frametime / pspritegroup - > numframes ;
pspriteframe = pspritegroup - > frames [ i % pspritegroup - > numframes ] ;
2020-06-01 01:31:46 +00:00
}
else
{
pspritegroup = ( mspritegroup_t * ) psprite - > frames [ frame ] . frameptr ;
pintervals = pspritegroup - > intervals ;
numframes = pspritegroup - > numframes ;
fullinterval = pintervals [ numframes - 1 ] ;
frametime = frametime - ( ( int ) ( frametime / fullinterval ) ) * fullinterval ; //make it loop...
for ( i = 0 ; i < ( numframes - 1 ) ; i + + )
{
if ( pintervals [ i ] > frametime )
break ;
}
pspriteframe = pspritegroup - > frames [ i ] ;
}
//and let the caller know which model name they should draw with
RETURN_TSTRING ( pspriteframe - > shader - > name ) ;
}
}
2014-03-30 08:55:06 +00:00
void QCBUILTIN PF_cs_setcustomskin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
csqcedict_t * ent = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
const char * fname = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
const char * skindata = PF_VarString ( prinst , 2 , pr_globals ) ;
if ( ent - > skinobject > 0 )
2018-01-22 19:18:04 +00:00
Mod_WipeSkin ( ent - > skinobject , false ) ;
2020-06-12 23:29:58 +00:00
ent - > skinobject = 0 ;
2014-03-30 08:55:06 +00:00
if ( * fname | | * skindata )
{
if ( * skindata )
ent - > skinobject = Mod_ReadSkinFile ( fname , skindata ) ;
else
2020-06-12 23:29:58 +00:00
ent - > skinobject = Mod_RegisterSkinFile ( fname ) ;
if ( * fname )
ent - > skinobject * = - 1 ; //negative means it doesn't bother refcounting, just leaves it loaded the whole time.
2014-03-30 08:55:06 +00:00
}
}
2018-01-22 19:18:04 +00:00
void QCBUILTIN PF_cs_loadcustomskin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * fname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
const char * skindata = PF_VarString ( prinst , 1 , pr_globals ) ;
if ( * fname | | * skindata )
{
if ( * skindata )
G_FLOAT ( OFS_RETURN ) = Mod_ReadSkinFile ( fname , skindata ) ;
else
2020-06-12 23:29:58 +00:00
G_FLOAT ( OFS_RETURN ) = Mod_RegisterSkinFile ( fname ) ;
2018-01-22 19:18:04 +00:00
}
else
G_FLOAT ( OFS_RETURN ) = 0 ;
}
void QCBUILTIN PF_cs_releasecustomskin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int oldskin = G_FLOAT ( OFS_PARM0 ) ;
if ( oldskin > 0 )
Mod_WipeSkin ( oldskin , false ) ;
}
void QCBUILTIN PF_cs_applycustomskin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
csqcedict_t * ent = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
int newskin = G_FLOAT ( OFS_PARM1 ) ;
int oldskin = ent - > skinobject ;
2020-06-12 23:29:58 +00:00
skinfile_t * sk ;
ent - > skinobject = - abs ( newskin ) ;
2018-01-22 19:18:04 +00:00
if ( oldskin > 0 )
Mod_WipeSkin ( oldskin , false ) ;
2020-06-12 23:29:58 +00:00
if ( ent - > skinobject > 0 )
{ //add a ref, so it doesn't get forgotten so fast.
sk = Mod_LookupSkin ( ent - > skinobject ) ;
if ( sk )
sk - > refcount + + ;
}
2018-01-22 19:18:04 +00:00
}
2005-01-17 17:43:13 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadByte ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2013-09-06 22:57:44 +00:00
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadByte is not valid at this time " ) ;
G_FLOAT ( OFS_RETURN ) = - 1 ;
return ;
}
2014-03-30 08:55:06 +00:00
G_FLOAT ( OFS_RETURN ) = MSG_ReadByte ( ) ;
2005-02-28 07:16:19 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadChar ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2013-09-06 22:57:44 +00:00
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadChar is not valid at this time " ) ;
G_FLOAT ( OFS_RETURN ) = - 1 ;
return ;
}
2005-02-28 07:16:19 +00:00
G_FLOAT ( OFS_RETURN ) = MSG_ReadChar ( ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadShort ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2013-09-06 22:57:44 +00:00
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadShort is not valid at this time " ) ;
G_FLOAT ( OFS_RETURN ) = - 1 ;
return ;
}
2005-02-28 07:16:19 +00:00
G_FLOAT ( OFS_RETURN ) = MSG_ReadShort ( ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadEntityNum ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2008-05-25 22:23:43 +00:00
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
unsigned int val ;
2013-09-06 22:57:44 +00:00
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadEntityNum is not valid at this time " ) ;
G_FLOAT ( OFS_RETURN ) = - 1 ;
return ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
val = MSGCL_ReadEntity ( ) ;
G_FLOAT ( OFS_RETURN ) = val ;
2008-05-25 22:23:43 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadLong ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2013-09-06 22:57:44 +00:00
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadLong is not valid at this time " ) ;
G_FLOAT ( OFS_RETURN ) = - 1 ;
return ;
}
2005-02-28 07:16:19 +00:00
G_FLOAT ( OFS_RETURN ) = MSG_ReadLong ( ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadCoord ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2013-09-06 22:57:44 +00:00
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadCoord is not valid at this time " ) ;
G_FLOAT ( OFS_RETURN ) = - 1 ;
return ;
}
2005-02-28 07:16:19 +00:00
G_FLOAT ( OFS_RETURN ) = MSG_ReadCoord ( ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadFloat ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
2013-09-06 22:57:44 +00:00
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadFloat is not valid at this time " ) ;
G_FLOAT ( OFS_RETURN ) = - 1 ;
return ;
}
2005-07-08 00:37:52 +00:00
G_FLOAT ( OFS_RETURN ) = MSG_ReadFloat ( ) ;
}
2020-09-29 07:09:01 +00:00
static void QCBUILTIN PF_ReadDouble ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadDouble is not valid at this time " ) ;
G_FLOAT ( OFS_RETURN ) = - 1 ;
return ;
}
G_DOUBLE ( OFS_RETURN ) = MSG_ReadDouble ( ) ;
}
2019-12-16 17:36:00 +00:00
static void QCBUILTIN PF_ReadInt ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadInt is not valid at this time " ) ;
G_INT ( OFS_RETURN ) = - 1 ;
return ;
}
G_INT ( OFS_RETURN ) = MSG_ReadLong ( ) ;
}
2020-09-29 07:09:01 +00:00
static void QCBUILTIN PF_ReadInt64 ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
if ( ! csqc_mayread )
{
2022-05-28 17:58:39 +00:00
CSQC_Abort ( " PF_ReadInt64 is not valid at this time " ) ;
2020-09-29 07:09:01 +00:00
G_INT ( OFS_RETURN ) = - 1 ;
return ;
}
G_INT64 ( OFS_RETURN ) = MSG_ReadInt64 ( ) ;
}
2022-05-28 17:58:39 +00:00
static void QCBUILTIN PF_ReadUInt64 ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadUInt64 is not valid at this time " ) ;
G_INT ( OFS_RETURN ) = - 1 ;
return ;
}
G_INT64 ( OFS_RETURN ) = MSG_ReadUInt64 ( ) ;
}
2005-07-08 00:37:52 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadString ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2013-09-06 22:57:44 +00:00
char * read ;
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadString is not valid at this time " ) ;
G_INT ( OFS_RETURN ) = 0 ;
return ;
}
read = MSG_ReadString ( ) ;
2007-03-11 16:51:45 +00:00
RETURN_TSTRING ( read ) ;
2005-02-28 07:16:19 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadAngle ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2013-09-06 22:57:44 +00:00
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadAngle is not valid at this time " ) ;
G_FLOAT ( OFS_RETURN ) = - 1 ;
return ;
}
2005-02-28 07:16:19 +00:00
G_FLOAT ( OFS_RETURN ) = MSG_ReadAngle ( ) ;
}
2016-09-01 14:31:24 +00:00
//basically acts as a readstring, but with added precache (and download)
static void QCBUILTIN PF_ReadPicture ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
char * imagename ;
unsigned short size ;
if ( ! csqc_mayread )
{
CSQC_Abort ( " PF_ReadPicture is not valid at this time " ) ;
G_INT ( OFS_RETURN ) = 0 ;
return ;
}
imagename = MSG_ReadString ( ) ;
size = MSG_ReadShort ( ) ;
MSG_ReadSkip ( size ) ;
//do the precache+download thing
{
shader_t * pic = R2D_SafeCachePic ( imagename ) ;
char ext [ 8 ] ;
//fixme: probably shouldn't block here.
if ( ( ! pic | | ! R_GetShaderSizes ( pic , NULL , NULL , true ) ) & & cls . state
# ifndef CLIENTONLY
& & ! sv . active
# endif
& & * COM_FileExtension ( imagename , ext , sizeof ( ext ) ) ) //only try to download it if it looks as though it contains a path.
CL_CheckOrEnqueDownloadFile ( imagename , imagename , 0 ) ;
}
RETURN_TSTRING ( imagename ) ;
}
2005-02-28 07:16:19 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_objerror ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
2017-08-14 16:38:44 +00:00
const char * s ;
2008-11-09 22:29:28 +00:00
struct edict_s * ed ;
2005-11-21 21:47:53 +00:00
2005-02-28 07:16:19 +00:00
s = PF_VarString ( prinst , 0 , pr_globals ) ;
/* Con_Printf ("======OBJECT ERROR in %s:\n%s\n", PR_GetString(pr_xfunction->s_name),s);
2008-11-09 22:29:28 +00:00
*/ ed = PROG_TO_EDICT ( prinst , * csqcg . self ) ;
2005-02-28 07:16:19 +00:00
/* ED_Print (ed);
*/
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
prinst - > ED_Print ( prinst , ed ) ;
2005-02-28 07:16:19 +00:00
Con_Printf ( " %s " , s ) ;
if ( developer . value )
2015-02-02 08:01:53 +00:00
prinst - > debug_trace = 2 ;
2005-02-28 07:16:19 +00:00
else
{
ED_Free ( prinst , ed ) ;
prinst - > AbortStack ( prinst ) ;
2005-11-21 21:47:53 +00:00
2005-02-28 07:16:19 +00:00
PR_BIError ( prinst , " Program error: %s " , s ) ;
}
}
2014-03-30 08:55:06 +00:00
static void QCBUILTIN PF_cs_setsensitivityscaler ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-28 07:16:19 +00:00
{
in_sensitivityscale = G_FLOAT ( OFS_PARM0 ) ;
}
2013-12-29 22:48:28 +00:00
static void QCBUILTIN PF_cs_boxparticles ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int effectnum = CL_TranslateParticleFromServer ( G_FLOAT ( OFS_PARM0 ) ) ;
2014-02-13 23:54:57 +00:00
// csqcedict_t *ent = (csqcedict_t*)G_EDICT(prinst, OFS_PARM1);
2013-12-29 22:48:28 +00:00
float * org_from = G_VECTOR ( OFS_PARM2 ) ;
float * org_to = G_VECTOR ( OFS_PARM3 ) ;
float * vel_from = G_VECTOR ( OFS_PARM4 ) ;
float * vel_to = G_VECTOR ( OFS_PARM5 ) ;
float count = G_FLOAT ( OFS_PARM6 ) ;
int flags = ( prinst - > callargc < 7 ) ? 0 : G_FLOAT ( OFS_PARM7 ) ;
2018-09-23 19:35:24 +00:00
/* if (flags & 1) //PARTICLES_USEALPHA
{
float * alphamin = ( float * ) PR_FindGlobal ( csqcprogs , " particles_alphamin " , 0 , NULL ) ;
float * alphamax = ( float * ) PR_FindGlobal ( csqcprogs , " particles_alphamax " , 0 , NULL ) ;
if ( alphamin & & alphamax )
;
}
if ( flags & 2 ) //PARTICLES_USECOLOR
{ //rgb vectors
float * colourmin = ( float * ) PR_FindGlobal ( csqcprogs , " particles_colormin " , 0 , NULL ) ;
float * colourmax = ( float * ) PR_FindGlobal ( csqcprogs , " particles_colormax " , 0 , NULL ) ;
if ( colourmin & & colourmax )
;
}
if ( flags & 4 ) //PARTICLES_USEFADE
{
float * fade = ( float * ) PR_FindGlobal ( csqcprogs , " particles_fade " , 0 , NULL ) ;
if ( fade )
;
}
*/
if ( flags & 128 ) //PARTICLES_DRAWASTRAIL
2013-12-29 22:48:28 +00:00
{
flags & = ~ 128 ;
2019-01-29 07:18:07 +00:00
P_ParticleTrail ( org_from , org_to , effectnum , 1 , 0 , NULL , NULL ) ;
2013-12-29 22:48:28 +00:00
}
else
{
P_RunParticleCube ( effectnum , org_from , org_to , vel_from , vel_to , count , 0 , true , 0 ) ;
}
2018-09-23 19:35:24 +00:00
if ( flags & ~ 128 )
{
static float throttletimer ;
Con_ThrottlePrintf ( & throttletimer , 1 , " PF_cs_boxparticles: flags & %x is not supported \n " , flags ) ;
}
2013-12-29 22:48:28 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_pointparticles ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-03-10 03:55:18 +00:00
{
2013-10-08 14:28:11 +00:00
int effectnum = G_FLOAT ( OFS_PARM0 ) ;
2005-03-10 03:55:18 +00:00
float * org = G_VECTOR ( OFS_PARM1 ) ;
float * vel = G_VECTOR ( OFS_PARM2 ) ;
float count = G_FLOAT ( OFS_PARM3 ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( prinst - > callargc < 3 )
2005-03-10 03:55:18 +00:00
vel = vec3_origin ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( prinst - > callargc < 4 )
2005-03-10 03:55:18 +00:00
count = 1 ;
2013-03-12 22:44:00 +00:00
effectnum = CL_TranslateParticleFromServer ( effectnum ) ;
2005-03-10 03:55:18 +00:00
P_RunParticleEffectType ( org , vel , count , effectnum ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_trailparticles ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
2009-04-01 22:03:56 +00:00
int efnum ;
csqcedict_t * ent ;
2005-08-03 23:14:59 +00:00
float * start = G_VECTOR ( OFS_PARM2 ) ;
float * end = G_VECTOR ( OFS_PARM3 ) ;
2019-01-29 07:18:07 +00:00
float timestep = host_frametime ;
2005-08-03 23:14:59 +00:00
2015-02-02 08:01:53 +00:00
if ( ( unsigned int ) G_INT ( OFS_PARM1 ) > = MAX_EDICTS )
{ //ents can't be negative, nor can they be huge (like floats are if expressed as an integer)
2011-05-20 04:10:46 +00:00
efnum = G_FLOAT ( OFS_PARM1 ) ;
2009-04-01 22:03:56 +00:00
ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
}
else
{
2013-10-08 14:28:11 +00:00
efnum = G_FLOAT ( OFS_PARM0 ) ;
2009-04-01 22:03:56 +00:00
ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM1 ) ;
}
2013-03-12 22:44:00 +00:00
efnum = CL_TranslateParticleFromServer ( efnum ) ;
2009-04-01 22:03:56 +00:00
2005-08-03 23:14:59 +00:00
if ( ! ent - > entnum ) //world trails are non-state-based.
2019-01-29 07:18:07 +00:00
pe - > ParticleTrail ( start , end , efnum , timestep , 0 , NULL , NULL ) ;
2005-08-03 23:14:59 +00:00
else
2019-01-29 07:18:07 +00:00
pe - > ParticleTrail ( start , end , efnum , timestep , - ent - > entnum , NULL , & ent - > trailstate ) ;
2014-10-05 20:04:11 +00:00
}
void CSQC_ResetTrails ( void )
{
pubprogfuncs_t * prinst = csqc_world . progs ;
int i ;
csqcedict_t * ent ;
if ( ! prinst )
return ;
2020-04-29 10:43:22 +00:00
for ( i = 0 ; i < * prinst - > parms - > num_edicts ; i + + )
2014-10-05 20:04:11 +00:00
{
2018-04-06 17:21:15 +00:00
ent = ( csqcedict_t * ) EDICT_NUM_PB ( prinst , i ) ;
2021-08-27 04:29:25 +00:00
ent - > trailstate = trailkey_null ;
2014-10-05 20:04:11 +00:00
}
2005-08-03 23:14:59 +00:00
}
2013-10-08 14:28:11 +00:00
//0 for error, non-0 for success.
//>0 match server
//<0 are client-only.
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_particleeffectnum ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-03-10 03:55:18 +00:00
{
2013-03-12 22:44:00 +00:00
int i ;
2014-03-30 08:55:06 +00:00
const char * effectname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
G_FLOAT ( OFS_RETURN ) = 0 ; //default to failure.
2008-11-28 20:34:51 +00:00
2013-03-12 22:44:00 +00:00
//use the server's index first.
for ( i = 1 ; i < MAX_SSPARTICLESPRE & & cl . particle_ssname [ i ] ; i + + )
{
if ( ! strcmp ( cl . particle_ssname [ i ] , effectname ) )
{
G_FLOAT ( OFS_RETURN ) = i ;
return ;
}
}
2016-07-12 00:40:13 +00:00
2013-10-08 14:28:11 +00:00
//then look for an existing client id
2013-03-12 22:44:00 +00:00
for ( i = 1 ; i < MAX_CSPARTICLESPRE & & cl . particle_csname [ i ] ; i + + )
{
if ( ! strcmp ( cl . particle_csname [ i ] , effectname ) )
{
2014-03-30 08:55:06 +00:00
//effects can be in the list despite now being stale. they still take up a slot to avoid reuse as the qc can potentially still potentially reference it.
//csqc needs to be able to detect a now-stale effect
2017-05-03 22:51:25 +00:00
//if (cl.particle_csprecache[i] != P_INVALID)
2014-03-30 08:55:06 +00:00
G_FLOAT ( OFS_RETURN ) = - i ;
2013-03-12 22:44:00 +00:00
return ;
}
}
2016-07-12 00:40:13 +00:00
//create if new
2013-03-12 22:44:00 +00:00
if ( i < MAX_CSPARTICLESPRE )
{
free ( cl . particle_csname [ i ] ) ;
cl . particle_csname [ i ] = NULL ;
2014-03-30 08:55:06 +00:00
cl . particle_csprecache [ i ] = P_FindParticleType ( effectname ) ;
2015-02-02 20:18:14 +00:00
//if (cl.particle_csprecache[i] != P_INVALID)
2014-03-30 08:55:06 +00:00
{
//it exists, allow it.
2013-03-12 22:44:00 +00:00
cl . particle_csname [ i ] = strdup ( effectname ) ;
2014-03-30 08:55:06 +00:00
G_FLOAT ( OFS_RETURN ) = - i ;
}
2015-02-02 20:18:14 +00:00
cl . particle_csprecaches = true ;
2013-03-12 22:44:00 +00:00
}
2005-03-10 03:55:18 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_particleeffectquery ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2012-01-17 07:57:46 +00:00
{
int id = G_FLOAT ( OFS_PARM0 ) ;
qboolean body = G_FLOAT ( OFS_PARM1 ) ;
char retstr [ 8192 ] ;
2013-03-12 22:44:00 +00:00
id = CL_TranslateParticleFromServer ( id ) ;
2012-01-17 07:57:46 +00:00
if ( pe - > ParticleQuery & & pe - > ParticleQuery ( id , body , retstr , sizeof ( retstr ) ) )
{
RETURN_TSTRING ( retstr ) ;
}
else
G_INT ( OFS_RETURN ) = 0 ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_sendevent ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-05-24 10:11:17 +00:00
{
csqcedict_t * ent ;
int i ;
2014-03-30 08:55:06 +00:00
const char * eventname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
const char * argtypes = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2009-05-24 10:11:17 +00:00
2013-08-27 13:18:09 +00:00
if ( ! cls . state )
return ;
2015-04-14 23:12:17 +00:00
MSG_WriteByte ( & cls . netchan . message , clcfte_qcrequest ) ;
2017-11-16 22:20:40 +00:00
2009-05-24 10:11:17 +00:00
for ( i = 0 ; i < 6 ; i + + )
{
if ( argtypes [ i ] = = ' s ' )
{
MSG_WriteByte ( & cls . netchan . message , ev_string ) ;
MSG_WriteString ( & cls . netchan . message , PR_GetStringOfs ( prinst , OFS_PARM2 + i * 3 ) ) ;
}
else if ( argtypes [ i ] = = ' f ' )
{
MSG_WriteByte ( & cls . netchan . message , ev_float ) ;
MSG_WriteFloat ( & cls . netchan . message , G_FLOAT ( OFS_PARM2 + i * 3 ) ) ;
}
2020-09-29 07:09:01 +00:00
else if ( argtypes [ i ] = = ' F ' )
{
MSG_WriteByte ( & cls . netchan . message , ev_double ) ;
MSG_WriteDouble ( & cls . netchan . message , G_DOUBLE ( OFS_PARM2 + i * 3 ) ) ;
}
2009-05-24 10:11:17 +00:00
else if ( argtypes [ i ] = = ' i ' )
{
MSG_WriteByte ( & cls . netchan . message , ev_integer ) ;
2018-01-03 04:40:06 +00:00
MSG_WriteLong ( & cls . netchan . message , G_INT ( OFS_PARM2 + i * 3 ) ) ;
2009-05-24 10:11:17 +00:00
}
2020-09-29 07:09:01 +00:00
else if ( argtypes [ i ] = = ' u ' )
{
MSG_WriteByte ( & cls . netchan . message , ev_uint ) ;
MSG_WriteLong ( & cls . netchan . message , G_UINT ( OFS_PARM2 + i * 3 ) ) ;
}
else if ( argtypes [ i ] = = ' I ' )
{
MSG_WriteByte ( & cls . netchan . message , ev_int64 ) ;
MSG_WriteInt64 ( & cls . netchan . message , G_INT64 ( OFS_PARM2 + i * 3 ) ) ;
}
else if ( argtypes [ i ] = = ' U ' )
{
MSG_WriteByte ( & cls . netchan . message , ev_uint64 ) ;
MSG_WriteInt64 ( & cls . netchan . message , G_UINT64 ( OFS_PARM2 + i * 3 ) ) ;
}
2009-05-24 10:11:17 +00:00
else if ( argtypes [ i ] = = ' v ' )
{
MSG_WriteByte ( & cls . netchan . message , ev_vector ) ;
MSG_WriteFloat ( & cls . netchan . message , G_FLOAT ( OFS_PARM2 + i * 3 + 0 ) ) ;
MSG_WriteFloat ( & cls . netchan . message , G_FLOAT ( OFS_PARM2 + i * 3 + 1 ) ) ;
MSG_WriteFloat ( & cls . netchan . message , G_FLOAT ( OFS_PARM2 + i * 3 + 2 ) ) ;
}
else if ( argtypes [ i ] = = ' e ' )
{
ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM2 + i * 3 ) ;
MSG_WriteByte ( & cls . netchan . message , ev_entity ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
MSG_WriteEntity ( & cls . netchan . message , ent - > xv - > entnum ) ;
2009-05-24 10:11:17 +00:00
}
else
break ;
}
2017-11-16 22:20:40 +00:00
if ( csqc_playerseat > 0 )
MSG_WriteByte ( & cls . netchan . message , 200 + csqc_playerseat ) ;
2009-05-24 10:11:17 +00:00
MSG_WriteByte ( & cls . netchan . message , 0 ) ;
MSG_WriteString ( & cls . netchan . message , eventname ) ;
}
2008-05-25 22:23:43 +00:00
static void cs_set_input_state ( usercmd_t * cmd )
{
2021-09-15 20:33:54 +00:00
if ( csqcg . input_sequence )
* csqcg . input_sequence = cmd - > sequence ;
2008-05-25 22:23:43 +00:00
if ( csqcg . input_timelength )
2013-05-03 04:28:08 +00:00
* csqcg . input_timelength = cmd - > msec / 1000.0f * cl . gamespeed ;
2008-05-25 22:23:43 +00:00
if ( csqcg . input_angles )
{
2008-11-09 22:29:28 +00:00
csqcg . input_angles [ 0 ] = SHORT2ANGLE ( cmd - > angles [ 0 ] ) ;
csqcg . input_angles [ 1 ] = SHORT2ANGLE ( cmd - > angles [ 1 ] ) ;
csqcg . input_angles [ 2 ] = SHORT2ANGLE ( cmd - > angles [ 2 ] ) ;
2008-05-25 22:23:43 +00:00
}
if ( csqcg . input_movevalues )
{
csqcg . input_movevalues [ 0 ] = cmd - > forwardmove ;
csqcg . input_movevalues [ 1 ] = cmd - > sidemove ;
csqcg . input_movevalues [ 2 ] = cmd - > upmove ;
}
if ( csqcg . input_buttons )
* csqcg . input_buttons = cmd - > buttons ;
if ( csqcg . input_impulse )
* csqcg . input_impulse = cmd - > impulse ;
if ( csqcg . input_lightlevel )
* csqcg . input_lightlevel = cmd - > lightlevel ;
if ( csqcg . input_weapon )
* csqcg . input_weapon = cmd - > weapon ;
if ( csqcg . input_servertime )
2017-08-29 02:29:06 +00:00
* csqcg . input_servertime = cmd - > fservertime ;
2008-11-09 22:29:28 +00:00
if ( csqcg . input_clienttime )
2021-05-09 13:02:49 +00:00
* csqcg . input_clienttime = cmd - > fclienttime ;
2014-12-25 02:32:22 +00:00
if ( csqcg . input_cursor_screen )
{
Vector2Copy ( cmd - > cursor_screen , csqcg . input_cursor_screen ) ;
csqcg . input_cursor_screen [ 2 ] = 0 ;
}
2020-09-08 05:11:09 +00:00
if ( csqcg . input_cursor_trace_start )
VectorCopy ( cmd - > cursor_start , csqcg . input_cursor_trace_start ) ;
if ( csqcg . input_cursor_trace_endpos )
VectorCopy ( cmd - > cursor_impact , csqcg . input_cursor_trace_endpos ) ;
2014-12-25 02:32:22 +00:00
if ( csqcg . input_cursor_entitynumber )
* csqcg . input_cursor_entitynumber = cmd - > cursor_entitynumber ;
2021-04-14 05:21:04 +00:00
if ( csqcg . input_head_status )
* csqcg . input_head_status = cmd - > vr [ VRDEV_HEAD ] . status ;
if ( csqcg . input_head_origin )
VectorCopy ( cmd - > vr [ VRDEV_HEAD ] . origin , csqcg . input_head_origin ) ;
if ( csqcg . input_head_velocity )
VectorCopy ( cmd - > vr [ VRDEV_HEAD ] . velocity , csqcg . input_head_velocity ) ;
if ( csqcg . input_head_angles )
{
csqcg . input_head_angles [ 0 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_HEAD ] . angles [ 0 ] ) ;
csqcg . input_head_angles [ 1 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_HEAD ] . angles [ 1 ] ) ;
csqcg . input_head_angles [ 2 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_HEAD ] . angles [ 2 ] ) ;
}
if ( csqcg . input_head_avelocity )
{
csqcg . input_head_avelocity [ 0 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_HEAD ] . avelocity [ 0 ] ) ;
csqcg . input_head_avelocity [ 1 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_HEAD ] . avelocity [ 1 ] ) ;
csqcg . input_head_avelocity [ 2 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_HEAD ] . avelocity [ 2 ] ) ;
}
2021-08-19 06:02:03 +00:00
if ( csqcg . input_head_weapon )
* csqcg . input_head_weapon = cmd - > vr [ VRDEV_HEAD ] . weapon ;
2021-04-14 05:21:04 +00:00
if ( csqcg . input_left_status )
* csqcg . input_left_status = cmd - > vr [ VRDEV_LEFT ] . status ;
if ( csqcg . input_left_origin )
VectorCopy ( cmd - > vr [ VRDEV_LEFT ] . origin , csqcg . input_left_origin ) ;
if ( csqcg . input_left_velocity )
VectorCopy ( cmd - > vr [ VRDEV_LEFT ] . velocity , csqcg . input_left_velocity ) ;
if ( csqcg . input_left_angles )
{
csqcg . input_left_angles [ 0 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_LEFT ] . angles [ 0 ] ) ;
csqcg . input_left_angles [ 1 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_LEFT ] . angles [ 1 ] ) ;
csqcg . input_left_angles [ 2 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_LEFT ] . angles [ 2 ] ) ;
}
if ( csqcg . input_left_avelocity )
{
csqcg . input_left_avelocity [ 0 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_LEFT ] . avelocity [ 0 ] ) ;
csqcg . input_left_avelocity [ 1 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_LEFT ] . avelocity [ 1 ] ) ;
csqcg . input_left_avelocity [ 2 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_LEFT ] . avelocity [ 2 ] ) ;
}
if ( csqcg . input_right_status )
* csqcg . input_right_status = cmd - > vr [ VRDEV_RIGHT ] . status ;
if ( csqcg . input_right_origin )
VectorCopy ( cmd - > vr [ VRDEV_RIGHT ] . origin , csqcg . input_right_origin ) ;
if ( csqcg . input_right_velocity )
VectorCopy ( cmd - > vr [ VRDEV_RIGHT ] . velocity , csqcg . input_right_velocity ) ;
if ( csqcg . input_right_angles )
{
csqcg . input_right_angles [ 0 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_RIGHT ] . angles [ 0 ] ) ;
csqcg . input_right_angles [ 1 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_RIGHT ] . angles [ 1 ] ) ;
csqcg . input_right_angles [ 2 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_RIGHT ] . angles [ 2 ] ) ;
}
if ( csqcg . input_right_avelocity )
{
csqcg . input_right_avelocity [ 0 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_RIGHT ] . avelocity [ 0 ] ) ;
csqcg . input_right_avelocity [ 1 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_RIGHT ] . avelocity [ 1 ] ) ;
csqcg . input_right_avelocity [ 2 ] = SHORT2ANGLE ( cmd - > vr [ VRDEV_RIGHT ] . avelocity [ 2 ] ) ;
}
2008-05-25 22:23:43 +00:00
}
static void cs_get_input_state ( usercmd_t * cmd )
{
2021-09-15 20:33:54 +00:00
// if (csqcg.input_sequence)
// cmd->sequence = *csqcg.input_sequence;
2008-05-25 22:23:43 +00:00
if ( csqcg . input_timelength )
cmd - > msec = * csqcg . input_timelength * 1000 ;
if ( csqcg . input_angles )
{
cmd - > angles [ 0 ] = ANGLE2SHORT ( csqcg . input_angles [ 0 ] ) ;
cmd - > angles [ 1 ] = ANGLE2SHORT ( csqcg . input_angles [ 1 ] ) ;
cmd - > angles [ 2 ] = ANGLE2SHORT ( csqcg . input_angles [ 2 ] ) ;
}
if ( csqcg . input_movevalues )
{
cmd - > forwardmove = csqcg . input_movevalues [ 0 ] ;
cmd - > sidemove = csqcg . input_movevalues [ 1 ] ;
cmd - > upmove = csqcg . input_movevalues [ 2 ] ;
}
if ( csqcg . input_buttons )
cmd - > buttons = * csqcg . input_buttons ;
if ( csqcg . input_impulse )
cmd - > impulse = * csqcg . input_impulse ;
if ( csqcg . input_lightlevel )
cmd - > lightlevel = * csqcg . input_lightlevel ;
if ( csqcg . input_weapon )
cmd - > weapon = * csqcg . input_weapon ;
if ( csqcg . input_servertime )
2021-05-09 13:02:49 +00:00
{
2017-08-29 02:29:06 +00:00
cmd - > fservertime = * csqcg . input_servertime ;
2021-05-09 13:02:49 +00:00
cmd - > servertime = * csqcg . input_servertime * 1000 ;
}
2021-06-21 13:46:52 +00:00
if ( csqcg . input_clienttime )
cmd - > fclienttime = * csqcg . input_clienttime ;
2014-12-25 02:32:22 +00:00
if ( csqcg . input_cursor_screen )
Vector2Copy ( csqcg . input_cursor_screen , cmd - > cursor_screen ) ;
2020-09-08 05:11:09 +00:00
if ( csqcg . input_cursor_trace_start )
VectorCopy ( csqcg . input_cursor_trace_start , cmd - > cursor_start ) ;
if ( csqcg . input_cursor_trace_endpos )
VectorCopy ( csqcg . input_cursor_trace_endpos , cmd - > cursor_impact ) ;
2014-12-25 02:32:22 +00:00
if ( csqcg . input_cursor_entitynumber )
cmd - > cursor_entitynumber = * csqcg . input_cursor_entitynumber ;
2021-04-14 05:21:04 +00:00
if ( csqcg . input_head_status )
cmd - > vr [ VRDEV_HEAD ] . status = * csqcg . input_head_status ;
if ( csqcg . input_head_origin )
VectorCopy ( csqcg . input_head_origin , cmd - > vr [ VRDEV_HEAD ] . origin ) ;
if ( csqcg . input_head_velocity )
VectorCopy ( csqcg . input_head_velocity , cmd - > vr [ VRDEV_HEAD ] . velocity ) ;
if ( csqcg . input_head_angles )
{
cmd - > vr [ VRDEV_HEAD ] . angles [ 0 ] = ANGLE2SHORT ( csqcg . input_head_angles [ 0 ] ) ;
cmd - > vr [ VRDEV_HEAD ] . angles [ 1 ] = ANGLE2SHORT ( csqcg . input_head_angles [ 1 ] ) ;
cmd - > vr [ VRDEV_HEAD ] . angles [ 2 ] = ANGLE2SHORT ( csqcg . input_head_angles [ 2 ] ) ;
}
if ( csqcg . input_head_avelocity )
{
cmd - > vr [ VRDEV_HEAD ] . avelocity [ 0 ] = ANGLE2SHORT ( csqcg . input_head_avelocity [ 0 ] ) ;
cmd - > vr [ VRDEV_HEAD ] . avelocity [ 1 ] = ANGLE2SHORT ( csqcg . input_head_avelocity [ 1 ] ) ;
cmd - > vr [ VRDEV_HEAD ] . avelocity [ 2 ] = ANGLE2SHORT ( csqcg . input_head_avelocity [ 2 ] ) ;
}
2021-08-19 06:02:03 +00:00
if ( csqcg . input_head_weapon )
cmd - > vr [ VRDEV_HEAD ] . weapon = * csqcg . input_head_weapon ;
2021-04-14 05:21:04 +00:00
if ( csqcg . input_left_status )
cmd - > vr [ VRDEV_LEFT ] . status = * csqcg . input_left_status ;
if ( csqcg . input_left_origin )
VectorCopy ( csqcg . input_left_origin , cmd - > vr [ VRDEV_LEFT ] . origin ) ;
if ( csqcg . input_left_velocity )
VectorCopy ( csqcg . input_left_velocity , cmd - > vr [ VRDEV_LEFT ] . velocity ) ;
if ( csqcg . input_left_angles )
{
cmd - > vr [ VRDEV_LEFT ] . angles [ 0 ] = ANGLE2SHORT ( csqcg . input_left_angles [ 0 ] ) ;
cmd - > vr [ VRDEV_LEFT ] . angles [ 1 ] = ANGLE2SHORT ( csqcg . input_left_angles [ 1 ] ) ;
cmd - > vr [ VRDEV_LEFT ] . angles [ 2 ] = ANGLE2SHORT ( csqcg . input_left_angles [ 2 ] ) ;
}
if ( csqcg . input_left_avelocity )
{
cmd - > vr [ VRDEV_LEFT ] . avelocity [ 0 ] = ANGLE2SHORT ( csqcg . input_left_avelocity [ 0 ] ) ;
cmd - > vr [ VRDEV_LEFT ] . avelocity [ 1 ] = ANGLE2SHORT ( csqcg . input_left_avelocity [ 1 ] ) ;
cmd - > vr [ VRDEV_LEFT ] . avelocity [ 2 ] = ANGLE2SHORT ( csqcg . input_left_avelocity [ 2 ] ) ;
}
2021-08-19 06:02:03 +00:00
if ( csqcg . input_left_weapon )
cmd - > vr [ VRDEV_LEFT ] . weapon = * csqcg . input_left_weapon ;
2021-04-14 05:21:04 +00:00
if ( csqcg . input_right_status )
cmd - > vr [ VRDEV_RIGHT ] . status = * csqcg . input_right_status ;
if ( csqcg . input_right_origin )
VectorCopy ( csqcg . input_right_origin , cmd - > vr [ VRDEV_RIGHT ] . origin ) ;
if ( csqcg . input_right_velocity )
VectorCopy ( csqcg . input_right_velocity , cmd - > vr [ VRDEV_RIGHT ] . velocity ) ;
if ( csqcg . input_right_angles )
{
cmd - > vr [ VRDEV_RIGHT ] . angles [ 0 ] = ANGLE2SHORT ( csqcg . input_right_angles [ 0 ] ) ;
cmd - > vr [ VRDEV_RIGHT ] . angles [ 1 ] = ANGLE2SHORT ( csqcg . input_right_angles [ 1 ] ) ;
cmd - > vr [ VRDEV_RIGHT ] . angles [ 2 ] = ANGLE2SHORT ( csqcg . input_right_angles [ 2 ] ) ;
}
if ( csqcg . input_right_avelocity )
{
cmd - > vr [ VRDEV_RIGHT ] . avelocity [ 0 ] = ANGLE2SHORT ( csqcg . input_right_avelocity [ 0 ] ) ;
cmd - > vr [ VRDEV_RIGHT ] . avelocity [ 1 ] = ANGLE2SHORT ( csqcg . input_right_avelocity [ 1 ] ) ;
cmd - > vr [ VRDEV_RIGHT ] . avelocity [ 2 ] = ANGLE2SHORT ( csqcg . input_right_avelocity [ 2 ] ) ;
}
2021-08-19 06:02:03 +00:00
if ( csqcg . input_right_weapon )
cmd - > vr [ VRDEV_RIGHT ] . weapon = * csqcg . input_right_weapon ;
2008-05-25 22:23:43 +00:00
}
2020-02-11 18:06:10 +00:00
//sets implicit pause (only works when singleplayer)
static void QCBUILTIN PF_cl_setpause ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
cl . implicitpause = ! ! G_FLOAT ( OFS_PARM0 ) ;
}
2020-04-19 01:23:32 +00:00
static void QCBUILTIN PF_cl_RotateMoves ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{ //changes the past...
float * angles = G_VECTOR ( OFS_PARM0 ) ;
int frame ;
vec3_t of , ou , nf , nu ;
vec4_t mat [ 3 ] ;
vec3_t a ;
int seat = ( ( prinst - > callargc > 1 ) ? G_FLOAT ( OFS_PARM1 ) : csqc_playerseat ) ;
if ( seat < 0 | | seat > = MAX_SPLITS )
{
G_FLOAT ( OFS_RETURN ) = false ;
return ;
}
AngleVectorsFLU ( angles , mat [ 0 ] , mat [ 1 ] , mat [ 2 ] ) ;
mat [ 0 ] [ 3 ] = mat [ 1 ] [ 3 ] = mat [ 2 ] [ 3 ] = 0 ;
for ( frame = 0 ; frame < countof ( cl . outframes ) ; frame + + )
{
if ( cl . outframes [ frame ] . cmd_sequence > cl . ackedmovesequence )
{
a [ 0 ] = SHORT2ANGLE ( cl . outframes [ frame ] . cmd [ seat ] . angles [ 0 ] ) ;
a [ 1 ] = SHORT2ANGLE ( cl . outframes [ frame ] . cmd [ seat ] . angles [ 1 ] ) ;
a [ 2 ] = SHORT2ANGLE ( cl . outframes [ frame ] . cmd [ seat ] . angles [ 2 ] ) ;
AngleVectors ( a , of , NULL , ou ) ;
VectorTransform ( of , mat , nf ) ;
VectorTransform ( ou , mat , nu ) ;
VectorAngles ( nf , nu , a , false ) ;
cl . outframes [ frame ] . cmd [ seat ] . angles [ 0 ] = ANGLE2SHORT ( a [ 0 ] ) ;
cl . outframes [ frame ] . cmd [ seat ] . angles [ 1 ] = ANGLE2SHORT ( a [ 1 ] ) ;
cl . outframes [ frame ] . cmd [ seat ] . angles [ 2 ] = ANGLE2SHORT ( a [ 2 ] ) ;
}
}
}
2005-04-26 16:04:12 +00:00
//get the input commands, and stuff them into some globals.
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_getinputstate ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-04-26 16:04:12 +00:00
{
2017-08-29 02:29:06 +00:00
usercmd_t * cmd ;
2018-06-03 09:46:41 +00:00
usercmd_t tmp ;
2017-08-29 02:29:06 +00:00
extern usercmd_t cl_pendingcmd [ MAX_SPLITS ] ;
2013-06-23 02:17:02 +00:00
int f = G_FLOAT ( OFS_PARM0 ) ;
int seat = ( ( prinst - > callargc > 1 ) ? G_FLOAT ( OFS_PARM1 ) : csqc_playerseat ) ;
if ( seat < 0 | | seat > = MAX_SPLITS )
{
G_FLOAT ( OFS_RETURN ) = false ;
return ;
}
2005-04-26 16:04:12 +00:00
f = G_FLOAT ( OFS_PARM0 ) ;
2013-05-11 14:02:55 +00:00
if ( cl . paused & & f > = cl . ackedmovesequence )
2012-05-09 15:30:53 +00:00
{
G_FLOAT ( OFS_RETURN ) = false ;
return ;
}
2012-04-09 19:12:12 +00:00
2012-01-01 11:22:24 +00:00
/*outgoing_sequence says how many packets have actually been sent, but there's an extra pending packet which has not been sent yet - be warned though, its data will change in the coming frames*/
2013-05-11 14:02:55 +00:00
if ( f = = cl . movesequence )
2012-04-09 19:12:12 +00:00
{
2017-11-16 22:20:40 +00:00
int i ;
2017-08-29 02:29:06 +00:00
cmd = & cl_pendingcmd [ seat ] ;
2017-11-16 22:20:40 +00:00
2014-08-03 14:47:47 +00:00
tmp = * cmd ;
cmd = & tmp ;
for ( i = 0 ; i < 3 ; i + + )
cmd - > angles [ i ] = ( ( int ) ( csqc_playerview - > viewangles [ i ] * 65536.0 / 360 ) & 65535 ) ;
2014-05-30 03:57:30 +00:00
if ( ! cmd - > msec )
2017-11-16 22:20:40 +00:00
* cmd = cl . outframes [ ( f - 1 ) & UPDATE_MASK ] . cmd [ seat ] ;
cmd - > msec = ( realtime - cl . outframes [ ( f - 1 ) & UPDATE_MASK ] . senttime ) * 1000 ;
2024-04-25 05:57:34 +00:00
cmd - > sequence = f ;
2021-05-09 13:02:49 +00:00
//make sure we have the latest info...
cmd - > vr [ VRDEV_LEFT ] = csqc_playerview - > vrdev [ VRDEV_LEFT ] ;
cmd - > vr [ VRDEV_RIGHT ] = csqc_playerview - > vrdev [ VRDEV_RIGHT ] ;
cmd - > vr [ VRDEV_HEAD ] = csqc_playerview - > vrdev [ VRDEV_HEAD ] ;
2012-04-09 19:12:12 +00:00
}
2012-01-01 11:22:24 +00:00
else
2013-09-06 22:57:44 +00:00
{
if ( cl . outframes [ f & UPDATE_MASK ] . cmd_sequence ! = f )
{
G_FLOAT ( OFS_RETURN ) = false ;
return ;
}
2013-06-23 02:17:02 +00:00
cmd = & cl . outframes [ f & UPDATE_MASK ] . cmd [ seat ] ;
2013-09-06 22:57:44 +00:00
}
2005-04-26 16:04:12 +00:00
2008-05-25 22:23:43 +00:00
cs_set_input_state ( cmd ) ;
2005-04-26 16:04:12 +00:00
G_FLOAT ( OFS_RETURN ) = true ;
}
2008-05-25 22:23:43 +00:00
2005-04-26 16:04:12 +00:00
//read lots of globals, run the default player physics, write lots of globals.
2008-11-28 20:34:51 +00:00
//not intended to affect client state at all
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_runplayerphysics ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-04-26 16:04:12 +00:00
{
2017-08-29 02:29:06 +00:00
float msecs ;
2020-09-08 05:11:09 +00:00
float oldtime = * csqcg . time ;
2005-08-03 23:14:59 +00:00
2015-02-02 08:01:53 +00:00
csqcedict_t * ent = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
int mt = ent - > v - > movetype ;
if ( prinst - > callargc < 1 )
{
csqc_deprecated ( " runplayerphysics with no ent " ) ;
return ;
}
2015-02-07 22:34:22 +00:00
if ( ent - > readonly )
{
csqc_deprecated ( " runplayerphysics called on read-only entity " ) ;
return ;
}
2009-04-19 00:50:42 +00:00
2020-08-13 08:39:48 +00:00
if ( ! csqc_world . worldmodel )
2005-08-03 23:14:59 +00:00
return ; //urm..
2005-04-26 16:04:12 +00:00
2019-07-29 05:28:20 +00:00
VALGRIND_MAKE_MEM_UNDEFINED ( & pmove , sizeof ( pmove ) ) ;
2009-04-19 00:50:42 +00:00
//debugging field
2005-08-03 23:14:59 +00:00
pmove . jump_msec = 0 ; //(cls.z_ext & Z_EXT_PM_TYPE) ? 0 : from->jump_msec;
2005-04-26 16:04:12 +00:00
//set up the movement command
2017-08-29 02:29:06 +00:00
msecs = * csqcg . input_timelength * 1000 ;
2005-04-26 16:04:12 +00:00
//precision inaccuracies. :(
2005-08-03 23:14:59 +00:00
pmove . cmd . angles [ 0 ] = ANGLE2SHORT ( csqcg . input_angles [ 0 ] ) ;
pmove . cmd . angles [ 1 ] = ANGLE2SHORT ( csqcg . input_angles [ 1 ] ) ;
pmove . cmd . angles [ 2 ] = ANGLE2SHORT ( csqcg . input_angles [ 2 ] ) ;
2005-10-01 03:01:12 +00:00
VectorCopy ( csqcg . input_angles , pmove . angles ) ;
2021-09-15 20:33:54 +00:00
pmove . cmd . sequence = * csqcg . clientcommandframe ;
2005-04-26 16:04:12 +00:00
pmove . cmd . forwardmove = csqcg . input_movevalues [ 0 ] ;
pmove . cmd . sidemove = csqcg . input_movevalues [ 1 ] ;
pmove . cmd . upmove = csqcg . input_movevalues [ 2 ] ;
2005-10-01 03:01:12 +00:00
pmove . cmd . buttons = * csqcg . input_buttons ;
2023-01-09 05:11:23 +00:00
pmove . onladder = false ;
2014-07-12 06:56:17 +00:00
pmove . safeorigin_known = false ;
2014-09-17 03:04:08 +00:00
pmove . capsule = false ; //FIXME
2005-04-26 16:04:12 +00:00
2023-01-09 05:11:23 +00:00
movevars . bunnyspeedcap = cl . bunnyspeedcap ;
2019-10-14 02:36:57 +00:00
movevars . coordtype = cls . netchan . message . prim . coordtype ;
2023-01-09 05:11:23 +00:00
if ( csqc_playerseat > = 0 & & cl . playerview [ csqc_playerseat ] . playernum + 1 = = ent - > xv - > entnum )
{
2019-02-25 06:40:26 +00:00
movevars . entgravity = cl . playerview [ csqc_playerseat ] . entgravity ;
2023-01-09 05:11:23 +00:00
movevars . maxspeed = cl . playerview [ csqc_playerseat ] . maxspeed ;
}
2019-02-25 06:40:26 +00:00
else
2023-01-09 05:11:23 +00:00
{
2019-02-25 06:40:26 +00:00
movevars . entgravity = 1 ;
2023-01-09 05:11:23 +00:00
movevars . maxspeed = cl . playerview [ 0 ] . maxspeed ;
}
if ( ent - > xv - > gravity )
movevars . entgravity = ent - > xv - > gravity ;
2019-02-25 06:40:26 +00:00
2015-02-02 08:01:53 +00:00
if ( ent - > xv - > entnum )
pmove . skipent = ent - > xv - > entnum ;
2009-04-19 00:50:42 +00:00
else
2015-02-02 08:01:53 +00:00
pmove . skipent = - 1 ;
mt & = 255 ;
switch ( mt )
2009-04-19 00:50:42 +00:00
{
2015-02-02 08:01:53 +00:00
default :
case MOVETYPE_WALK :
pmove . pm_type = PM_NORMAL ;
break ;
case MOVETYPE_NOCLIP :
pmove . pm_type = PM_SPECTATOR ;
break ;
2015-03-03 00:14:43 +00:00
case MOVETYPE_FLY_WORLDONLY :
2015-02-02 08:01:53 +00:00
case MOVETYPE_FLY :
pmove . pm_type = PM_FLY ;
break ;
2009-04-19 00:50:42 +00:00
}
2015-02-02 08:01:53 +00:00
pmove . jump_held = ( int ) ent - > xv - > pmove_flags & PMF_JUMP_HELD ;
pmove . waterjumptime = 0 ;
2023-01-09 05:11:23 +00:00
pmove . onground = ! ! ( ( int ) ent - > v - > flags & FL_ONGROUND ) ;
2015-02-02 08:01:53 +00:00
VectorCopy ( ent - > v - > origin , pmove . origin ) ;
VectorCopy ( ent - > v - > velocity , pmove . velocity ) ;
VectorCopy ( ent - > v - > maxs , pmove . player_maxs ) ;
VectorCopy ( ent - > v - > mins , pmove . player_mins ) ;
2023-01-09 05:11:23 +00:00
VectorCopy ( ent - > xv - > gravitydir , pmove . gravitydir ) ;
2005-04-26 16:04:12 +00:00
2005-10-01 03:01:12 +00:00
CL_SetSolidEntities ( ) ;
2005-04-26 16:04:12 +00:00
2017-08-29 02:29:06 +00:00
while ( msecs > 0 ) //break up longer commands
2005-04-26 16:04:12 +00:00
{
pmove . cmd . msec = msecs ;
if ( pmove . cmd . msec > 50 )
pmove . cmd . msec = 50 ;
msecs - = pmove . cmd . msec ;
PM_PlayerMove ( 1 ) ;
}
2015-02-02 08:01:53 +00:00
VectorCopy ( pmove . angles , ent - > v - > angles ) ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
ent - > v - > angles [ 0 ] * = r_meshpitch . value * 1 / 3.0f ; //FIXME
2015-02-02 08:01:53 +00:00
VectorCopy ( pmove . origin , ent - > v - > origin ) ;
VectorCopy ( pmove . velocity , ent - > v - > velocity ) ;
2017-11-16 22:20:40 +00:00
if ( pmove . onground )
ent - > v - > flags = ( int ) ent - > v - > flags | FL_ONGROUND ;
else
ent - > v - > flags = ( int ) ent - > v - > flags & ~ FL_ONGROUND ;
2015-02-02 08:01:53 +00:00
ent - > xv - > pmove_flags = 0 ;
ent - > xv - > pmove_flags + = pmove . jump_held ? PMF_JUMP_HELD : 0 ;
ent - > xv - > pmove_flags + = pmove . onladder ? PMF_LADDER : 0 ;
2014-10-05 20:04:11 +00:00
2015-02-02 08:01:53 +00:00
//fixme: touch triggers?
World_LinkEdict ( & csqc_world , ( wedict_t * ) ent , true ) ;
2017-07-13 10:44:54 +00:00
2020-09-08 05:11:09 +00:00
* csqcg . time = oldtime ;
2005-04-26 16:04:12 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_getentitytoken ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2008-05-25 22:23:43 +00:00
{
2013-03-12 23:24:15 +00:00
if ( prinst - > callargc )
{
2014-03-30 08:55:06 +00:00
const char * s = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2020-08-13 08:39:48 +00:00
if ( * s = = 0 & & csqc_world . worldmodel )
2017-06-21 01:24:25 +00:00
{
2020-08-13 08:39:48 +00:00
if ( csqc_world . worldmodel - > loadstate = = MLS_LOADING )
COM_WorkerPartialSync ( csqc_world . worldmodel , & csqc_world . worldmodel - > loadstate , MLS_LOADING ) ;
s = Mod_GetEntitiesString ( csqc_world . worldmodel ) ;
2017-06-21 01:24:25 +00:00
}
2013-03-12 23:24:15 +00:00
csqcmapentitydata = s ;
G_INT ( OFS_RETURN ) = 0 ;
return ;
}
2008-05-25 22:23:43 +00:00
if ( ! csqcmapentitydata )
{
//nothing more to parse
G_INT ( OFS_RETURN ) = 0 ;
}
else
{
2015-08-20 03:17:47 +00:00
char * QCC_COM_Parse ( const char * data ) ;
extern char qcc_token [ ] ;
csqcmapentitydata = QCC_COM_Parse ( csqcmapentitydata ) ;
2015-04-27 06:19:33 +00:00
if ( ! csqcmapentitydata ) //hit the end
G_INT ( OFS_RETURN ) = 0 ;
else
2015-08-20 03:17:47 +00:00
RETURN_TSTRING ( qcc_token ) ;
2008-05-25 22:23:43 +00:00
}
}
2005-04-26 16:04:12 +00:00
static void CheckSendPings ( void )
{ //quakeworld sends a 'pings' client command to retrieve the frequently updating stuff
if ( realtime - cl . last_ping_request > 2 )
{
cl . last_ping_request = realtime ;
2008-01-11 15:22:18 +00:00
CL_SendClientCommand ( true , " pings " ) ;
2005-04-26 16:04:12 +00:00
}
}
2016-10-22 07:06:51 +00:00
static const char * PF_cs_serverkey_internal ( const char * keyname )
2005-10-01 03:01:12 +00:00
{
char * ret ;
2016-10-22 07:06:51 +00:00
static char adr [ MAX_ADR_SIZE ] ;
2005-10-01 03:01:12 +00:00
if ( ! strcmp ( keyname , " ip " ) )
2011-10-27 15:46:36 +00:00
{
if ( cls . demoplayback )
2017-07-12 08:15:27 +00:00
ret = cls . lastdemoname ;
2011-10-27 15:46:36 +00:00
else
2013-05-03 04:28:08 +00:00
ret = NET_AdrToString ( adr , sizeof ( adr ) , & cls . netchan . remote_address ) ;
2011-10-27 15:46:36 +00:00
}
2014-12-11 16:26:26 +00:00
else if ( ! strcmp ( keyname , " servername " ) )
ret = cls . servername ;
2013-06-23 02:17:02 +00:00
else if ( ! strcmp ( keyname , " constate " ) )
2013-03-12 22:53:23 +00:00
{
2013-08-27 13:18:09 +00:00
if ( cls . state = = ca_disconnected
# ifndef CLIENTONLY
& & ! sv . state
# endif
)
2013-03-12 22:53:23 +00:00
ret = " disconnected " ;
else if ( cls . state = = ca_active )
ret = " active " ;
else
ret = " connecting " ;
}
2014-12-11 16:26:26 +00:00
else if ( ! strcmp ( keyname , " loadstate " ) )
{
extern int total_loading_size , current_loading_size , loading_stage ;
extern char levelshotname [ MAX_QPATH ] ;
ret = va ( " %i %u %u \" %s \" " , loading_stage , current_loading_size , total_loading_size , levelshotname ) ;
}
else if ( ! strcmp ( keyname , " transferring " ) )
{
ret = CL_TryingToConnect ( ) ;
if ( ! ret )
ret = " " ;
}
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
else if ( ! strcmp ( keyname , " maxplayers " ) )
{
ret = va ( " %i " , cl . allocated_client_slots ) ;
}
2014-12-11 16:26:26 +00:00
else if ( ! strcmp ( keyname , " dlstate " ) )
{
if ( ! cl . downloadlist & & ! cls . download )
ret = " " ; //nothing being downloaded right now
else
{
unsigned int fcount ;
qofs_t tsize ;
qboolean sizeextra ;
CL_GetDownloadSizes ( & fcount , & tsize , & sizeextra ) ;
if ( cls . download ) //downloading something
ret = va ( " %u %g %u \" %s \" \" %s \" %g %i %g %g " , fcount , ( float ) tsize , sizeextra ? 1u : 0u , cls . download - > localname , cls . download - > remotename , cls . download - > percent , cls . download - > rate , ( float ) cls . download - > completedbytes , ( float ) cls . download - > size ) ;
else //not downloading anything right now
ret = va ( " %u %g %u " , fcount , ( float ) tsize , sizeextra ? 1u : 0u ) ;
}
}
else if ( ! strcmp ( keyname , " pausestate " ) )
ret = cl . paused ? " 1 " : " 0 " ;
2005-10-01 03:01:12 +00:00
else if ( ! strcmp ( keyname , " protocol " ) )
{ //using this is pretty acedemic, really. Not particuarly portable.
switch ( cls . protocol )
{ //a tokenizable string
//first is the base game qw/nq
//second is branch (custom engine name)
//third is protocol version.
default :
case CP_UNKNOWN :
ret = " Unknown " ;
break ;
case CP_QUAKEWORLD :
2009-11-04 21:16:50 +00:00
if ( cls . fteprotocolextensions | | cls . fteprotocolextensions2 )
2005-10-01 03:01:12 +00:00
ret = " QuakeWorld FTE " ;
else if ( cls . z_ext )
ret = " QuakeWorld ZQuake " ;
else
ret = " QuakeWorld " ;
break ;
case CP_NETQUAKE :
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
switch ( cls . protocol_nq )
2005-10-01 03:01:12 +00:00
{
default :
ret = " NetQuake " ;
break ;
2013-07-26 17:19:06 +00:00
case CPNQ_FITZ666 :
ret = " Fitz666 " ;
break ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
case CPNQ_DP5 :
2005-10-01 03:01:12 +00:00
ret = " NetQuake DarkPlaces 5 " ;
break ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
case CPNQ_DP6 :
2005-10-01 03:01:12 +00:00
ret = " NetQuake DarkPlaces 6 " ;
break ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
case CPNQ_DP7 :
2005-10-01 03:01:12 +00:00
ret = " NetQuake DarkPlaces 7 " ;
break ;
}
break ;
case CP_QUAKE2 :
ret = " Quake2 " ;
break ;
case CP_QUAKE3 :
ret = " Quake3 " ;
break ;
case CP_PLUGIN :
ret = " External " ;
break ;
}
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
else if ( ! strcmp ( keyname , " challenge " ) )
{
ret = va ( " %u " , cls . challenge ) ;
}
2005-10-01 03:01:12 +00:00
else
{
2013-03-12 22:53:23 +00:00
# ifndef CLIENTONLY
2016-07-12 00:40:13 +00:00
if ( sv . state > = ss_loading )
2013-03-12 22:53:23 +00:00
{
2018-07-05 16:21:44 +00:00
ret = InfoBuf_ValueForKey ( & svs . info , keyname ) ;
2013-03-12 22:53:23 +00:00
if ( ! * ret )
2018-07-05 16:21:44 +00:00
ret = InfoBuf_ValueForKey ( & svs . localinfo , keyname ) ;
2013-03-12 22:53:23 +00:00
}
else
# endif
2018-07-05 16:21:44 +00:00
ret = InfoBuf_ValueForKey ( & cl . serverinfo , keyname ) ;
2005-10-01 03:01:12 +00:00
}
2016-10-22 07:06:51 +00:00
return ret ;
2005-10-01 03:01:12 +00:00
}
2016-10-22 07:06:51 +00:00
static const char * PF_cs_getplayerkey_internal ( unsigned int pnum , const char * keyname )
2005-04-26 16:04:12 +00:00
{
2016-10-22 07:06:51 +00:00
static char buffer [ 64 ] ;
2005-04-26 16:04:12 +00:00
char * ret ;
2017-01-13 00:39:50 +00:00
if ( ( unsigned int ) pnum > = ( unsigned int ) cl . allocated_client_slots )
2005-04-26 16:04:12 +00:00
ret = " " ;
2013-03-12 22:44:00 +00:00
else if ( ! strcmp ( keyname , " viewentity " ) ) //compat with DP. Yes, I know this is in the wrong place. This is an evil hack.
2011-05-20 04:10:46 +00:00
{
ret = buffer ;
sprintf ( ret , " %i " , pnum + 1 ) ;
}
2013-06-23 02:17:02 +00:00
else if ( ! * cl . players [ pnum ] . name )
2005-10-01 03:01:12 +00:00
ret = " " ; //player isn't on the server.
2005-04-26 16:04:12 +00:00
else if ( ! strcmp ( keyname , " ping " ) )
{
CheckSendPings ( ) ;
2007-03-11 16:51:45 +00:00
ret = buffer ;
2005-04-26 16:04:12 +00:00
sprintf ( ret , " %i " , cl . players [ pnum ] . ping ) ;
}
else if ( ! strcmp ( keyname , " frags " ) )
{
2007-03-11 16:51:45 +00:00
ret = buffer ;
2005-04-26 16:04:12 +00:00
sprintf ( ret , " %i " , cl . players [ pnum ] . frags ) ;
}
2013-03-12 22:44:00 +00:00
else if ( ! strcmp ( keyname , " userid " ) )
{
ret = buffer ;
sprintf ( ret , " %i " , cl . players [ pnum ] . userid ) ;
}
2005-04-26 16:04:12 +00:00
else if ( ! strcmp ( keyname , " pl " ) ) //packet loss
{
CheckSendPings ( ) ;
2007-03-11 16:51:45 +00:00
ret = buffer ;
2005-04-26 16:04:12 +00:00
sprintf ( ret , " %i " , cl . players [ pnum ] . pl ) ;
}
2023-01-09 05:12:04 +00:00
else if ( ! strcmp ( keyname , " activetime " ) )
2005-04-26 16:04:12 +00:00
{
2007-03-11 16:51:45 +00:00
ret = buffer ;
2015-06-24 17:59:57 +00:00
sprintf ( ret , " %f " , realtime - cl . players [ pnum ] . realentertime ) ;
2005-04-26 16:04:12 +00:00
}
2023-01-09 05:12:04 +00:00
// else if (!strcmp(keyname, "entertime"))
2015-06-24 17:59:57 +00:00
// {
// ret = buffer;
// sprintf(ret, "%i", (int)cl.players[pnum].entertime);
// }
2023-01-09 05:12:04 +00:00
else if ( ! strcmp ( keyname , " topcolor_rgb " ) )
2013-06-23 02:17:02 +00:00
{
2018-03-04 14:41:16 +00:00
unsigned int col = cl . players [ pnum ] . dtopcolor ;
2013-06-23 02:17:02 +00:00
ret = buffer ;
if ( col < 16 )
{
col = Sbar_ColorForMap ( col ) ;
sprintf ( ret , " '%g %g %g' " , host_basepal [ col * 3 + 0 ] / 255.0 , host_basepal [ col * 3 + 1 ] / 255.0 , host_basepal [ col * 3 + 2 ] / 255.0 ) ;
}
else
sprintf ( ret , " '%g %g %g' " , ( ( col & 0xff0000 ) > > 16 ) / 255.0 , ( ( col & 0x00ff00 ) > > 8 ) / 255.0 , ( ( col & 0x0000ff ) > > 0 ) / 255.0 ) ;
}
2023-01-09 05:12:04 +00:00
else if ( ! strcmp ( keyname , " bottomcolor_rgb " ) )
2013-06-23 02:17:02 +00:00
{
2018-03-04 14:41:16 +00:00
unsigned int col = cl . players [ pnum ] . dbottomcolor ;
2013-06-23 02:17:02 +00:00
ret = buffer ;
if ( col < 16 )
{
col = Sbar_ColorForMap ( col ) ;
sprintf ( ret , " '%g %g %g' " , host_basepal [ col * 3 + 0 ] / 255.0 , host_basepal [ col * 3 + 1 ] / 255.0 , host_basepal [ col * 3 + 2 ] / 255.0 ) ;
}
else
sprintf ( ret , " '%g %g %g' " , ( ( col & 0xff0000 ) > > 16 ) / 255.0 , ( ( col & 0x00ff00 ) > > 8 ) / 255.0 , ( ( col & 0x0000ff ) > > 0 ) / 255.0 ) ;
}
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2017-08-14 16:38:44 +00:00
else if ( csqc_isdarkplaces & & ! strcmp ( keyname , " colors " ) ) //checks to see if a player has locally been set to ignored (for text chat)
{
ret = buffer ;
2019-01-15 14:12:49 +00:00
sprintf ( ret , " %i " , cl . players [ pnum ] . dtopcolor + cl . players [ pnum ] . dbottomcolor * 16 ) ;
2017-08-14 16:38:44 +00:00
}
# endif
2013-05-26 01:05:58 +00:00
else if ( ! strcmp ( keyname , " ignored " ) ) //checks to see if a player has locally been set to ignored (for text chat)
{
ret = buffer ;
sprintf ( ret , " %i " , ( int ) cl . players [ pnum ] . ignored ) ;
}
2010-11-21 03:39:12 +00:00
# ifdef VOICECHAT
2013-05-26 01:05:58 +00:00
else if ( ! strcmp ( keyname , " vignored " ) ) //checks to see this player's voicechat is ignored.
{
ret = buffer ;
sprintf ( ret , " %i " , ( int ) cl . players [ pnum ] . vignored ) ;
}
2010-11-21 03:39:12 +00:00
else if ( ! strcmp ( keyname , " voipspeaking " ) )
{
ret = buffer ;
sprintf ( ret , " %i " , S_Voip_Speaking ( pnum ) ) ;
}
else if ( ! strcmp ( keyname , " voiploudness " ) )
{
ret = buffer ;
2013-06-23 02:17:02 +00:00
if ( pnum = = csqc_playerview - > playernum )
2010-11-21 03:39:12 +00:00
sprintf ( ret , " %i " , S_Voip_Loudness ( false ) ) ;
else
2018-11-22 03:02:36 +00:00
sprintf ( ret , " %i " , S_Voip_ClientLoudness ( pnum ) ) ;
2010-11-21 03:39:12 +00:00
}
# endif
2005-04-26 16:04:12 +00:00
else
{
2018-07-05 16:21:44 +00:00
ret = InfoBuf_ValueForKey ( & cl . players [ pnum ] . userinfo , keyname ) ;
2005-04-26 16:04:12 +00:00
}
2016-10-22 07:06:51 +00:00
return ret ;
}
//string(string keyname)
static void QCBUILTIN PF_cs_serverkey ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
2017-08-14 16:38:44 +00:00
const char * keyname = PF_VarString ( prinst , 0 , pr_globals ) ;
2016-10-22 07:06:51 +00:00
const char * ret = PF_cs_serverkey_internal ( keyname ) ;
if ( * ret )
RETURN_TSTRING ( ret ) ;
else
G_INT ( OFS_RETURN ) = 0 ;
}
2017-08-29 02:29:06 +00:00
static void QCBUILTIN PF_cs_serverkeyfloat ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * keyname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
const char * ret = PF_cs_serverkey_internal ( keyname ) ;
if ( * ret )
G_FLOAT ( OFS_RETURN ) = strtod ( ret , NULL ) ;
else
G_FLOAT ( OFS_RETURN ) = ( prinst - > callargc > = 2 ) ? G_FLOAT ( OFS_PARM1 ) : 0 ;
}
2018-07-05 16:21:44 +00:00
static void QCBUILTIN PF_cs_serverkeyblob ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * keyname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
int qcptr = G_INT ( OFS_PARM1 ) ;
int qcsize = G_INT ( OFS_PARM2 ) ;
void * ptr ;
size_t blobsize = 0 ;
const char * blob ;
if ( qcptr < 0 | | qcptr + qcsize > = prinst - > stringtablesize )
{
PR_BIError ( prinst , " PF_cs_serverkeyblob: invalid pointer \n " ) ;
return ;
}
2021-07-17 15:09:34 +00:00
ptr = ( prinst - > stringtable + qcptr ) ;
2018-07-05 16:21:44 +00:00
2019-03-12 05:04:27 +00:00
blob = InfoBuf_BlobForKey ( & cl . serverinfo , keyname , & blobsize , NULL ) ;
2018-07-05 16:21:44 +00:00
if ( qcptr )
{
blobsize = min ( blobsize , qcsize ) ;
memcpy ( ptr , blob , blobsize ) ;
G_INT ( OFS_RETURN ) = blobsize ;
}
else
G_INT ( OFS_RETURN ) = blobsize ;
}
2016-10-22 07:06:51 +00:00
//string(float pnum, string keyname)
2017-08-29 02:29:06 +00:00
static void QCBUILTIN PF_cs_getplayerkeystring ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2016-10-22 07:06:51 +00:00
{
int pnum = G_FLOAT ( OFS_PARM0 ) ;
const char * keyname = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
const char * ret ;
if ( pnum < 0 )
{
if ( csqc_resortfrags )
{
Sbar_SortFrags ( true , false ) ;
csqc_resortfrags = false ;
}
if ( pnum > = - scoreboardlines )
{ //sort by
pnum = fragsort [ - ( pnum + 1 ) ] ;
}
}
ret = PF_cs_getplayerkey_internal ( pnum , keyname ) ;
if ( * ret )
RETURN_TSTRING ( ret ) ;
else
G_INT ( OFS_RETURN ) = 0 ;
}
2017-08-29 02:29:06 +00:00
static void QCBUILTIN PF_cs_getplayerkeyfloat ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int pnum = G_FLOAT ( OFS_PARM0 ) ;
const char * keyname = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
const char * ret ;
if ( pnum < 0 )
{
if ( csqc_resortfrags )
{
Sbar_SortFrags ( true , false ) ;
csqc_resortfrags = false ;
}
if ( pnum > = - scoreboardlines )
{ //sort by
pnum = fragsort [ - ( pnum + 1 ) ] ;
}
}
ret = PF_cs_getplayerkey_internal ( pnum , keyname ) ;
if ( * ret )
G_FLOAT ( OFS_RETURN ) = strtod ( ret , NULL ) ;
else
G_FLOAT ( OFS_RETURN ) = ( prinst - > callargc > = 3 ) ? G_FLOAT ( OFS_PARM2 ) : 0 ;
}
2018-07-05 16:21:44 +00:00
static void QCBUILTIN PF_cs_getplayerkeyblob ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int pnum = G_FLOAT ( OFS_PARM0 ) ;
const char * keyname = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
int qcptr = G_INT ( OFS_PARM2 ) ;
int qcsize = G_INT ( OFS_PARM3 ) ;
void * ptr ;
if ( pnum < 0 )
{
if ( csqc_resortfrags )
{
Sbar_SortFrags ( true , false ) ;
csqc_resortfrags = false ;
}
if ( pnum > = - scoreboardlines )
{ //sort by
pnum = fragsort [ - ( pnum + 1 ) ] ;
}
}
if ( qcptr < 0 | | qcptr + qcsize > = prinst - > stringtablesize )
{
PR_BIError ( prinst , " PF_cs_getplayerkeyblob: invalid pointer \n " ) ;
return ;
}
2021-07-17 15:09:34 +00:00
ptr = ( prinst - > stringtable + qcptr ) ;
2018-07-05 16:21:44 +00:00
if ( ( unsigned int ) pnum > = ( unsigned int ) cl . allocated_client_slots )
G_INT ( OFS_RETURN ) = 0 ;
else
{
size_t blobsize = 0 ;
2019-03-12 05:04:27 +00:00
const char * blob = InfoBuf_BlobForKey ( & cl . players [ pnum ] . userinfo , keyname , & blobsize , NULL ) ;
2018-07-05 16:21:44 +00:00
if ( qcptr )
{
blobsize = min ( blobsize , qcsize ) ;
memcpy ( ptr , blob , blobsize ) ;
G_INT ( OFS_RETURN ) = blobsize ;
}
else
G_INT ( OFS_RETURN ) = blobsize ;
}
}
2016-10-22 07:06:51 +00:00
static void QCBUILTIN PF_cs_infokey ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
csqcedict_t * ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
const char * keyname = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
const char * ret ;
if ( ! ent - > entnum )
ret = PF_cs_serverkey_internal ( keyname ) ;
else
{
int pnum = ent - > xv - > entnum - 1 ; //figure out which ssqc entity this is meant to be
if ( pnum < 0 )
{
csqc_deprecated ( " infokey: entity does not correlate to an ssqc entity \n " ) ;
ret = " " ;
}
else if ( pnum > = cl . allocated_client_slots )
{
csqc_deprecated ( " infokey: entity does not correlate to an ssqc player entity \n " ) ;
ret = " " ;
}
else
ret = PF_cs_getplayerkey_internal ( pnum , keyname ) ;
}
2005-04-26 16:04:12 +00:00
if ( * ret )
2007-03-11 16:51:45 +00:00
RETURN_TSTRING ( ret ) ;
2005-05-08 06:01:25 +00:00
else
G_INT ( OFS_RETURN ) = 0 ;
2005-04-26 16:04:12 +00:00
}
2021-07-17 15:09:34 +00:00
static int PR_CSQC_NamedBuiltinUnsupported ( const char * name ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_checkextension ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-05-19 02:53:03 +00:00
{
2014-03-30 08:55:06 +00:00
const char * extname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2021-07-17 15:09:34 +00:00
int i , ebi ;
2008-11-09 22:29:28 +00:00
for ( i = 0 ; i < QSG_Extensions_count ; i + + )
{
if ( ! QSG_Extensions [ i ] . name )
continue ;
if ( ! strcmp ( QSG_Extensions [ i ] . name , extname ) )
{
2021-04-14 05:21:04 +00:00
if ( QSG_Extensions [ i ] . extensioncheck )
{
2021-08-23 06:37:21 +00:00
extcheck_t ctx = { prinst - > parms - > user , cls . fteprotocolextensions , cls . fteprotocolextensions2 } ;
2021-04-14 05:21:04 +00:00
G_FLOAT ( OFS_RETURN ) = QSG_Extensions [ i ] . extensioncheck ( & ctx ) ;
}
else
2021-07-17 15:09:34 +00:00
{
//make sure all of its builtins are actually supported.
//if any is marked as 'fixme' then we've not implemented it in csqc yet.
for ( ebi = 0 ; ebi < countof ( QSG_Extensions [ i ] . builtinnames ) & & QSG_Extensions [ i ] . builtinnames [ ebi ] ; ebi + + )
if ( PR_CSQC_NamedBuiltinUnsupported ( QSG_Extensions [ i ] . builtinnames [ ebi ] ) )
{
G_FLOAT ( OFS_RETURN ) = false ;
return ;
}
2021-04-14 05:21:04 +00:00
G_FLOAT ( OFS_RETURN ) = true ;
2021-07-17 15:09:34 +00:00
}
2008-11-09 22:29:28 +00:00
return ;
}
}
G_FLOAT ( OFS_RETURN ) = false ;
2005-05-19 02:53:03 +00:00
}
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
void QCBUILTIN PF_soundupdate ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
wedict_t * entity = G_WEDICT ( prinst , OFS_PARM0 ) ;
int channel = G_FLOAT ( OFS_PARM1 ) ;
const char * sample = PR_GetStringOfs ( prinst , OFS_PARM2 ) ;
float volume = G_FLOAT ( OFS_PARM3 ) ;
float attenuation = G_FLOAT ( OFS_PARM4 ) ;
2017-01-29 13:10:53 +00:00
float pitchpct = ( prinst - > callargc > = 6 ) ? G_FLOAT ( OFS_PARM5 ) * 0.01 : 0 ;
2015-07-27 08:21:34 +00:00
unsigned int flags = ( prinst - > callargc > = 7 ) ? G_FLOAT ( OFS_PARM6 ) : 0 ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
float startoffset = ( prinst - > callargc > = 8 ) ? G_FLOAT ( OFS_PARM7 ) : 0 ;
sfx_t * sfx = S_PrecacheSound ( sample ) ;
2015-09-01 04:45:15 +00:00
vec3_t org ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
2015-09-01 04:45:15 +00:00
VectorCopy ( entity - > v - > origin , org ) ;
if ( entity - > v - > solid = = SOLID_BSP )
{
VectorMA ( org , 0.5 , entity - > v - > mins , org ) ;
VectorMA ( org , 0.5 , entity - > v - > maxs , org ) ;
}
2016-07-12 00:40:13 +00:00
G_FLOAT ( OFS_RETURN ) = S_UpdateSound ( - entity - > entnum , channel , sfx , org , entity - > v - > velocity , volume , attenuation , startoffset , pitchpct , flags ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
void QCBUILTIN PF_stopsound ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
wedict_t * entity = G_WEDICT ( prinst , OFS_PARM0 ) ;
int channel = G_FLOAT ( OFS_PARM1 ) ;
S_StopSound ( - entity - > entnum , channel ) ;
}
2014-05-13 23:21:20 +00:00
void QCBUILTIN PF_getsoundtime ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
wedict_t * entity = G_WEDICT ( prinst , OFS_PARM0 ) ;
int channel = G_FLOAT ( OFS_PARM1 ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
G_FLOAT ( OFS_RETURN ) = S_GetSoundTime ( - entity - > entnum , channel ) ;
2014-05-13 23:21:20 +00:00
}
2019-03-23 07:06:37 +00:00
void QCBUILTIN PF_getchannellevel ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
wedict_t * entity = G_WEDICT ( prinst , OFS_PARM0 ) ;
int channel = G_FLOAT ( OFS_PARM1 ) ;
G_FLOAT ( OFS_RETURN ) = S_GetChannelLevel ( - entity - > entnum , channel ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_sound ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-06-04 04:20:20 +00:00
{
2014-03-30 08:55:06 +00:00
const char * sample ;
2005-06-04 04:20:20 +00:00
int channel ;
csqcedict_t * entity ;
2005-08-19 19:06:22 +00:00
float volume ;
2005-06-04 04:20:20 +00:00
float attenuation ;
2010-12-05 02:46:07 +00:00
float pitchpct ;
2015-07-27 08:21:34 +00:00
unsigned int flags ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
float startoffset ;
2005-06-04 04:20:20 +00:00
sfx_t * sfx ;
2015-09-01 04:45:15 +00:00
vec3_t org ;
2005-11-21 21:47:53 +00:00
2005-06-14 04:52:10 +00:00
entity = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
2005-06-04 04:20:20 +00:00
channel = G_FLOAT ( OFS_PARM1 ) ;
sample = PR_GetStringOfs ( prinst , OFS_PARM2 ) ;
2005-08-03 23:14:59 +00:00
volume = G_FLOAT ( OFS_PARM3 ) ;
2005-06-04 04:20:20 +00:00
attenuation = G_FLOAT ( OFS_PARM4 ) ;
2017-01-29 13:10:53 +00:00
pitchpct = ( prinst - > callargc > = 6 ) ? G_FLOAT ( OFS_PARM5 ) * 0.01 : 0 ;
2015-07-27 08:21:34 +00:00
flags = ( prinst - > callargc > = 7 ) ? G_FLOAT ( OFS_PARM6 ) : 0 ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
startoffset = ( prinst - > callargc > = 8 ) ? G_FLOAT ( OFS_PARM7 ) : 0 ;
2005-06-04 04:20:20 +00:00
sfx = S_PrecacheSound ( sample ) ;
2015-09-01 04:45:15 +00:00
VectorCopy ( entity - > v - > origin , org ) ;
if ( entity - > v - > solid = = SOLID_BSP )
{
VectorMA ( org , 0.5 , entity - > v - > mins , org ) ;
VectorMA ( org , 0.5 , entity - > v - > maxs , org ) ;
}
2005-06-04 04:20:20 +00:00
if ( sfx )
2016-07-12 00:40:13 +00:00
S_StartSound ( - entity - > entnum , channel , sfx , org , entity - > v - > velocity , volume , attenuation , startoffset , pitchpct , flags ) ;
2019-01-15 14:12:49 +00:00
}
2005-04-26 16:04:12 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_pointsound ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2008-11-09 22:29:28 +00:00
{
2014-03-30 08:55:06 +00:00
const char * sample ;
2008-11-09 22:29:28 +00:00
float * origin ;
float volume ;
float attenuation ;
2010-12-05 02:46:07 +00:00
float pitchpct ;
2008-11-09 22:29:28 +00:00
sfx_t * sfx ;
origin = G_VECTOR ( OFS_PARM0 ) ;
sample = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
volume = G_FLOAT ( OFS_PARM2 ) ;
attenuation = G_FLOAT ( OFS_PARM3 ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( prinst - > callargc > = 5 )
2017-01-29 13:10:53 +00:00
pitchpct = G_FLOAT ( OFS_PARM4 ) * 0.01 ;
2010-12-05 02:46:07 +00:00
else
pitchpct = 0 ;
2008-11-09 22:29:28 +00:00
sfx = S_PrecacheSound ( sample ) ;
if ( sfx )
2016-07-12 00:40:13 +00:00
S_StartSound ( 0 , 0 , sfx , origin , NULL , volume , attenuation , 0 , pitchpct , 0 ) ;
2008-11-09 22:29:28 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_particle ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-01 19:23:00 +00:00
{
float * org = G_VECTOR ( OFS_PARM0 ) ;
float * dir = G_VECTOR ( OFS_PARM1 ) ;
float colour = G_FLOAT ( OFS_PARM2 ) ;
float count = G_FLOAT ( OFS_PARM2 ) ;
2008-11-09 22:29:28 +00:00
pe - > RunParticleEffect ( org , dir , colour , count ) ;
2005-07-01 19:23:00 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_particle2 ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
float * org , * dmin , * dmax ;
float colour ;
float count ;
float effect ;
org = G_VECTOR ( OFS_PARM0 ) ;
dmin = G_VECTOR ( OFS_PARM1 ) ;
dmax = G_VECTOR ( OFS_PARM2 ) ;
colour = G_FLOAT ( OFS_PARM3 ) ;
effect = G_FLOAT ( OFS_PARM4 ) ;
count = G_FLOAT ( OFS_PARM5 ) ;
2008-11-09 22:29:28 +00:00
pe - > RunParticleEffect2 ( org , dmin , dmax , colour , effect , count ) ;
2005-07-14 01:57:34 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_particle3 ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
float * org , * box ;
float colour ;
float count ;
float effect ;
org = G_VECTOR ( OFS_PARM0 ) ;
box = G_VECTOR ( OFS_PARM1 ) ;
colour = G_FLOAT ( OFS_PARM2 ) ;
effect = G_FLOAT ( OFS_PARM3 ) ;
count = G_FLOAT ( OFS_PARM4 ) ;
2008-11-09 22:29:28 +00:00
pe - > RunParticleEffect3 ( org , box , colour , effect , count ) ;
2005-07-14 01:57:34 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_particle4 ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
float * org ;
float radius ;
float colour ;
float count ;
float effect ;
org = G_VECTOR ( OFS_PARM0 ) ;
radius = G_FLOAT ( OFS_PARM1 ) ;
colour = G_FLOAT ( OFS_PARM2 ) ;
effect = G_FLOAT ( OFS_PARM3 ) ;
count = G_FLOAT ( OFS_PARM4 ) ;
2008-11-09 22:29:28 +00:00
pe - > RunParticleEffect4 ( org , radius , colour , effect , count ) ;
2005-07-14 01:57:34 +00:00
}
2005-07-01 19:23:00 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void QCBUILTIN PF_cl_effect ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-01 19:23:00 +00:00
{
float * org = G_VECTOR ( OFS_PARM0 ) ;
2014-03-30 08:55:06 +00:00
const char * name = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2005-07-01 19:23:00 +00:00
float startframe = G_FLOAT ( OFS_PARM2 ) ;
float endframe = G_FLOAT ( OFS_PARM3 ) ;
float framerate = G_FLOAT ( OFS_PARM4 ) ;
model_t * mdl ;
2014-03-30 08:55:06 +00:00
mdl = Mod_ForName ( name , MLV_WARN ) ;
2005-07-01 19:23:00 +00:00
if ( mdl )
2016-07-12 00:40:13 +00:00
CL_SpawnSpriteEffect ( org , NULL , NULL , mdl , startframe , endframe , framerate , mdl - > type = = mod_sprite ? - 1 : 1 , 1 , 0 , 0 , P_INVALID , 0 , 0 ) ;
2005-07-01 19:23:00 +00:00
else
Con_Printf ( " PF_cl_effect: Couldn't load model %s \n " , name ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void QCBUILTIN PF_cl_ambientsound ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-01 19:23:00 +00:00
{
2014-03-30 08:55:06 +00:00
const char * samp ;
2005-07-01 19:23:00 +00:00
float * pos ;
float vol , attenuation ;
2005-11-21 21:47:53 +00:00
pos = G_VECTOR ( OFS_PARM0 ) ;
2005-07-01 19:23:00 +00:00
samp = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
vol = G_FLOAT ( OFS_PARM2 ) ;
attenuation = G_FLOAT ( OFS_PARM3 ) ;
S_StaticSound ( S_PrecacheSound ( samp ) , pos , vol , attenuation ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_lightstyle ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-01 19:23:00 +00:00
{
int stnum = G_FLOAT ( OFS_PARM0 ) ;
2014-03-30 08:55:06 +00:00
const char * str = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2014-06-25 03:53:11 +00:00
vec3_t rgb = { 1 , 1 , 1 } ;
if ( prinst - > callargc > = 3 ) //fte is a quakeworld engine
VectorCopy ( G_VECTOR ( OFS_PARM2 ) , rgb ) ;
2005-07-01 19:23:00 +00:00
2014-06-25 03:53:11 +00:00
R_UpdateLightStyle ( stnum , str , rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] ) ;
2005-07-01 19:23:00 +00:00
}
2017-01-15 13:13:09 +00:00
static void QCBUILTIN PF_getlightstyle ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
unsigned int stnum = G_FLOAT ( OFS_PARM0 ) ;
2019-09-10 15:40:04 +00:00
if ( stnum > = cl_max_lightstyles )
2017-01-15 13:13:09 +00:00
{
VectorSet ( G_VECTOR ( OFS_PARM1 ) , 0 , 0 , 0 ) ;
G_INT ( OFS_RETURN ) = 0 ;
return ;
}
VectorCopy ( cl_lightstyle [ stnum ] . colours , G_VECTOR ( OFS_PARM1 ) ) ;
if ( ! cl_lightstyle [ stnum ] . length )
G_INT ( OFS_RETURN ) = 0 ;
else
RETURN_TSTRING ( cl_lightstyle [ stnum ] . map ) ;
}
static void QCBUILTIN PF_getlightstylergb ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
unsigned int stnum = G_FLOAT ( OFS_PARM0 ) ;
int value ; //could be float, but that would exceed the precision of R_AnimateLight
2019-09-10 15:40:04 +00:00
if ( stnum > = MAX_NET_LIGHTSTYLES )
2017-01-15 13:13:09 +00:00
{
Con_Printf ( " PF_getlightstyle: stnum > MAX_LIGHTSTYLES " ) ;
return ;
}
2019-09-10 15:40:04 +00:00
if ( stnum < cl_max_lightstyles | | ! cl_lightstyle [ stnum ] . length )
2017-01-15 13:13:09 +00:00
value = ( ' m ' - ' a ' ) * 22 * r_lightstylescale . value ;
else if ( cl_lightstyle [ stnum ] . map [ 0 ] = = ' = ' )
value = atof ( cl_lightstyle [ stnum ] . map + 1 ) * 256 * r_lightstylescale . value ;
else
{
int v1 , v2 , vd , i ;
float f ;
f = ( cl . time * r_lightstylespeed . value ) ;
if ( f < 0 )
f = 0 ;
i = ( int ) f ;
f - = i ; //this can require updates at 1000 times a second.. Depends on your framerate of course
v1 = i % cl_lightstyle [ stnum ] . length ;
v1 = cl_lightstyle [ stnum ] . map [ v1 ] - ' a ' ;
v2 = ( i + 1 ) % cl_lightstyle [ stnum ] . length ;
v2 = cl_lightstyle [ stnum ] . map [ v2 ] - ' a ' ;
vd = v1 - v2 ;
if ( ! r_lightstylesmooth . ival | | vd < - r_lightstylesmooth_limit . ival | | vd > r_lightstylesmooth_limit . ival )
value = v1 * 22 * r_lightstylescale . value ;
else
value = ( v1 * ( 1 - f ) + v2 * ( f ) ) * 22 * r_lightstylescale . value ;
}
VectorScale ( cl_lightstyle [ stnum ] . colours , value * ( 1.0 / 256 ) , G_VECTOR ( OFS_RETURN ) ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_gunshot ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
2005-07-14 01:57:34 +00:00
float scaler = 1 ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( prinst - > callargc > = 2 ) //fte is a quakeworld engine
2005-07-14 01:57:34 +00:00
scaler = G_FLOAT ( OFS_PARM1 ) ;
if ( P_RunParticleEffectType ( pos , NULL , scaler , pt_gunshot ) )
P_RunParticleEffect ( pos , vec3_origin , 0 , 20 * scaler ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_bloodqw ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
float scaler = 1 ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( prinst - > callargc > = 2 ) //fte is a quakeworld engine
2005-07-14 01:57:34 +00:00
scaler = G_FLOAT ( OFS_PARM1 ) ;
2008-11-09 22:29:28 +00:00
if ( P_RunParticleEffectType ( pos , NULL , scaler , ptqw_blood ) )
if ( P_RunParticleEffectType ( pos , NULL , scaler , ptdp_blood ) )
P_RunParticleEffect ( pos , vec3_origin , 73 , 20 * scaler ) ;
2005-07-14 01:57:34 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_blooddp ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-13 06:01:18 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
float * dir = G_VECTOR ( OFS_PARM1 ) ;
float scaler = G_FLOAT ( OFS_PARM2 ) ;
2008-11-09 22:29:28 +00:00
if ( P_RunParticleEffectType ( pos , dir , scaler , ptdp_blood ) )
if ( P_RunParticleEffectType ( pos , dir , scaler , ptqw_blood ) )
P_RunParticleEffect ( pos , dir , 73 , 20 * scaler ) ;
2005-08-13 06:01:18 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_lightningblood ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
2008-11-09 22:29:28 +00:00
if ( P_RunParticleEffectType ( pos , NULL , 1 , ptqw_lightningblood ) )
2005-07-14 01:57:34 +00:00
P_RunParticleEffect ( pos , vec3_origin , 225 , 50 ) ;
2005-07-08 00:37:52 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_spike ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
if ( P_RunParticleEffectType ( pos , NULL , 1 , pt_spike ) )
if ( P_RunParticleEffectType ( pos , NULL , 10 , pt_gunshot ) )
P_RunParticleEffect ( pos , vec3_origin , 0 , 10 ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_superspike ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
if ( P_RunParticleEffectType ( pos , NULL , 1 , pt_superspike ) )
if ( P_RunParticleEffectType ( pos , NULL , 2 , pt_spike ) )
if ( P_RunParticleEffectType ( pos , NULL , 20 , pt_gunshot ) )
P_RunParticleEffect ( pos , vec3_origin , 0 , 20 ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_explosion ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
2005-08-26 21:59:36 +00:00
// light
if ( r_explosionlight . value ) {
dlight_t * dl ;
dl = CL_AllocDlight ( 0 ) ;
VectorCopy ( pos , dl - > origin ) ;
2006-04-21 05:23:51 +00:00
dl - > radius = 150 + r_explosionlight . value * 200 ;
2005-08-26 21:59:36 +00:00
dl - > die = cl . time + 1 ;
dl - > decay = 300 ;
2005-11-21 21:47:53 +00:00
2005-08-26 21:59:36 +00:00
dl - > color [ 0 ] = 0.2 ;
dl - > color [ 1 ] = 0.155 ;
dl - > color [ 2 ] = 0.05 ;
dl - > channelfade [ 0 ] = 0.196 ;
dl - > channelfade [ 1 ] = 0.23 ;
dl - > channelfade [ 2 ] = 0.12 ;
}
2005-10-08 22:35:20 +00:00
if ( P_RunParticleEffectType ( pos , NULL , 1 , pt_explosion ) )
P_RunParticleEffect ( pos , NULL , 107 , 1024 ) ; // should be 97-111
2013-07-14 12:22:51 +00:00
Surf_AddStain ( pos , - 1 , - 1 , - 1 , 100 ) ;
2005-08-26 21:59:36 +00:00
2016-07-12 00:40:13 +00:00
S_StartSound ( 0 , 0 , cl_sfx_r_exp3 , pos , NULL , 1 , 1 , 0 , 0 , 0 ) ;
2005-07-08 00:37:52 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_tarexplosion ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
2008-11-09 22:29:28 +00:00
P_RunParticleEffectType ( pos , NULL , 1 , pt_tarexplosion ) ;
2005-08-26 21:59:36 +00:00
2016-07-12 00:40:13 +00:00
S_StartSound ( 0 , 0 , cl_sfx_r_exp3 , pos , NULL , 1 , 1 , 0 , 0 , 0 ) ;
2005-07-08 00:37:52 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_wizspike ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
if ( P_RunParticleEffectType ( pos , NULL , 1 , pt_wizspike ) )
P_RunParticleEffect ( pos , vec3_origin , 20 , 30 ) ;
2005-08-26 21:59:36 +00:00
2016-07-12 00:40:13 +00:00
S_StartSound ( 0 , 0 , cl_sfx_knighthit , pos , NULL , 1 , 1 , 0 , 0 , 0 ) ;
2005-07-08 00:37:52 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_knightspike ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
if ( P_RunParticleEffectType ( pos , NULL , 1 , pt_knightspike ) )
P_RunParticleEffect ( pos , vec3_origin , 226 , 20 ) ;
2005-08-26 21:59:36 +00:00
2016-07-12 00:40:13 +00:00
S_StartSound ( 0 , 0 , cl_sfx_knighthit , pos , NULL , 1 , 1 , 0 , 0 , 0 ) ;
2005-07-08 00:37:52 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_lavasplash ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
2008-11-09 22:29:28 +00:00
P_RunParticleEffectType ( pos , NULL , 1 , pt_lavasplash ) ;
2005-07-08 00:37:52 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_teleport ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
P_RunParticleEffectType ( pos , NULL , 1 , pt_teleportsplash ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_gunshotquad ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
if ( P_RunParticleEffectTypeString ( pos , vec3_origin , 1 , " te_gunshotquad " ) )
2005-08-06 22:39:28 +00:00
if ( P_RunParticleEffectType ( pos , NULL , 1 , pt_gunshot ) )
P_RunParticleEffect ( pos , vec3_origin , 0 , 20 ) ;
2005-07-08 00:37:52 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_spikequad ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
if ( P_RunParticleEffectTypeString ( pos , vec3_origin , 1 , " te_spikequad " ) )
2005-08-06 22:39:28 +00:00
if ( P_RunParticleEffectType ( pos , NULL , 1 , pt_spike ) )
if ( P_RunParticleEffectType ( pos , NULL , 10 , pt_gunshot ) )
P_RunParticleEffect ( pos , vec3_origin , 0 , 10 ) ;
2005-07-08 00:37:52 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_superspikequad ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
if ( P_RunParticleEffectTypeString ( pos , vec3_origin , 1 , " te_superspikequad " ) )
2005-08-06 22:39:28 +00:00
if ( P_RunParticleEffectType ( pos , NULL , 1 , pt_superspike ) )
if ( P_RunParticleEffectType ( pos , NULL , 2 , pt_spike ) )
if ( P_RunParticleEffectType ( pos , NULL , 20 , pt_gunshot ) )
P_RunParticleEffect ( pos , vec3_origin , 0 , 20 ) ;
2005-07-08 00:37:52 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_explosionquad ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-08 00:37:52 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
if ( P_RunParticleEffectTypeString ( pos , vec3_origin , 1 , " te_explosionquad " ) )
2005-10-08 22:35:20 +00:00
if ( P_RunParticleEffectType ( pos , NULL , 1 , pt_explosion ) )
P_RunParticleEffect ( pos , NULL , 107 , 1024 ) ; // should be 97-111
2013-07-14 12:22:51 +00:00
Surf_AddStain ( pos , - 1 , - 1 , - 1 , 100 ) ;
2005-08-26 21:59:36 +00:00
// light
if ( r_explosionlight . value ) {
dlight_t * dl ;
dl = CL_AllocDlight ( 0 ) ;
VectorCopy ( pos , dl - > origin ) ;
2006-04-21 05:23:51 +00:00
dl - > radius = 150 + r_explosionlight . value * 200 ;
2005-08-26 21:59:36 +00:00
dl - > die = cl . time + 1 ;
dl - > decay = 300 ;
2005-11-21 21:47:53 +00:00
2005-08-26 21:59:36 +00:00
dl - > color [ 0 ] = 0.2 ;
dl - > color [ 1 ] = 0.155 ;
dl - > color [ 2 ] = 0.05 ;
dl - > channelfade [ 0 ] = 0.196 ;
dl - > channelfade [ 1 ] = 0.23 ;
dl - > channelfade [ 2 ] = 0.12 ;
}
2016-07-12 00:40:13 +00:00
S_StartSound ( 0 , 0 , cl_sfx_r_exp3 , pos , NULL , 1 , 1 , 0 , 0 , 0 ) ;
2005-07-08 00:37:52 +00:00
}
2005-07-14 01:57:34 +00:00
//void(vector org, float radius, float lifetime, vector color) te_customflash
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_customflash ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
float * org = G_VECTOR ( OFS_PARM0 ) ;
float radius = G_FLOAT ( OFS_PARM1 ) ;
float lifetime = G_FLOAT ( OFS_PARM2 ) ;
float * colour = G_VECTOR ( OFS_PARM3 ) ;
dlight_t * dl ;
// light
dl = CL_AllocDlight ( 0 ) ;
VectorCopy ( org , dl - > origin ) ;
dl - > radius = radius ;
dl - > die = cl . time + lifetime ;
dl - > decay = dl - > radius / lifetime ;
dl - > color [ 0 ] = colour [ 0 ] * 0.5f ;
dl - > color [ 1 ] = colour [ 1 ] * 0.5f ;
dl - > color [ 2 ] = colour [ 2 ] * 0.5f ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_bloodshower ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
2015-08-20 03:17:47 +00:00
float * minb = G_VECTOR ( OFS_PARM0 ) ;
float * maxb = G_VECTOR ( OFS_PARM1 ) ;
vec3_t vel = { 0 , 0 , - G_FLOAT ( OFS_PARM2 ) } ;
float howmany = G_FLOAT ( OFS_PARM3 ) ;
P_RunParticleCube ( P_FindParticleType ( " te_bloodshower " ) , minb , maxb , vel , vel , howmany , 0 , false , 0 ) ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_particlecube ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
float * minb = G_VECTOR ( OFS_PARM0 ) ;
float * maxb = G_VECTOR ( OFS_PARM1 ) ;
float * vel = G_VECTOR ( OFS_PARM2 ) ;
float howmany = G_FLOAT ( OFS_PARM3 ) ;
float color = G_FLOAT ( OFS_PARM4 ) ;
float gravity = G_FLOAT ( OFS_PARM5 ) ;
float jitter = G_FLOAT ( OFS_PARM6 ) ;
2013-12-29 22:48:28 +00:00
P_RunParticleCube ( P_INVALID , minb , maxb , vel , vel , howmany , color , gravity , jitter ) ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_spark ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
2015-08-20 03:17:47 +00:00
float * pos = G_VECTOR ( OFS_PARM0 ) ;
float * pos2 = G_VECTOR ( OFS_PARM1 ) ;
float cnt = G_FLOAT ( OFS_PARM2 ) ;
P_RunParticleEffectType ( pos , pos2 , cnt , ptdp_spark ) ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_smallflash ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
2015-08-20 03:17:47 +00:00
float * pos = G_VECTOR ( OFS_PARM0 ) ;
dlight_t * dl = CL_AllocDlight ( 0 ) ;
VectorCopy ( pos , dl - > origin ) ;
dl - > radius = 200 ;
dl - > decay = 1000 ;
dl - > die = cl . time + 0.2 ;
dl - > color [ 0 ] = 2.0 ;
dl - > color [ 1 ] = 2.0 ;
dl - > color [ 2 ] = 2.0 ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_explosion2 ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
2015-08-20 03:17:47 +00:00
float * pos = G_VECTOR ( OFS_PARM0 ) ;
int colorStart = G_FLOAT ( OFS_PARM1 ) ;
int colorLength = G_FLOAT ( OFS_PARM2 ) ;
int ef = P_FindParticleType ( va ( " TE_EXPLOSION2_%i_%i " , colorStart , colorLength ) ) ;
if ( ef = = P_INVALID )
ef = pt_explosion ;
P_RunParticleEffectType ( pos , NULL , 1 , ef ) ;
if ( r_explosionlight . value )
{
dlight_t * dl = CL_AllocDlight ( 0 ) ;
VectorCopy ( pos , dl - > origin ) ;
dl - > radius = 350 ;
dl - > die = cl . time + 0.5 ;
dl - > decay = 300 ;
}
2016-07-12 00:40:13 +00:00
S_StartSound ( 0 , 0 , cl_sfx_r_exp3 , pos , NULL , 1 , 1 , 0 , 0 , 0 ) ;
2005-08-03 23:14:59 +00:00
}
2016-08-25 00:12:14 +00:00
static void QCBUILTIN PF_cl_te_flamejet ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
vec3_t pos , vel ;
int count ;
// origin
pos [ 0 ] = MSG_ReadCoord ( ) ;
pos [ 1 ] = MSG_ReadCoord ( ) ;
pos [ 2 ] = MSG_ReadCoord ( ) ;
// velocity
vel [ 0 ] = MSG_ReadCoord ( ) ;
vel [ 1 ] = MSG_ReadCoord ( ) ;
vel [ 2 ] = MSG_ReadCoord ( ) ;
// count
count = MSG_ReadByte ( ) ;
if ( P_RunParticleEffectType ( pos , vel , count , P_FindParticleType ( " TE_FLAMEJET " ) ) )
P_RunParticleEffect ( pos , vel , 232 , count ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_lightning1 ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
csqcedict_t * ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
float * start = G_VECTOR ( OFS_PARM1 ) ;
2009-06-11 21:09:39 +00:00
float * end = G_VECTOR ( OFS_PARM2 ) ;
2005-08-03 23:14:59 +00:00
2019-06-12 01:47:03 +00:00
CL_AddBeam ( BT_Q1LIGHTNING1 , ent - > entnum + ( ent - > entnum ? MAX_EDICTS : 0 ) , start , end ) ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_lightning2 ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
csqcedict_t * ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
float * start = G_VECTOR ( OFS_PARM1 ) ;
2009-06-11 21:09:39 +00:00
float * end = G_VECTOR ( OFS_PARM2 ) ;
2005-08-03 23:14:59 +00:00
2019-06-12 01:47:03 +00:00
CL_AddBeam ( BT_Q1LIGHTNING2 , ent - > entnum + ( ent - > entnum ? MAX_EDICTS : 0 ) , start , end ) ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_lightning3 ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
csqcedict_t * ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
float * start = G_VECTOR ( OFS_PARM1 ) ;
2009-06-11 21:09:39 +00:00
float * end = G_VECTOR ( OFS_PARM2 ) ;
2005-08-03 23:14:59 +00:00
2019-06-12 01:47:03 +00:00
CL_AddBeam ( BT_Q1LIGHTNING3 , ent - > entnum + ( ent - > entnum ? MAX_EDICTS : 0 ) , start , end ) ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_beam ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
csqcedict_t * ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
float * start = G_VECTOR ( OFS_PARM1 ) ;
2009-06-11 21:09:39 +00:00
float * end = G_VECTOR ( OFS_PARM2 ) ;
2005-08-03 23:14:59 +00:00
2019-06-12 01:47:03 +00:00
CL_AddBeam ( BT_Q1BEAM , ent - > entnum + ( ent - > entnum ? MAX_EDICTS : 0 ) , start , end ) ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_plasmaburn ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
2015-08-20 03:17:47 +00:00
float * pos = G_VECTOR ( OFS_PARM0 ) ;
if ( P_RunParticleEffectType ( pos , NULL , 1 , P_FindParticleType ( " te_plasmaburn " ) ) )
P_RunParticleEffect ( pos , vec3_origin , 15 , 50 ) ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_explosionrgb ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
float * org = G_VECTOR ( OFS_PARM0 ) ;
float * colour = G_VECTOR ( OFS_PARM1 ) ;
2005-11-21 21:47:53 +00:00
2005-08-03 23:14:59 +00:00
dlight_t * dl ;
2005-10-08 22:35:20 +00:00
if ( P_RunParticleEffectType ( org , NULL , 1 , pt_explosion ) )
P_RunParticleEffect ( org , NULL , 107 , 1024 ) ; // should be 97-111
2013-07-14 12:22:51 +00:00
Surf_AddStain ( org , - 1 , - 1 , - 1 , 100 ) ;
2005-11-21 21:47:53 +00:00
2005-08-03 23:14:59 +00:00
// light
if ( r_explosionlight . value )
{
dl = CL_AllocDlight ( 0 ) ;
VectorCopy ( org , dl - > origin ) ;
2006-04-21 05:23:51 +00:00
dl - > radius = 150 + r_explosionlight . value * 200 ;
2005-08-03 23:14:59 +00:00
dl - > die = cl . time + 0.5 ;
dl - > decay = 300 ;
2005-11-21 21:47:53 +00:00
2005-08-03 23:14:59 +00:00
dl - > color [ 0 ] = 0.4f * colour [ 0 ] ;
dl - > color [ 1 ] = 0.4f * colour [ 1 ] ;
dl - > color [ 2 ] = 0.4f * colour [ 2 ] ;
dl - > channelfade [ 0 ] = 0 ;
dl - > channelfade [ 1 ] = 0 ;
dl - > channelfade [ 2 ] = 0 ;
}
2016-07-12 00:40:13 +00:00
S_StartSound ( 0 , 0 , cl_sfx_r_exp3 , org , NULL , 1 , 1 , 0 , 0 , 0 ) ;
2005-08-03 23:14:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_particlerain ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
float * min = G_VECTOR ( OFS_PARM0 ) ;
float * max = G_VECTOR ( OFS_PARM1 ) ;
float * vel = G_VECTOR ( OFS_PARM2 ) ;
float howmany = G_FLOAT ( OFS_PARM3 ) ;
float colour = G_FLOAT ( OFS_PARM4 ) ;
P_RunParticleWeather ( min , max , vel , howmany , colour , " rain " ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_te_particlesnow ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
float * min = G_VECTOR ( OFS_PARM0 ) ;
float * max = G_VECTOR ( OFS_PARM1 ) ;
float * vel = G_VECTOR ( OFS_PARM2 ) ;
float howmany = G_FLOAT ( OFS_PARM3 ) ;
float colour = G_FLOAT ( OFS_PARM4 ) ;
P_RunParticleWeather ( min , max , vel , howmany , colour , " snow " ) ;
}
2005-07-14 01:57:34 +00:00
void CSQC_RunThreads ( void )
{
csqctreadstate_t * state = csqcthreads , * next ;
csqcthreads = NULL ;
while ( state )
{
next = state - > next ;
2011-12-05 15:23:40 +00:00
if ( state - > resumetime > cl . servertime )
2005-07-28 15:52:31 +00:00
{ //not time yet, reform original list.
2005-07-14 01:57:34 +00:00
state - > next = csqcthreads ;
csqcthreads = state ;
}
else
{ //call it and forget it ever happened. The Sleep biltin will recreate if needed.
2005-11-21 21:47:53 +00:00
2005-07-14 01:57:34 +00:00
2018-04-06 17:21:15 +00:00
* csqcg . self = EDICT_TO_PROG ( csqcprogs , EDICT_NUM_UB ( csqcprogs , state - > self ) ) ;
* csqcg . other = EDICT_TO_PROG ( csqcprogs , EDICT_NUM_UB ( csqcprogs , state - > other ) ) ;
2005-07-14 01:57:34 +00:00
csqcprogs - > RunThread ( csqcprogs , state - > thread ) ;
csqcprogs - > parms - > memfree ( state - > thread ) ;
csqcprogs - > parms - > memfree ( state ) ;
}
state = next ;
}
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_addprogs ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
2014-03-30 08:55:06 +00:00
const char * s = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2011-05-20 04:10:46 +00:00
int newp ;
2005-07-14 01:57:34 +00:00
if ( ! s | | ! * s )
2011-05-20 04:10:46 +00:00
newp = - 1 ;
2005-07-14 01:57:34 +00:00
else
2011-05-20 04:10:46 +00:00
{
2015-02-02 08:01:53 +00:00
newp = PR_LoadProgs ( prinst , s ) ;
2011-05-20 04:10:46 +00:00
if ( newp > = 0 )
2013-11-21 23:02:28 +00:00
PR_ProgsAdded ( csqcprogs , newp , s ) ;
2011-05-20 04:10:46 +00:00
}
G_FLOAT ( OFS_RETURN ) = newp ;
2005-07-14 01:57:34 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_OpenPortal ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
2021-11-03 20:30:40 +00:00
int state = G_FLOAT ( OFS_PARM1 ) ! = 0 ;
wedict_t * ent = G_WEDICT ( prinst , OFS_PARM0 ) ;
int portal = ent - > xv - > style ;
int area1 = ent - > pvsinfo . areanum , area2 = ent - > pvsinfo . areanum2 ;
if ( csqc_world . worldmodel - > funcs . SetAreaPortalState )
csqc_world . worldmodel - > funcs . SetAreaPortalState ( csqc_world . worldmodel , portal , area1 , area2 , state ) ;
2005-07-14 01:57:34 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_droptofloor ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
csqcedict_t * ent ;
vec3_t end ;
vec3_t start ;
trace_t trace ;
ent = ( csqcedict_t * ) PROG_TO_EDICT ( prinst , * csqcg . self ) ;
VectorCopy ( ent - > v - > origin , end ) ;
end [ 2 ] - = 512 ;
VectorCopy ( ent - > v - > origin , start ) ;
2009-11-07 13:29:15 +00:00
trace = World_Move ( & csqc_world , start , ent - > v - > mins , ent - > v - > maxs , end , MOVE_NORMAL , ( wedict_t * ) ent ) ;
2005-07-14 01:57:34 +00:00
if ( trace . fraction = = 1 | | trace . allsolid )
G_FLOAT ( OFS_RETURN ) = 0 ;
else
{
VectorCopy ( trace . endpos , ent - > v - > origin ) ;
2009-11-07 13:29:15 +00:00
World_LinkEdict ( & csqc_world , ( wedict_t * ) ent , false ) ;
2005-07-14 01:57:34 +00:00
ent - > v - > flags = ( int ) ent - > v - > flags | FL_ONGROUND ;
ent - > v - > groundentity = EDICT_TO_PROG ( prinst , trace . ent ) ;
G_FLOAT ( OFS_RETURN ) = 1 ;
}
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cl_getlight ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
vec3_t ambient , diffuse , dir ;
2021-07-06 16:32:59 +00:00
2021-08-04 21:18:11 +00:00
if ( csqc_world . worldmodel - > lightmaps . maxstyle > = cl_max_lightstyles | | ! csqc_world . worldmodel | | csqc_world . worldmodel - > loadstate ! = MLS_LOADED | | ! csqc_world . worldmodel - > funcs . LightPointValues )
2016-07-12 00:40:13 +00:00
VectorSet ( G_VECTOR ( OFS_RETURN ) , 0 , 0 , 0 ) ;
else
{
2020-08-13 08:39:48 +00:00
csqc_world . worldmodel - > funcs . LightPointValues ( csqc_world . worldmodel , G_VECTOR ( OFS_PARM0 ) , ambient , diffuse , dir ) ;
2016-07-12 00:40:13 +00:00
VectorMA ( ambient , 0.5 , diffuse , G_VECTOR ( OFS_RETURN ) ) ;
}
2005-07-14 01:57:34 +00:00
}
2005-10-01 03:01:12 +00:00
/*
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_Stub ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-14 01:57:34 +00:00
{
Con_Printf ( " Obsolete csqc builtin (%i) executed \n " , prinst - > lastcalledbuiltinnumber ) ;
}
2005-10-01 03:01:12 +00:00
*/
2005-07-01 19:23:00 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_rotatevectorsbytag ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-03 23:14:59 +00:00
{
csqcedict_t * ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
int tagnum = G_FLOAT ( OFS_PARM1 ) ;
float * srcorg = ent - > v - > origin ;
int modelindex = ent - > v - > modelindex ;
float * retorg = G_VECTOR ( OFS_RETURN ) ;
model_t * mod = CSQC_GetModelForIndex ( modelindex ) ;
float transforms [ 12 ] ;
float src [ 12 ] ;
float dest [ 12 ] ;
int i ;
2008-12-23 02:55:20 +00:00
framestate_t fstate ;
2005-08-03 23:14:59 +00:00
2009-11-04 21:16:50 +00:00
cs_getframestate ( ent , ent - > xv - > renderflags , & fstate ) ;
2005-11-21 21:47:53 +00:00
2008-12-23 02:55:20 +00:00
if ( Mod_GetTag ( mod , tagnum , & fstate , transforms ) )
2007-08-06 21:13:15 +00:00
{
2020-09-08 05:11:09 +00:00
VectorCopy ( csqcg . v_forward , src + 0 ) ;
2007-08-06 21:13:15 +00:00
src [ 3 ] = 0 ;
2020-09-08 05:11:09 +00:00
VectorNegate ( csqcg . v_right , src + 4 ) ;
2007-08-06 21:13:15 +00:00
src [ 7 ] = 0 ;
2020-09-08 05:11:09 +00:00
VectorCopy ( csqcg . v_up , src + 8 ) ;
2007-08-06 21:13:15 +00:00
src [ 11 ] = 0 ;
2009-11-04 21:16:50 +00:00
if ( ent - > xv - > scale )
2005-08-03 23:14:59 +00:00
{
2007-08-06 21:13:15 +00:00
for ( i = 0 ; i < 12 ; i + = 4 )
2005-10-01 03:01:12 +00:00
{
2009-11-04 21:16:50 +00:00
transforms [ i + 0 ] * = ent - > xv - > scale ;
transforms [ i + 1 ] * = ent - > xv - > scale ;
transforms [ i + 2 ] * = ent - > xv - > scale ;
transforms [ i + 3 ] * = ent - > xv - > scale ;
2005-10-01 03:01:12 +00:00
}
2007-08-06 21:13:15 +00:00
}
2005-10-01 03:01:12 +00:00
2007-08-06 21:13:15 +00:00
R_ConcatRotationsPad ( ( void * ) transforms , ( void * ) src , ( void * ) dest ) ;
2005-08-03 23:14:59 +00:00
2020-09-08 05:11:09 +00:00
VectorCopy ( dest + 0 , csqcg . v_forward ) ;
VectorNegate ( dest + 4 , csqcg . v_right ) ;
VectorCopy ( dest + 8 , csqcg . v_up ) ;
2005-08-03 23:14:59 +00:00
2007-08-06 21:13:15 +00:00
VectorCopy ( srcorg , retorg ) ;
for ( i = 0 ; i < 3 ; i + + )
{
retorg [ 0 ] + = transforms [ i * 4 + 3 ] * src [ 4 * i + 0 ] ;
retorg [ 1 ] + = transforms [ i * 4 + 3 ] * src [ 4 * i + 1 ] ;
retorg [ 2 ] + = transforms [ i * 4 + 3 ] * src [ 4 * i + 2 ] ;
2005-08-03 23:14:59 +00:00
}
2007-08-06 21:13:15 +00:00
return ;
}
2005-08-03 23:14:59 +00:00
VectorCopy ( srcorg , retorg ) ;
}
2008-11-09 22:29:28 +00:00
2008-12-23 02:55:20 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_break ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-07 18:08:13 +00:00
{
2015-02-02 08:01:53 +00:00
PR_RunWarning ( prinst , " break statement \n " ) ;
2005-08-07 18:08:13 +00:00
}
2013-05-11 05:03:07 +00:00
//fixme merge with ssqc
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_walkmove ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-07 18:08:13 +00:00
{
2014-06-21 17:58:17 +00:00
wedict_t * ent ;
2005-08-11 04:14:33 +00:00
float yaw , dist ;
vec3_t move ;
// dfunction_t *oldf;
int oldself ;
qboolean settrace ;
2014-06-21 17:58:17 +00:00
vec3_t axis [ 3 ] ;
float s ;
2005-08-11 04:14:33 +00:00
2014-06-21 17:58:17 +00:00
ent = PROG_TO_WEDICT ( prinst , * csqcg . self ) ;
2005-08-11 04:14:33 +00:00
yaw = G_FLOAT ( OFS_PARM0 ) ;
dist = G_FLOAT ( OFS_PARM1 ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( prinst - > callargc > = 3 & & G_FLOAT ( OFS_PARM2 ) )
2005-08-11 04:14:33 +00:00
settrace = true ;
else
settrace = false ;
if ( ! ( ( int ) ent - > v - > flags & ( FL_ONGROUND | FL_FLY | FL_SWIM ) ) )
{
G_FLOAT ( OFS_RETURN ) = 0 ;
return ;
}
2014-06-21 17:58:17 +00:00
World_GetEntGravityAxis ( ent , axis ) ;
2005-08-11 04:14:33 +00:00
yaw = yaw * M_PI * 2 / 360 ;
2014-06-21 17:58:17 +00:00
s = cos ( yaw ) * dist ;
VectorScale ( axis [ 0 ] , s , move ) ;
s = sin ( yaw ) * dist ;
VectorMA ( move , s , axis [ 1 ] , move ) ;
2005-08-11 04:14:33 +00:00
// save program state, because CS_movestep may call other progs
oldself = * csqcg . self ;
2018-09-23 19:35:24 +00:00
G_FLOAT ( OFS_RETURN ) = World_movestep ( & csqc_world , ( wedict_t * ) ent , move , axis , true , false , settrace ? cs_settracevars : NULL ) ;
2005-08-11 04:14:33 +00:00
// restore program state
* csqcg . self = oldself ;
}
2013-05-11 05:03:07 +00:00
//fixme merge with ssqc
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_movetogoal ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-17 00:15:44 +00:00
{
wedict_t * ent ;
float dist ;
ent = ( wedict_t * ) PROG_TO_EDICT ( prinst , * csqcg . self ) ;
dist = G_FLOAT ( OFS_PARM0 ) ;
World_MoveToGoal ( & csqc_world , ent , dist ) ;
}
2005-08-11 04:14:33 +00:00
static void CS_ConsoleCommand_f ( void )
2013-08-27 13:18:09 +00:00
{
2005-08-11 04:14:33 +00:00
char cmd [ 2048 ] ;
2017-11-16 22:20:40 +00:00
int seat = CL_TargettedSplit ( false ) ;
2008-11-09 22:29:28 +00:00
Q_snprintfz ( cmd , sizeof ( cmd ) , " %s %s " , Cmd_Argv ( 0 ) , Cmd_Args ( ) ) ;
2017-11-16 22:20:40 +00:00
CSQC_ConsoleCommand ( seat , cmd ) ;
2005-08-11 04:14:33 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_registercommand ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-11 04:14:33 +00:00
{
2023-01-09 05:12:04 +00:00
const char * str = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
const char * desc = ( prinst - > callargc > 1 ) ? PR_GetStringOfs ( prinst , OFS_PARM1 ) : NULL ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( desc & & ! * desc )
desc = NULL ;
2013-08-27 13:18:09 +00:00
if ( ! Cmd_Exists ( str ) )
2023-01-09 05:12:04 +00:00
Cmd_AddCommandD ( str , CS_ConsoleCommand_f , desc ) ;
2005-08-11 04:14:33 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_cs_setlistener ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-08-11 04:14:33 +00:00
{
float * origin = G_VECTOR ( OFS_PARM0 ) ;
float * forward = G_VECTOR ( OFS_PARM1 ) ;
float * right = G_VECTOR ( OFS_PARM2 ) ;
float * up = G_VECTOR ( OFS_PARM3 ) ;
2016-07-12 00:40:13 +00:00
size_t reverbtype = ( prinst - > callargc > 4 ) ? G_FLOAT ( OFS_PARM4 ) : 0 ;
float * velocity = ( prinst - > callargc > 5 ) ? G_VECTOR ( OFS_PARM5 ) : NULL ;
2013-10-29 17:38:22 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
int i = ( csqc_playerseat > = 0 ) ? csqc_playerseat : 0 ;
cl . playerview [ i ] . audio . defaulted = false ;
2016-07-12 00:40:13 +00:00
cl . playerview [ i ] . audio . entnum = csqcg . player_localentnum ? * csqcg . player_localentnum : cl . playerview [ i ] . viewentity ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
VectorCopy ( origin , cl . playerview [ i ] . audio . origin ) ;
VectorCopy ( forward , cl . playerview [ i ] . audio . forward ) ;
VectorCopy ( right , cl . playerview [ i ] . audio . right ) ;
VectorCopy ( up , cl . playerview [ i ] . audio . up ) ;
2016-07-12 00:40:13 +00:00
cl . playerview [ i ] . audio . reverbtype = reverbtype ;
if ( velocity )
VectorCopy ( velocity , cl . playerview [ i ] . audio . velocity ) ;
else
VectorClear ( cl . playerview [ i ] . audio . velocity ) ;
}
static void QCBUILTIN PF_cs_setupreverb ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int reverbslot = G_FLOAT ( OFS_PARM0 ) ;
int qcptr = G_INT ( OFS_PARM1 ) ;
int size = G_INT ( OFS_PARM2 ) ;
struct reverbproperties_s * ptr ;
//validates the pointer.
if ( qcptr < 0 | | qcptr + size > = prinst - > stringtablesize )
{
PR_BIError ( prinst , " PF_cs_setupreverb: invalid reverb pointer \n " ) ;
return ;
}
ptr = ( struct reverbproperties_s * ) ( prinst - > stringtable + qcptr ) ;
//let the sound system do its thing.
S_UpdateReverb ( reverbslot , ptr , size ) ;
2005-08-07 18:08:13 +00:00
}
2005-08-03 23:14:59 +00:00
2008-05-25 22:23:43 +00:00
# define RSES_NOLERP 1
2008-11-09 22:29:28 +00:00
# define RSES_NOROTATE 2
# define RSES_NOTRAILS 4
# define RSES_NOLIGHTS 8
2009-07-19 01:55:21 +00:00
static void CSQC_LerpStateToCSQC ( lerpents_t * le , csqcedict_t * ent , qboolean nolerp )
{
2016-07-12 00:40:13 +00:00
ent - > v - > frame = le - > newframe [ FS_REG ] ;
ent - > xv - > frame1time = max ( 0 , cl . servertime - le - > newframestarttime [ FS_REG ] ) ;
ent - > xv - > frame2 = le - > oldframe [ FS_REG ] ;
ent - > xv - > frame2time = max ( 0 , cl . servertime - le - > oldframestarttime [ FS_REG ] ) ;
ent - > xv - > lerpfrac = bound ( 0 , 1 - ( ent - > xv - > frame1time ) / le - > framelerpdeltatime [ FS_REG ] , 1 ) ;
2009-07-19 01:55:21 +00:00
2016-07-12 00:40:13 +00:00
ent - > xv - > baseframe = le - > newframe [ FST_BASE ] ;
ent - > xv - > baseframe1time = max ( 0 , cl . servertime - le - > newframestarttime [ FST_BASE ] ) ;
ent - > xv - > baseframe2 = le - > oldframe [ FST_BASE ] ;
ent - > xv - > baseframe2time = max ( 0 , cl . servertime - le - > oldframestarttime [ FST_BASE ] ) ;
ent - > xv - > baselerpfrac = bound ( 0 , 1 - ( ent - > xv - > baseframe1time ) / le - > framelerpdeltatime [ FST_BASE ] , 1 ) ;
2017-01-13 00:39:50 +00:00
ent - > xv - > basebone = le - > basebone ;
2009-07-19 01:55:21 +00:00
2012-05-09 15:30:53 +00:00
if ( nolerp )
2009-07-19 01:55:21 +00:00
{
ent - > v - > origin [ 0 ] = le - > neworigin [ 0 ] ;
ent - > v - > origin [ 1 ] = le - > neworigin [ 1 ] ;
ent - > v - > origin [ 2 ] = le - > neworigin [ 2 ] ;
ent - > v - > angles [ 0 ] = le - > newangle [ 0 ] ;
ent - > v - > angles [ 1 ] = le - > newangle [ 1 ] ;
ent - > v - > angles [ 2 ] = le - > newangle [ 2 ] ;
}
2012-05-09 15:30:53 +00:00
else
2009-07-19 01:55:21 +00:00
{
ent - > v - > origin [ 0 ] = le - > origin [ 0 ] ;
ent - > v - > origin [ 1 ] = le - > origin [ 1 ] ;
ent - > v - > origin [ 2 ] = le - > origin [ 2 ] ;
ent - > v - > angles [ 0 ] = le - > angles [ 0 ] ;
ent - > v - > angles [ 1 ] = le - > angles [ 1 ] ;
ent - > v - > angles [ 2 ] = le - > angles [ 2 ] ;
}
}
2009-04-01 22:03:56 +00:00
void CSQC_EntStateToCSQC ( unsigned int flags , float lerptime , entity_state_t * src , csqcedict_t * ent )
{
model_t * model ;
lerpents_t * le ;
le = & cl . lerpents [ src - > number ] ;
2009-07-19 01:55:21 +00:00
CSQC_LerpStateToCSQC ( le , ent , flags & RSES_NOLERP ) ;
2009-04-01 22:03:56 +00:00
model = cl . model_precache [ src - > modelindex ] ;
if ( ! ( flags & RSES_NOTRAILS ) )
{
//use entnum as a test to see if its new (if the old origin isn't usable)
2011-06-18 12:25:36 +00:00
if ( ent - > xv - > entnum )
2009-04-01 22:03:56 +00:00
{
2019-01-29 07:18:07 +00:00
if ( model - > particletrail = = P_INVALID | | pe - > ParticleTrail ( ent - > v - > origin , src - > origin , model - > particletrail , host_frametime , src - > number , NULL , & ( le - > trailstate ) ) )
2011-06-18 12:25:36 +00:00
if ( model - > traildefaultindex > = 0 )
2019-01-29 07:18:07 +00:00
pe - > ParticleTrailIndex ( ent - > v - > origin , src - > origin , P_INVALID , host_frametime , model - > traildefaultindex , 0 , & ( le - > trailstate ) ) ;
2009-04-01 22:03:56 +00:00
}
}
2009-11-04 21:16:50 +00:00
ent - > xv - > entnum = src - > number ;
2009-04-01 22:03:56 +00:00
ent - > v - > modelindex = src - > modelindex ;
2015-11-18 07:37:39 +00:00
// ent->xv->vw_index = src->modelindex2;
2012-02-12 05:18:31 +00:00
// ent->v->flags = src->flags;
ent - > v - > effects = src - > effects ;
2009-04-01 22:03:56 +00:00
//we ignore the q2 state fields
ent - > v - > colormap = src - > colormap ;
ent - > v - > skin = src - > skinnum ;
2009-11-04 21:16:50 +00:00
ent - > xv - > scale = src - > scale / 16.0f ;
ent - > xv - > fatness = src - > fatness / 16.0f ;
2017-02-19 00:15:42 +00:00
# ifdef HEXEN2
ent - > xv - > drawflags = src - > hexen2flags ;
ent - > xv - > abslight = src - > abslight ;
# endif
2012-02-12 05:18:31 +00:00
// ent->xv->abslight = src->abslight;
2009-04-01 22:03:56 +00:00
// ent->v->dpflags = src->dpflags;
2012-02-12 05:18:31 +00:00
ent - > xv - > colormod [ 0 ] = src - > colormod [ 0 ] * ( 8 / 256.0f ) ;
ent - > xv - > colormod [ 1 ] = src - > colormod [ 1 ] * ( 8 / 256.0f ) ;
ent - > xv - > colormod [ 2 ] = src - > colormod [ 2 ] * ( 8 / 256.0f ) ;
2015-06-04 06:15:14 +00:00
ent - > xv - > glowmod [ 0 ] = src - > glowmod [ 0 ] * ( 8 / 256.0f ) ;
ent - > xv - > glowmod [ 1 ] = src - > glowmod [ 1 ] * ( 8 / 256.0f ) ;
ent - > xv - > glowmod [ 2 ] = src - > glowmod [ 2 ] * ( 8 / 256.0f ) ;
// ent->xv->glow_size = src->glowsize*4;
// ent->xv->glow_color = src->glowcolour;
// ent->xv->glow_trail = !!(state->dpflags & RENDER_GLOWTRAIL);
2016-10-22 07:06:51 +00:00
ent - > xv - > alpha = ( src - > trans = = 255 ) ? 0 : src - > trans / 254.0f ;
2009-04-01 22:03:56 +00:00
// ent->v->solid = src->solid;
2015-06-04 06:15:14 +00:00
// ent->v->color[0] = src->light[0]/255.0;
// ent->v->color[1] = src->light[1]/255.0;
// ent->v->color[2] = src->light[2]/255.0;
2012-02-12 05:18:31 +00:00
// ent->v->light_lev = src->light[3];
2015-06-04 06:15:14 +00:00
// ent->xv->style = src->lightstyle;
// ent->xv->pflags = src->lightpflags;
ent - > xv - > tag_entity = src - > tagentity ;
ent - > xv - > tag_index = src - > tagindex ;
2012-02-12 05:18:31 +00:00
2016-07-12 00:40:13 +00:00
if ( src - > solidsize = = ES_SOLID_BSP )
2012-02-12 05:18:31 +00:00
{
ent - > v - > solid = SOLID_BSP ;
VectorCopy ( model - > mins , ent - > v - > mins ) ;
VectorCopy ( model - > maxs , ent - > v - > maxs ) ;
}
2016-07-12 00:40:13 +00:00
else if ( src - > solidsize )
2012-02-12 05:18:31 +00:00
{
ent - > v - > solid = SOLID_BBOX ;
2016-07-12 00:40:13 +00:00
COM_DecodeSize ( src - > solidsize , ent - > v - > mins , ent - > v - > maxs ) ;
2012-02-12 05:18:31 +00:00
}
else
ent - > v - > solid = SOLID_NOT ;
ent - > v - > movetype = src - > u . q1 . pmovetype ;
2014-05-30 03:57:30 +00:00
ent - > v - > velocity [ 0 ] = src - > u . q1 . velocity [ 0 ] * ( 1 / 8.0 ) ;
ent - > v - > velocity [ 1 ] = src - > u . q1 . velocity [ 1 ] * ( 1 / 8.0 ) ;
ent - > v - > velocity [ 2 ] = src - > u . q1 . velocity [ 2 ] * ( 1 / 8.0 ) ;
2009-04-01 22:03:56 +00:00
if ( model )
{
2011-10-27 15:46:36 +00:00
if ( ! ( flags & RSES_NOROTATE ) & & ( model - > flags & MF_ROTATE ) )
2009-04-01 22:03:56 +00:00
{
ent - > v - > angles [ 0 ] = 0 ;
ent - > v - > angles [ 1 ] = 100 * lerptime ;
ent - > v - > angles [ 2 ] = 0 ;
}
}
}
void CSQC_PlayerStateToCSQC ( int pnum , player_state_t * srcp , csqcedict_t * ent )
{
2009-11-04 21:16:50 +00:00
ent - > xv - > entnum = pnum + 1 ;
2009-04-01 22:03:56 +00:00
2013-10-29 17:38:22 +00:00
ent - > v - > modelindex = srcp - > modelindex ;
2015-11-18 07:37:39 +00:00
// ent->xv->vw_index = srcp->modelindex2;
2009-04-01 22:03:56 +00:00
ent - > v - > skin = srcp - > skinnum ;
2009-07-19 01:55:21 +00:00
CSQC_LerpStateToCSQC ( & cl . lerpplayers [ pnum ] , ent , true ) ;
2016-07-12 00:40:13 +00:00
ent - > xv - > lerpfrac = 1 - ( ent - > xv - > frame1time ) / cl . lerpplayers [ pnum ] . framelerpdeltatime [ FS_REG ] ;
2011-05-20 04:10:46 +00:00
ent - > xv - > lerpfrac = bound ( 0 , ent - > xv - > lerpfrac , 1 ) ;
2009-04-01 22:03:56 +00:00
VectorCopy ( srcp - > origin , ent - > v - > origin ) ;
VectorCopy ( srcp - > viewangles , ent - > v - > angles ) ;
2009-07-19 01:55:21 +00:00
VectorCopy ( srcp - > velocity , ent - > v - > velocity ) ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
ent - > v - > angles [ 0 ] * = r_meshpitch . value * 0.333 ;
2009-04-01 22:03:56 +00:00
ent - > v - > colormap = pnum + 1 ;
2011-05-20 04:10:46 +00:00
ent - > xv - > scale = srcp - > scale ;
2009-04-01 22:03:56 +00:00
//ent->v->fatness = srcp->fatness;
2016-10-22 07:06:51 +00:00
ent - > xv - > alpha = ( srcp - > alpha = = 255 ) ? 0 : ( srcp - > alpha / 254.0f ) ;
2009-04-01 22:03:56 +00:00
2012-02-12 05:18:31 +00:00
// ent->v->colormod[0] = srcp->colormod[0]*(8/256.0f);
// ent->v->colormod[1] = srcp->colormod[1]*(8/256.0f);
// ent->v->colormod[2] = srcp->colormod[2]*(8/256.0f);
2009-04-01 22:03:56 +00:00
// ent->v->effects = srcp->effects;
}
2014-09-17 03:04:08 +00:00
unsigned int deltaflags [ MAX_PRECACHE_MODELS ] ;
func_t deltafunction [ MAX_PRECACHE_MODELS ] ;
2009-04-01 22:03:56 +00:00
typedef struct
{
unsigned int readpos ; //pos
unsigned int numents ; //present
unsigned int maxents ; //buffer size
struct
{
2015-04-21 20:06:27 +00:00
unsigned int n ; //don't rely on the ent->v->entnum, as csqc can corrupt that
2009-04-01 22:03:56 +00:00
csqcedict_t * e ; //the csqc ent
} * e ;
} csqcdelta_pack_t ;
static csqcdelta_pack_t csqcdelta_pack_new ;
static csqcdelta_pack_t csqcdelta_pack_old ;
float csqcdelta_time ;
static csqcedict_t * csqcdelta_playerents [ MAX_CLIENTS ] ;
2015-04-21 20:43:01 +00:00
static void CSQC_EntRemove ( csqcedict_t * ed )
{
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_Ent_Remove )
2015-04-21 20:43:01 +00:00
{
* csqcg . self = EDICT_TO_PROG ( csqcprogs , ed ) ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Ent_Remove ) ;
2015-04-21 20:43:01 +00:00
}
else
{
pe - > DelinkTrailstate ( & ed - > trailstate ) ;
World_UnlinkEdict ( ( wedict_t * ) ed ) ;
ED_Free ( csqcprogs , ( void * ) ed ) ;
}
}
2009-04-01 22:03:56 +00:00
2009-04-06 00:34:32 +00:00
qboolean CSQC_DeltaPlayer ( int playernum , player_state_t * state )
2009-04-01 22:03:56 +00:00
{
func_t func ;
2014-09-17 03:04:08 +00:00
if ( ! state | | state - > modelindex < = 0 | | state - > modelindex > = MAX_PRECACHE_MODELS )
2009-04-01 22:03:56 +00:00
{
if ( csqcdelta_playerents [ playernum ] )
{
2015-04-21 20:06:27 +00:00
CSQC_EntRemove ( csqcdelta_playerents [ playernum ] ) ;
2009-04-01 22:03:56 +00:00
csqcdelta_playerents [ playernum ] = NULL ;
}
return false ;
}
func = deltafunction [ state - > modelindex ] ;
if ( func )
{
void * pr_globals ;
csqcedict_t * ent ;
ent = csqcdelta_playerents [ playernum ] ;
if ( ! ent )
2014-05-30 03:57:30 +00:00
{
2015-09-14 10:36:42 +00:00
ent = ( csqcedict_t * ) ED_Alloc ( csqcprogs , false , 0 ) ;
2014-05-30 03:57:30 +00:00
ent - > xv - > drawmask = MASK_DELTA ;
}
2009-04-01 22:03:56 +00:00
CSQC_PlayerStateToCSQC ( playernum , state , ent ) ;
2011-05-20 04:10:46 +00:00
2009-04-01 22:03:56 +00:00
* csqcg . self = EDICT_TO_PROG ( csqcprogs , ( void * ) ent ) ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = ! csqcdelta_playerents [ playernum ] ;
PR_ExecuteProgram ( csqcprogs , func ) ;
csqcdelta_playerents [ playernum ] = ent ;
2015-06-12 14:44:50 +00:00
return G_FLOAT ( OFS_RETURN ) ;
2009-04-01 22:03:56 +00:00
}
else if ( csqcdelta_playerents [ playernum ] )
{
2015-04-21 20:06:27 +00:00
CSQC_EntRemove ( csqcdelta_playerents [ playernum ] ) ;
2009-04-01 22:03:56 +00:00
csqcdelta_playerents [ playernum ] = NULL ;
}
return false ;
}
2009-04-06 00:34:32 +00:00
void CSQC_DeltaStart ( float time )
2009-04-01 22:03:56 +00:00
{
csqcdelta_pack_t tmp ;
csqcdelta_time = time ;
tmp = csqcdelta_pack_new ;
csqcdelta_pack_new = csqcdelta_pack_old ;
csqcdelta_pack_old = tmp ;
csqcdelta_pack_new . numents = 0 ;
csqcdelta_pack_new . readpos = 0 ;
csqcdelta_pack_old . readpos = 0 ;
}
2009-04-06 00:34:32 +00:00
qboolean CSQC_DeltaUpdate ( entity_state_t * src )
2009-04-01 22:03:56 +00:00
{
//FTE ensures that this function is called with increasing ent numbers each time
func_t func ;
func = deltafunction [ src - > modelindex ] ;
if ( func )
{
void * pr_globals ;
csqcedict_t * ent , * oldent ;
2015-04-21 20:06:27 +00:00
while ( csqcdelta_pack_old . readpos < csqcdelta_pack_old . numents & & csqcdelta_pack_old . e [ csqcdelta_pack_old . readpos ] . n < src - > number )
2009-04-01 22:03:56 +00:00
{
2015-04-21 20:06:27 +00:00
//this entity is stale, remove it.
CSQC_EntRemove ( csqcdelta_pack_old . e [ csqcdelta_pack_old . readpos ] . e ) ;
csqcdelta_pack_old . readpos + + ;
}
2009-04-01 22:03:56 +00:00
2015-04-21 20:06:27 +00:00
if ( csqcdelta_pack_old . readpos > = csqcdelta_pack_old . numents )
oldent = NULL ; //reached the end of the old frame's ents (so we must be new)
else if ( src - > number < csqcdelta_pack_old . e [ csqcdelta_pack_old . readpos ] . n )
oldent = NULL ; //there's a gap, this one must be new.
else
{ //already known.
oldent = csqcdelta_pack_old . e [ csqcdelta_pack_old . readpos ] . e ;
csqcdelta_pack_old . readpos + + ;
2009-04-01 22:03:56 +00:00
}
if ( src - > number < maxcsqcentities & & csqcent [ src - > number ] )
{
//in the csqc list (don't permit in the delta list too)
if ( oldent )
2015-04-21 20:06:27 +00:00
CSQC_EntRemove ( oldent ) ;
2009-04-01 22:03:56 +00:00
return false ;
}
if ( oldent )
ent = oldent ;
else
2014-05-30 03:57:30 +00:00
{
2015-09-14 10:36:42 +00:00
ent = ( csqcedict_t * ) ED_Alloc ( csqcprogs , false , 0 ) ;
2017-08-29 02:29:06 +00:00
if ( ! csqc_isdarkplaces )
ent - > xv - > drawmask = MASK_DELTA ;
2014-05-30 03:57:30 +00:00
}
2009-04-01 22:03:56 +00:00
CSQC_EntStateToCSQC ( deltaflags [ src - > modelindex ] , csqcdelta_time , src , ent ) ;
2009-05-19 01:54:00 +00:00
2009-04-01 22:03:56 +00:00
* csqcg . self = EDICT_TO_PROG ( csqcprogs , ( void * ) ent ) ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = ! oldent ;
PR_ExecuteProgram ( csqcprogs , func ) ;
if ( csqcdelta_pack_new . maxents < = csqcdelta_pack_new . numents )
{
csqcdelta_pack_new . maxents = csqcdelta_pack_new . numents + 64 ;
csqcdelta_pack_new . e = BZ_Realloc ( csqcdelta_pack_new . e , sizeof ( * csqcdelta_pack_new . e ) * csqcdelta_pack_new . maxents ) ;
}
csqcdelta_pack_new . e [ csqcdelta_pack_new . numents ] . e = ent ;
csqcdelta_pack_new . e [ csqcdelta_pack_new . numents ] . n = src - > number ;
csqcdelta_pack_new . numents + + ;
return G_FLOAT ( OFS_RETURN ) ;
}
return false ;
}
2009-04-06 00:34:32 +00:00
void CSQC_DeltaEnd ( void )
2009-04-01 22:03:56 +00:00
{
//remove any unreferenced ents stuck on the end
while ( csqcdelta_pack_old . readpos < csqcdelta_pack_old . numents )
{
2015-04-21 20:06:27 +00:00
CSQC_EntRemove ( csqcdelta_pack_old . e [ csqcdelta_pack_old . readpos ] . e ) ;
2009-04-01 22:03:56 +00:00
csqcdelta_pack_old . readpos + + ;
}
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_DeltaListen ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-04-01 22:03:56 +00:00
{
int i ;
2014-03-30 08:55:06 +00:00
const char * mname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2009-04-01 22:03:56 +00:00
func_t func = G_INT ( OFS_PARM1 ) ;
unsigned int flags = G_FLOAT ( OFS_PARM2 ) ;
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess )
{
csqc_deprecated ( " PF_DeltaListen: game access is blocked " ) ;
return ;
}
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( ! prinst - > GetFunctionInfo ( prinst , func , NULL , NULL , NULL , NULL , 0 ) )
2009-04-01 22:03:56 +00:00
{
Con_Printf ( " PF_DeltaListen: Bad function index \n " ) ;
return ;
}
if ( ! strcmp ( mname , " * " ) )
{
//yes, even things that are not allocated yet
2014-09-17 03:04:08 +00:00
for ( i = 0 ; i < MAX_PRECACHE_MODELS ; i + + )
2009-04-01 22:03:56 +00:00
{
deltafunction [ i ] = func ;
deltaflags [ i ] = flags ;
}
}
else
{
2014-09-17 03:04:08 +00:00
for ( i = 1 ; i < MAX_PRECACHE_MODELS ; i + + )
2009-04-01 22:03:56 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . model_name [ i ] )
2009-04-01 22:03:56 +00:00
break ;
if ( ! strcmp ( cl . model_name [ i ] , mname ) )
{
deltafunction [ i ] = func ;
deltaflags [ i ] = flags ;
break ;
}
}
}
}
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
static void AngleVectorsIndex ( const vec3_t angles , int modelindex , vec3_t forward , vec3_t right , vec3_t up )
{
vec3_t fixedangles ;
fixedangles [ 0 ] = angles [ 0 ] * CSQC_PitchScaleForModelIndex ( modelindex ) ;
fixedangles [ 1 ] = angles [ 1 ] ;
fixedangles [ 2 ] = angles [ 2 ] ;
AngleVectors ( fixedangles , forward , right , up ) ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_getentity ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2012-02-17 01:35:22 +00:00
{
int entnum = G_FLOAT ( OFS_PARM0 ) ;
int fldnum = G_FLOAT ( OFS_PARM1 ) ;
2015-11-18 07:37:39 +00:00
lerpents_t * le ;
entity_state_t * es ;
2012-02-17 01:35:22 +00:00
2018-01-22 19:18:04 +00:00
if ( csqc_nogameaccess )
{
G_FLOAT ( OFS_RETURN + 0 ) = 0 ;
G_FLOAT ( OFS_RETURN + 1 ) = 0 ;
G_FLOAT ( OFS_RETURN + 2 ) = 0 ;
return ;
}
2012-02-17 01:35:22 +00:00
if ( fldnum = = GE_MAXENTS )
{
G_FLOAT ( OFS_RETURN ) = cl . maxlerpents ;
return ;
}
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
if ( entnum > 0 & & entnum < = cl . allocated_client_slots & & cl . lerpplayers [ entnum - 1 ] . sequence = = cl . lerpentssequence )
{
player_state_t * ps = & cl . inframes [ cl . validsequence & UPDATE_MASK ] . playerstate [ entnum - 1 ] ;
le = & cl . lerpplayers [ entnum - 1 ] ;
switch ( fldnum )
{
case GE_ACTIVE :
G_FLOAT ( OFS_RETURN ) = 1 ;
break ;
case GE_ORIGIN :
/*lerped position*/
VectorCopy ( le - > origin , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_SCALE :
G_FLOAT ( OFS_RETURN ) = ps - > scale / 16.0f ;
break ;
case GE_ALPHA :
G_FLOAT ( OFS_RETURN ) = ps - > alpha / 255.0f ;
break ;
case GE_COLORMOD :
G_FLOAT ( OFS_RETURN + 0 ) = ps - > colourmod [ 0 ] / 8.0f ;
G_FLOAT ( OFS_RETURN + 1 ) = ps - > colourmod [ 1 ] / 8.0f ;
G_FLOAT ( OFS_RETURN + 2 ) = ps - > colourmod [ 2 ] / 8.0f ;
break ;
case GE_SKIN :
G_FLOAT ( OFS_RETURN ) = ps - > skinnum ;
break ;
case GE_MINS :
VectorCopy ( ps - > szmins , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_MAXS :
VectorCopy ( ps - > szmaxs , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_ABSMIN :
VectorAdd ( ps - > szmins , le - > origin , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_ABSMAX :
VectorAdd ( ps - > szmaxs , le - > origin , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_ORIGINANDVECTORS :
VectorCopy ( le - > origin , G_VECTOR ( OFS_RETURN ) ) ;
2020-09-08 05:11:09 +00:00
AngleVectorsIndex ( le - > angles , ps - > modelindex , csqcg . v_forward , csqcg . v_right , csqcg . v_up ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
break ;
case GE_FORWARD :
AngleVectorsIndex ( le - > angles , ps - > modelindex , G_VECTOR ( OFS_RETURN ) , NULL , NULL ) ;
break ;
case GE_RIGHT :
AngleVectorsIndex ( le - > angles , ps - > modelindex , NULL , G_VECTOR ( OFS_RETURN ) , NULL ) ;
break ;
case GE_UP :
AngleVectorsIndex ( le - > angles , ps - > modelindex , NULL , NULL , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_PANTSCOLOR :
2018-03-04 14:41:16 +00:00
G_FLOAT ( OFS_RETURN ) = cl . players [ entnum - 1 ] . dbottomcolor ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
break ;
case GE_SHIRTCOLOR :
2018-03-04 14:41:16 +00:00
G_FLOAT ( OFS_RETURN ) = cl . players [ entnum - 1 ] . dtopcolor ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
break ;
case GE_LIGHT :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_MODELINDEX :
G_FLOAT ( OFS_RETURN ) = ps - > modelindex ;
break ;
case GE_MODELINDEX2 :
G_FLOAT ( OFS_RETURN ) = ps - > command . impulse ; //evil hack
break ;
case GE_EFFECTS :
G_FLOAT ( OFS_RETURN ) = ps - > effects ;
break ;
case GE_FRAME :
G_FLOAT ( OFS_RETURN ) = ps - > frame ;
break ;
case GE_ANGLES :
VectorCopy ( le - > angles , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_FATNESS :
G_FLOAT ( OFS_RETURN ) = ps - > fatness ;
break ;
case GE_DRAWFLAGS :
G_FLOAT ( OFS_RETURN ) = SCALE_ORIGIN_ORIGIN ;
break ;
case GE_ABSLIGHT :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_GLOWMOD :
VectorSet ( G_VECTOR ( OFS_RETURN ) , 1 , 1 , 1 ) ;
break ;
case GE_GLOWSIZE :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_GLOWCOLOUR :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_RTSTYLE :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_RTPFLAGS :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_RTCOLOUR :
VectorSet ( G_VECTOR ( OFS_RETURN ) , 1 , 1 , 1 ) ;
break ;
case GE_RTRADIUS :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_TAGENTITY :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_TAGINDEX :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_GRAVITYDIR :
VectorCopy ( ps - > gravitydir , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_TRAILEFFECTNUM :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
default :
VectorCopy ( vec3_origin , G_VECTOR ( OFS_RETURN ) ) ;
break ;
}
return ;
}
2012-02-17 01:35:22 +00:00
if ( entnum > = cl . maxlerpents | | ! cl . lerpentssequence | | cl . lerpents [ entnum ] . sequence ! = cl . lerpentssequence )
{
2014-08-10 00:31:37 +00:00
if ( fldnum ! = GE_ACTIVE )
Con_DPrintf ( " PF_getentity: entity %i is not valid \n " , entnum ) ;
2012-02-17 01:35:22 +00:00
VectorCopy ( vec3_origin , G_VECTOR ( OFS_RETURN ) ) ;
return ;
}
2015-11-18 07:37:39 +00:00
le = & cl . lerpents [ entnum ] ;
es = le - > entstate ;
2012-02-17 01:35:22 +00:00
switch ( fldnum )
{
case GE_ACTIVE :
G_FLOAT ( OFS_RETURN ) = 1 ;
break ;
case GE_ORIGIN :
/*lerped position*/
2015-11-18 07:37:39 +00:00
VectorCopy ( le - > origin , G_VECTOR ( OFS_RETURN ) ) ;
2012-02-17 01:35:22 +00:00
break ;
case GE_SCALE :
2015-11-18 07:37:39 +00:00
G_FLOAT ( OFS_RETURN ) = es - > scale / 16.0f ;
2012-02-17 01:35:22 +00:00
break ;
case GE_ALPHA :
2015-11-18 07:37:39 +00:00
G_FLOAT ( OFS_RETURN ) = es - > trans / 255.0f ;
2012-02-17 01:35:22 +00:00
break ;
case GE_COLORMOD :
2015-11-18 07:37:39 +00:00
G_FLOAT ( OFS_RETURN + 0 ) = es - > colormod [ 0 ] / 8.0f ;
G_FLOAT ( OFS_RETURN + 1 ) = es - > colormod [ 1 ] / 8.0f ;
G_FLOAT ( OFS_RETURN + 2 ) = es - > colormod [ 2 ] / 8.0f ;
2012-02-17 01:35:22 +00:00
break ;
case GE_SKIN :
2015-11-18 07:37:39 +00:00
G_FLOAT ( OFS_RETURN ) = es - > skinnum ;
2012-02-17 01:35:22 +00:00
break ;
case GE_MINS :
2016-07-12 00:40:13 +00:00
{
vec3_t maxs ;
COM_DecodeSize ( es - > solidsize , G_VECTOR ( OFS_RETURN ) , maxs ) ;
}
2012-02-17 01:35:22 +00:00
break ;
case GE_MAXS :
2016-07-12 00:40:13 +00:00
{
vec3_t mins ;
COM_DecodeSize ( es - > solidsize , mins , G_VECTOR ( OFS_RETURN ) ) ;
}
2012-02-17 01:35:22 +00:00
break ;
2016-07-12 00:40:13 +00:00
2012-02-17 01:35:22 +00:00
case GE_ABSMIN :
2016-07-12 00:40:13 +00:00
{
vec3_t maxs ;
COM_DecodeSize ( es - > solidsize , G_VECTOR ( OFS_RETURN ) , maxs ) ;
VectorAdd ( G_VECTOR ( OFS_RETURN ) , le - > origin , G_VECTOR ( OFS_RETURN ) ) ;
}
2012-02-17 01:35:22 +00:00
break ;
case GE_ABSMAX :
2016-07-12 00:40:13 +00:00
{
vec3_t mins ;
COM_DecodeSize ( es - > solidsize , mins , G_VECTOR ( OFS_RETURN ) ) ;
VectorAdd ( G_VECTOR ( OFS_RETURN ) , le - > origin , G_VECTOR ( OFS_RETURN ) ) ;
}
2012-02-17 01:35:22 +00:00
break ;
case GE_ORIGINANDVECTORS :
2015-11-18 07:37:39 +00:00
VectorCopy ( le - > origin , G_VECTOR ( OFS_RETURN ) ) ;
2020-09-08 05:11:09 +00:00
AngleVectorsIndex ( le - > angles , es - > modelindex , csqcg . v_forward , csqcg . v_right , csqcg . v_up ) ;
2012-02-17 01:35:22 +00:00
break ;
case GE_FORWARD :
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
AngleVectorsIndex ( le - > angles , es - > modelindex , G_VECTOR ( OFS_RETURN ) , NULL , NULL ) ;
2012-02-17 01:35:22 +00:00
break ;
case GE_RIGHT :
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
AngleVectorsIndex ( le - > angles , es - > modelindex , NULL , G_VECTOR ( OFS_RETURN ) , NULL ) ;
2012-02-17 01:35:22 +00:00
break ;
case GE_UP :
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
AngleVectorsIndex ( le - > angles , es - > modelindex , NULL , NULL , G_VECTOR ( OFS_RETURN ) ) ;
2012-02-17 01:35:22 +00:00
break ;
case GE_PANTSCOLOR :
2015-11-18 07:37:39 +00:00
if ( es - > colormap < = cl . allocated_client_slots & & ! ( es - > dpflags & RENDER_COLORMAPPED ) )
2018-03-04 14:41:16 +00:00
G_FLOAT ( OFS_RETURN ) = cl . players [ es - > colormap ] . dbottomcolor ;
2012-02-17 01:35:22 +00:00
else
2015-11-18 07:37:39 +00:00
G_FLOAT ( OFS_RETURN ) = es - > colormap & 15 ;
2012-02-17 01:35:22 +00:00
break ;
case GE_SHIRTCOLOR :
2015-11-18 07:37:39 +00:00
if ( es - > colormap < = cl . allocated_client_slots & & ! ( es - > dpflags & RENDER_COLORMAPPED ) )
2018-03-04 14:41:16 +00:00
G_FLOAT ( OFS_RETURN ) = cl . players [ es - > colormap ] . dtopcolor ;
2012-02-17 01:35:22 +00:00
else
2015-11-18 07:37:39 +00:00
G_FLOAT ( OFS_RETURN ) = es - > colormap > > 4 ;
break ;
case GE_LIGHT :
G_FLOAT ( OFS_RETURN ) = 0 ;
break ;
case GE_MODELINDEX :
G_FLOAT ( OFS_RETURN ) = es - > modelindex ;
break ;
case GE_MODELINDEX2 :
G_FLOAT ( OFS_RETURN ) = es - > modelindex2 ;
break ;
case GE_EFFECTS :
G_FLOAT ( OFS_RETURN ) = es - > effects ;
break ;
case GE_FRAME :
G_FLOAT ( OFS_RETURN ) = es - > frame ;
break ;
case GE_ANGLES :
VectorCopy ( le - > angles , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_FATNESS :
G_FLOAT ( OFS_RETURN ) = es - > fatness ;
break ;
case GE_DRAWFLAGS :
G_FLOAT ( OFS_RETURN ) = es - > hexen2flags ;
break ;
case GE_ABSLIGHT :
G_FLOAT ( OFS_RETURN ) = es - > abslight ;
break ;
case GE_GLOWMOD :
VectorScale ( es - > glowmod , 1 / 8.0 , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_GLOWSIZE :
G_FLOAT ( OFS_RETURN ) = es - > glowsize ;
break ;
case GE_GLOWCOLOUR :
G_FLOAT ( OFS_RETURN ) = es - > glowcolour ;
break ;
case GE_RTSTYLE :
G_FLOAT ( OFS_RETURN ) = es - > lightstyle ;
break ;
case GE_RTPFLAGS :
G_FLOAT ( OFS_RETURN ) = es - > lightpflags ;
break ;
case GE_RTCOLOUR :
VectorScale ( es - > light , 1 / 1024.0 , G_VECTOR ( OFS_RETURN ) ) ;
break ;
case GE_RTRADIUS :
G_FLOAT ( OFS_RETURN ) = es - > light [ 3 ] ;
break ;
case GE_TAGENTITY :
G_FLOAT ( OFS_RETURN ) = es - > tagentity ;
break ;
case GE_TAGINDEX :
G_FLOAT ( OFS_RETURN ) = es - > tagindex ;
break ;
case GE_GRAVITYDIR :
{
vec3_t a ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
a [ 0 ] = ( ( 192 + es - > u . q1 . gravitydir [ 0 ] ) / 256.0f ) * 360 ;
2015-11-18 07:37:39 +00:00
a [ 1 ] = ( es - > u . q1 . gravitydir [ 1 ] / 256.0f ) * 360 ;
a [ 2 ] = 0 ;
AngleVectors ( a , G_VECTOR ( OFS_RETURN ) , NULL , NULL ) ;
}
break ;
case GE_TRAILEFFECTNUM :
G_FLOAT ( OFS_RETURN ) = es - > u . q1 . traileffectnum ;
2012-02-17 01:35:22 +00:00
break ;
2015-11-18 07:37:39 +00:00
2012-02-17 01:35:22 +00:00
default :
Con_Printf ( " PF_getentity: field %i is not supported \n " , fldnum ) ;
VectorCopy ( vec3_origin , G_VECTOR ( OFS_RETURN ) ) ;
break ;
}
}
2015-11-18 07:37:39 +00:00
static void QCBUILTIN PF_cs_getplayerstat ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
unsigned int playernum = G_FLOAT ( OFS_PARM0 ) ;
unsigned int statnum = G_FLOAT ( OFS_PARM1 ) ;
unsigned int stattype = G_FLOAT ( OFS_PARM2 ) ;
unsigned int i , j ;
if ( playernum > = cl . allocated_client_slots | | statnum > = MAX_CL_STATS )
stattype = ev_void ;
switch ( stattype )
{
default :
case ev_void :
G_FLOAT ( OFS_RETURN + 0 ) = 0 ;
G_FLOAT ( OFS_RETURN + 1 ) = 0 ;
G_FLOAT ( OFS_RETURN + 2 ) = 0 ;
break ;
case ev_integer :
2021-04-14 05:21:04 +00:00
case ev_uint :
2015-11-18 07:37:39 +00:00
case ev_field : //Hopefully NOT useful, certainly not reliable
case ev_function : //Hopefully NOT useful
case ev_pointer : //NOT useful in a networked capacity.
G_INT ( OFS_RETURN ) = cl . players [ playernum ] . stats [ statnum ] ;
break ;
2021-04-14 05:21:04 +00:00
case ev_int64 : //lamely takes two consecutive stats.
case ev_uint64 :
G_UINT64 ( OFS_RETURN ) = ( puint64_t ) ( ( statnum + 0 > = MAX_CL_STATS ) ? 0 : cl . players [ playernum ] . stats [ statnum + 0 ] ) |
( ( puint64_t ) ( ( statnum + 1 > = MAX_CL_STATS ) ? 0 : cl . players [ playernum ] . stats [ statnum + 1 ] ) < < 32 ) ;
break ;
2015-11-18 07:37:39 +00:00
case ev_float :
G_FLOAT ( OFS_RETURN ) = cl . players [ playernum ] . statsf [ statnum ] ;
break ;
2021-04-14 05:21:04 +00:00
case ev_double : //lame truncation for network.
G_DOUBLE ( OFS_RETURN ) = cl . players [ playernum ] . statsf [ statnum ] ;
break ;
2015-11-18 07:37:39 +00:00
case ev_vector :
G_FLOAT ( OFS_RETURN + 0 ) = ( statnum + 0 > = MAX_CL_STATS ) ? 0 : cl . players [ playernum ] . statsf [ statnum + 0 ] ;
G_FLOAT ( OFS_RETURN + 1 ) = ( statnum + 1 > = MAX_CL_STATS ) ? 0 : cl . players [ playernum ] . statsf [ statnum + 1 ] ;
G_FLOAT ( OFS_RETURN + 2 ) = ( statnum + 2 > = MAX_CL_STATS ) ? 0 : cl . players [ playernum ] . statsf [ statnum + 2 ] ;
break ;
case ev_entity :
j = cl . players [ playernum ] . stats [ statnum ] ;
if ( j < maxcsqcentities & & csqcent [ j ] )
G_INT ( OFS_RETURN ) = EDICT_TO_PROG ( csqcprogs , csqcent [ j ] ) ;
else if ( j < = cl . allocated_client_slots & & j > 0 & & csqcdelta_playerents [ j ] )
G_INT ( OFS_RETURN ) = EDICT_TO_PROG ( csqcprogs , csqcdelta_playerents [ j ] ) ;
else
{
G_INT ( OFS_RETURN ) = 0 ;
//scan for the delta entity reference.
for ( i = 0 ; i < csqcdelta_pack_new . numents ; i + + )
{
if ( csqcdelta_pack_old . e [ i ] . n = = j & & csqcdelta_pack_old . e [ i ] . e )
{
G_INT ( OFS_RETURN ) = EDICT_TO_PROG ( csqcprogs , csqcdelta_pack_old . e [ i ] . e ) ;
break ;
}
}
}
break ;
case ev_string :
G_INT ( OFS_RETURN ) = 0 ; //FIXME: no info, these are not currently tracked in mvds apparently.
break ;
}
}
2018-10-23 07:09:06 +00:00
void CL_CalcCrouch ( playerview_t * pv ) ;
2013-12-29 22:48:28 +00:00
static void QCBUILTIN PF_V_CalcRefdef ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2017-08-14 16:38:44 +00:00
{ //this function is essentially an overcomplicated way to shirk from defining your own view bobbing.
2013-12-29 22:48:28 +00:00
csqcedict_t * ent = ( csqcedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
2018-09-29 17:31:58 +00:00
vec3_t savedvel ;
2017-08-16 02:14:07 +00:00
/*enum
2017-08-14 16:38:44 +00:00
{
TELEPORTED ,
JUMPING ,
DEAD ,
INTERMISSION
2017-08-16 02:14:07 +00:00
} flags = G_FLOAT ( OFS_PARM1 ) ; */
2018-10-11 10:31:23 +00:00
// csqc_deprecated("V_CalcRefdef has too much undefined behaviour.\n");
2013-12-29 22:48:28 +00:00
// if (ent->xv->entnum >= 1 && ent->xv->entnum <= MAX_CLIENTS)
// CSQC_ChangeLocalPlayer(ent->xv->entnum-1);
2018-10-11 10:31:23 +00:00
/* xonotic requires:
cl_followmodel
cl_smoothviewheight
cl_bobfall
*/
2013-12-29 22:48:28 +00:00
csqc_rebuildmatricies = true ;
CL_DecayLights ( ) ;
2018-10-23 07:09:06 +00:00
// CL_ClearEntityLists();
2013-12-29 22:48:28 +00:00
V_ClearRefdef ( csqc_playerview ) ;
r_refdef . drawsbar = false ; //csqc defaults to no sbar.
2014-05-30 03:57:30 +00:00
r_refdef . drawcrosshair = false ;
2013-12-29 22:48:28 +00:00
2018-09-29 17:31:58 +00:00
VectorCopy ( csqc_playerview - > simvel , savedvel ) ;
2013-12-29 22:48:28 +00:00
VectorCopy ( ent - > v - > origin , csqc_playerview - > simorg ) ;
2018-09-29 17:31:58 +00:00
VectorCopy ( ent - > v - > velocity , csqc_playerview - > simvel ) ;
csqc_playerview - > onground = ! ! ( ( int ) ent - > v - > flags & FL_ONGROUND ) ;
2018-10-23 07:09:06 +00:00
CL_CalcCrouch ( csqc_playerview ) ;
2013-12-29 22:48:28 +00:00
V_CalcRefdef ( csqc_playerview ) ; //set up the defaults
2018-09-29 17:31:58 +00:00
VectorCopy ( savedvel , csqc_playerview - > simvel ) ;
2013-12-29 22:48:28 +00:00
}
2009-04-01 22:03:56 +00:00
2020-04-19 01:23:32 +00:00
static void QCBUILTIN PF_getlocationname ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
float * loc = G_VECTOR ( OFS_PARM0 ) ;
RETURN_TSTRING ( TP_LocationName ( loc ) ) ;
}
2009-04-01 22:03:56 +00:00
# if 1
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
//static void QCBUILTIN PF_ReadServerEntityState(pubprogfuncs_t *prinst, struct globalvars_s *pr_globals)
2012-04-24 07:59:11 +00:00
//{
//}
2009-04-01 22:03:56 +00:00
# else
2008-05-25 22:23:43 +00:00
packet_entities_t * CL_ProcessPacketEntities ( float * servertime , qboolean nolerp ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
static void QCBUILTIN PF_ReadServerEntityState ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2008-05-25 22:23:43 +00:00
{
//read the arguments the csqc gave us
unsigned int flags = G_FLOAT ( OFS_PARM0 ) ;
float servertime = G_FLOAT ( OFS_PARM1 ) ;
//locals
packet_entities_t * pack ;
csqcedict_t * ent ;
entity_state_t * src ;
unsigned int i ;
lerpents_t * le ;
csqcedict_t * oldent ;
oldcsqcpack_t * oldlist , * newlist ;
int oldidx = 0 , newidx = 0 ;
model_t * model ;
2008-11-09 22:29:28 +00:00
player_state_t * srcp ;
2008-05-25 22:23:43 +00:00
//setup
servertime + = cl . servertime ;
2009-05-19 01:54:00 +00:00
pack = CL_ProcessPacketEntities ( & servertime , ( flags & RSES_NOLERP ) ) ;
2008-05-25 22:23:43 +00:00
if ( ! pack )
2008-11-09 22:29:28 +00:00
return ; //we're lagging. can't do anything, just don't update
2013-10-29 17:38:22 +00:00
for ( i = 0 ; i < cl . allocated_client_slots ; i + + )
2008-11-09 22:29:28 +00:00
{
srcp = & cl . frames [ cl . validsequence & UPDATE_MASK ] . playerstate [ i ] ;
ent = deltaedplayerents [ i ] ;
if ( srcp - > messagenum = = cl . validsequence & & ( i + 1 > = maxcsqcentities | | ! csqcent [ i + 1 ] ) )
{
if ( ! ent )
{
ent = ( csqcedict_t * ) ED_Alloc ( prinst ) ;
deltaedplayerents [ i ] = ent ;
G_FLOAT ( OFS_PARM0 ) = true ;
}
else
{
G_FLOAT ( OFS_PARM0 ) = false ;
}
2009-04-01 22:03:56 +00:00
CSQC_PlayerStateToCSQC ( i , srcp , ent ) ;
2008-11-09 22:29:28 +00:00
if ( csqcg . delta_update )
{
* csqcg . self = EDICT_TO_PROG ( prinst , ( void * ) ent ) ;
PR_ExecuteProgram ( prinst , csqcg . delta_update ) ;
}
}
else if ( ent )
{
* csqcg . self = EDICT_TO_PROG ( prinst , ( void * ) ent ) ;
PR_ExecuteProgram ( prinst , csqcg . delta_remove ) ;
deltaedplayerents [ i ] = NULL ;
}
}
2008-05-25 22:23:43 +00:00
oldlist = & loadedcsqcpack [ loadedcsqcpacknum ] ;
loadedcsqcpacknum ^ = 1 ;
newlist = & loadedcsqcpack [ loadedcsqcpacknum ] ;
newlist - > numents = 0 ;
for ( i = 0 ; i < pack - > num_entities ; i + + )
{
src = & pack - > entities [ i ] ;
// CL_LinkPacketEntities
2011-10-27 15:46:36 +00:00
# ifdef warningmsg
# pragma warningmsg("what to do here?")
2008-05-25 22:23:43 +00:00
# endif
// if (csqcent[src->number])
// continue; //don't add the entity if we have one sent specially via csqc protocols.
if ( oldidx = = oldlist - > numents )
{ //reached the end of the old frame's ents
oldent = NULL ;
}
else
{
while ( oldidx < oldlist - > numents & & oldlist - > entnum [ oldidx ] < src - > number )
{
//this entity is stale, remove it.
oldent = oldlist - > entptr [ oldidx ] ;
* csqcg . self = EDICT_TO_PROG ( prinst , ( void * ) oldent ) ;
PR_ExecuteProgram ( prinst , csqcg . delta_remove ) ;
oldidx + + ;
}
if ( src - > number < oldlist - > entnum [ oldidx ] )
oldent = NULL ;
else
{
oldent = oldlist - > entptr [ oldidx ] ;
oldidx + + ;
}
}
2008-11-09 22:29:28 +00:00
if ( src - > number < maxcsqcentities & & csqcent [ src - > number ] )
{
//in the csqc list
if ( oldent )
{
* csqcg . self = EDICT_TO_PROG ( prinst , ( void * ) oldent ) ;
PR_ExecuteProgram ( prinst , csqcg . delta_remove ) ;
}
continue ;
}
2008-05-25 22:23:43 +00:00
//note: we don't delta the state here. we just replace the old.
//its already lerped
if ( oldent )
ent = oldent ;
else
ent = ( csqcedict_t * ) ED_Alloc ( prinst ) ;
2009-04-01 22:03:56 +00:00
CSQC_EntStateToCSQC ( flags , servertime , src , ent ) ;
2009-05-19 01:54:00 +00:00
2008-05-25 22:23:43 +00:00
if ( csqcg . delta_update )
{
* csqcg . self = EDICT_TO_PROG ( prinst , ( void * ) ent ) ;
G_FLOAT ( OFS_PARM0 ) = ! oldent ;
PR_ExecuteProgram ( prinst , csqcg . delta_update ) ;
}
if ( newlist - > maxents < = newidx )
{
newlist - > maxents = newidx + 64 ;
newlist - > entptr = BZ_Realloc ( newlist - > entptr , sizeof ( * newlist - > entptr ) * newlist - > maxents ) ;
newlist - > entnum = BZ_Realloc ( newlist - > entnum , sizeof ( * newlist - > entnum ) * newlist - > maxents ) ;
}
newlist - > entptr [ newidx ] = ent ;
newlist - > entnum [ newidx ] = src - > number ;
newidx + + ;
}
//remove any unreferenced ents stuck on the end
while ( oldidx < oldlist - > numents )
{
oldent = oldlist - > entptr [ oldidx ] ;
* csqcg . self = EDICT_TO_PROG ( prinst , ( void * ) oldent ) ;
PR_ExecuteProgram ( prinst , csqcg . delta_remove ) ;
oldidx + + ;
}
newlist - > numents = newidx ;
}
2009-04-01 22:03:56 +00:00
# endif
2014-10-05 20:04:11 +00:00
//be careful to not touch the resource unless we're meant to, to avoid stalling
static void QCBUILTIN PF_resourcestatus ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int restype = G_FLOAT ( OFS_PARM0 ) ;
int doload = G_FLOAT ( OFS_PARM1 ) ;
const char * resname = PR_GetStringOfs ( prinst , OFS_PARM2 ) ;
int idx , idx2 ;
model_t * mod ;
image_t * img ;
// shader_t *sh;
sfx_t * sfx ;
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTKNOWN ;
switch ( restype )
{
case RESTYPE_MODEL :
idx = CS_FindModel ( resname , & idx2 ) ;
if ( idx < 0 )
{
mod = cl . model_csqcprecache [ - idx ] ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . model_csqcprecache [ - idx ] & & doload & & cl . model_csqcname [ - idx ] )
2014-10-05 20:04:11 +00:00
mod = cl . model_csqcprecache [ - idx ] = Mod_ForName ( Mod_FixName ( cl . model_csqcname [ - idx ] , cl . model_name [ 1 ] ) , MLV_WARN ) ;
}
else if ( idx > 0 )
{
mod = cl . model_precache [ idx ] ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . model_precache [ idx ] & & doload & & cl . model_name [ idx ] )
2014-10-05 20:04:11 +00:00
mod = cl . model_precache [ idx ] = Mod_ForName ( Mod_FixName ( cl . model_name [ idx ] , cl . model_name [ 1 ] ) , MLV_WARN ) ;
}
else
return ;
if ( ! mod )
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTLOADED ;
else
{
if ( doload & & mod - > loadstate = = MLS_NOTLOADED )
Mod_LoadModel ( mod , MLV_SILENT ) ; //should avoid blocking.
switch ( mod - > loadstate )
{
default :
case MLS_NOTLOADED :
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTLOADED ;
break ;
case MLS_LOADING :
G_FLOAT ( OFS_RETURN ) = RESSTATE_LOADING ;
break ;
case MLS_LOADED :
G_FLOAT ( OFS_RETURN ) = RESSTATE_LOADED ;
break ;
case MLS_FAILED :
G_FLOAT ( OFS_RETURN ) = RESSTATE_FAILED ;
break ;
}
}
return ;
case RESTYPE_SOUND :
sfx = NULL ;
2023-12-22 09:52:19 +00:00
for ( idx = 1 ; idx < MAX_PRECACHE_SOUNDS ; idx + + )
2014-10-05 20:04:11 +00:00
{
if ( ! strcmp ( cl . sound_name [ idx ] , resname ) )
{
sfx = cl . sound_precache [ idx ] ;
break ;
}
}
if ( ! sfx )
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
sfx = S_FindName ( resname , doload , false ) ;
2014-10-05 20:04:11 +00:00
if ( ! sfx )
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTKNOWN ;
else
{
if ( doload & & sfx - > loadstate = = SLS_NOTLOADED )
2018-09-23 19:35:24 +00:00
S_LoadSound ( sfx , true ) ;
2014-10-05 20:04:11 +00:00
switch ( sfx - > loadstate )
{
case SLS_NOTLOADED :
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTLOADED ;
break ;
case SLS_LOADING :
G_FLOAT ( OFS_RETURN ) = RESSTATE_LOADING ;
break ;
case SLS_LOADED :
G_FLOAT ( OFS_RETURN ) = RESSTATE_LOADED ;
break ;
case SLS_FAILED :
G_FLOAT ( OFS_RETURN ) = RESSTATE_FAILED ;
break ;
}
}
break ;
/*
case RESTYPE_PARTICLE :
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTKNOWN ;
break ;
case RESTYPE_SHADER :
sh = R_RegisterCustom ( resname , 0 , NULL , NULL ) ;
if ( sh )
{
//FIXME: scan through the images.
}
else
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTKNOWN ;
break ;
case RESTYPE_SKIN :
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTKNOWN ;
break ;
*/
case RESTYPE_TEXTURE :
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTKNOWN ;
img = Image_FindTexture ( resname , NULL , 0 ) ;
if ( ! img )
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTKNOWN ;
else
{
switch ( img - > status )
{
case TEX_NOTLOADED :
G_FLOAT ( OFS_RETURN ) = RESSTATE_NOTLOADED ;
break ;
case TEX_LOADING :
G_FLOAT ( OFS_RETURN ) = RESSTATE_LOADING ;
break ;
case TEX_LOADED :
G_FLOAT ( OFS_RETURN ) = RESSTATE_LOADED ;
break ;
case TEX_FAILED :
G_FLOAT ( OFS_RETURN ) = RESSTATE_FAILED ;
break ;
}
}
break ;
default :
G_FLOAT ( OFS_RETURN ) = RESSTATE_UNSUPPORTED ;
break ;
}
}
2021-07-25 16:12:24 +00:00
static void QCBUILTIN PF_cl_gp_rumble ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int device = G_FLOAT ( OFS_PARM0 ) ;
2021-08-04 21:18:04 +00:00
quint16_t amp_low = G_FLOAT ( OFS_PARM1 ) ;
quint16_t amp_high = G_FLOAT ( OFS_PARM2 ) ;
quint32_t duration = G_FLOAT ( OFS_PARM3 ) ;
INS_Rumble ( device , amp_low , amp_high , duration ) ;
2021-07-25 16:12:24 +00:00
}
static void QCBUILTIN PF_cl_gp_rumbletriggers ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int device = G_FLOAT ( OFS_PARM0 ) ;
2021-08-04 21:18:04 +00:00
quint16_t left = G_FLOAT ( OFS_PARM1 ) ;
quint16_t right = G_FLOAT ( OFS_PARM2 ) ;
quint32_t duration = G_FLOAT ( OFS_PARM3 ) ;
INS_RumbleTriggers ( device , left , right , duration ) ;
2021-07-25 16:12:24 +00:00
}
static void QCBUILTIN PF_cl_gp_setledcolor ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int device = G_FLOAT ( OFS_PARM0 ) ;
2021-08-04 21:18:04 +00:00
INS_SetLEDColor ( device , G_VECTOR ( OFS_PARM1 ) ) ;
2021-07-25 16:12:24 +00:00
}
static void QCBUILTIN PF_cl_gp_settriggerfx ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int device = G_FLOAT ( OFS_PARM0 ) ;
int size = G_INT ( OFS_PARM2 ) ;
2021-07-25 22:55:17 +00:00
const void * fxptr = PR_GetReadQCPtr ( prinst , G_INT ( OFS_PARM1 ) , size ) ;
2021-07-25 16:12:24 +00:00
if ( ! fxptr )
PR_BIError ( prinst , " PF_cl_gp_settriggerfx: invalid pointer/size \n " ) ;
else
2021-08-04 21:18:04 +00:00
INS_SetTriggerFX ( device , fxptr , size ) ;
2021-07-25 16:12:24 +00:00
}
2020-07-14 00:48:56 +00:00
/*static void PF_cs_clipboard_got(void *ctx, const char *utf8)
{
void * pr_globals ;
unsigned int unicode ;
int error ;
while ( * utf8 )
{
unicode = utf8_decode ( & error , utf8 , & utf8 ) ;
if ( error )
unicode = 0xfffdu ;
if ( ! csqcprogs | | ! csqcg . input_event | | CSIE_PASTE > = dpcompat_csqcinputeventtypes . ival )
return ;
# ifdef TEXTEDITOR
if ( editormodal )
return ;
# endif
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSIE_PASTE ;
G_FLOAT ( OFS_PARM1 ) = 0 ;
G_FLOAT ( OFS_PARM2 ) = unicode ;
G_FLOAT ( OFS_PARM3 ) = 0 ;
qcinput_scan = G_FLOAT ( OFS_PARM1 ) ;
qcinput_unicode = G_FLOAT ( OFS_PARM2 ) ;
PR_ExecuteProgram ( csqcprogs , csqcg . input_event ) ;
qcinput_scan = 0 ; //and stop replay attacks
qcinput_unicode = 0 ;
}
}
static void QCBUILTIN PF_cs_clipboard_get ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
clipboardtype_t cliptype = G_FLOAT ( OFS_PARM0 ) ;
Sys_Clipboard_PasteText ( cliptype , PF_cs_clipboard_got , prinst ) ;
} */
2015-02-02 08:01:53 +00:00
void QCBUILTIN PF_CL_DrawTextField ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals ) ;
2008-05-25 22:23:43 +00:00
2005-07-01 19:23:00 +00:00
//prefixes:
//PF_ - common, works on any vm
//PF_cs_ - works in csqc only (dependant upon globals or fields)
//PF_cl_ - works in csqc and menu (if needed...)
2005-01-17 17:43:13 +00:00
//warning: functions that depend on globals are bad, mkay?
2008-11-09 22:29:28 +00:00
static struct {
char * name ;
builtin_t bifunc ;
int ebfsnum ;
} BuiltinList [ ] = {
2005-01-17 17:43:13 +00:00
//0
2013-03-12 22:53:23 +00:00
{ " makevectors " , PF_cs_makevectors , 1 } , // #1 void() makevectors (QUAKE)
{ " setorigin " , PF_cs_SetOrigin , 2 } , // #2 void(entity e, vector org) setorigin (QUAKE)
{ " setmodel " , PF_cs_SetModel , 3 } , // #3 void(entity e, string modl) setmodel (QUAKE)
{ " setsize " , PF_cs_SetSize , 4 } , // #4 void(entity e, vector mins, vector maxs) setsize (QUAKE)
2008-11-09 22:29:28 +00:00
//5
2021-04-14 05:21:04 +00:00
{ " breakpoint " , PF_cs_break , 6 } , // #6 void() debugbreak (QUAKE)
2013-03-12 22:53:23 +00:00
{ " random " , PF_random , 7 } , // #7 float() random (QUAKE)
{ " sound " , PF_cs_sound , 8 } , // #8 void(entity e, float chan, string samp, float vol, float atten) sound (QUAKE)
{ " normalize " , PF_normalize , 9 } , // #9 vector(vector in) normalize (QUAKE)
2005-01-17 17:43:13 +00:00
//10
2013-03-12 22:53:23 +00:00
{ " error " , PF_error , 10 } , // #10 void(string errortext) error (QUAKE)
{ " objerror " , PF_objerror , 11 } , // #11 void(string errortext) onjerror (QUAKE)
{ " vlen " , PF_vlen , 12 } , // #12 float(vector v) vlen (QUAKE)
{ " vectoyaw " , PF_vectoyaw , 13 } , // #13 float(vector v) vectoyaw (QUAKE)
{ " spawn " , PF_Spawn , 14 } , // #14 entity() spawn (QUAKE)
{ " remove " , PF_cs_remove , 15 } , // #15 void(entity e) remove (QUAKE)
2020-02-11 18:06:10 +00:00
{ " removeinstant " , PF_cs_removeinstant , 0 } ,
2013-03-12 22:53:23 +00:00
{ " traceline " , PF_cs_traceline , 16 } , // #16 void(vector v1, vector v2, float nomonst, entity forent) traceline (QUAKE)
{ " checkclient " , PF_NoCSQC , 17 } , // #17 entity() checkclient (QUAKE) (don't support)
{ " find " , PF_FindString , 18 } , // #18 entity(entity start, .string fld, string match) findstring (QUAKE)
{ " precache_sound " , PF_cs_PrecacheSound , 19 } , // #19 void(string str) precache_sound (QUAKE)
2005-01-17 17:43:13 +00:00
//20
2013-03-12 22:53:23 +00:00
{ " precache_model " , PF_cs_PrecacheModel , 20 } , // #20 void(string str) precache_model (QUAKE)
{ " stuffcmd " , PF_NoCSQC , 21 } , // #21 void(entity client, string s) stuffcmd (QUAKE) (don't support)
2014-03-30 08:55:06 +00:00
{ " findradius " , PF_findradius , 22 } , // #22 entity(vector org, float rad) findradius (QUAKE)
2020-06-27 19:32:08 +00:00
# ifdef QCGC
{ " findradius_list " , PF_findradius_list , 0 } ,
{ " find_list " , PF_FindList , 0 } ,
# endif
2013-03-12 22:53:23 +00:00
{ " bprint " , PF_NoCSQC , 23 } , // #23 void(string s, ...) bprint (QUAKE) (don't support)
{ " sprint " , PF_NoCSQC , 24 } , // #24 void(entity e, string s, ...) sprint (QUAKE) (don't support)
{ " dprint " , PF_dprint , 25 } , // #25 void(string s, ...) dprint (QUAKE)
{ " ftos " , PF_ftos , 26 } , // #26 string(float f) ftos (QUAKE)
{ " vtos " , PF_vtos , 27 } , // #27 string(vector f) vtos (QUAKE)
{ " coredump " , PF_coredump , 28 } , // #28 void(void) coredump (QUAKE)
{ " traceon " , PF_traceon , 29 } , // #29 void() traceon (QUAKE)
2005-01-17 17:43:13 +00:00
//30
2013-03-12 22:53:23 +00:00
{ " traceoff " , PF_traceoff , 30 } , // #30 void() traceoff (QUAKE)
{ " eprint " , PF_eprint , 31 } , // #31 void(entity e) eprint (QUAKE)
{ " walkmove " , PF_cs_walkmove , 32 } , // #32 float(float yaw, float dist) walkmove (QUAKE)
{ " ? " , PF_Fixme , 33 } , // #33
{ " droptofloor " , PF_cs_droptofloor , 34 } , // #34
{ " lightstyle " , PF_cs_lightstyle , 35 } , // #35 void(float lightstyle, string stylestring) lightstyle (QUAKE)
{ " rint " , PF_rint , 36 } , // #36 float(float f) rint (QUAKE)
{ " floor " , PF_floor , 37 } , // #37 float(float f) floor (QUAKE)
{ " ceil " , PF_ceil , 38 } , // #38 float(float f) ceil (QUAKE)
// {"?", PF_Fixme, 39}, // #39
2005-01-17 17:43:13 +00:00
//40
2014-06-21 17:58:17 +00:00
{ " checkbottom " , PF_checkbottom , 40 } , // #40 float(entity e) checkbottom (QUAKE)
2013-03-12 22:53:23 +00:00
{ " pointcontents " , PF_cs_pointcontents , 41 } , // #41 float(vector org) pointcontents (QUAKE)
2021-04-14 05:21:04 +00:00
{ " pointcontentsmask " , PF_cs_pointcontentsmask , 0 } , // #41 float(vector org) pointcontents (QUAKE)
2013-03-12 22:53:23 +00:00
// {"?", PF_Fixme, 42}, // #42
{ " fabs " , PF_fabs , 43 } , // #43 float(float f) fabs (QUAKE)
{ " aim " , PF_NoCSQC , 44 } , // #44 vector(entity e, float speed) aim (QUAKE) (don't support)
{ " cvar " , PF_cvar , 45 } , // #45 float(string cvarname) cvar (QUAKE)
{ " localcmd " , PF_localcmd , 46 } , // #46 void(string str) localcmd (QUAKE)
{ " nextent " , PF_nextent , 47 } , // #47 entity(entity e) nextent (QUAKE)
{ " particle " , PF_cs_particle , 48 } , // #48 void(vector org, vector dir, float colour, float count) particle (QUAKE)
2014-01-13 02:42:25 +00:00
{ " changeyaw " , PF_changeyaw , 49 } , // #49 void() changeyaw (QUAKE)
2005-01-17 17:43:13 +00:00
//50
2008-11-09 22:29:28 +00:00
// {"?", PF_Fixme, 50}, // #50
2013-03-12 22:53:23 +00:00
{ " vectoangles " , PF_vectoangles , 51 } , // #51 vector(vector v) vectoangles (QUAKE)
// {"WriteByte", PF_Fixme, 52}, // #52 void(float to, float f) WriteByte (QUAKE)
// {"WriteChar", PF_Fixme, 53}, // #53 void(float to, float f) WriteChar (QUAKE)
// {"WriteShort", PF_Fixme, 54}, // #54 void(float to, float f) WriteShort (QUAKE)
2008-11-09 22:29:28 +00:00
2013-03-12 22:53:23 +00:00
// {"WriteLong", PF_Fixme, 55}, // #55 void(float to, float f) WriteLong (QUAKE)
// {"WriteCoord", PF_Fixme, 56}, // #56 void(float to, float f) WriteCoord (QUAKE)
// {"WriteAngle", PF_Fixme, 57}, // #57 void(float to, float f) WriteAngle (QUAKE)
// {"WriteString", PF_Fixme, 58}, // #58 void(float to, float f) WriteString (QUAKE)
// {"WriteEntity", PF_Fixme, 59}, // #59 void(float to, float f) WriteEntity (QUAKE)
2005-02-28 07:16:19 +00:00
2005-01-17 17:43:13 +00:00
//60
2013-03-12 22:53:23 +00:00
{ " sin " , PF_Sin , 60 } , // #60 float(float angle) sin (DP_QC_SINCOSSQRTPOW)
{ " cos " , PF_Cos , 61 } , // #61 float(float angle) cos (DP_QC_SINCOSSQRTPOW)
{ " sqrt " , PF_Sqrt , 62 } , // #62 float(float value) sqrt (DP_QC_SINCOSSQRTPOW)
2014-01-13 02:42:25 +00:00
{ " changepitch " , PF_changepitch , 63 } , // #63 void(entity ent) changepitch (DP_QC_CHANGEPITCH)
2013-03-12 22:53:23 +00:00
{ " tracetoss " , PF_cs_tracetoss , 64 } , // #64 void(entity ent, entity ignore) tracetoss (DP_QC_TRACETOSS)
{ " etos " , PF_etos , 65 } , // #65 string(entity ent) etos (DP_QC_ETOS)
{ " ? " , PF_Fixme , 66 } , // #66
2014-03-30 08:55:06 +00:00
{ " movetogoal " , PF_cs_movetogoal , 67 } , // #67 void(float step) movetogoal (QUAKE)
{ " precache_file " , PF_cs_precachefile , 68 } , // #68 void(string s) precache_file (QUAKE) (don't support)
2013-03-12 22:53:23 +00:00
{ " makestatic " , PF_cs_makestatic , 69 } , // #69 void(entity e) makestatic (QUAKE)
2005-01-17 17:43:13 +00:00
//70
2013-03-12 22:53:23 +00:00
{ " changelevel " , PF_NoCSQC , 70 } , // #70 void(string mapname) changelevel (QUAKE) (don't support)
// {"?", PF_Fixme, 71}, // #71
{ " cvar_set " , PF_cvar_set , 72 } , // #72 void(string cvarname, string valuetoset) cvar_set (QUAKE)
{ " centerprint " , PF_NoCSQC , 73 } , // #73 void(entity ent, string text) centerprint (QUAKE) (don't support - cprint is supported instead)
{ " ambientsound " , PF_cl_ambientsound , 74 } , // #74 void (vector pos, string samp, float vol, float atten) ambientsound (QUAKE)
{ " precache_model2 " , PF_cs_PrecacheModel , 75 } , // #75 void(string str) precache_model2 (QUAKE)
{ " precache_sound2 " , PF_cs_PrecacheSound , 76 } , // #76 void(string str) precache_sound2 (QUAKE)
2014-03-30 08:55:06 +00:00
{ " precache_file2 " , PF_cs_precachefile , 77 } , // #77 void(string str) precache_file2 (QUAKE)
2013-03-12 22:53:23 +00:00
{ " setspawnparms " , PF_NoCSQC , 78 } , // #78 void() setspawnparms (QUAKE) (don't support)
{ " logfrag " , PF_NoCSQC , 79 } , // #79 void(entity killer, entity killee) logfrag (QW_ENGINE) (don't support)
2005-07-14 01:57:34 +00:00
2005-01-17 17:43:13 +00:00
//80
2016-10-22 07:06:51 +00:00
{ " infokey " , PF_cs_infokey , 80 } , // #80 string(entity e, string keyname) infokey (QW_ENGINE) (don't support)
2013-03-12 22:53:23 +00:00
{ " stof " , PF_stof , 81 } , // #81 float(string s) stof (FRIK_FILE or QW_ENGINE)
{ " multicast " , PF_NoCSQC , 82 } , // #82 void(vector where, float set) multicast (QW_ENGINE) (don't support)
2008-11-09 22:29:28 +00:00
2017-01-15 13:13:09 +00:00
{ " getlightstyle " , PF_getlightstyle , 0 } ,
{ " getlightstylergb " , PF_getlightstylergb , 0 } ,
2005-07-14 01:57:34 +00:00
2005-01-17 17:43:13 +00:00
//90
2013-03-12 22:53:23 +00:00
{ " tracebox " , PF_cs_tracebox , 90 } ,
{ " randomvec " , PF_randomvector , 91 } , // #91 vector() randomvec (DP_QC_RANDOMVEC)
{ " getlight " , PF_cl_getlight , 92 } , // #92 vector(vector org) getlight (DP_QC_GETLIGHT)
{ " registercvar " , PF_registercvar , 93 } , // #93 void(string cvarname, string defaultvalue) registercvar (DP_QC_REGISTERCVAR)
{ " min " , PF_min , 94 } , // #94 float(float a, floats) min (DP_QC_MINMAXBOUND)
{ " max " , PF_max , 95 } , // #95 float(float a, floats) max (DP_QC_MINMAXBOUND)
{ " bound " , PF_bound , 96 } , // #96 float(float minimum, float val, float maximum) bound (DP_QC_MINMAXBOUND)
{ " pow " , PF_pow , 97 } , // #97 float(float value) pow (DP_QC_SINCOSSQRTPOW)
2015-08-10 18:28:23 +00:00
{ " logarithm " , PF_Logarithm , 0 } ,
2013-03-12 22:53:23 +00:00
{ " findfloat " , PF_FindFloat , 98 } , // #98 entity(entity start, .float fld, float match) findfloat (DP_QC_FINDFLOAT)
2015-05-16 08:02:05 +00:00
{ " findentity " , PF_FindFloat , 98 } , // #98 entity(entity start, .float fld, float match) findfloat (DP_QC_FINDFLOAT)
2013-03-12 22:53:23 +00:00
{ " checkextension " , PF_checkextension , 99 } , // #99 float(string extname) checkextension (EXT_CSQC)
2016-01-18 05:22:07 +00:00
{ " checkbuiltin " , PF_checkbuiltin , 0 } ,
2013-10-08 14:28:11 +00:00
{ " anglemod " , PF_anglemod , 102 } ,
2021-08-04 21:17:52 +00:00
{ " anglesub " , PF_anglesub , 0 } ,
2005-07-14 01:57:34 +00:00
2005-01-17 17:43:13 +00:00
//110
2013-03-12 22:53:23 +00:00
{ " fopen " , PF_fopen , 110 } , // #110 float(string strname, float accessmode) fopen (FRIK_FILE)
{ " fclose " , PF_fclose , 111 } , // #111 void(float fnum) fclose (FRIK_FILE)
{ " fgets " , PF_fgets , 112 } , // #112 string(float fnum) fgets (FRIK_FILE)
{ " fputs " , PF_fputs , 113 } , // #113 void(float fnum, string str) fputs (FRIK_FILE)
2016-07-12 00:40:13 +00:00
{ " fread " , PF_fread , 0 } ,
{ " fwrite " , PF_fwrite , 0 } ,
2016-08-25 00:12:14 +00:00
{ " fseek " , PF_fseek , 0 } ,
{ " fsize " , PF_fsize , 0 } ,
2013-03-12 22:53:23 +00:00
{ " strlen " , PF_strlen , 114 } , // #114 float(string str) strlen (FRIK_FILE)
2015-01-21 18:18:37 +00:00
{ " strcat " , PF_strcat , 115 } , // #115 string(string str1, string str2, ...) strcat (FRIK_FILE)
2013-03-12 22:53:23 +00:00
{ " substring " , PF_substring , 116 } , // #116 string(string str, float start, float length) substring (FRIK_FILE)
2015-01-21 18:18:37 +00:00
{ " stov " , PF_stov , 117 } , // #117 vector(string str) stov (FRIK_FILE)
{ " strzone " , PF_strzone , 118 } , // #118 string(string str) dupstring (FRIK_FILE)
{ " strunzone " , PF_strunzone , 119 } , // #119 void(string str) freestring (FRIK_FILE)
2020-06-27 19:32:08 +00:00
# ifdef QCGC
{ " createbuffer " , PF_createbuffer , 0 } ,
# endif
2005-02-10 00:14:10 +00:00
2016-07-12 00:40:13 +00:00
{ " localsound " , PF_cl_localsound , 177 } ,
2005-02-10 00:14:10 +00:00
//200
2018-02-04 13:16:25 +00:00
{ " getmodelindex " , PF_cs_getmodelindex , 200 } ,
2022-06-19 15:17:41 +00:00
{ " getsoundindex " , PF_cs_getsoundindex , 0 } ,
2013-03-12 22:53:23 +00:00
{ " externcall " , PF_externcall , 201 } ,
{ " addprogs " , PF_cs_addprogs , 202 } ,
{ " externvalue " , PF_externvalue , 203 } ,
{ " externset " , PF_externset , 204 } ,
{ " externrefcall " , PF_externrefcall , 205 } ,
{ " instr " , PF_instr , 206 } ,
{ " openportal " , PF_cs_OpenPortal , 207 } , //q2bsps
{ " registertempent " , PF_NoCSQC , 208 } , //{"RegisterTempEnt", PF_RegisterTEnt, 0, 0, 0, 208},
{ " customtempent " , PF_NoCSQC , 209 } , //{"CustomTempEnt", PF_CustomTEnt, 0, 0, 0, 209},
2005-02-10 00:14:10 +00:00
//210
2021-07-17 15:09:34 +00:00
{ " fork " , PF_Fixme , 210 } , //{"fork", PF_Fork, 0, 0, 0, 210},
2013-03-12 22:53:23 +00:00
{ " abort " , PF_Abort , 211 } , //#211 void() abort (FTE_MULTITHREADED)
2021-07-17 15:09:34 +00:00
{ " sleep " , PF_Fixme , 212 } , //{"sleep", PF_Sleep, 0, 0, 0, 212},
2013-03-12 22:53:23 +00:00
{ " forceinfokey " , PF_NoCSQC , 213 } , //{"forceinfokey", PF_ForceInfoKey, 0, 0, 0, 213},
2018-07-05 16:21:44 +00:00
{ " forceinfokeyblob " , PF_NoCSQC , 0 } , //{"forceinfokey", PF_ForceInfoKey, 0, 0, 0, 213},
2013-03-12 22:53:23 +00:00
{ " chat " , PF_NoCSQC , 214 } , //{"chat", PF_chat, 0, 0, 0, 214},// #214 void(string filename, float starttag, entity edict) SV_Chat (FTE_NPCCHAT)
2005-07-14 01:57:34 +00:00
2013-03-12 22:53:23 +00:00
{ " particle2 " , PF_cs_particle2 , 215 } , //215 (FTE_PEXT_HEXEN2)
{ " particle3 " , PF_cs_particle3 , 216 } , //216 (FTE_PEXT_HEXEN2)
{ " particle4 " , PF_cs_particle4 , 217 } , //217 (FTE_PEXT_HEXEN2)
2005-07-14 01:57:34 +00:00
//EXT_DIMENSION_PLANES
2013-03-12 22:53:23 +00:00
{ " bitshift " , PF_bitshift , 218 } , //#218 bitshift (EXT_DIMENSION_PLANES)
{ " te_lightningblood " , PF_cl_te_lightningblood , 219 } , // #219 te_lightningblood void(vector org) (FTE_TE_STANDARDEFFECTBUILTINS)
2005-02-10 00:14:10 +00:00
//220
2013-03-12 22:53:23 +00:00
// {"map_builtin", PF_Fixme, 220}, //like #100 - takes 2 args. arg0 is builtinname, 1 is number to map to.
{ " strstrofs " , PF_strstrofs , 221 } , // #221 float(string s1, string sub) strstrofs (FTE_STRINGS)
{ " str2chr " , PF_str2chr , 222 } , // #222 float(string str, float index) str2chr (FTE_STRINGS)
{ " chr2str " , PF_chr2str , 223 } , // #223 string(float chr, ...) chr2str (FTE_STRINGS)
{ " strconv " , PF_strconv , 224 } , // #224 string(float ccase, float redalpha, float redchars, string str, ...) strconv (FTE_STRINGS)
{ " strpad " , PF_strpad , 225 } , // #225 string strpad(float pad, string str1, ...) strpad (FTE_STRINGS)
{ " infoadd " , PF_infoadd , 226 } , // #226 string(string old, string key, string value) infoadd
{ " infoget " , PF_infoget , 227 } , // #227 string(string info, string key) infoget
2013-06-23 02:17:02 +00:00
{ " strcmp " , PF_strncmp , 228 } , // #228 float(string s1, string s2) strcmp (FTE_STRINGS)
2013-03-12 22:53:23 +00:00
{ " strncmp " , PF_strncmp , 228 } , // #228 float(string s1, string s2, float len) strncmp (FTE_STRINGS)
2013-06-23 02:17:02 +00:00
{ " strcasecmp " , PF_strncasecmp , 229 } , // #229 float(string s1, string s2) strcasecmp (FTE_STRINGS)
2005-02-10 00:14:10 +00:00
//230
2013-03-12 22:53:23 +00:00
{ " strncasecmp " , PF_strncasecmp , 230 } , // #230 float(string s1, string s2, float len) strncasecmp (FTE_STRINGS)
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
{ " strtrim " , PF_strtrim , 0 } ,
2013-03-12 22:53:23 +00:00
{ " calltimeofday " , PF_calltimeofday , 231 } ,
{ " clientstat " , PF_NoCSQC , 232 } , // #231 clientstat
{ " runclientphys " , PF_NoCSQC , 233 } , // #232 runclientphys
// {"isbackbuffered", PF_NoCSQC, 234}, // #233 float(entity ent) isbackbuffered
2011-12-05 15:23:40 +00:00
//I messed up, 234 is meant to be isbackbuffered. luckily that's not present in csqc, but still, this is messy. Don't document this.
2013-03-12 22:53:23 +00:00
{ " rotatevectorsbytag " , PF_rotatevectorsbytag , 234 } , // #234
2008-11-09 22:29:28 +00:00
{ " rotatevectorsbyangle " , PF_rotatevectorsbyangles , 235 } , // #235
2011-12-05 15:23:40 +00:00
{ " rotatevectorsbyvectors " , PF_rotatevectorsbymatrix , 236 } , // #236
2013-03-12 22:53:23 +00:00
{ " skinforname " , PF_skinforname , 237 } , // #237
{ " shaderforname " , PF_shaderforname , 238 } , // #238
2020-03-07 09:00:40 +00:00
{ " remapshader " , PF_remapshader , 0 } ,
2013-03-12 22:53:23 +00:00
{ " te_bloodqw " , PF_cl_te_bloodqw , 239 } , // #239 void te_bloodqw(vector org[, float count]) (FTE_TE_STANDARDEFFECTBUILTINS)
2013-12-29 22:48:28 +00:00
{ " checkpvs " , PF_checkpvs , 240 } ,
2013-03-12 22:53:23 +00:00
// {"matchclientname", PF_matchclient, 241},
2018-07-22 11:49:37 +00:00
{ " sendpacket " , PF_cl_SendPacket , 242 } , //void(string dest, string content) sendpacket = #242; (FTE_QC_SENDPACKET)
2013-03-12 22:53:23 +00:00
// {"bulleten", PF_bulleten, 243}, (removed builtin)
{ " rotatevectorsbytag " , PF_rotatevectorsbytag , 244 } ,
2016-12-21 15:48:52 +00:00
{ " mod " , PF_mod , 245 } ,
2013-03-12 22:53:23 +00:00
{ " sqlconnect " , PF_NoCSQC , 250 } , // #250 float([string host], [string user], [string pass], [string defaultdb], [string driver]) sqlconnect (FTE_SQL)
{ " sqldisconnect " , PF_NoCSQC , 251 } , // #251 void(float serveridx) sqldisconnect (FTE_SQL)
{ " sqlopenquery " , PF_NoCSQC , 252 } , // #252 float(float serveridx, void(float serveridx, float queryidx, float rows, float columns, float eof) callback, float querytype, string query) sqlopenquery (FTE_SQL)
{ " sqlclosequery " , PF_NoCSQC , 253 } , // #253 void(float serveridx, float queryidx) sqlclosequery (FTE_SQL)
{ " sqlreadfield " , PF_NoCSQC , 254 } , // #254 string(float serveridx, float queryidx, float row, float column) sqlreadfield (FTE_SQL)
{ " sqlerror " , PF_NoCSQC , 255 } , // #255 string(float serveridx, [float queryidx]) sqlerror (FTE_SQL)
{ " sqlescape " , PF_NoCSQC , 256 } , // #256 string(float serveridx, string data) sqlescape (FTE_SQL)
{ " sqlversion " , PF_NoCSQC , 257 } , // #257 string(float serveridx) sqlversion (FTE_SQL)
{ " sqlreadfloat " , PF_NoCSQC , 258 } , // #258 float(float serveridx, float queryidx, float row, float column) sqlreadfloat (FTE_SQL)
2022-02-19 20:48:40 +00:00
{ " json_parse " , PF_json_parse , 0 } ,
{ " json_free " , PF_memfree , 0 } ,
{ " json_get_value_type " , PF_json_get_value_type , 0 } ,
{ " json_get_integer " , PF_json_get_integer , 0 } ,
{ " json_get_float " , PF_json_get_float , 0 } ,
{ " json_get_string " , PF_json_get_string , 0 } ,
{ " json_find_object_child " , PF_json_find_object_child , 0 } ,
{ " json_get_length " , PF_json_get_length , 0 } ,
{ " json_get_child_at_index " , PF_json_get_child_at_index , 0 } ,
{ " json_get_name " , PF_json_get_name , 0 } ,
{ " js_run_script " , PF_js_run_script , 0 } ,
2013-03-12 22:53:23 +00:00
{ " stoi " , PF_stoi , 259 } ,
{ " itos " , PF_itos , 260 } ,
{ " stoh " , PF_stoh , 261 } ,
{ " htos " , PF_htos , 262 } ,
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
{ " ftoi " , PF_ftoi , 0 } ,
{ " itof " , PF_itof , 0 } ,
2013-03-12 22:53:23 +00:00
{ " skel_create " , PF_skel_create , 263 } , //float(float modlindex) skel_create = #263; // (FTE_CSQC_SKELETONOBJECTS)
{ " skel_build " , PF_skel_build , 264 } , //float(float skel, entity ent, float modelindex, float retainfrac, float firstbone, float lastbone, optional float addition) skel_build = #264; // (FTE_CSQC_SKELETONOBJECTS)
2018-03-04 14:41:16 +00:00
{ " skel_build_ptr " , PF_skel_build_ptr , 0 } , //float(float skel, int numblends, __variant *blends, int blendsize) skel_build_ptr = #0;
2013-03-12 22:53:23 +00:00
{ " skel_get_numbones " , PF_skel_get_numbones , 265 } , //float(float skel) skel_get_numbones = #265; // (FTE_CSQC_SKELETONOBJECTS)
{ " skel_get_bonename " , PF_skel_get_bonename , 266 } , //string(float skel, float bonenum) skel_get_bonename = #266; // (FTE_CSQC_SKELETONOBJECTS) (returns tempstring)
{ " skel_get_boneparent " , PF_skel_get_boneparent , 267 } , //float(float skel, float bonenum) skel_get_boneparent = #267; // (FTE_CSQC_SKELETONOBJECTS)
{ " skel_find_bone " , PF_skel_find_bone , 268 } , //float(float skel, string tagname) skel_get_boneidx = #268; // (FTE_CSQC_SKELETONOBJECTS)
{ " skel_get_bonerel " , PF_skel_get_bonerel , 269 } , //vector(float skel, float bonenum) skel_get_bonerel = #269; // (FTE_CSQC_SKELETONOBJECTS) (sets v_forward etc)
{ " skel_get_boneabs " , PF_skel_get_boneabs , 270 } , //vector(float skel, float bonenum) skel_get_boneabs = #270; // (FTE_CSQC_SKELETONOBJECTS) (sets v_forward etc)
{ " skel_set_bone " , PF_skel_set_bone , 271 } , //void(float skel, float bonenum, vector org) skel_set_bone = #271; // (FTE_CSQC_SKELETONOBJECTS) (reads v_forward etc)
2017-12-08 06:57:50 +00:00
{ " skel_premul_bone " , PF_skel_premul_bone , 272 } , //void(float skel, float bonenum, vector org) skel_mul_bone = #272; // (FTE_CSQC_SKELETONOBJECTS) (reads v_forward etc)
{ " skel_premul_bones " , PF_skel_premul_bones , 273 } , //void(float skel, float startbone, float endbone, vector org) skel_mul_bone = #273; // (FTE_CSQC_SKELETONOBJECTS) (reads v_forward etc)
{ " skel_postmul_bone " , PF_skel_postmul_bone , 0 } , //void(float skel, float bonenum, vector org) skel_mul_bone = #272; // (FTE_CSQC_SKELETONOBJECTS) (reads v_forward etc)
// {"skel_postmul_bones", PF_skel_postmul_bones, 0},//void(float skel, float startbone, float endbone, vector org) skel_mul_bone = #273; // (FTE_CSQC_SKELETONOBJECTS) (reads v_forward etc)
2013-03-12 22:53:23 +00:00
{ " skel_copybones " , PF_skel_copybones , 274 } , //void(float skeldst, float skelsrc, float startbone, float entbone) skel_copybones = #274; // (FTE_CSQC_SKELETONOBJECTS)
{ " skel_delete " , PF_skel_delete , 275 } , //void(float skel) skel_delete = #275; // (FTE_CSQC_SKELETONOBJECTS)
2022-01-07 03:18:00 +00:00
{ " frameforname " , PF_frameforname , 276 } , //float(float modidx, string framename) frameforname = #276 (FTE_CSQC_SKELETONOBJECTS)
{ " frameduration " , PF_frameduration , 277 } , //float(float modidx, float framenum) frameduration = #277 (FTE_CSQC_SKELETONOBJECTS)
2022-01-08 10:01:29 +00:00
{ " frameforaction " , PF_frameforaction , 0 } , //float(float modidx, int actionid) frameforaction = #0
2017-01-13 00:39:50 +00:00
{ " processmodelevents " , PF_processmodelevents , 0 } ,
{ " getnextmodelevent " , PF_getnextmodelevent , 0 } ,
{ " getmodeleventidx " , PF_getmodeleventidx , 0 } ,
2013-03-12 22:53:23 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
{ " getlocationname " , PF_getlocationname , 0 } ,
2016-07-29 20:25:48 +00:00
{ " crossproduct " , PF_crossproduct , 0 } ,
2017-06-15 14:23:26 +00:00
{ " pushmove " , PF_pushmove , 0 } ,
2015-09-01 04:45:15 +00:00
# ifdef TERRAIN
2013-03-12 22:53:23 +00:00
{ " terrain_edit " , PF_terrain_edit , 278 } , //void(float action, vector pos, float radius, float quant) terrain_edit = #278 (??FTE_TERRAIN_EDIT??)
2015-04-14 23:12:17 +00:00
{ " brush_get " , PF_brush_get , 0 } ,
{ " brush_create " , PF_brush_create , 0 } ,
{ " brush_delete " , PF_brush_delete , 0 } ,
{ " brush_selected " , PF_brush_selected , 0 } ,
{ " brush_getfacepoints " , PF_brush_getfacepoints , 0 } ,
2015-07-30 16:26:15 +00:00
{ " brush_calcfacepoints " , PF_brush_calcfacepoints , 0 } ,
2015-04-14 23:12:17 +00:00
{ " brush_findinvolume " , PF_brush_findinvolume , 0 } ,
2020-10-06 03:17:28 +00:00
{ " patch_getcp " , PF_patch_getcp , 0 } ,
{ " patch_getmesh " , PF_patch_getmesh , 0 } ,
{ " patch_create " , PF_patch_create , 0 } ,
2023-04-17 02:39:30 +00:00
{ " patch_evaluate " , PF_patch_evaluate , 0 } ,
2015-09-01 04:45:15 +00:00
# endif
2015-04-14 23:12:17 +00:00
2018-04-27 16:40:50 +00:00
# ifdef ENGINE_ROUTING
{ " route_calculate " , PF_route_calculate , 0 } ,
# endif
2013-03-12 22:53:23 +00:00
{ " touchtriggers " , PF_touchtriggers , 279 } , //void() touchtriggers = #279;
{ " skel_ragupdate " , PF_skel_ragedit , 281 } , // (FTE_QC_RAGDOLL)
{ " skel_mmap " , PF_skel_mmap , 282 } , // (FTE_QC_RAGDOLL)
{ " skel_set_bone_world " , PF_skel_set_bone_world , 283 } ,
{ " frametoname " , PF_frametoname , 284 } , //string(float modidx, float framenum) frametoname
{ " skintoname " , PF_skintoname , 285 } , //string(float modidx, float skin) skintoname
2014-10-05 20:04:11 +00:00
{ " resourcestatus " , PF_resourcestatus , 286 } ,
2012-03-19 06:30:41 +00:00
2013-05-03 04:28:08 +00:00
{ " hash_createtab " , PF_hash_createtab , 287 } ,
{ " hash_destroytab " , PF_hash_destroytab , 288 } ,
{ " hash_add " , PF_hash_add , 289 } ,
{ " hash_get " , PF_hash_get , 290 } ,
{ " hash_delete " , PF_hash_delete , 291 } ,
{ " hash_getkey " , PF_hash_getkey , 292 } ,
2013-08-21 07:14:39 +00:00
{ " hash_getcb " , PF_hash_getcb , 293 } ,
{ " checkcommand " , PF_checkcommand , 294 } ,
2014-02-07 08:38:40 +00:00
{ " argescape " , PF_argescape , 295 } ,
2016-12-13 11:50:15 +00:00
{ " modelframecount " , PF_modelframecount , 0 } ,
2005-03-07 08:40:03 +00:00
//300
2013-03-12 22:53:23 +00:00
{ " clearscene " , PF_R_ClearScene , 300 } , // #300 void() clearscene (EXT_CSQC)
{ " addentities " , PF_R_AddEntityMask , 301 } , // #301 void(float mask) addentities (EXT_CSQC)
2017-11-16 22:20:40 +00:00
{ " addentity " , PF_R_AddEntity , 302 } , // #302 void(entity ent) addentity (EXT_CSQC)
2022-06-26 08:08:50 +00:00
{ " addentity_lighting " , PF_R_AddEntityLighting , 0 } ,
2017-11-24 18:40:17 +00:00
{ " removeentity " , PF_R_RemoveEntity , 0 } ,
2013-03-12 22:53:23 +00:00
{ " setproperty " , PF_R_SetViewFlag , 303 } , // #303 float(float property, ...) setproperty (EXT_CSQC)
{ " renderscene " , PF_R_RenderScene , 304 } , // #304 void() renderscene (EXT_CSQC)
2005-03-07 08:40:03 +00:00
2018-03-05 11:35:58 +00:00
{ " dynamiclight_add " , PF_R_DynamicLight_AddDynamic , 305 } , // #305 float(vector org, float radius, vector lightcolours) adddynamiclight (EXT_CSQC)
2005-08-11 04:14:33 +00:00
2013-03-12 22:53:23 +00:00
{ " R_BeginPolygon " , PF_R_PolygonBegin , 306 } , // #306 void(string texturename) R_BeginPolygon (EXT_CSQC_???)
{ " R_PolygonVertex " , PF_R_PolygonVertex , 307 } , // #307 void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex (EXT_CSQC_???)
{ " R_EndPolygon " , PF_R_PolygonEnd , 308 } , // #308 void() R_EndPolygon (EXT_CSQC_???)
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
{ " R_EndPolygonRibbon " , PF_R_PolygonEndRibbon , 0 } ,
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
{ " addtrisoup_simple " , PF_R_AddTrisoup_Simple , 0 } ,
2005-03-07 08:40:03 +00:00
2013-03-12 22:53:23 +00:00
{ " getproperty " , PF_R_GetViewFlag , 309 } , // #309 vector/float(float property) getproperty (EXT_CSQC_1)
2005-08-11 04:14:33 +00:00
//310
//maths stuff that uses the current view settings.
2013-03-12 22:53:23 +00:00
{ " unproject " , PF_cs_unproject , 310 } , // #310 vector (vector v) unproject (EXT_CSQC)
{ " project " , PF_cs_project , 311 } , // #311 vector (vector v) project (EXT_CSQC)
2005-08-11 04:14:33 +00:00
2008-11-09 22:29:28 +00:00
// {"?", PF_Fixme, 312}, // #312
// {"?", PF_Fixme, 313}, // #313
2005-08-11 04:14:33 +00:00
//2d (immediate) operations
2019-09-04 07:59:40 +00:00
{ " drawtextfield " , PF_CL_DrawTextField , 0 /*314*/ } ,
{ " drawline " , PF_CL_drawline , 315 } , // #315 void(float width, vector pos1, vector pos2) drawline (EXT_CSQC)
{ " iscachedpic " , PF_CL_is_cached_pic , 316 } , // #316 float(string name) iscachedpic (EXT_CSQC)
{ " precache_pic " , PF_CL_precache_pic , 317 } , // #317 string(string name, float trywad) precache_pic (EXT_CSQC)
{ " r_uploadimage " , PF_CL_uploadimage , 0 } ,
{ " r_readimage " , PF_CL_readimage , 0 } ,
{ " drawgetimagesize " , PF_CL_drawgetimagesize , 318 } , // #318 vector(string picname) draw_getimagesize (EXT_CSQC)
{ " freepic " , PF_CL_free_pic , 319 } , // #319 void(string name) freepic (EXT_CSQC)
2020-06-01 01:31:46 +00:00
{ " spriteframe " , PF_cs_spriteframe , 0 } ,
2005-03-07 08:40:03 +00:00
//320
2019-09-04 07:59:40 +00:00
{ " drawcharacter " , PF_CL_drawcharacter , 320 } , // #320 float(vector position, float character, vector scale, vector rgb, float alpha [, float flag]) drawcharacter (EXT_CSQC, [EXT_CSQC_???])
{ " drawrawstring " , PF_CL_drawrawstring , 321 } , // #321 float(vector position, string text, vector scale, vector rgb, float alpha [, float flag]) drawstring (EXT_CSQC, [EXT_CSQC_???])
{ " drawpic " , PF_CL_drawpic , 322 } , // #322 float(vector position, string pic, vector size, vector rgb, float alpha [, float flag]) drawpic (EXT_CSQC, [EXT_CSQC_???])
{ " drawrotpic " , PF_CL_drawrotpic , 0 } ,
{ " drawfill " , PF_CL_drawfill , 323 } , // #323 float(vector position, vector size, vector rgb, float alpha [, float flag]) drawfill (EXT_CSQC, [EXT_CSQC_???])
2013-03-12 22:53:23 +00:00
{ " drawsetcliparea " , PF_CL_drawsetcliparea , 324 } , // #324 void(float x, float y, float width, float height) drawsetcliparea (EXT_CSQC_???)
2019-09-04 07:59:40 +00:00
{ " drawresetcliparea " , PF_CL_drawresetcliparea , 325 } , // #325 void(void) drawresetcliparea (EXT_CSQC_???)
2013-03-12 22:53:23 +00:00
2019-09-04 07:59:40 +00:00
{ " drawstring " , PF_CL_drawcolouredstring , 326 } , // #326
{ " stringwidth " , PF_CL_stringwidth , 327 } , // #327 EXT_CSQC_'DARKPLACES'
{ " drawsubpic " , PF_CL_drawsubpic , 328 } , // #328 EXT_CSQC_'DARKPLACES'
{ " drawrotsubpic " , PF_CL_drawrotsubpic , 0 } ,
2019-09-17 19:49:39 +00:00
# ifdef HAVE_LEGACY
{ " drawrotpic_dp " , PF_CL_drawrotpic_dp , 329 } ,
# endif
2005-03-07 08:40:03 +00:00
//330
2020-09-08 05:11:09 +00:00
{ " getstati " , PF_cs_getstat_int , 330 } , // #330 int(float stnum) getstati (EXT_CSQC)
{ " getstatf " , PF_cs_getstat_float , 331 } , // #331 float(float stnum) getstatf (EXT_CSQC)
{ " getstats " , PF_cs_getstat_string , 332 } , // #332 string(float firststnum) getstats (EXT_CSQC)
2015-11-18 07:37:39 +00:00
{ " getplayerstat " , PF_cs_getplayerstat , 0 } , // #0 __variant(float playernum, float statnum, float stattype) getplayerstat
2013-03-12 22:53:23 +00:00
{ " setmodelindex " , PF_cs_SetModelIndex , 333 } , // #333 void(entity e, float mdlindex) setmodelindex (EXT_CSQC)
{ " modelnameforindex " , PF_cs_ModelnameForIndex , 334 } , // #334 string(float mdlindex) modelnameforindex (EXT_CSQC)
2022-06-19 15:17:41 +00:00
{ " soundnameforindex " , PF_cs_SoundnameForIndex , 0 } ,
2005-08-11 04:14:33 +00:00
2015-12-28 17:41:39 +00:00
{ " particleeffectnum " , PF_cs_particleeffectnum , 335 } , // #335 float(string effectname) particleeffectnum (EXT_CSQC)
2013-03-12 22:53:23 +00:00
{ " trailparticles " , PF_cs_trailparticles , 336 } , // #336 void(float effectnum, entity ent, vector start, vector end) trailparticles (EXT_CSQC),
2015-02-02 08:01:53 +00:00
{ " trailparticles_dp " , PF_cs_trailparticles , 336 } , // #336 DP sucks
2013-03-12 22:53:23 +00:00
{ " pointparticles " , PF_cs_pointparticles , 337 } , // #337 void(float effectnum, vector origin [, vector dir, float count]) pointparticles (EXT_CSQC)
2005-08-11 04:14:33 +00:00
2013-03-12 22:53:23 +00:00
{ " cprint " , PF_cl_cprint , 338 } , // #338 void(string s) cprint (EXT_CSQC)
{ " print " , PF_print , 339 } , // #339 void(string s) print (EXT_CSQC)
2005-03-07 08:40:03 +00:00
//340
2013-03-12 22:53:23 +00:00
{ " keynumtostring " , PF_cl_keynumtostring , 340 } , // #340 string(float keynum) keynumtostring (EXT_CSQC)
{ " stringtokeynum " , PF_cl_stringtokeynum , 341 } , // #341 float(string keyname) stringtokeynum (EXT_CSQC)
{ " getkeybind " , PF_cl_getkeybind , 342 } , // #342 string(float keynum) getkeybind (EXT_CSQC)
2005-08-11 04:14:33 +00:00
2014-09-02 02:44:43 +00:00
{ " setcursormode " , PF_cl_setcursormode , 343 } , // #343 This is originally a DP extension
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
{ " getcursormode " , PF_cl_getcursormode , 0 } , //
{ " setmousepos " , PF_cl_setmousepos , 0 } , //
2013-12-17 22:45:37 +00:00
{ " getmousepos " , PF_cl_getmousepos , 344 } , // #344 This is a DP extension
2005-08-11 04:14:33 +00:00
2020-07-14 00:48:56 +00:00
// {"clipboard_get", PF_cs_clipboard_get, 0}, //don't let csqc read the clipboard right now. its too risky.
{ " clipboard_set " , PF_cl_clipboard_set , 0 } , //it can change it though, no real problem there. just kill the program if its filling it with crap.
2013-03-12 22:53:23 +00:00
{ " getinputstate " , PF_cs_getinputstate , 345 } , // #345 float(float framenum) getinputstate (EXT_CSQC)
2014-03-30 08:55:06 +00:00
{ " setsensitivityscaler " , PF_cs_setsensitivityscaler , 346 } , // #346 void(float sens) setsensitivityscaler (EXT_CSQC)
2005-08-11 04:14:33 +00:00
2013-03-12 22:53:23 +00:00
{ " runstandardplayerphysics " , PF_cs_runplayerphysics , 347 } , // #347 void() runstandardplayerphysics (EXT_CSQC)
2005-08-11 04:14:33 +00:00
2017-08-29 02:29:06 +00:00
{ " getplayerkeyvalue " , PF_cs_getplayerkeystring , 348 } , // #348 string(float playernum, string keyname) getplayerkeyvalue (EXT_CSQC)
2018-07-05 16:21:44 +00:00
{ " getplayerkeyfloat " , PF_cs_getplayerkeyfloat , 0 } , // #348 string(float playernum, string keyname) getplayerkeyvalue
{ " getplayerkeyblob " , PF_cs_getplayerkeyblob , 0 } , // #0 int(float playernum, string keyname, optional void *outptr, int size) getplayerkeyblob
2019-06-17 04:21:41 +00:00
{ " setlocaluserinfo " , PF_cl_setlocaluserinfo , 0 } ,
{ " getlocaluserinfo " , PF_cl_getlocaluserinfostring , 0 } ,
{ " setlocaluserinfoblob " , PF_cl_setlocaluserinfo , 0 } ,
{ " getlocaluserinfoblob " , PF_cl_getlocaluserinfoblob , 0 } ,
2005-03-07 08:40:03 +00:00
2013-03-12 22:53:23 +00:00
{ " isdemo " , PF_cl_playingdemo , 349 } , // #349 float() isdemo (EXT_CSQC)
2005-03-07 08:40:03 +00:00
//350
2013-03-12 22:53:23 +00:00
{ " isserver " , PF_cl_runningserver , 350 } , // #350 float() isserver (EXT_CSQC)
2005-08-11 04:14:33 +00:00
2013-03-12 22:53:23 +00:00
{ " SetListener " , PF_cs_setlistener , 351 } , // #351 void(vector origin, vector forward, vector right, vector up) SetListener (EXT_CSQC)
2016-07-12 00:40:13 +00:00
{ " setup_reverb " , PF_cs_setupreverb , 0 } ,
2013-03-12 22:53:23 +00:00
{ " registercommand " , PF_cs_registercommand , 352 } , // #352 void(string cmdname) registercommand (EXT_CSQC)
{ " wasfreed " , PF_WasFreed , 353 } , // #353 float(entity ent) wasfreed (EXT_CSQC) (should be availabe on server too)
2005-08-11 04:14:33 +00:00
2013-03-12 22:53:23 +00:00
{ " serverkey " , PF_cs_serverkey , 354 } , // #354 string(string key) serverkey;
2017-08-29 02:29:06 +00:00
{ " serverkeyfloat " , PF_cs_serverkeyfloat , 0 } , // #0 float(string key) serverkeyfloat;
2018-07-05 16:21:44 +00:00
{ " serverkeyblob " , PF_cs_serverkeyblob , 0 } ,
2013-03-12 22:53:23 +00:00
{ " getentitytoken " , PF_cs_getentitytoken , 355 } , // #355 string() getentitytoken;
{ " findfont " , PF_CL_findfont , 356 } ,
{ " loadfont " , PF_CL_loadfont , 357 } ,
// {"?", PF_Fixme, 358}, // #358
{ " sendevent " , PF_cs_sendevent , 359 } , // #359 void(string evname, string evargs, ...) (EXT_CSQC_1)
2005-03-07 08:40:03 +00:00
//360
2005-08-11 04:14:33 +00:00
//note that 'ReadEntity' is pretty hard to implement reliably. Modders should use a combination of ReadShort, and findfloat, and remember that it might not be known clientside (pvs culled or other reason)
2013-03-12 22:53:23 +00:00
{ " readbyte " , PF_ReadByte , 360 } , // #360 float() readbyte (EXT_CSQC)
{ " readchar " , PF_ReadChar , 361 } , // #361 float() readchar (EXT_CSQC)
{ " readshort " , PF_ReadShort , 362 } , // #362 float() readshort (EXT_CSQC)
{ " readlong " , PF_ReadLong , 363 } , // #363 float() readlong (EXT_CSQC)
{ " readcoord " , PF_ReadCoord , 364 } , // #364 float() readcoord (EXT_CSQC)
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
2013-03-12 22:53:23 +00:00
{ " readangle " , PF_ReadAngle , 365 } , // #365 float() readangle (EXT_CSQC)
{ " readstring " , PF_ReadString , 366 } , // #366 string() readstring (EXT_CSQC)
2020-09-29 07:09:01 +00:00
{ " readfloat " , PF_ReadFloat , 367 } , // #367 float() readfloat (EXT_CSQC)
{ " readdouble " , PF_ReadDouble , 0 } , // #367 __double() readdouble (EXT_CSQC)
{ " readint " , PF_ReadInt , 0 } , // #0 int() readint
{ " readint64 " , PF_ReadInt64 , 0 } , // #0 __int64() readint64
2022-05-28 17:58:39 +00:00
{ " readuint64 " , PF_ReadUInt64 , 0 } , // #0 __uint64() readuint64
2013-03-12 22:53:23 +00:00
{ " readentitynum " , PF_ReadEntityNum , 368 } , // #368 float() readentitynum (EXT_CSQC)
2009-04-01 22:03:56 +00:00
2011-12-05 15:23:40 +00:00
// {"readserverentitystate", PF_ReadServerEntityState, 369}, // #369 void(float flags, float simtime) readserverentitystate (EXT_CSQC_1)
2009-04-01 22:03:56 +00:00
// {"readsingleentitystate", PF_ReadSingleEntityState, 370},
2013-03-12 22:53:23 +00:00
{ " deltalisten " , PF_DeltaListen , 371 } , // #371 float(string modelname, float flags) deltalisten (EXT_CSQC_1)
2005-03-07 08:40:03 +00:00
2018-03-05 11:35:58 +00:00
{ " dynamiclight_spawnstatic " , PF_R_DynamicLight_AddStatic , 0 } ,
2013-05-03 04:28:08 +00:00
{ " dynamiclight_get " , PF_R_DynamicLight_Get , 372 } ,
{ " dynamiclight_set " , PF_R_DynamicLight_Set , 373 } ,
2013-03-12 22:53:23 +00:00
{ " particleeffectquery " , PF_cs_particleeffectquery , 374 } ,
2013-05-03 04:28:08 +00:00
{ " adddecal " , PF_R_AddDecal , 375 } ,
2014-03-30 08:55:06 +00:00
{ " setcustomskin " , PF_cs_setcustomskin , 376 } ,
2018-01-22 19:18:04 +00:00
{ " loadcustomskin " , PF_cs_loadcustomskin , 377 } ,
{ " applycustomskin " , PF_cs_applycustomskin , 378 } ,
{ " releasecustomskin " , PF_cs_releasecustomskin , 379 } ,
2009-11-04 21:16:50 +00:00
2013-05-03 04:28:08 +00:00
{ " memalloc " , PF_memalloc , 384 } ,
{ " memfree " , PF_memfree , 385 } ,
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
{ " memcmp " , PF_memcmp , 0 } ,
2013-05-03 04:28:08 +00:00
{ " memcpy " , PF_memcpy , 386 } ,
{ " memfill8 " , PF_memfill8 , 387 } ,
{ " memgetval " , PF_memgetval , 388 } ,
{ " memsetval " , PF_memsetval , 389 } ,
{ " memptradd " , PF_memptradd , 390 } ,
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
{ " memstrsize " , PF_memstrsize , 0 } ,
2023-01-09 05:12:04 +00:00
{ " base64encode " , PF_base64encode , 0 } ,
{ " base64decode " , PF_base64decode , 0 } ,
2012-09-30 05:52:03 +00:00
2013-08-21 07:14:39 +00:00
{ " con_getset " , PF_SubConGetSet , 391 } ,
2014-05-30 03:57:30 +00:00
{ " con_printf " , PF_SubConPrintf , 392 } ,
2013-08-21 07:14:39 +00:00
{ " con_draw " , PF_SubConDraw , 393 } ,
{ " con_input " , PF_SubConInput , 394 } ,
2016-07-12 00:40:13 +00:00
{ " setwindowcaption " , PF_cl_setwindowcaption , 0 } ,
2015-04-14 23:12:17 +00:00
{ " cvars_haveunsaved " , PF_cvars_haveunsaved , 0 } ,
2015-09-06 03:30:28 +00:00
{ " entityprotection " , PF_entityprotection , 0 } ,
2008-11-09 22:29:28 +00:00
//400
2015-09-06 03:30:28 +00:00
{ " copyentity " , PF_copyentity , 400 } , // #400 void(entity from, entity to) copyentity (DP_QC_COPYENTITY)
2021-07-01 15:43:28 +00:00
{ " setcolor " , PF_NoCSQC , 401 } , // #401 void(entity cl, float colours) setcolors (DP_SV_SETCOLOR) (don't implement)
2017-08-14 16:38:44 +00:00
{ " findchain " , PF_findchain , 402 } , // #402 entity(string field, string match) findchain (DP_QC_FINDCHAIN)
{ " findchainfloat " , PF_findchainfloat , 403 } , // #403 entity(float fld, float match) findchainfloat (DP_QC_FINDCHAINFLOAT)
2013-05-03 04:28:08 +00:00
{ " effect " , PF_cl_effect , 404 } , // #404 void(vector org, string modelname, float startframe, float endframe, float framerate) effect (DP_SV_EFFECT)
{ " te_blood " , PF_cl_te_blooddp , 405 } , // #405 void(vector org, vector velocity, float howmany) te_blood (DP_TE_BLOOD)
{ " te_bloodshower " , PF_cl_te_bloodshower , 406 } , // #406 void(vector mincorner, vector maxcorner, float explosionspeed, float howmany) te_bloodshower (DP_TE_BLOODSHOWER)
{ " te_explosionrgb " , PF_cl_te_explosionrgb , 407 } , // #407 void(vector org, vector color) te_explosionrgb (DP_TE_EXPLOSIONRGB)
{ " te_particlecube " , PF_cl_te_particlecube , 408 } , // #408 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color, float gravityflag, float randomveljitter) te_particlecube (DP_TE_PARTICLECUBE)
{ " te_particlerain " , PF_cl_te_particlerain , 409 } , // #409 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlerain (DP_TE_PARTICLERAIN)
{ " te_particlesnow " , PF_cl_te_particlesnow , 410 } , // #410 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlesnow (DP_TE_PARTICLESNOW)
{ " te_spark " , PF_cl_te_spark , 411 } , // #411 void(vector org, vector vel, float howmany) te_spark (DP_TE_SPARK)
{ " te_gunshotquad " , PF_cl_te_gunshotquad , 412 } , // #412 void(vector org) te_gunshotquad (DP_TE_QUADEFFECTS1)
{ " te_spikequad " , PF_cl_te_spikequad , 413 } , // #413 void(vector org) te_spikequad (DP_TE_QUADEFFECTS1)
{ " te_superspikequad " , PF_cl_te_superspikequad , 414 } , // #414 void(vector org) te_superspikequad (DP_TE_QUADEFFECTS1)
{ " te_explosionquad " , PF_cl_te_explosionquad , 415 } , // #415 void(vector org) te_explosionquad (DP_TE_QUADEFFECTS1)
{ " te_smallflash " , PF_cl_te_smallflash , 416 } , // #416 void(vector org) te_smallflash (DP_TE_SMALLFLASH)
{ " te_customflash " , PF_cl_te_customflash , 417 } , // #417 void(vector org, float radius, float lifetime, vector color) te_customflash (DP_TE_CUSTOMFLASH)
{ " te_gunshot " , PF_cl_te_gunshot , 418 } , // #418 void(vector org) te_gunshot (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_spike " , PF_cl_te_spike , 419 } , // #419 void(vector org) te_spike (DP_TE_STANDARDEFFECTBUILTINS)
2013-03-12 22:53:23 +00:00
{ " te_superspike " , PF_cl_te_superspike , 420 } , // #420 void(vector org) te_superspike (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_explosion " , PF_cl_te_explosion , 421 } , // #421 void(vector org) te_explosion (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_tarexplosion " , PF_cl_te_tarexplosion , 422 } , // #422 void(vector org) te_tarexplosion (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_wizspike " , PF_cl_te_wizspike , 423 } , // #423 void(vector org) te_wizspike (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_knightspike " , PF_cl_te_knightspike , 424 } , // #424 void(vector org) te_knightspike (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_lavasplash " , PF_cl_te_lavasplash , 425 } , // #425 void(vector org) te_lavasplash (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_teleport " , PF_cl_te_teleport , 426 } , // #426 void(vector org) te_teleport (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_explosion2 " , PF_cl_te_explosion2 , 427 } , // #427 void(vector org, float color, float colorlength) te_explosion2 (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_lightning1 " , PF_cl_te_lightning1 , 428 } , // #428 void(entity own, vector start, vector end) te_lightning1 (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_lightning2 " , PF_cl_te_lightning2 , 429 } , // #429 void(entity own, vector start, vector end) te_lightning2 (DP_TE_STANDARDEFFECTBUILTINS)
2008-11-09 22:29:28 +00:00
2011-12-23 03:12:29 +00:00
{ " te_lightning3 " , PF_cl_te_lightning3 , 430 } , // #430 void(entity own, vector start, vector end) te_lightning3 (DP_TE_STANDARDEFFECTBUILTINS)
{ " te_beam " , PF_cl_te_beam , 431 } , // #431 void(entity own, vector start, vector end) te_beam (DP_TE_STANDARDEFFECTBUILTINS)
2015-08-28 03:13:45 +00:00
{ " vectorvectors " , PF_vectorvectors , 432 } , // #432 void(vector dir) vectorvectors (DP_QC_VECTORVECTORS)
2011-12-23 03:12:29 +00:00
{ " te_plasmaburn " , PF_cl_te_plasmaburn , 433 } , // #433 void(vector org) te_plasmaburn (DP_TE_PLASMABURN)
{ " getsurfacenumpoints " , PF_getsurfacenumpoints , 434 } , // #434 float(entity e, float s) getsurfacenumpoints (DP_QC_GETSURFACE)
2008-11-09 22:29:28 +00:00
2011-12-23 03:12:29 +00:00
{ " getsurfacepoint " , PF_getsurfacepoint , 435 } , // #435 vector(entity e, float s, float n) getsurfacepoint (DP_QC_GETSURFACE)
{ " getsurfacenormal " , PF_getsurfacenormal , 436 } , // #436 vector(entity e, float s) getsurfacenormal (DP_QC_GETSURFACE)
{ " getsurfacetexture " , PF_getsurfacetexture , 437 } , // #437 string(entity e, float s) getsurfacetexture (DP_QC_GETSURFACE)
{ " getsurfacenearpoint " , PF_getsurfacenearpoint , 438 } , // #438 float(entity e, vector p) getsurfacenearpoint (DP_QC_GETSURFACE)
{ " getsurfaceclippedpoint " , PF_getsurfaceclippedpoint , 439 } , // #439 vector(entity e, float s, vector p) getsurfaceclippedpoint (DP_QC_GETSURFACE)
2008-11-09 22:29:28 +00:00
2013-03-12 22:53:23 +00:00
{ " clientcommand " , PF_NoCSQC , 440 } , // #440 void(entity e, string s) clientcommand (KRIMZON_SV_PARSECLIENTCOMMAND) (don't implement)
{ " tokenize " , PF_Tokenize , 441 } , // #441 float(string s) tokenize (KRIMZON_SV_PARSECLIENTCOMMAND)
{ " argv " , PF_ArgV , 442 } , // #442 string(float n) argv (KRIMZON_SV_PARSECLIENTCOMMAND)
2018-01-22 19:18:04 +00:00
{ " argc " , PF_ArgC , 0 } , // #0 float() argc pointless, but whatever
2013-12-29 22:48:28 +00:00
{ " setattachment " , PF_setattachment , 443 } , // #443 void(entity e, entity tagentity, string tagname) setattachment (DP_GFX_QUAKE3MODELTAGS)
2013-03-12 22:53:23 +00:00
{ " search_begin " , PF_search_begin , 444 } , // #444 float search_begin(string pattern, float caseinsensitive, float quiet) (DP_QC_FS_SEARCH)
2008-11-09 22:29:28 +00:00
2013-03-12 22:53:23 +00:00
{ " search_end " , PF_search_end , 445 } , // #445 void search_end(float handle) (DP_QC_FS_SEARCH)
{ " search_getsize " , PF_search_getsize , 446 } , // #446 float search_getsize(float handle) (DP_QC_FS_SEARCH)
{ " search_getfilename " , PF_search_getfilename , 447 } , // #447 string search_getfilename(float handle, float num) (DP_QC_FS_SEARCH)
2015-02-02 08:01:53 +00:00
{ " search_getfilesize " , PF_search_getfilesize , 0 } ,
{ " search_getfilemtime " , PF_search_getfilemtime , 0 } ,
2020-07-21 07:58:54 +00:00
{ " search_getpackagename " , PF_search_getpackagename , 0 } ,
{ " search_fopen " , PF_search_fopen , 0 } ,
2013-03-12 22:53:23 +00:00
{ " cvar_string " , PF_cvar_string , 448 } , // #448 string(float n) cvar_string (DP_QC_CVAR_STRING)
{ " findflags " , PF_FindFlags , 449 } , // #449 entity(entity start, .entity fld, float match) findflags (DP_QC_FINDFLAGS)
2008-11-09 22:29:28 +00:00
2017-08-14 16:38:44 +00:00
{ " findchainflags " , PF_findchainflags , 450 } , // #450 entity(.float fld, float match) findchainflags (DP_QC_FINDCHAINFLAGS)
2013-03-12 22:53:23 +00:00
{ " gettagindex " , PF_gettagindex , 451 } , // #451 float(entity ent, string tagname) gettagindex (DP_MD3_TAGSINFO)
{ " gettaginfo " , PF_gettaginfo , 452 } , // #452 vector(entity ent, float tagindex) gettaginfo (DP_MD3_TAGSINFO)
{ " dropclient " , PF_NoCSQC , 453 } , // #453 void(entity player) dropclient (DP_SV_BOTCLIENT) (don't implement)
{ " spawnclient " , PF_NoCSQC , 454 } , // #454 entity() spawnclient (DP_SV_BOTCLIENT) (don't implement)
2008-11-09 22:29:28 +00:00
2013-03-12 22:53:23 +00:00
{ " clienttype " , PF_NoCSQC , 455 } , // #455 float(entity client) clienttype (DP_SV_BOTCLIENT) (don't implement)
2008-11-09 22:29:28 +00:00
2009-05-19 01:54:00 +00:00
2008-11-09 22:29:28 +00:00
// {"WriteUnterminatedString",PF_WriteString2, 456}, //writestring but without the null terminator. makes things a little nicer.
//DP_TE_FLAMEJET
2016-08-25 00:12:14 +00:00
{ " te_flamejet " , PF_cl_te_flamejet , 457 } , // #457 void(vector org, vector vel, float howmany) te_flamejet
2008-11-09 22:29:28 +00:00
//no 458 documented.
//DP_QC_EDICT_NUM
2013-03-12 22:53:23 +00:00
{ " edict_num " , PF_edict_for_num , 459 } , // #459 entity(float entnum) edict_num
2008-11-09 22:29:28 +00:00
//DP_QC_STRINGBUFFERS
2013-03-12 22:53:23 +00:00
{ " buf_create " , PF_buf_create , 460 } , // #460 float() buf_create
{ " buf_del " , PF_buf_del , 461 } , // #461 void(float bufhandle) buf_del
{ " buf_getsize " , PF_buf_getsize , 462 } , // #462 float(float bufhandle) buf_getsize
{ " buf_copy " , PF_buf_copy , 463 } , // #463 void(float bufhandle_from, float bufhandle_to) buf_copy
{ " buf_sort " , PF_buf_sort , 464 } , // #464 void(float bufhandle, float sortpower, float backward) buf_sort
{ " buf_implode " , PF_buf_implode , 465 } , // #465 string(float bufhandle, string glue) buf_implode
{ " bufstr_get " , PF_bufstr_get , 466 } , // #466 string(float bufhandle, float string_index) bufstr_get
{ " bufstr_set " , PF_bufstr_set , 467 } , // #467 void(float bufhandle, float string_index, string str) bufstr_set
{ " bufstr_add " , PF_bufstr_add , 468 } , // #468 float(float bufhandle, string str, float order) bufstr_add
{ " bufstr_free " , PF_bufstr_free , 469 } , // #469 void(float bufhandle, float string_index) bufstr_free
2008-11-09 22:29:28 +00:00
//no 470 documented
//DP_QC_ASINACOSATANATAN2TAN
2013-03-12 22:53:23 +00:00
{ " asin " , PF_asin , 471 } , // #471 float(float s) asin
{ " acos " , PF_acos , 472 } , // #472 float(float c) acos
{ " atan " , PF_atan , 473 } , // #473 float(float t) atan
{ " atan2 " , PF_atan2 , 474 } , // #474 float(float c, float s) atan2
{ " tan " , PF_tan , 475 } , // #475 float(float a) tan
2008-11-09 22:29:28 +00:00
2013-05-03 04:28:08 +00:00
//DP_QC_STRINGCOLORFUNCTIONS
2013-03-12 22:53:23 +00:00
{ " strlennocol " , PF_strlennocol , 476 } , // #476 float(string s) strlennocol
{ " strdecolorize " , PF_strdecolorize , 477 } , // #477 string(string s) strdecolorize
2008-11-09 22:29:28 +00:00
//DP_QC_STRFTIME
2013-03-12 22:53:23 +00:00
{ " strftime " , PF_strftime , 478 } , // #478 string(float uselocaltime, string format, ...) strftime
2008-11-09 22:29:28 +00:00
//DP_QC_TOKENIZEBYSEPARATOR
2013-03-12 22:53:23 +00:00
{ " tokenizebyseparator " , PF_tokenizebyseparator , 479 } , // #479 float(string s, string separator1, ...) tokenizebyseparator
2008-11-09 22:29:28 +00:00
//DP_QC_STRING_CASE_FUNCTIONS
2013-03-12 22:53:23 +00:00
{ " strtolower " , PF_strtolower , 480 } , // #476 string(string s) strtolower
{ " strtoupper " , PF_strtoupper , 481 } , // #476 string(string s) strlennocol
2008-11-09 22:29:28 +00:00
//DP_QC_CVAR_DEFSTRING
2013-03-12 22:53:23 +00:00
{ " cvar_defstring " , PF_cvar_defstring , 482 } , // #482 string(string s) cvar_defstring
2008-11-09 22:29:28 +00:00
//DP_SV_POINTSOUND
2013-03-12 22:53:23 +00:00
{ " pointsound " , PF_cs_pointsound , 483 } , // #483 void(vector origin, string sample, float volume, float attenuation) pointsound
2008-11-09 22:29:28 +00:00
//DP_QC_STRREPLACE
2013-03-12 22:53:23 +00:00
{ " strreplace " , PF_strreplace , 484 } , // #484 string(string search, string replace, string subject) strreplace
{ " strireplace " , PF_strireplace , 485 } , // #485 string(string search, string replace, string subject) strireplace
2008-11-09 22:29:28 +00:00
//DP_QC_GETSURFACEPOINTATTRIBUTE
{ " getsurfacepointattribute " , PF_getsurfacepointattribute , 486 } , // #486vector(entity e, float s, float n, float a) getsurfacepointattribute
2005-03-07 08:40:03 +00:00
2017-02-21 20:22:07 +00:00
# ifdef HAVE_MEDIA_DECODER
2008-11-09 22:29:28 +00:00
//DP_GECKO_SUPPORT
2016-07-12 00:40:13 +00:00
{ " gecko_create " , PF_cs_media_create , 487 } , // #487 float(string name)
{ " gecko_destroy " , PF_cs_media_destroy , 488 } , // #488 void(string name)
{ " gecko_navigate " , PF_cs_media_command , 489 } , // #489 void(string name, string URI)
{ " gecko_keyevent " , PF_cs_media_keyevent , 490 } , // #490 float(string name, float key, float eventtype)
{ " gecko_mousemove " , PF_cs_media_mousemove , 491 } , // #491 void(string name, float x, float y)
{ " gecko_resize " , PF_cs_media_resize , 492 } , // #492 void(string name, float w, float h)
{ " gecko_get_texture_extent " , PF_cs_media_get_texture_extent , 493 } , // #493 vector(string name)
{ " gecko_getproperty " , PF_cs_media_getproperty } ,
{ " cin_open " , PF_cs_media_create } ,
{ " cin_close " , PF_cs_media_destroy } ,
{ " cin_setstate " , PF_cs_media_setstate } ,
{ " cin_getstate " , PF_cs_media_getstate } ,
{ " cin_restart " , PF_cs_media_restart } ,
2009-03-07 05:05:54 +00:00
# endif
2005-03-07 08:40:03 +00:00
2008-11-09 22:29:28 +00:00
//DP_QC_CRC16
2013-06-23 02:17:02 +00:00
{ " crc16 " , PF_crc16 , 494 } , // #494 float(float caseinsensitive, string s, ...) crc16
2005-03-07 08:40:03 +00:00
2008-11-09 22:29:28 +00:00
//DP_QC_CVAR_TYPE
2013-06-23 02:17:02 +00:00
{ " cvar_type " , PF_cvar_type , 495 } , // #495 float(string name) cvar_type
2008-11-09 22:29:28 +00:00
//DP_QC_ENTITYDATA
2013-03-12 22:53:23 +00:00
{ " numentityfields " , PF_numentityfields , 496 } , // #496 float() numentityfields
2015-02-02 08:01:53 +00:00
{ " findentityfield " , PF_findentityfield , 0 } ,
{ " entityfieldref " , PF_entityfieldref , 0 } ,
2013-03-12 22:53:23 +00:00
{ " entityfieldname " , PF_entityfieldname , 497 } , // #497 string(float fieldnum) entityfieldname
{ " entityfieldtype " , PF_entityfieldtype , 498 } , // #498 float(float fieldnum) entityfieldtype
{ " getentityfieldstring " , PF_getentityfieldstring , 499 } , // #499 string(float fieldnum, entity ent) getentityfieldstring
{ " putentityfieldstring " , PF_putentityfieldstring , 500 } , // #500 float(float fieldnum, entity ent, string s) putentityfieldstring
2008-11-09 22:29:28 +00:00
//DP_SV_WRITEPICTURE
2015-02-02 08:01:53 +00:00
{ " ReadPicture " , PF_ReadPicture , 501 } , // #501 void(float to, string s, float sz) WritePicture
2008-11-09 22:29:28 +00:00
2013-12-29 22:48:28 +00:00
{ " boxparticles " , PF_cs_boxparticles , 502 } ,
2008-11-09 22:29:28 +00:00
//DP_QC_WHICHPACK
2013-03-12 22:53:23 +00:00
{ " whichpack " , PF_whichpack , 503 } , // #503 string(string filename) whichpack
2008-11-09 22:29:28 +00:00
2012-02-17 01:35:22 +00:00
//DP_CSQC_QUERYRENDERENTITY
2013-03-12 22:53:23 +00:00
{ " getentity " , PF_getentity , 504 } , // #504 __variant(float entnum, fload fieldnum) getentity
2012-02-17 01:35:22 +00:00
2008-11-09 22:29:28 +00:00
//DP_QC_URI_ESCAPE
2013-03-12 22:53:23 +00:00
{ " uri_escape " , PF_uri_escape , 510 } , // #510 string(string in) uri_escape
{ " uri_unescape " , PF_uri_unescape , 511 } , // #511 string(string in) uri_unescape = #511;
2008-11-09 22:29:28 +00:00
//DP_QC_NUM_FOR_EDICT
2013-03-12 22:53:23 +00:00
{ " num_for_edict " , PF_num_for_edict , 512 } , // #512 float(entity ent) num_for_edict
2008-11-09 22:29:28 +00:00
//DP_QC_URI_GET
2013-03-12 22:53:23 +00:00
{ " uri_get " , PF_uri_get , 513 } , // #513 float(string uril, float id) uri_get
2015-05-14 03:06:58 +00:00
{ " uri_post " , PF_uri_get , 513 } , // #513 float(string uril, float id) uri_post
2013-03-12 22:53:23 +00:00
{ " tokenize_console " , PF_tokenize_console , 514 } ,
{ " argv_start_index " , PF_argv_start_index , 515 } ,
{ " argv_end_index " , PF_argv_end_index , 516 } ,
{ " buf_cvarlist " , PF_buf_cvarlist , 517 } ,
{ " cvar_description " , PF_cvar_description , 518 } ,
2014-05-30 03:57:30 +00:00
{ " gettime " , PF_gettime , 519 } ,
2013-03-12 22:53:23 +00:00
2013-06-23 02:17:02 +00:00
{ " keynumtostring_omgwtf " , PF_cl_keynumtostring , 520 } ,
2013-03-12 22:53:23 +00:00
{ " findkeysforcommand " , PF_cl_findkeysforcommand , 521 } ,
2015-06-04 06:15:14 +00:00
{ " findkeysforcommandex " , PF_cl_findkeysforcommandex , 0 } ,
2013-03-12 22:53:23 +00:00
{ " loadfromdata " , PF_loadfromdata , 529 } ,
{ " loadfromfile " , PF_loadfromfile , 530 } ,
2020-02-11 18:06:10 +00:00
{ " setpause " , PF_cl_setpause , 531 } ,
2015-08-10 18:28:23 +00:00
{ " log " , PF_Logarithm , 532 } ,
2013-03-12 22:53:23 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
{ " stopsound " , PF_stopsound , 0 } ,
{ " soundupdate " , PF_soundupdate , 0 } ,
2014-05-13 23:21:20 +00:00
{ " getsoundtime " , PF_getsoundtime , 533 } ,
2019-03-23 07:06:37 +00:00
{ " getchannellevel " , PF_getchannellevel , 0 } ,
2013-03-12 23:24:15 +00:00
{ " soundlength " , PF_soundlength , 534 } ,
2013-06-23 02:17:02 +00:00
{ " buf_loadfile " , PF_buf_loadfile , 535 } ,
{ " buf_writefile " , PF_buf_writefile , 536 } ,
2020-07-14 00:48:56 +00:00
{ " bufstr_find " , PF_bufstr_find , 537 } ,
2014-02-07 08:38:40 +00:00
// {"matchpattern", PF_Fixme, 538},
// {"undefined", PF_Fixme, 539},
2014-08-25 07:35:41 +00:00
2015-02-02 08:01:53 +00:00
# ifdef USERBE
2014-02-07 08:38:40 +00:00
{ " physics_enable " , PF_physics_enable , 540 } ,
{ " physics_addforce " , PF_physics_addforce , 541 } ,
{ " physics_addtorque " , PF_physics_addtorque , 542 } ,
2014-08-25 07:35:41 +00:00
# endif
2013-03-12 23:24:15 +00:00
2013-08-27 13:18:09 +00:00
{ " setmousetarget " , PF_cl_setmousetarget , 603 } ,
{ " getmousetarget " , PF_cl_getmousetarget , 604 } ,
2013-03-12 22:53:23 +00:00
{ " callfunction " , PF_callfunction , 605 } ,
{ " writetofile " , PF_writetofile , 606 } ,
{ " isfunction " , PF_isfunction , 607 } ,
2014-05-16 17:45:37 +00:00
{ " getresolution " , PF_cl_getresolution , 608 } ,
2013-06-23 02:17:02 +00:00
{ " keynumtostring_menu " , PF_cl_keynumtostring , 609 } , //while present in dp's menuqc, dp doesn't actually support keynumtostring=609 in csqc. Which is probably a good thing because csqc would have 3 separate versions if it did.
2013-03-12 22:53:23 +00:00
2015-06-04 06:15:14 +00:00
{ " findkeysforcommand_menu " , PF_cl_findkeysforcommand , 610 } ,
2013-03-12 22:53:23 +00:00
{ " gethostcachevalue " , PF_cl_gethostcachevalue , 611 } ,
{ " gethostcachestring " , PF_cl_gethostcachestring , 612 } ,
{ " parseentitydata " , PF_parseentitydata , 613 } ,
2016-07-12 00:40:13 +00:00
{ " generateentitydata " , PF_generateentitydata , 0 } ,
2014-01-13 02:42:25 +00:00
{ " stringtokeynum_menu " , PF_cl_stringtokeynum , 614 } ,
2013-03-12 22:53:23 +00:00
2019-12-10 14:50:47 +00:00
{ " resethostcachemasks " , PF_cl_resethostcachemasks , 615 } ,
{ " sethostcachemaskstring " , PF_cl_sethostcachemaskstring , 616 } ,
{ " sethostcachemasknumber " , PF_cl_sethostcachemasknumber , 617 } ,
{ " resorthostcache " , PF_cl_resorthostcache , 618 } ,
{ " sethostcachesort " , PF_cl_sethostcachesort , 619 } ,
{ " refreshhostcache " , PF_cl_refreshhostcache , 620 } ,
{ " gethostcachenumber " , PF_cl_gethostcachenumber , 621 } ,
{ " gethostcacheindexforkey " , PF_cl_gethostcacheindexforkey , 622 } ,
2013-03-12 22:53:23 +00:00
{ " addwantedhostcachekey " , PF_cl_addwantedhostcachekey , 623 } ,
2013-03-12 23:09:25 +00:00
# ifdef CL_MASTER
2013-03-12 22:53:23 +00:00
{ " getextresponse " , PF_cl_getextresponse , 624 } ,
2013-03-12 23:09:25 +00:00
# endif
2013-03-12 22:53:23 +00:00
{ " netaddress_resolve " , PF_netaddress_resolve , 625 } ,
2017-08-14 16:38:44 +00:00
{ " getgamedirinfo " , PF_cl_getgamedirinfo , 626 } ,
2020-04-19 01:23:32 +00:00
# ifdef PACKAGEMANAGER
{ " getpackagemanagerinfo " , PF_cl_getpackagemanagerinfo , 0 } ,
# endif
2013-03-12 22:53:23 +00:00
{ " sprintf " , PF_sprintf , 627 } ,
2019-12-10 14:50:47 +00:00
{ " getsurfacenumtriangles " , PF_getsurfacenumtriangles , 628 } ,
2013-03-12 22:53:23 +00:00
{ " getsurfacetriangle " , PF_getsurfacetriangle , 629 } ,
2018-12-11 00:20:59 +00:00
{ " setkeybind " , PF_cl_setkeybind , 630 } ,
2013-03-12 22:53:23 +00:00
{ " getbindmaps " , PF_cl_GetBindMap , 631 } ,
{ " setbindmaps " , PF_cl_SetBindMap , 632 } ,
2020-05-01 11:36:20 +00:00
// {NULL, PF_Fixme, 633},
// {NULL, PF_Fixme, 634},
// {NULL, PF_Fixme, 635},
// {NULL, PF_Fixme, 636},
// {NULL, PF_Fixme, 637},
{ " CL_RotateMoves " , PF_cl_RotateMoves , 638 } ,
2013-12-29 22:48:28 +00:00
{ " digest_hex " , PF_digest_hex , 639 } ,
2018-07-05 16:21:44 +00:00
{ " digest_ptr " , PF_digest_ptr , 0 } ,
2013-12-29 22:48:28 +00:00
{ " V_CalcRefdef " , PF_V_CalcRefdef , 640 } ,
2019-12-10 14:50:47 +00:00
// {NULL, PF_Fixme, 641},
// {NULL, PF_Fixme, 642},
// {NULL, PF_Fixme, 643},
// {NULL, PF_Fixme, 644},
// {NULL, PF_Fixme, 645},
// {NULL, PF_Fixme, 646},
// {NULL, PF_Fixme, 647},
// {NULL, PF_Fixme, 648},
// {NULL, PF_Fixme, 649},
{ " fcopy " , PF_fcopy , 650 } ,
{ " frename " , PF_frename , 651 } ,
{ " fremove " , PF_fremove , 652 } ,
{ " fexists " , PF_fexists , 653 } ,
{ " rmtree " , PF_rmtree , 654 } ,
2021-07-25 16:12:24 +00:00
{ " gp_rumble " , PF_cl_gp_rumble , 0 } , // #0 void(float devid, float amp_low, float amp_high, float duration) gp_rumble
{ " gp_rumbletriggers " , PF_cl_gp_rumbletriggers , 0 } , // #0 void(float devid, float left, float right, float duration) gp_rumbletriggers
{ " gp_setledcolor " , PF_cl_gp_setledcolor , 0 } , // #0 void(float devid, float red, float green, float blue) gp_setledcolor
{ " gp_settriggerfx " , PF_cl_gp_settriggerfx , 0 } , // #0 void(float devid, const void *data, int size) gp_settriggerfx
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
2008-11-09 22:29:28 +00:00
{ NULL }
2005-02-09 19:32:09 +00:00
} ;
2005-01-17 17:43:13 +00:00
2021-07-17 15:09:34 +00:00
static int PR_CSQC_NamedBuiltinUnsupported ( const char * name )
{
int i ;
for ( i = 0 ; BuiltinList [ i ] . name ; i + + )
{
if ( ! strcmp ( BuiltinList [ i ] . name , name ) )
return ( BuiltinList [ i ] . bifunc = = PF_Fixme ) ;
}
return false ;
}
2011-12-05 15:23:40 +00:00
int PR_CSQC_BuiltinValid ( char * name , int num )
{
int i ;
for ( i = 0 ; BuiltinList [ i ] . name ; i + + )
{
if ( BuiltinList [ i ] . ebfsnum = = num )
{
if ( ! strcmp ( BuiltinList [ i ] . name , name ) )
{
if ( BuiltinList [ i ] . bifunc = = PF_NoCSQC | | BuiltinList [ i ] . bifunc = = PF_Fixme )
return false ;
else
return true ;
}
}
}
return false ;
}
2011-05-20 04:10:46 +00:00
static builtin_t csqc_builtin [ 800 ] ;
2005-01-17 17:43:13 +00:00
2015-02-02 08:01:53 +00:00
static int PDECL PR_CSQC_MapNamedBuiltin ( pubprogfuncs_t * progfuncs , int headercrc , const char * builtinname )
{
int i , binum ;
for ( i = 0 ; BuiltinList [ i ] . name ; i + + )
{
if ( ! strcmp ( BuiltinList [ i ] . name , builtinname ) & & BuiltinList [ i ] . bifunc ! = PF_Fixme )
{
for ( binum = sizeof ( csqc_builtin ) / sizeof ( csqc_builtin [ 0 ] ) ; - - binum ; )
{
if ( csqc_builtin [ binum ] & & csqc_builtin [ binum ] ! = PF_Fixme & & BuiltinList [ i ] . bifunc )
continue ;
csqc_builtin [ binum ] = BuiltinList [ i ] . bifunc ;
return binum ;
}
Con_Printf ( " No more builtin slots to allocate for %s \n " , builtinname ) ;
break ;
}
}
2020-01-09 15:35:40 +00:00
if ( ! csqc_nogameaccess )
Con_DPrintf ( " Unknown csqc builtin: %s \n " , builtinname ) ;
2015-02-02 08:01:53 +00:00
return 0 ;
}
2005-01-17 17:43:13 +00:00
2005-04-26 16:04:12 +00:00
static jmp_buf csqc_abort ;
static progparms_t csqcprogparms ;
2005-01-17 17:43:13 +00:00
//Any menu builtin error or anything like that will come here.
2016-07-12 00:40:13 +00:00
static void VARGS CSQC_Abort ( char * format , . . . ) //an error occured.
2005-01-17 17:43:13 +00:00
{
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , format ) ;
2006-03-06 01:41:09 +00:00
vsnprintf ( string , sizeof ( string ) - 1 , format , argptr ) ;
2005-01-17 17:43:13 +00:00
va_end ( argptr ) ;
Con_Printf ( " CSQC_Abort: %s \n Shutting down csqc \n " , string ) ;
2005-08-19 19:06:22 +00:00
if ( pr_csqc_coreonerror . value )
{
2016-01-18 05:22:07 +00:00
size_t size = 1024 * 1024 * 8 ;
2005-08-19 19:06:22 +00:00
char * buffer = BZ_Malloc ( size ) ;
2013-08-21 07:14:39 +00:00
csqcprogs - > save_ents ( csqcprogs , buffer , & size , size , 3 ) ;
2015-06-04 06:15:14 +00:00
COM_WriteFile ( " csqccore.txt " , FS_GAMEONLY , buffer , size ) ;
2005-08-19 19:06:22 +00:00
BZ_Free ( buffer ) ;
}
2005-01-17 17:43:13 +00:00
Host_EndGame ( " csqc error " ) ;
}
2016-07-12 00:40:13 +00:00
static void CSQC_ForgetThreads ( void )
2005-07-14 01:57:34 +00:00
{
csqctreadstate_t * state = csqcthreads , * next ;
csqcthreads = NULL ;
while ( state )
{
next = state - > next ;
csqcprogs - > parms - > memfree ( state - > thread ) ;
csqcprogs - > parms - > memfree ( state ) ;
state = next ;
}
}
2016-07-12 00:40:13 +00:00
static void PDECL CSQC_EntSpawn ( struct edict_s * e , int loading )
2009-11-04 21:16:50 +00:00
{
struct csqcedict_s * ent = ( csqcedict_t * ) e ;
# ifdef VM_Q1
if ( ! ent - > xv )
ent - > xv = ( csqcextentvars_t * ) ( ent - > v + 1 ) ;
# endif
2012-04-09 19:12:12 +00:00
if ( 1 )
{
2015-06-04 06:15:14 +00:00
// ent->xv->dimension_see = csqc_world.dimension_default;
// ent->xv->dimension_seen = csqc_world.dimension_default;
2012-04-09 19:12:12 +00:00
// ent->xv->dimension_ghost = 0;
2015-06-04 06:15:14 +00:00
ent - > xv - > dimension_solid = * csqcg . dimension_default ;
ent - > xv - > dimension_hit = * csqcg . dimension_default ;
2018-09-23 19:35:24 +00:00
2018-10-13 06:20:49 +00:00
# ifdef HEXEN2
2018-09-23 19:35:24 +00:00
ent - > xv - > drawflags = SCALE_ORIGIN_ORIGIN ;
2018-10-13 06:20:49 +00:00
# endif
2012-04-09 19:12:12 +00:00
}
2009-11-04 21:16:50 +00:00
}
2012-04-09 19:12:12 +00:00
2016-07-12 00:40:13 +00:00
static pbool QDECL CSQC_EntFree ( struct edict_s * e )
2009-11-04 21:16:50 +00:00
{
struct csqcedict_s * ent = ( csqcedict_t * ) e ;
ent - > v - > solid = SOLID_NOT ;
2011-09-03 03:49:43 +00:00
ent - > v - > movetype = 0 ;
2009-11-04 21:16:50 +00:00
ent - > v - > modelindex = 0 ;
ent - > v - > think = 0 ;
ent - > v - > nextthink = 0 ;
2011-09-03 03:49:43 +00:00
ent - > xv - > predraw = 0 ;
ent - > xv - > drawmask = 0 ;
ent - > xv - > renderflags = 0 ;
2009-11-04 21:16:50 +00:00
2014-03-30 08:55:06 +00:00
if ( ent - > skinobject > 0 )
2018-01-22 19:18:04 +00:00
Mod_WipeSkin ( ent - > skinobject , false ) ;
2014-03-30 08:55:06 +00:00
ent - > skinobject = 0 ;
2015-02-02 08:01:53 +00:00
# ifdef USERBE
if ( csqc_world . rbe )
{
csqc_world . rbe - > RemoveFromEntity ( & csqc_world , ( wedict_t * ) ent ) ;
csqc_world . rbe - > RemoveJointFromEntity ( & csqc_world , ( wedict_t * ) ent ) ;
}
2009-11-04 21:16:50 +00:00
# endif
return true ;
}
2018-09-23 19:35:24 +00:00
static void QDECL CSQC_Event_Touch ( world_t * w , wedict_t * s , wedict_t * o , trace_t * trace )
2009-11-07 13:29:15 +00:00
{
int oself = * csqcg . self ;
int oother = * csqcg . other ;
* csqcg . self = EDICT_TO_PROG ( w - > progs , ( edict_t * ) s ) ;
* csqcg . other = EDICT_TO_PROG ( w - > progs , ( edict_t * ) o ) ;
2020-09-08 05:11:09 +00:00
* csqcg . time = w - > physicstime ;
2009-11-07 13:29:15 +00:00
PR_ExecuteProgram ( w - > progs , s - > v - > touch ) ;
* csqcg . self = oself ;
* csqcg . other = oother ;
}
2016-07-12 00:40:13 +00:00
static void QDECL CSQC_Event_Think ( world_t * w , wedict_t * s )
2011-09-03 03:49:43 +00:00
{
* csqcg . self = EDICT_TO_PROG ( w - > progs , ( edict_t * ) s ) ;
* csqcg . other = EDICT_TO_PROG ( w - > progs , ( edict_t * ) w - > edicts ) ;
2020-09-08 05:11:09 +00:00
* csqcg . time = w - > physicstime ;
2011-09-03 03:49:43 +00:00
2014-05-10 16:37:53 +00:00
if ( ! s - > v - > think )
Con_Printf ( " CSQC entity \" %s \" has nextthink with no think function \n " , PR_GetString ( w - > progs , s - > v - > classname ) ) ;
else
PR_ExecuteProgram ( w - > progs , s - > v - > think ) ;
2011-09-03 03:49:43 +00:00
}
2016-07-12 00:40:13 +00:00
static void QDECL CSQC_Event_Sound ( float * origin , wedict_t * wentity , int channel , const char * sample , int volume , float attenuation , float pitchadj , float timeoffset , unsigned int flags )
2012-07-05 19:42:36 +00:00
{
int i ;
2013-03-12 23:24:15 +00:00
vec3_t originbuf ;
if ( ! origin )
2012-07-05 19:42:36 +00:00
{
2013-03-12 23:24:15 +00:00
if ( wentity - > v - > solid = = SOLID_BSP )
{
origin = originbuf ;
for ( i = 0 ; i < 3 ; i + + )
origin [ i ] = wentity - > v - > origin [ i ] + 0.5 * ( wentity - > v - > mins [ i ] + wentity - > v - > maxs [ i ] ) ;
}
else
origin = wentity - > v - > origin ;
2012-07-05 19:42:36 +00:00
}
2016-07-12 00:40:13 +00:00
S_StartSound ( NUM_FOR_EDICT ( csqcprogs , ( edict_t * ) wentity ) , channel , S_PrecacheSound ( sample ) , origin , NULL , volume / 255.0 , attenuation , timeoffset , pitchadj , flags ) ;
2012-07-05 19:42:36 +00:00
}
2016-07-12 00:40:13 +00:00
static qboolean QDECL CSQC_Event_ContentsTransition ( world_t * w , wedict_t * ent , int oldwatertype , int newwatertype )
2012-07-05 19:42:36 +00:00
{
if ( ent - > xv - > contentstransition )
{
void * pr_globals = PR_globals ( w - > progs , PR_CURRENT ) ;
2012-07-15 05:24:21 +00:00
* csqcg . self = EDICT_TO_PROG ( w - > progs , ent ) ;
2020-09-08 05:11:09 +00:00
* csqcg . time = w - > physicstime ;
2012-07-05 19:42:36 +00:00
G_FLOAT ( OFS_PARM0 ) = oldwatertype ;
G_FLOAT ( OFS_PARM1 ) = newwatertype ;
PR_ExecuteProgram ( w - > progs , ent - > xv - > contentstransition ) ;
return true ;
}
return false ; //do legacy behaviour
}
2016-07-12 00:40:13 +00:00
static model_t * QDECL CSQC_World_ModelForIndex ( world_t * w , int modelindex )
2009-11-07 13:29:15 +00:00
{
2017-01-13 00:39:50 +00:00
model_t * mod = CSQC_GetModelForIndex ( modelindex ) ;
if ( mod & & mod - > loadstate ! = MLS_LOADED )
{
2017-08-29 02:29:06 +00:00
if ( mod - > loadstate = = MLS_NOTLOADED )
Mod_LoadModel ( mod , MLV_SILENT ) ;
2017-01-13 00:39:50 +00:00
if ( mod - > loadstate = = MLS_LOADING )
COM_WorkerPartialSync ( mod , & mod - > loadstate , MLS_LOADING ) ;
if ( mod - > loadstate ! = MLS_LOADED )
mod = NULL ; //gah, it failed!
}
return mod ;
2009-11-07 13:29:15 +00:00
}
2016-07-12 00:40:13 +00:00
static void QDECL CSQC_World_GetFrameState ( world_t * w , wedict_t * win , framestate_t * out )
2011-10-27 15:46:36 +00:00
{
csqcedict_t * in = ( csqcedict_t * ) win ;
cs_getframestate ( in , in - > xv - > renderflags , out ) ;
}
2009-11-07 13:29:15 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
static qboolean CSQC_GenerateMaterial ( struct shaderparsestate_s * ps , const char * materialname , void ( * LoadMaterialString ) ( struct shaderparsestate_s * ps , const char * script ) )
{
COM_AssertMainThread ( " CSQC_GenerateMaterial " ) ;
if ( csqcg . CSQC_GenerateMaterial )
{
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( csqcprogs , materialname ) ) ;
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_GenerateMaterial ) ;
if ( G_INT ( OFS_RETURN ) )
{ //we got the script, now pass it to our material system to parse it.
LoadMaterialString ( ps , PR_GetStringOfs ( csqcprogs , OFS_RETURN ) ) ;
return true ;
}
}
return false ;
}
static plugmaterialloaderfuncs_t csqcmaterialloader = { " csqc " , CSQC_GenerateMaterial } ;
2005-02-09 19:32:09 +00:00
void CSQC_Shutdown ( void )
{
2014-10-05 20:04:11 +00:00
int i ;
2005-02-09 19:32:09 +00:00
if ( csqcprogs )
{
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_Shutdown )
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Shutdown ) ;
2018-11-19 06:37:25 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Material_RegisterLoader ( & csqc_world , NULL ) ;
2013-10-08 14:28:11 +00:00
key_dest_absolutemouse & = ~ kdm_game ;
2005-07-14 01:57:34 +00:00
CSQC_ForgetThreads ( ) ;
2015-01-21 18:18:37 +00:00
PR_ReleaseFonts ( kdm_game ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
PR_Common_Shutdown ( csqcprogs , false ) ;
2015-06-14 08:16:15 +00:00
World_Destroy ( & csqc_world ) ;
2019-09-25 20:23:24 +00:00
csqcprogs - > Shutdown ( csqcprogs ) ;
2015-06-14 08:16:15 +00:00
csqc_world . progs = csqcprogs = NULL ;
2005-02-09 19:32:09 +00:00
}
2015-06-14 08:16:15 +00:00
else
World_Destroy ( & csqc_world ) ;
2005-02-09 19:32:09 +00:00
2013-08-27 13:18:09 +00:00
Cmd_RemoveCommands ( CS_ConsoleCommand_f ) ;
2009-11-17 00:15:44 +00:00
2009-04-19 00:50:42 +00:00
Z_Free ( csqcdelta_pack_new . e ) ;
memset ( & csqcdelta_pack_new , 0 , sizeof ( csqcdelta_pack_new ) ) ;
Z_Free ( csqcdelta_pack_old . e ) ;
memset ( & csqcdelta_pack_old , 0 , sizeof ( csqcdelta_pack_old ) ) ;
2009-04-02 22:25:54 +00:00
memset ( & deltafunction , 0 , sizeof ( deltafunction ) ) ;
2009-04-19 00:50:42 +00:00
memset ( csqcdelta_playerents , 0 , sizeof ( csqcdelta_playerents ) ) ;
2012-11-27 03:23:19 +00:00
Z_Free ( csqcent ) ;
csqcent = NULL ;
maxcsqcentities = 0 ;
2014-10-05 20:04:11 +00:00
for ( i = 0 ; i < MAX_CSPARTICLESPRE & & cl . particle_csname [ i ] ; i + + )
{
free ( cl . particle_csname [ i ] ) ;
cl . particle_csname [ i ] = NULL ;
}
2009-04-19 00:50:42 +00:00
csqcmapentitydata = NULL ;
csqcmapentitydataloaded = false ;
2005-02-28 07:16:19 +00:00
in_sensitivityscale = 1 ;
2009-11-07 13:29:15 +00:00
csqc_world . num_edicts = 0 ;
2016-07-12 00:40:13 +00:00
memset ( & csqc_world , 0 , sizeof ( csqc_world ) ) ;
2018-01-22 19:18:04 +00:00
memset ( & csqcg , 0 , sizeof ( csqcg ) ) ;
2015-02-02 08:01:53 +00:00
2021-05-09 13:02:49 +00:00
in_vraim . ival = in_vraim . value ; //csqc mod with explicit vr stuff.
2015-02-02 08:01:53 +00:00
if ( csqc_deprecated_warned > 1 )
{
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( ! cl_csqc_nodeprecate . ival )
Con_Printf ( " total %u csqc deprecation warnings suppressed \n " , csqc_deprecated_warned - 1 ) ;
2015-02-02 08:01:53 +00:00
csqc_deprecated_warned = 0 ;
}
2005-01-24 05:10:11 +00:00
}
2018-09-23 19:35:24 +00:00
static qboolean CSQC_ValidateMainCSProgs ( void * file , size_t filesize , unsigned int checksum , size_t checksize )
2005-03-10 03:55:18 +00:00
{
2018-09-23 19:35:24 +00:00
if ( ! file )
return false ;
if ( checksize & & filesize ! = checksize )
return false ;
if ( cls . protocol = = CP_NETQUAKE & & ! ( cls . fteprotocolextensions2 & PEXT2_PREDINFO ) )
{ //DP uses really lame checksums.
2021-04-14 05:21:04 +00:00
if ( CalcHashInt ( & hash_crc16 , file , filesize ) ! = checksum )
2018-09-23 19:35:24 +00:00
return false ;
}
else
{ //FTE uses folded-md4. yeah, its broken but at least its still more awkward
2023-02-20 06:13:40 +00:00
if ( LittleLong ( CalcHashInt ( & hash_md4 , file , filesize ) ) ! = checksum )
2018-09-23 19:35:24 +00:00
return false ;
}
return true ;
}
static void * CSQC_FindMainProgs ( size_t * sz , const char * name , unsigned int checksum , size_t checksize )
{ //returns a TempFile
char newname [ MAX_QPATH ] ;
void * file = NULL ;
2005-03-10 03:55:18 +00:00
2018-09-23 19:35:24 +00:00
//the filename we'll cache to
snprintf ( newname , MAX_QPATH , " csprogsvers/%x.dat " , checksum ) ;
//we can use FSLF_IGNOREPURE because we have our own hashes/size checks instead.
//this should make it slightly easier for server admins
if ( checksum )
2005-08-07 18:08:13 +00:00
{
2018-09-23 19:35:24 +00:00
file = COM_LoadTempFile ( newname , FSLF_IGNOREPURE , sz ) ;
if ( ! CSQC_ValidateMainCSProgs ( file , * sz , checksum , checksize ) )
file = NULL ;
}
2005-08-07 18:08:13 +00:00
2018-09-23 19:35:24 +00:00
if ( ! file )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
const char * progsname = cls . state ? InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogsname " ) : " csprogs.dat " ;
2018-10-23 07:09:06 +00:00
flocation_t loc = { 0 } ;
vfsfile_t * f ;
qboolean found = false ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! found & & * progsname )
2018-10-23 07:09:06 +00:00
found = FS_FLocateFile ( progsname , FSLF_IGNOREPURE , & loc ) ;
if ( ! found & & strcmp ( progsname , " csprogs.dat " ) )
2021-06-02 15:29:44 +00:00
{
progsname = " csprogs.dat " ;
found = FS_FLocateFile ( progsname , FSLF_IGNOREPURE , & loc ) ;
}
if ( found & & ( f = FS_OpenReadLocation ( progsname , & loc ) ) )
2005-08-07 18:08:13 +00:00
{
2018-10-23 07:09:06 +00:00
* sz = VFS_GETLEN ( f ) ;
file = Hunk_TempAlloc ( * sz ) ;
VFS_READ ( f , file , * sz ) ;
VFS_CLOSE ( f ) ;
if ( file & & ! cls . demoplayback ) //allow them to use csprogs.dat if playing a demo, and don't care about the checksum
2007-06-20 00:02:54 +00:00
{
2018-10-23 07:09:06 +00:00
if ( checksum & & ! csprogs_promiscuous )
{
if ( ! CSQC_ValidateMainCSProgs ( file , * sz , checksum , checksize ) )
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
{ //its not a match... maybe we can get a better one from the pure paths instead...
file = COM_LoadTempFile ( progsname , 0 , sz ) ;
if ( ! CSQC_ValidateMainCSProgs ( file , * sz , checksum , checksize ) )
file = NULL ;
}
2018-10-23 07:09:06 +00:00
//we write the csprogs into our archive if it was loaded from outside of there.
//this is to ensure that demos will play on the same machine later on...
//this is unreliable though, and redundant if we're writing the csqc into the demos themselves.
//also kinda irrelevant with sv_pure.
//FIXME: don't back up if it was in a package.
2014-12-11 16:26:26 +00:00
# ifndef FTE_TARGET_WEB
2018-10-23 07:09:06 +00:00
if ( file & & ! sv_state & & ! FS_WhichPackForLocation ( & loc , false )
2018-09-01 04:18:08 +00:00
# if !defined(CLIENTONLY) && defined(MVD_RECORDING)
2018-10-23 07:09:06 +00:00
& & ! sv_demo_write_csqc . ival
2018-01-24 12:13:32 +00:00
# endif
2018-10-23 07:09:06 +00:00
)
//back it up
COM_WriteFile ( newname , FS_GAMEONLY , file , * sz ) ;
2014-12-11 16:26:26 +00:00
# endif
2018-10-23 07:09:06 +00:00
}
2008-11-09 22:29:28 +00:00
}
2005-08-07 18:08:13 +00:00
}
}
2018-09-23 19:35:24 +00:00
return file ;
}
qboolean CSQC_CheckDownload ( const char * name , unsigned int checksum , size_t checksize )
{
size_t sz ;
if ( CSQC_FindMainProgs ( & sz , name , checksum , checksize ) )
return true ;
return false ;
}
//when the qclib needs a file, it calls out to this function.
void * PDECL CSQC_PRLoadFile ( const char * path , unsigned char * ( PDECL * buf_get ) ( void * ctx , size_t len ) , void * buf_ctx , size_t * sz , pbool issource )
{
qbyte * file ;
if ( ! strcmp ( path , csprogs_checkname ) )
file = CSQC_FindMainProgs ( sz , csprogs_checkname , csprogs_checksum , csprogs_checksize ) ;
2018-01-22 19:18:04 +00:00
else
2018-07-05 16:21:44 +00:00
file = COM_LoadTempFile ( path , 0 , sz ) ;
2005-08-07 18:08:13 +00:00
2018-01-22 19:18:04 +00:00
if ( file )
{
qbyte * buffer = buf_get ( buf_ctx , * sz ) ;
memcpy ( buffer , file , * sz ) ;
return buffer ;
}
return NULL ;
2005-03-10 03:55:18 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
int QDECL CSQC_PRFileSize ( const char * path )
2005-08-11 04:14:33 +00:00
{
return COM_FileSize ( path ) ;
}
2011-09-03 03:49:43 +00:00
qboolean CSQC_Inited ( void )
{
if ( csqcprogs )
return true ;
return false ;
}
2013-03-12 22:53:23 +00:00
qboolean CSQC_UnconnectedOkay ( qboolean inprinciple )
{
2013-06-23 02:17:02 +00:00
if ( ! pr_csqc_formenus . ival )
return false ;
2013-03-12 22:53:23 +00:00
if ( ! inprinciple )
{
if ( ! csqcprogs )
return false ;
}
2013-06-23 02:17:02 +00:00
return true ;
2013-03-12 22:53:23 +00:00
}
qboolean CSQC_UnconnectedInit ( void )
{
2013-08-27 13:18:09 +00:00
if ( ! CSQC_UnconnectedOkay ( true ) )
2013-06-23 02:17:02 +00:00
return false ;
2013-08-27 13:18:09 +00:00
if ( csqcprogs )
return true ;
2018-09-23 19:35:24 +00:00
return CSQC_Init ( true , " csprogs.dat " , 0 , 0 ) ;
2013-03-12 22:53:23 +00:00
}
2014-10-05 20:04:11 +00:00
void ASMCALL CSQC_StateOp ( pubprogfuncs_t * prinst , float var , func_t func )
{
world_t * w = prinst - > parms - > user ;
stdentvars_t * vars = PROG_TO_EDICT ( prinst , * w - > g . self ) - > v ;
vars - > nextthink = * w - > g . time + 0.1 ;
vars - > think = func ;
vars - > frame = var ;
}
2016-07-12 00:40:13 +00:00
void ASMCALL CSQC_CStateOp ( pubprogfuncs_t * progs , float first , float last , func_t currentfunc )
2014-10-05 20:04:11 +00:00
{
2016-07-12 00:40:13 +00:00
float min , max ;
float step ;
world_t * w = progs - > parms - > user ;
wedict_t * e = PROG_TO_WEDICT ( progs , * w - > g . self ) ;
float frame = e - > v - > frame ;
// if (progstype == PROG_H2)
// e->v->nextthink = *w->g.time+0.05;
// else
e - > v - > nextthink = * w - > g . time + 0.1 ;
e - > v - > think = currentfunc ;
if ( csqcg . cycle_wrapped )
* csqcg . cycle_wrapped = false ;
if ( first > last )
{ //going backwards
min = last ;
max = first ;
step = - 1.0 ;
}
else
{ //forwards
min = first ;
max = last ;
step = 1.0 ;
}
if ( frame < min | | frame > max )
frame = first ; //started out of range, must have been a different animation
else
{
frame + = step ;
if ( frame < min | | frame > max )
{ //became out of range, must have wrapped
if ( csqcg . cycle_wrapped )
* csqcg . cycle_wrapped = true ;
frame = first ;
}
}
e - > v - > frame = frame ;
2014-10-05 20:04:11 +00:00
}
2016-07-12 00:40:13 +00:00
static void ASMCALL CSQC_CWStateOp ( pubprogfuncs_t * prinst , float first , float last , func_t currentfunc )
2014-10-05 20:04:11 +00:00
{
2016-07-12 00:40:13 +00:00
float min , max ;
float step ;
world_t * w = prinst - > parms - > user ;
wedict_t * e = PROG_TO_WEDICT ( prinst , * w - > g . self ) ;
float frame = e - > v - > weaponframe ;
// if (progstype == PROG_H2)
// e->v->nextthink = *w->g.time+0.05;
// else
e - > v - > nextthink = * w - > g . time + 0.1 ;
e - > v - > think = currentfunc ;
if ( csqcg . cycle_wrapped )
* csqcg . cycle_wrapped = false ;
if ( first > last )
{ //going backwards
min = last ;
max = first ;
step = - 1.0 ;
}
else
{ //forwards
min = first ;
max = last ;
step = 1.0 ;
}
if ( frame < min | | frame > max )
frame = first ; //started out of range, must have been a different animation
else
{
frame + = step ;
if ( frame < min | | frame > max )
{ //became out of range, must have wrapped
if ( csqcg . cycle_wrapped )
* csqcg . cycle_wrapped = true ;
frame = first ;
}
}
e - > v - > weaponframe = frame ;
2014-10-05 20:04:11 +00:00
}
void ASMCALL CSQC_ThinkTimeOp ( pubprogfuncs_t * progs , edict_t * ed , float var )
{
world_t * w = progs - > parms - > user ;
stdentvars_t * vars = ed - > v ;
vars - > nextthink = * w - > g . time + var ;
}
2019-09-04 08:32:22 +00:00
pbool PDECL CSQC_CheckHeaderCrc ( pubprogfuncs_t * progs , progsnum_t num , int crc , const char * filename )
2014-10-05 20:04:11 +00:00
{
if ( ! num )
{
2018-08-23 06:03:31 +00:00
switch ( crc )
2014-10-05 20:04:11 +00:00
{
2018-08-23 06:03:31 +00:00
case PROGHEADER_CRC_CSQC :
break ; //fte's full csqc stuff
case PROGHEADER_CRC_QW :
case PROGHEADER_CRC_NQ :
case PROGHEADER_CRC_PREREL :
case PROGHEADER_CRC_TENEBRAE :
case PROGHEADER_CRC_H2 :
case PROGHEADER_CRC_H2MP :
case PROGHEADER_CRC_H2DEMO :
break ; //simple csqc. but only if it has the right entry points.
# ifndef csqc_isdarkplaces
case PROGHEADER_CRC_CSQC_DP :
2018-01-22 19:18:04 +00:00
csqc_isdarkplaces = true ;
Con_DPrintf ( CON_WARNING " Running darkplaces csprogs.dat version \n " ) ;
2018-08-23 06:03:31 +00:00
break ;
2019-01-29 07:18:07 +00:00
case 23147 :
csqc_isdarkplaces = true ;
Con_DPrintf ( CON_WARNING " Running ^aINVALID^a csprogs.dat version \n " ) ;
break ;
2017-08-29 02:29:06 +00:00
# endif
2018-08-23 06:03:31 +00:00
default :
2018-01-22 19:18:04 +00:00
Con_Printf ( CON_WARNING " Running unknown csprogs.dat version \n " ) ;
2018-08-23 06:03:31 +00:00
break ;
}
2018-01-22 19:18:04 +00:00
}
2014-10-05 20:04:11 +00:00
return true ;
}
2013-03-12 22:53:23 +00:00
2005-01-17 17:43:13 +00:00
double csqctime ;
2018-09-23 19:35:24 +00:00
qboolean CSQC_Init ( qboolean anycsqc , const char * csprogsname , unsigned int checksum , size_t progssize )
2005-01-17 17:43:13 +00:00
{
2008-05-25 22:23:43 +00:00
int i ;
2009-04-19 00:50:42 +00:00
string_t * str ;
2008-05-25 22:23:43 +00:00
csqcedict_t * worldent ;
2014-04-12 03:31:59 +00:00
char * cheats ;
2018-09-23 19:35:24 +00:00
qboolean csdatenabled = true ;
if ( ! csprogsname )
{
csdatenabled = false ;
csprogsname = " csprogs.dat " ;
}
2018-10-13 12:19:58 +00:00
if ( ! * csprogsname )
csprogsname = " csprogs.dat " ;
2018-09-23 19:35:24 +00:00
if ( csprogs_promiscuous ! = anycsqc | | csprogs_checksum ! = checksum | | csprogs_checksize ! = progssize | | strcmp ( csprogs_checkname , csprogsname ) )
2013-03-12 22:53:23 +00:00
CSQC_Shutdown ( ) ;
2011-12-06 00:39:39 +00:00
csprogs_promiscuous = anycsqc ;
2011-10-27 15:46:36 +00:00
csprogs_checksum = checksum ;
2018-09-23 19:35:24 +00:00
csprogs_checksize = progssize ;
Q_strncpyz ( csprogs_checkname , csprogsname , sizeof ( csprogs_checkname ) ) ;
2005-03-10 03:55:18 +00:00
2013-09-06 22:57:44 +00:00
csqc_mayread = false ;
2012-09-30 05:52:03 +00:00
2012-02-12 05:18:31 +00:00
csqc_singlecheats = cls . demoplayback ;
2018-09-23 19:35:24 +00:00
# ifdef HAVE_SERVER
if ( sv . state = = ss_active )
{
cheats = InfoBuf_ValueForKey ( & svs . info , " *cheats " ) ;
if ( ! * cheats & & sv . allocated_client_slots = = 1 )
cheats = " ON " ;
}
else
# endif
cheats = InfoBuf_ValueForKey ( & cl . serverinfo , " *cheats " ) ;
2014-04-12 03:31:59 +00:00
if ( ! Q_strcasecmp ( cheats , " ON " ) | | atoi ( cheats ) )
2012-09-30 05:52:03 +00:00
csqc_singlecheats = true ;
2009-04-01 22:03:56 +00:00
2008-11-09 22:29:28 +00:00
//its already running...
if ( csqcprogs )
return false ;
2005-02-09 19:32:09 +00:00
2010-02-06 01:25:04 +00:00
if ( qrenderer = = QR_NONE )
2005-01-17 17:43:13 +00:00
{
2005-03-10 03:55:18 +00:00
return false ;
2005-01-17 17:43:13 +00:00
}
2005-08-19 19:06:22 +00:00
if ( cl_nocsqc . value )
2023-04-14 01:50:19 +00:00
{
if ( checksum | | progssize )
Con_Printf ( CON_WARNING " Server is using csqc, but its disabled via %s \n " , cl_nocsqc . name ) ;
2005-08-19 19:06:22 +00:00
return false ;
2023-04-14 01:50:19 +00:00
}
2005-08-19 19:06:22 +00:00
2014-10-05 20:04:11 +00:00
if ( cls . state = = ca_disconnected )
{
movevars . gravity = 800 ;
movevars . entgravity = 1 ;
movevars . maxspeed = 320 ;
movevars . bunnyspeedcap = 0 ; //pm_bunnyspeedcap.value;
movevars . ktjump = false ; //pm_ktjump.value;
movevars . slidefix = true ; //(pm_slidefix.value != 0);
movevars . airstep = true ; //(pm_airstep.value != 0);
2019-03-01 22:39:30 +00:00
movevars . pground = true ;
2018-01-22 19:18:04 +00:00
movevars . stepdown = true ;
2014-10-05 20:04:11 +00:00
movevars . walljump = false ; //(pm_walljump.value);
movevars . slidyslopes = false ; //(pm_slidyslopes.value!=0);
2023-01-25 23:14:13 +00:00
movevars . bunnyfriction = false ;
2021-05-09 13:00:30 +00:00
movevars . autobunny = false ; //pm_autobunny.value!=0
2014-10-05 20:04:11 +00:00
movevars . watersinkspeed = 60 ; //*pm_watersinkspeed.string?pm_watersinkspeed.value:60;
movevars . flyfriction = 4 ; //*pm_flyfriction.string?pm_flyfriction.value:4;
2018-12-11 00:20:59 +00:00
movevars . edgefriction = 2 ; //*pm_edgefriction.string?pm_edgefriction.value:2;
2014-10-05 20:04:11 +00:00
movevars . stepheight = PM_DEFAULTSTEPHEIGHT ;
2019-10-14 02:36:57 +00:00
movevars . coordtype = COORDTYPE_FLOAT_32 ;
2019-03-23 07:06:37 +00:00
movevars . flags = MOVEFLAG_NOGRAVITYONGROUND ;
2014-10-05 20:04:11 +00:00
}
2011-05-20 04:10:46 +00:00
for ( i = 0 ; i < sizeof ( csqc_builtin ) / sizeof ( csqc_builtin [ 0 ] ) ; i + + )
csqc_builtin [ i ] = PF_Fixme ;
2008-11-09 22:29:28 +00:00
for ( i = 0 ; BuiltinList [ i ] . bifunc ; i + + )
{
if ( BuiltinList [ i ] . ebfsnum )
2011-05-20 04:10:46 +00:00
csqc_builtin [ BuiltinList [ i ] . ebfsnum ] = BuiltinList [ i ] . bifunc ;
2008-11-09 22:29:28 +00:00
}
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
csqc_deprecated_warned = ! ! cl_csqc_nodeprecate . ival ;
2005-02-12 18:56:04 +00:00
memset ( cl . model_csqcname , 0 , sizeof ( cl . model_csqcname ) ) ;
memset ( cl . model_csqcprecache , 0 , sizeof ( cl . model_csqcprecache ) ) ;
2005-01-17 17:43:13 +00:00
csqcprogparms . progsversion = PROGSTRUCT_VERSION ;
2018-01-22 19:18:04 +00:00
csqcprogparms . ReadFile = CSQC_PRLoadFile ;
2005-08-11 04:14:33 +00:00
csqcprogparms . FileSize = CSQC_PRFileSize ; //int (*FileSize) (char *fname); //-1 if file does not exist
2005-01-17 17:43:13 +00:00
csqcprogparms . WriteFile = QC_WriteFile ; //bool (*WriteFile) (char *name, void *data, int len);
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
csqcprogparms . Printf = PR_Printf ; //Con_Printf;//void (*printf) (char *, ...);
2016-12-09 09:09:12 +00:00
csqcprogparms . DPrintf = PR_DPrintf ; //Con_Printf;//void (*printf) (char *, ...);
2005-01-17 17:43:13 +00:00
csqcprogparms . Sys_Error = Sys_Error ;
csqcprogparms . Abort = CSQC_Abort ;
2014-10-05 20:04:11 +00:00
csqcprogparms . CheckHeaderCrc = CSQC_CheckHeaderCrc ;
2005-03-28 07:05:38 +00:00
csqcprogparms . edictsize = sizeof ( csqcedict_t ) ;
2005-01-17 17:43:13 +00:00
2009-11-04 21:16:50 +00:00
csqcprogparms . entspawn = CSQC_EntSpawn ; //void (*entspawn) (struct edict_s *ent); //ent has been spawned, but may not have all the extra variables (that may need to be set) set
csqcprogparms . entcanfree = CSQC_EntFree ; //bool (*entcanfree) (struct edict_s *ent); //return true to stop ent from being freed
2014-10-05 20:04:11 +00:00
csqcprogparms . stateop = CSQC_StateOp ; //StateOp;//void (*stateop) (float var, func_t func);
csqcprogparms . cstateop = CSQC_CStateOp ; //CStateOp;
csqcprogparms . cwstateop = CSQC_CWStateOp ; //CWStateOp;
csqcprogparms . thinktimeop = CSQC_ThinkTimeOp ; //ThinkTimeOp;
2005-01-17 17:43:13 +00:00
2015-02-02 08:01:53 +00:00
csqcprogparms . MapNamedBuiltin = PR_CSQC_MapNamedBuiltin ;
2005-01-17 17:43:13 +00:00
csqcprogparms . loadcompleate = NULL ; //void (*loadcompleate) (int edictsize); //notification to reset any pointers.
2005-04-19 21:09:29 +00:00
csqcprogparms . memalloc = PR_CB_Malloc ; //void *(*memalloc) (int size); //small string allocation malloced and freed randomly
csqcprogparms . memfree = PR_CB_Free ; //void (*memfree) (void * mem);
2005-01-17 17:43:13 +00:00
2011-05-20 04:10:46 +00:00
csqcprogparms . globalbuiltins = csqc_builtin ; //builtin_t *globalbuiltins; //these are available to all progs
csqcprogparms . numglobalbuiltins = sizeof ( csqc_builtin ) / sizeof ( csqc_builtin [ 0 ] ) ;
2005-01-17 17:43:13 +00:00
2009-04-01 22:03:56 +00:00
csqcprogparms . autocompile = PR_COMPILEIGNORE ; //enum {PR_NOCOMPILE, PR_COMPILENEXIST, PR_COMPILECHANGED, PR_COMPILEALWAYS} autocompile;
2005-01-17 17:43:13 +00:00
csqcprogparms . gametime = & csqctime ;
2020-04-29 10:43:22 +00:00
# ifdef MULTITHREAD
csqcprogparms . usethreadedgc = pr_gc_threaded . ival ;
# endif
2005-01-17 17:43:13 +00:00
2020-04-29 10:43:22 +00:00
csqcprogparms . edicts = ( struct edict_s * * ) & csqc_world . edicts ;
csqcprogparms . num_edicts = & csqc_world . num_edicts ;
2005-01-17 17:43:13 +00:00
2005-08-03 23:14:59 +00:00
csqcprogparms . useeditor = QCEditor ; //void (*useeditor) (char *filename, int line, int nump, char **parms);
2011-10-27 15:46:36 +00:00
csqcprogparms . user = & csqc_world ;
2013-10-08 14:28:11 +00:00
csqc_world . keydestmask = kdm_game ;
2005-01-17 17:43:13 +00:00
csqctime = Sys_DoubleTime ( ) ;
if ( ! csqcprogs )
{
2013-11-21 23:02:28 +00:00
int csprogsnum = - 1 ;
int csaddonnum = - 1 ;
2005-02-28 07:16:19 +00:00
in_sensitivityscale = 1 ;
2008-05-25 22:23:43 +00:00
csqcmapentitydataloaded = true ;
2022-01-28 10:48:14 +00:00
cl . mapstarttime = realtime ;
2005-01-17 17:43:13 +00:00
csqcprogs = InitProgs ( & csqcprogparms ) ;
2009-11-17 00:15:44 +00:00
csqc_world . progs = csqcprogs ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
csqc_world . usesolidcorpse = true ;
2017-08-29 02:29:06 +00:00
PR_Configure ( csqcprogs , PR_ReadBytesString ( pr_csqc_memsize . string ) , MAX_PROGS , pr_enable_profiling . ival ) ;
2009-11-07 13:29:15 +00:00
csqc_world . worldmodel = cl . worldmodel ;
csqc_world . Event_Touch = CSQC_Event_Touch ;
2011-09-03 03:49:43 +00:00
csqc_world . Event_Think = CSQC_Event_Think ;
2012-07-05 19:42:36 +00:00
csqc_world . Event_Sound = CSQC_Event_Sound ;
csqc_world . Event_ContentsTransition = CSQC_Event_ContentsTransition ;
2011-10-27 15:46:36 +00:00
csqc_world . Get_CModel = CSQC_World_ModelForIndex ;
csqc_world . Get_FrameState = CSQC_World_GetFrameState ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
World_ClearWorld ( & csqc_world , false ) ;
2005-01-24 05:10:11 +00:00
CSQC_InitFields ( ) ; //let the qclib know the field order that the engine needs.
2005-11-21 21:47:53 +00:00
2011-10-27 15:46:36 +00:00
if ( setjmp ( csqc_abort ) )
{
CSQC_Shutdown ( ) ;
return false ;
}
2017-08-29 02:29:06 +00:00
# ifndef csqc_isdarkplaces
2009-04-01 22:03:56 +00:00
csqc_isdarkplaces = false ;
2017-08-29 02:29:06 +00:00
# endif
2012-10-13 00:56:31 +00:00
if ( csdatenabled | | csqc_singlecheats | | anycsqc )
2018-01-22 19:18:04 +00:00
csqc_nogameaccess = false ;
else
csqc_nogameaccess = true ;
if ( ! csqc_nogameaccess )
{ //only load csprogs if its expected to be able to work without failing for game access reasons
2018-09-23 19:35:24 +00:00
csprogsnum = PR_LoadProgs ( csqcprogs , csprogs_checkname ) ;
2018-01-22 19:18:04 +00:00
if ( csprogsnum > = 0 )
2014-03-30 08:55:06 +00:00
Con_DPrintf ( " Loaded csprogs.dat \n " ) ;
2023-04-14 01:50:19 +00:00
else if ( csprogs_checksum | | csprogs_checksize )
Con_Printf ( CON_WARNING " Unable to load \" csprogsvers/%x.dat \" \n " , csprogs_checksum ) ;
2005-01-17 17:43:13 +00:00
}
2018-01-22 19:18:04 +00:00
2023-04-17 02:39:30 +00:00
if ( csprogsnum > = 0 & & ! Q_strcasecmp ( csprogs_checkname , " csaddon.dat " ) )
; //using csaddon directly... map editor mode?
else if ( csqc_singlecheats | | anycsqc )
2011-10-27 15:46:36 +00:00
{
2015-02-02 08:01:53 +00:00
csaddonnum = PR_LoadProgs ( csqcprogs , " csaddon.dat " ) ;
2013-11-21 23:02:28 +00:00
if ( csaddonnum > = 0 )
2012-11-27 03:23:19 +00:00
Con_DPrintf ( " loaded csaddon.dat... \n " ) ;
else
Con_DPrintf ( " unable to find csaddon.dat. \n " ) ;
2011-10-27 15:46:36 +00:00
}
2012-11-27 03:23:19 +00:00
else
Con_DPrintf ( " skipping csaddon.dat due to cheat restrictions \n " ) ;
2011-10-27 15:46:36 +00:00
2018-01-22 19:18:04 +00:00
if ( csprogsnum < 0 & & csaddonnum < 0 ) //simple csqc optionally uses the nq progs, but its explicitly limited
{
csqc_nogameaccess = true ;
csprogsnum = PR_LoadProgs ( csqcprogs , " progs.dat " ) ;
}
2013-11-21 23:02:28 +00:00
if ( csprogsnum = = - 1 & & csaddonnum = = - 1 )
2011-10-27 15:46:36 +00:00
{
CSQC_Shutdown ( ) ;
return false ;
}
2019-06-17 04:21:41 +00:00
if ( csqc_nogameaccess & & ! PR_FindFunction ( csqcprogs , " CSQC_DrawHud " , PR_ANY ) & & ! PR_FindFunction ( csqcprogs , " CSQC_DrawScores " , PR_ANY ) )
2018-01-22 19:18:04 +00:00
{ //simple csqc module is not csqc. abort now.
CSQC_Shutdown ( ) ;
2018-08-23 06:03:31 +00:00
Con_DPrintf ( " progs.dat is not suitable for SimpleCSQC - no CSQC_DrawHud \n " ) ;
2018-01-22 19:18:04 +00:00
return false ;
}
else if ( csqc_nogameaccess )
Con_DPrintf ( " Loaded [csqc]progs.dat \n " ) ;
2013-11-21 23:02:28 +00:00
PR_ProgsAdded ( csqcprogs , csprogsnum , " csprogs.dat " ) ;
PR_ProgsAdded ( csqcprogs , csaddonnum , " csaddon.dat " ) ;
2005-08-07 18:08:13 +00:00
2005-05-20 03:32:53 +00:00
PF_InitTempStrings ( csqcprogs ) ;
2009-11-17 00:15:44 +00:00
csqc_world . physicstime = 0 ;
2014-10-05 20:04:11 +00:00
if ( ! csqc_world . worldmodel )
csqc_world . worldmodel = Mod_ForName ( " " , MLV_SILENT ) ;
csqc_worldchanged = false ;
2009-11-17 00:15:44 +00:00
2005-08-07 18:08:13 +00:00
memset ( csqcent , 0 , sizeof ( * csqcent ) * maxcsqcentities ) ; //clear the server->csqc entity translations.
2005-11-21 21:47:53 +00:00
2023-10-30 04:29:48 +00:00
if ( csqc_isdarkplaces )
CSQC_FindGlobals ( true ) ;
else
CSQC_FindGlobals ( false ) ;
2011-12-05 15:23:40 +00:00
for ( i = 0 ; i < csqcprogs - > numprogs ; i + + )
{
func_t f = PR_FindFunction ( csqcprogs , " init " , i ) ;
if ( f )
{
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_PROG ( OFS_PARM0 ) = i - 1 ;
PR_ExecuteProgram ( csqcprogs , f ) ;
}
}
2011-07-30 14:14:56 +00:00
csqcentsize = PR_InitEnts ( csqcprogs , pr_csqc_maxedicts . value ) ;
2005-11-21 21:47:53 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( csqcg . CSQC_GenerateMaterial )
Material_RegisterLoader ( & csqc_world , & csqcmaterialloader ) ;
2005-01-24 05:10:11 +00:00
//world edict becomes readonly
2018-04-06 17:21:15 +00:00
worldent = ( csqcedict_t * ) EDICT_NUM_PB ( csqcprogs , 0 ) ;
2016-07-12 00:40:13 +00:00
worldent - > ereftype = ER_ENTITY ;
2008-05-25 22:23:43 +00:00
2014-10-05 20:04:11 +00:00
for ( i = 0 ; i < csqcprogs - > numprogs ; i + + )
{
func_t f = PR_FindFunction ( csqcprogs , " initents " , i ) ;
if ( f )
{
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_PROG ( OFS_PARM0 ) = i - 1 ;
PR_ExecuteProgram ( csqcprogs , f ) ;
}
}
2011-05-20 04:10:46 +00:00
/*DP compat*/
2016-07-12 00:40:13 +00:00
str = ( string_t * ) csqcprogs - > GetEdictFieldValue ( csqcprogs , ( edict_t * ) worldent , " message " , ev_string , NULL ) ;
2009-04-19 00:50:42 +00:00
if ( str )
2015-01-21 18:18:37 +00:00
* str = PR_NewString ( csqcprogs , cl . levelname ) ;
2009-05-19 01:54:00 +00:00
2011-05-20 04:10:46 +00:00
str = ( string_t * ) PR_FindGlobal ( csqcprogs , " mapname " , 0 , NULL ) ;
2009-04-19 00:50:42 +00:00
if ( str )
{
2018-07-05 16:21:44 +00:00
char * s = InfoBuf_ValueForKey ( & cl . serverinfo , " map " ) ;
2017-08-29 02:29:06 +00:00
if ( ! * s )
s = cl . model_name [ 1 ] ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! s | | ! * s )
2009-04-19 00:50:42 +00:00
s = " unknown " ;
2015-01-21 18:18:37 +00:00
* str = PR_NewString ( csqcprogs , s ) ;
2009-04-19 00:50:42 +00:00
}
2005-01-17 17:43:13 +00:00
2018-01-22 19:18:04 +00:00
if ( csqcg . deathmatch )
* csqcg . deathmatch = cl . deathmatch ;
if ( csqcg . coop )
* csqcg . coop = ! cl . deathmatch & & cl . allocated_client_slots > 1 ;
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_Init )
2008-05-25 22:23:43 +00:00
{
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2011-04-20 03:38:59 +00:00
G_FLOAT ( OFS_PARM0 ) = CSQC_API_VERSION ; //api version
2008-05-25 22:23:43 +00:00
( ( ( string_t * ) pr_globals ) [ OFS_PARM1 ] = PR_TempString ( csqcprogs , FULLENGINENAME ) ) ;
2011-03-30 15:17:55 +00:00
G_FLOAT ( OFS_PARM2 ) = version_number ( ) ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Init ) ;
2008-05-25 22:23:43 +00:00
}
2017-08-14 16:38:44 +00:00
/*
{
char * watchname = " something " ;
void * dbg = PR_FindGlobal ( csqcprogs , watchname , 0 , NULL ) ;
if ( ! csqcprogs - > SetWatchPoint ( csqcprogs , watchname ) )
Con_Printf ( " Unable to watch %s \n " , watchname ) ;
}
*/
// csqcprogs->ToggleBreak(csqcprogs, "something", 0, 2);
2005-02-09 19:32:09 +00:00
2012-01-01 02:26:42 +00:00
Con_DPrintf ( " Loaded csqc \n " ) ;
2009-04-19 00:50:42 +00:00
csqcmapentitydataloaded = false ;
2014-10-05 20:04:11 +00:00
csqc_world . physicstime = 0.1 ;
2015-07-30 16:26:15 +00:00
2023-02-20 08:47:45 +00:00
CSQC_RendererRestarted ( true ) ;
2015-07-30 16:26:15 +00:00
if ( cls . state = = ca_disconnected )
CSQC_WorldLoaded ( ) ;
2005-01-17 17:43:13 +00:00
}
2005-03-10 03:55:18 +00:00
return true ; //success!
2005-01-17 17:43:13 +00:00
}
2023-02-20 08:47:45 +00:00
void CSQC_RendererRestarted ( qboolean initing )
2012-07-05 19:42:36 +00:00
{
int i ;
if ( ! csqcprogs )
return ;
2023-02-20 08:47:45 +00:00
if ( initing )
2012-07-05 19:42:36 +00:00
{
2023-02-20 08:47:45 +00:00
//called at startup
if ( csqc_worldchanged )
{
csqc_worldchanged = false ;
cl . worldmodel = r_worldentity . model = csqc_world . worldmodel ;
if ( cl . worldmodel )
FS_LoadMapPackFile ( cl . worldmodel - > name , cl . worldmodel - > archive ) ;
Surf_NewMap ( csqc_world . worldmodel ) ;
CL_UpdateWindowTitle ( ) ;
World_RBE_Shutdown ( & csqc_world ) ;
World_RBE_Start ( & csqc_world ) ;
}
}
else
{ //FIXME: this might be awkward in the purecsqc case.
csqc_world . worldmodel = cl . worldmodel ;
for ( i = 0 ; i < MAX_CSMODELS ; i + + )
{
cl . model_csqcprecache [ i ] = NULL ;
}
2012-07-05 19:42:36 +00:00
}
//FIXME: registered shaders
2015-07-30 16:26:15 +00:00
//let the csqc know that its rendertargets got purged
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_RendererRestarted )
2016-10-22 07:06:51 +00:00
{
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2020-01-09 15:35:40 +00:00
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( csqcprogs , rf - > description ) ) ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_RendererRestarted ) ;
2016-10-22 07:06:51 +00:00
}
2015-07-30 16:26:15 +00:00
//in case it drew to any render targets.
if ( R2D_Flush )
R2D_Flush ( ) ;
if ( * r_refdef . rt_destcolour [ 0 ] . texname )
{
Q_strncpyz ( r_refdef . rt_destcolour [ 0 ] . texname , " " , sizeof ( r_refdef . rt_destcolour [ 0 ] . texname ) ) ;
BE_RenderToTextureUpdate2d ( true ) ;
}
2012-07-05 19:42:36 +00:00
}
2008-05-25 22:23:43 +00:00
void CSQC_WorldLoaded ( void )
{
2010-07-11 02:22:39 +00:00
csqcedict_t * worldent ;
2015-09-01 04:45:15 +00:00
int tmp ;
int wmodelindex ;
2010-07-11 02:22:39 +00:00
2008-05-25 22:23:43 +00:00
if ( ! csqcprogs )
return ;
if ( csqcmapentitydataloaded )
return ;
2015-02-02 08:01:53 +00:00
if ( csqc_isdarkplaces )
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
CSQC_FindGlobals ( false ) ;
2015-02-02 08:01:53 +00:00
2020-08-13 08:39:48 +00:00
csqc_world . worldmodel = cl . worldmodel ;
2008-05-25 22:23:43 +00:00
csqcmapentitydataloaded = true ;
2020-08-13 08:39:48 +00:00
csqcmapentitydata = Mod_GetEntitiesString ( csqc_world . worldmodel ) ;
2009-11-17 00:15:44 +00:00
2015-02-02 08:01:53 +00:00
World_RBE_Start ( & csqc_world ) ;
2009-11-17 00:15:44 +00:00
2018-04-06 17:21:15 +00:00
worldent = ( csqcedict_t * ) EDICT_NUM_PB ( csqcprogs , 0 ) ;
2010-07-11 02:22:39 +00:00
worldent - > v - > solid = SOLID_BSP ;
2020-08-13 08:39:48 +00:00
wmodelindex = CS_FindModel ( csqc_world . worldmodel ? csqc_world . worldmodel - > name : " " , & tmp ) ;
2015-09-01 04:45:15 +00:00
tmp = csqc_worldchanged ;
csqc_setmodel ( csqcprogs , worldent , wmodelindex ) ;
csqc_worldchanged = tmp ;
2010-07-11 02:22:39 +00:00
2013-06-23 02:17:02 +00:00
worldent - > readonly = false ; //just in case
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
World_ClearWorld ( & csqc_world , true ) ;
2015-02-02 08:01:53 +00:00
if ( csqc_isdarkplaces )
{
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_Init )
2015-02-02 08:01:53 +00:00
{
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSQC_API_VERSION ; //api version
( ( ( string_t * ) pr_globals ) [ OFS_PARM1 ] = PR_TempString ( csqcprogs , FULLENGINENAME ) ) ;
G_FLOAT ( OFS_PARM2 ) = version_number ( ) ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Init ) ;
2015-02-02 08:01:53 +00:00
}
}
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_WorldLoaded )
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_WorldLoaded ) ;
2008-05-25 22:23:43 +00:00
csqcmapentitydata = NULL ;
2010-07-11 02:22:39 +00:00
worldent - > readonly = true ;
2008-05-25 22:23:43 +00:00
}
2005-08-16 18:35:43 +00:00
void CSQC_CoreDump ( void )
{
if ( ! csqcprogs )
{
Con_Printf ( " Can't core dump, you need to be running the CSQC progs first. " ) ;
return ;
}
{
2016-01-18 05:22:07 +00:00
size_t size = 1024 * 1024 * 8 ;
2005-08-16 18:35:43 +00:00
char * buffer = BZ_Malloc ( size ) ;
2013-08-21 07:14:39 +00:00
csqcprogs - > save_ents ( csqcprogs , buffer , & size , size , 3 ) ;
2015-06-04 06:15:14 +00:00
COM_WriteFile ( " csqccore.txt " , FS_GAMEONLY , buffer , size ) ;
2005-08-16 18:35:43 +00:00
BZ_Free ( buffer ) ;
}
}
2008-11-09 22:29:28 +00:00
void PR_CSExtensionList_f ( void )
{
int i ;
int ebi ;
int bi ;
2021-04-14 05:21:04 +00:00
qc_extension_t * extlist ;
2021-07-17 15:09:34 +00:00
qboolean inactive ;
char biissues [ 8192 ] ;
const builtin_t * pr_builtin = csqc_builtin ;
int num ;
qboolean wrongmodule ;
int j ;
const char * extname ;
2021-08-23 06:37:21 +00:00
extcheck_t extcheck = { & csqc_world , cls . fteprotocolextensions , cls . fteprotocolextensions2 } ;
2021-07-17 15:09:34 +00:00
2008-11-09 22:29:28 +00:00
# define SHOW_ACTIVEEXT 1
# define SHOW_ACTIVEBI 2
# define SHOW_NOTSUPPORTEDEXT 4
# define SHOW_NOTACTIVEEXT 8
# define SHOW_NOTACTIVEBI 16
int showflags = atoi ( Cmd_Argv ( 1 ) ) ;
if ( ! showflags )
showflags = SHOW_ACTIVEEXT | SHOW_NOTACTIVEEXT ;
//make sure the info is valid
2011-05-20 04:10:46 +00:00
if ( ! csqc_builtin [ 0 ] )
2008-11-09 22:29:28 +00:00
{
2011-05-20 04:10:46 +00:00
for ( i = 0 ; i < sizeof ( csqc_builtin ) / sizeof ( csqc_builtin [ 0 ] ) ; i + + )
csqc_builtin [ i ] = PF_Fixme ;
2008-11-09 22:29:28 +00:00
for ( i = 0 ; BuiltinList [ i ] . bifunc ; i + + )
{
if ( BuiltinList [ i ] . ebfsnum )
2011-05-20 04:10:46 +00:00
csqc_builtin [ BuiltinList [ i ] . ebfsnum ] = BuiltinList [ i ] . bifunc ;
2008-11-09 22:29:28 +00:00
}
}
if ( showflags & ( SHOW_ACTIVEBI | SHOW_NOTACTIVEBI ) )
for ( i = 0 ; BuiltinList [ i ] . name ; i + + )
{
if ( ! BuiltinList [ i ] . ebfsnum )
continue ; //a reserved builtin.
if ( BuiltinList [ i ] . bifunc = = PF_Fixme )
Con_Printf ( " ^1%s:%i needs to be added \n " , BuiltinList [ i ] . name , BuiltinList [ i ] . ebfsnum ) ;
2011-05-20 04:10:46 +00:00
else if ( csqc_builtin [ BuiltinList [ i ] . ebfsnum ] = = BuiltinList [ i ] . bifunc )
2008-11-09 22:29:28 +00:00
{
if ( showflags & SHOW_ACTIVEBI )
Con_Printf ( " %s is active on %i \n " , BuiltinList [ i ] . name , BuiltinList [ i ] . ebfsnum ) ;
}
else
{
if ( showflags & SHOW_NOTACTIVEBI )
Con_Printf ( " ^4%s is NOT active (%i) \n " , BuiltinList [ i ] . name , BuiltinList [ i ] . ebfsnum ) ;
}
}
if ( showflags & ( SHOW_NOTSUPPORTEDEXT | SHOW_NOTACTIVEEXT | SHOW_ACTIVEEXT ) )
{
extlist = QSG_Extensions ;
for ( i = 0 ; i < QSG_Extensions_count ; i + + )
{
2021-07-17 15:09:34 +00:00
* biissues = 0 ;
inactive = false ;
2008-11-09 22:29:28 +00:00
if ( ! extlist [ i ] . name )
continue ;
2021-07-17 15:09:34 +00:00
for ( ebi = 0 ; ebi < countof ( extlist [ i ] . builtinnames ) & & extlist [ i ] . builtinnames [ ebi ] ; ebi + + )
2008-11-09 22:29:28 +00:00
{
2021-07-17 15:09:34 +00:00
wrongmodule = false ;
2008-11-09 22:29:28 +00:00
for ( bi = 0 ; BuiltinList [ bi ] . name ; bi + + )
{
if ( ! strcmp ( BuiltinList [ bi ] . name , extlist [ i ] . builtinnames [ ebi ] ) )
2021-07-17 15:09:34 +00:00
{
if ( BuiltinList [ bi ] . bifunc = = PF_Fixme )
wrongmodule = true ;
else
break ;
}
2008-11-09 22:29:28 +00:00
}
if ( ! BuiltinList [ bi ] . name )
{
2021-07-17 15:09:34 +00:00
if ( wrongmodule )
continue ;
Q_strncatz2 ( biissues , va ( CON_ERROR " \t ^4#:%s is not known \n " , extlist [ i ] . builtinnames [ ebi ] ) ) ;
inactive = true ;
continue ;
2008-11-09 22:29:28 +00:00
}
2021-07-17 15:09:34 +00:00
num = BuiltinList [ bi ] . ebfsnum ;
if ( ! num )
; //builtins with no number are handled at load time. there are no number conflicts so no way for the builtin to be inactive. if there is an error then its not because of the extension itself.
else if ( pr_builtin [ num ] ! = BuiltinList [ bi ] . bifunc )
2008-11-09 22:29:28 +00:00
{
2021-07-17 15:09:34 +00:00
if ( pr_builtin [ num ] = = PF_Fixme )
Q_strncatz2 ( biissues , va ( " \t ^4#%i:%s is not implemented \n " , num , BuiltinList [ bi ] . name ) ) ;
2008-11-09 22:29:28 +00:00
else
{
2021-07-17 15:09:34 +00:00
for ( j = 0 ; BuiltinList [ j ] . name ; j + + )
{
if ( BuiltinList [ j ] . bifunc = = pr_builtin [ num ] )
{
Q_strncatz2 ( biissues , va ( " \t #%i:%s is currently %s \n " , num , BuiltinList [ bi ] . name , BuiltinList [ j ] . name ) ) ;
break ;
}
}
if ( ! BuiltinList [ j ] . name )
Q_strncatz2 ( biissues , va ( " \t ^4#%i:%s is currently unknown \n " , num , BuiltinList [ bi ] . name ) ) ;
2008-11-09 22:29:28 +00:00
}
2021-07-17 15:09:34 +00:00
inactive = true ;
2008-11-09 22:29:28 +00:00
}
}
2021-07-17 15:09:34 +00:00
if ( extlist [ i ] . description )
extname = va ( " ^[%s \\ tip \\ %s^] " , extlist [ i ] . name , extlist [ i ] . description ) ;
else
extname = extlist [ i ] . name ;
if ( extlist [ i ] . extensioncheck & & ! extlist [ i ] . extensioncheck ( & extcheck ) )
{
if ( showflags & SHOW_NOTSUPPORTEDEXT )
Con_Printf ( CON_WARNING " protocol %s is blocked \n %s " , extname , biissues ) ;
}
else if ( inactive )
{
if ( showflags & SHOW_NOTSUPPORTEDEXT )
Con_Printf ( CON_ERROR " %s is inactive \n %s " , extname , biissues ) ;
}
else
2008-11-09 22:29:28 +00:00
{
if ( showflags & SHOW_ACTIVEEXT )
{
2021-07-17 15:09:34 +00:00
if ( ! extlist [ i ] . builtinnames [ 0 ] )
Con_Printf ( " %s is supported \n %s " , extname , biissues ) ;
2008-11-09 22:29:28 +00:00
else
2021-07-17 15:09:34 +00:00
Con_Printf ( " %s is currently active \n %s " , extname , biissues ) ;
2008-11-09 22:29:28 +00:00
}
}
}
}
}
2011-05-20 04:10:46 +00:00
void CSQC_Breakpoint_f ( void )
{
int wasset ;
int isset ;
char * filename = Cmd_Argv ( 1 ) ;
int line = atoi ( Cmd_Argv ( 2 ) ) ;
if ( ! csqcprogs )
{
Con_Printf ( " CSQC not running \n " ) ;
return ;
}
2011-09-16 05:56:54 +00:00
wasset = csqcprogs - > ToggleBreak ( csqcprogs , filename , line , 3 ) ;
isset = csqcprogs - > ToggleBreak ( csqcprogs , filename , line , 2 ) ;
2011-05-20 04:10:46 +00:00
if ( wasset = = isset )
Con_Printf ( " Breakpoint was not valid \n " ) ;
else if ( isset )
Con_Printf ( " Breakpoint has been set \n " ) ;
else
Con_Printf ( " Breakpoint has been cleared \n " ) ;
2015-03-03 00:14:43 +00:00
// Cvar_Set(Cvar_FindVar("pr_debugger"), "1");
2011-05-20 04:10:46 +00:00
}
2013-03-12 23:24:15 +00:00
static void CSQC_Poke_f ( void )
{
2014-05-10 13:42:13 +00:00
if ( ! csqc_singlecheats & & cls . state )
2013-03-12 23:24:15 +00:00
Con_Printf ( " %s is a cheat command \n " , Cmd_Argv ( 0 ) ) ;
else if ( csqcprogs )
Con_Printf ( " Result: %s \n " , csqcprogs - > EvaluateDebugString ( csqcprogs , Cmd_Args ( ) ) ) ;
else
Con_Printf ( " csqc not running \n " ) ;
}
void CSQC_WatchPoint_f ( void )
{
char * variable = Cmd_Argv ( 1 ) ;
if ( ! * variable )
variable = NULL ;
if ( ! csqc_singlecheats )
Con_Printf ( " %s is a cheat command \n " , Cmd_Argv ( 0 ) ) ;
else if ( ! csqcprogs )
{
Con_Printf ( " csqc not running \n " ) ;
return ;
}
if ( csqcprogs - > SetWatchPoint ( csqcprogs , variable ) )
Con_Printf ( " Watchpoint set \n " ) ;
else
Con_Printf ( " Watchpoint cleared \n " ) ;
}
2014-04-24 01:53:01 +00:00
void PR_CSProfile_f ( void )
{
if ( csqcprogs & & csqcprogs - > DumpProfile )
2015-01-07 13:34:05 +00:00
if ( ! csqcprogs - > DumpProfile ( csqcprogs , ! atof ( Cmd_Argv ( 1 ) ) ) )
Con_Printf ( " Enabled csqc Profiling. \n " ) ;
2014-04-24 01:53:01 +00:00
}
2013-03-12 23:24:15 +00:00
2011-05-20 04:10:46 +00:00
static void CSQC_GameCommand_f ( void ) ;
2005-03-20 02:57:11 +00:00
void CSQC_RegisterCvarsAndThings ( void )
{
2005-08-16 18:35:43 +00:00
Cmd_AddCommand ( " coredump_csqc " , CSQC_CoreDump ) ;
2008-11-09 22:29:28 +00:00
Cmd_AddCommand ( " extensionlist_csqc " , PR_CSExtensionList_f ) ;
2012-11-27 03:23:19 +00:00
Cmd_AddCommandD ( " cl_cmd " , CSQC_GameCommand_f , " Calls the csqc's GameCommand function " ) ;
2011-05-20 04:10:46 +00:00
Cmd_AddCommand ( " breakpoint_csqc " , CSQC_Breakpoint_f ) ;
2013-03-12 23:24:15 +00:00
Cmd_AddCommand ( " watchpoint_csqc " , CSQC_WatchPoint_f ) ;
Cmd_AddCommandD ( " poke_csqc " , CSQC_Poke_f , " Allows you to inspect/debug " ) ;
2014-04-24 01:53:01 +00:00
Cmd_AddCommand ( " profile_csqc " , PR_CSProfile_f ) ;
2005-08-16 18:35:43 +00:00
2013-03-12 22:53:23 +00:00
Cvar_Register ( & pr_csqc_formenus , CSQCPROGSGROUP ) ;
2011-07-30 14:14:56 +00:00
Cvar_Register ( & pr_csqc_memsize , CSQCPROGSGROUP ) ;
Cvar_Register ( & pr_csqc_maxedicts , CSQCPROGSGROUP ) ;
2005-08-19 19:06:22 +00:00
Cvar_Register ( & cl_csqcdebug , CSQCPROGSGROUP ) ;
Cvar_Register ( & cl_nocsqc , CSQCPROGSGROUP ) ;
Cvar_Register ( & pr_csqc_coreonerror , CSQCPROGSGROUP ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
Cvar_Register ( & cl_csqc_nodeprecate , CSQCPROGSGROUP ) ;
Cvar_Register ( & dpcompat_csqcinputeventtypes , CSQCPROGSGROUP ) ;
2011-05-20 04:10:46 +00:00
}
void CSQC_CvarChanged ( cvar_t * var )
{
if ( csqcprogs )
{
PR_AutoCvar ( csqcprogs , var ) ;
}
2005-03-20 02:57:11 +00:00
}
2014-12-11 16:26:26 +00:00
qboolean CSQC_UseGamecodeLoadingScreen ( void )
{
2020-09-08 05:11:09 +00:00
return csqcprogs & & csqcg . CSQC_UpdateViewLoading ;
2014-12-11 16:26:26 +00:00
}
2013-12-29 22:48:28 +00:00
//evil evil function. calling qc from inside the renderer is BAD.
qboolean CSQC_SetupToRenderPortal ( int entkeynum )
{
# ifdef TEXTEDITOR
if ( editormodal )
return false ;
# endif
if ( csqcprogs & & entkeynum < 0 )
{
2018-04-06 17:21:15 +00:00
csqcedict_t * e = ( void * ) EDICT_NUM_UB ( csqcprogs , - entkeynum ) ;
2013-12-29 22:48:28 +00:00
if ( e - > xv - > camera_transform )
{
int oself = * csqcg . self ;
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
* csqcg . self = EDICT_TO_PROG ( csqcprogs , e ) ;
VectorCopy ( r_refdef . vieworg , G_VECTOR ( OFS_PARM0 ) ) ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
VectorAngles ( vpn , vup , G_VECTOR ( OFS_PARM1 ) , true /*FIXME*/ ) ;
2020-09-08 05:11:09 +00:00
VectorCopy ( vpn , csqcg . v_forward ) ;
VectorCopy ( vright , csqcg . v_right ) ;
VectorCopy ( vup , csqcg . v_up ) ;
2013-12-29 22:48:28 +00:00
VectorCopy ( r_refdef . vieworg /*r_refdef.pvsorigin*/ , csqcg . trace_endpos ) ;
PR_ExecuteProgram ( csqcprogs , e - > xv - > camera_transform ) ;
2020-09-08 05:11:09 +00:00
VectorCopy ( csqcg . v_forward , vpn ) ;
VectorCopy ( csqcg . v_right , vright ) ;
VectorCopy ( csqcg . v_up , vup ) ;
2013-12-29 22:48:28 +00:00
VectorCopy ( G_VECTOR ( OFS_RETURN ) , r_refdef . vieworg ) ;
VectorCopy ( csqcg . trace_endpos , r_refdef . pvsorigin ) ;
* csqcg . self = oself ;
return true ;
}
}
return false ;
}
2005-01-17 17:43:13 +00:00
qboolean CSQC_DrawView ( void )
{
2009-11-17 00:15:44 +00:00
int ticlimit = 10 ;
float mintic = 0.01 ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
float maxtic = 0.1 ;
2012-07-05 19:42:36 +00:00
double clframetime = host_frametime ;
2017-08-29 02:29:06 +00:00
RSpeedLocals ( ) ;
2009-11-17 00:15:44 +00:00
2013-03-12 22:44:00 +00:00
csqc_resortfrags = true ;
2013-08-27 13:18:09 +00:00
csqctime = Sys_DoubleTime ( ) ;
2013-03-12 22:44:00 +00:00
2020-09-08 05:11:09 +00:00
if ( ! csqcg . CSQC_UpdateView | | ! csqcprogs )
2013-03-12 22:53:23 +00:00
return false ;
2022-02-07 14:34:30 +00:00
if ( cls . state < ca_active & & ! CSQC_UnconnectedOkay ( false ) & & ! CSQC_UseGamecodeLoadingScreen ( ) )
2005-01-17 17:43:13 +00:00
return false ;
2005-02-12 18:56:04 +00:00
r_secondaryview = 0 ;
2010-04-09 10:50:14 +00:00
if ( csqcg . frametime )
* csqcg . frametime = host_frametime ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
csqc_dp_lastwas3d = false ;
2017-08-29 02:29:06 +00:00
RSpeedRemark ( ) ;
2014-04-04 01:45:40 +00:00
if ( csqc_isdarkplaces & & * csqc_world . g . physics_mode = = 1 )
2013-10-08 14:28:11 +00:00
{
csqc_world . physicstime = cl . servertime ;
}
else
2009-11-17 00:15:44 +00:00
{
2019-11-20 05:27:43 +00:00
# ifdef USERBE
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( csqc_world . rbe )
maxtic = mintic ; //physics engines need a fixed tick rate.
2019-11-20 05:27:43 +00:00
# endif
2013-06-23 02:17:02 +00:00
while ( 1 )
2009-11-17 00:15:44 +00:00
{
2013-06-23 02:17:02 +00:00
host_frametime = cl . servertime - csqc_world . physicstime ;
if ( host_frametime < mintic )
break ;
if ( ! - - ticlimit )
{
csqc_world . physicstime = cl . servertime ;
break ;
}
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( host_frametime > maxtic )
host_frametime = maxtic ;
2009-11-17 00:15:44 +00:00
2015-02-02 08:01:53 +00:00
# ifdef USERBE
if ( csqc_world . rbe )
{
# ifdef RAGDOLL
2018-03-24 04:02:09 +00:00
rag_doallanimations ( & csqc_world ) ;
2015-02-02 08:01:53 +00:00
# endif
2017-04-18 11:12:17 +00:00
csqc_world . rbe - > RunFrame ( & csqc_world , host_frametime , 800 ) ;
2015-02-02 08:01:53 +00:00
}
# endif
2011-09-03 03:49:43 +00:00
2013-06-23 02:17:02 +00:00
World_Physics_Frame ( & csqc_world ) ;
2014-10-05 20:04:11 +00:00
csqc_world . physicstime + = host_frametime ;
2013-06-23 02:17:02 +00:00
}
2009-11-17 00:15:44 +00:00
}
2017-08-29 02:29:06 +00:00
RSpeedEnd ( RSPEED_CSQCPHYSICS ) ;
2012-07-05 19:42:36 +00:00
2017-08-29 02:29:06 +00:00
RSpeedRemark ( ) ;
2005-10-01 03:01:12 +00:00
2017-08-29 02:29:06 +00:00
host_frametime = clframetime ;
2013-06-23 02:17:02 +00:00
2011-10-27 15:46:36 +00:00
if ( csqcg . frametime )
2023-01-09 05:15:31 +00:00
* csqcg . frametime = cl . paused ? 0 : bound ( 0 , cl . time - cl . lasttime , 0.1 ) ;
2017-01-13 00:39:50 +00:00
if ( csqcg . clframetime )
* csqcg . clframetime = host_frametime ;
2011-10-27 15:46:36 +00:00
2013-06-23 02:17:02 +00:00
if ( csqcg . numclientseats )
* csqcg . numclientseats = cl . splitclients ;
2005-08-11 04:14:33 +00:00
if ( csqcg . intermission )
2015-09-01 04:45:15 +00:00
* csqcg . intermission = cl . intermissionmode ;
2018-01-22 19:18:04 +00:00
if ( csqcg . intermission_time )
* csqcg . intermission_time = cl . completed_time ;
2005-04-26 16:04:12 +00:00
2014-03-30 08:55:06 +00:00
//work out which packet entities are solid
CL_SetSolidEntities ( ) ;
2013-06-23 02:17:02 +00:00
CL_TransitionEntities ( ) ;
if ( cl . worldmodel )
CL_PredictMove ( ) ;
2007-06-20 00:02:54 +00:00
2008-11-28 20:34:51 +00:00
if ( csqcg . cltime )
2022-01-28 10:48:14 +00:00
* csqcg . cltime = realtime - cl . mapstarttime ;
2020-09-08 05:11:09 +00:00
if ( csqcg . time )
* csqcg . time = cl . servertime ;
2017-08-29 02:29:06 +00:00
if ( csqcg . clientcommandframe )
* csqcg . clientcommandframe = cl . movesequence ;
if ( csqcg . servercommandframe )
* csqcg . servercommandframe = cl . ackedmovesequence ;
if ( csqcg . gamespeed )
* csqcg . gamespeed = cl . gamespeed ;
if ( cl . paused )
{
if ( csqcg . gamespeed )
* csqcg . gamespeed = 0 ;
}
2013-10-08 14:28:11 +00:00
if ( cl . currentpackentities & & cl . previouspackentities )
{
2020-09-08 05:11:09 +00:00
if ( csqcg . servertime )
* csqcg . servertime = cl . currentpackentities - > servertime ;
if ( csqcg . serverprevtime )
* csqcg . serverprevtime = cl . previouspackentities - > servertime ;
if ( csqcg . serverdeltatime )
* csqcg . serverdeltatime = cl . currentpackentities - > servertime - cl . previouspackentities - > servertime ;
2013-10-08 14:28:11 +00:00
}
2005-02-28 07:16:19 +00:00
2017-08-29 02:29:06 +00:00
//always revert to a usable default.
CSQC_ChangeLocalPlayer ( cl_forceseat . ival ? ( cl_forceseat . ival - 1 ) % cl . splitclients : 0 ) ;
DropPunchAngle ( csqc_playerview ) ; //FIXME: this seems like the wrong place for this.
if ( cl . worldmodel )
Surf_LessenStains ( ) ;
2005-07-14 01:57:34 +00:00
CSQC_RunThreads ( ) ; //wake up any qc threads
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2015-02-02 08:01:53 +00:00
if ( csqcg . autocvar_vid_conwidth )
* csqcg . autocvar_vid_conwidth = vid . width ;
if ( csqcg . autocvar_vid_conheight )
* csqcg . autocvar_vid_conheight = vid . height ;
2017-08-29 02:29:06 +00:00
# endif
2015-02-02 08:01:53 +00:00
2008-05-25 22:23:43 +00:00
{
2022-02-07 14:34:30 +00:00
extern qboolean scr_drawloading ;
extern int loading_stage ;
2008-05-25 22:23:43 +00:00
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2017-09-20 11:27:13 +00:00
if ( csqc_isdarkplaces )
{ //fucked for compatibility.
G_FLOAT ( OFS_PARM0 ) = vid . pixelwidth ;
G_FLOAT ( OFS_PARM1 ) = vid . pixelheight ;
}
else
{
G_FLOAT ( OFS_PARM0 ) = vid . width ;
G_FLOAT ( OFS_PARM1 ) = vid . height ;
}
2019-09-04 07:59:40 +00:00
G_FLOAT ( OFS_PARM2 ) = ! Key_Dest_Has ( kdm_menu | kdm_cwindows ) & & ! r_refdef . eyeoffset [ 0 ] & & ! r_refdef . eyeoffset [ 1 ] ;
2017-08-29 02:29:06 +00:00
2022-02-07 14:34:30 +00:00
if ( csqcg . CSQC_UpdateViewLoading & & ( ( cls . state & & cls . state < ca_active ) | | scr_drawloading | | loading_stage ) )
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_UpdateViewLoading ) ;
2017-08-29 02:29:06 +00:00
else
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_UpdateView ) ;
2008-05-25 22:23:43 +00:00
}
2005-01-17 17:43:13 +00:00
2015-02-02 08:01:53 +00:00
if ( * r_refdef . rt_destcolour [ 0 ] . texname )
{
2015-08-04 15:16:24 +00:00
if ( R2D_Flush )
R2D_Flush ( ) ;
2015-02-02 08:01:53 +00:00
Q_strncpyz ( r_refdef . rt_destcolour [ 0 ] . texname , " " , sizeof ( r_refdef . rt_destcolour [ 0 ] . texname ) ) ;
BE_RenderToTextureUpdate2d ( true ) ;
}
2017-08-29 02:29:06 +00:00
RSpeedEnd ( RSPEED_CSQCREDRAW ) ;
2015-02-02 08:01:53 +00:00
2005-01-17 17:43:13 +00:00
return true ;
}
2018-01-22 19:18:04 +00:00
qboolean CSQC_DrawHud ( playerview_t * pv )
{
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_DrawHud & & ( pv = = cl . playerview /* || csqcg.numclientseats*/ ) )
2018-01-22 19:18:04 +00:00
{
RSpeedMark ( ) ;
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
//set csqc globals
CSQC_ChangeLocalPlayer ( pv - cl . playerview ) ;
if ( csqcg . numclientseats )
* csqcg . numclientseats = cl . splitclients ;
2020-09-08 05:11:09 +00:00
if ( csqcg . time )
* csqcg . time = cl . time ;
2018-01-22 19:18:04 +00:00
if ( csqcg . frametime )
* csqcg . frametime = host_frametime ;
if ( csqcg . cltime )
2022-01-28 10:48:14 +00:00
* csqcg . cltime = realtime - cl . mapstarttime ;
2018-01-22 19:18:04 +00:00
G_FLOAT ( OFS_PARM0 + 0 ) = r_refdef . grect . width ;
G_FLOAT ( OFS_PARM0 + 1 ) = r_refdef . grect . height ;
G_FLOAT ( OFS_PARM0 + 2 ) = 0 ;
2018-01-23 01:49:49 +00:00
# ifdef QUAKEHUD
2018-01-22 19:18:04 +00:00
G_FLOAT ( OFS_PARM1 ) = ( pv - > sb_showscores ? 1 : 0 ) | ( pv - > sb_showteamscores ? 2 : 0 ) ;
2018-01-23 01:49:49 +00:00
# else
G_FLOAT ( OFS_PARM1 ) = false ; //hmm
# endif
G_FLOAT ( OFS_PARM2 + 0 ) = 0 ; //r_refdef.grect.x;
G_FLOAT ( OFS_PARM2 + 1 ) = 0 ; //r_refdef.grect.y;
G_FLOAT ( OFS_PARM2 + 2 ) = 0 ; //pv-cl.playerview;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_DrawHud ) ;
2018-01-22 19:18:04 +00:00
if ( * r_refdef . rt_destcolour [ 0 ] . texname )
{
if ( R2D_Flush )
R2D_Flush ( ) ;
Q_strncpyz ( r_refdef . rt_destcolour [ 0 ] . texname , " " , sizeof ( r_refdef . rt_destcolour [ 0 ] . texname ) ) ;
BE_RenderToTextureUpdate2d ( true ) ;
}
RSpeedEnd ( RSPEED_CSQCREDRAW ) ;
return true ;
}
return false ;
}
qboolean CSQC_DrawScores ( playerview_t * pv )
{
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_DrawScores & & ( pv = = cl . playerview /* || csqcg.numclientseats*/ ) )
2018-01-22 19:18:04 +00:00
{
RSpeedMark ( ) ;
void * pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
//set csqc globals (in case CSQC_DrawHud wasn't implemented)
CSQC_ChangeLocalPlayer ( pv - cl . playerview ) ;
if ( csqcg . numclientseats )
* csqcg . numclientseats = cl . splitclients ;
2020-09-08 05:11:09 +00:00
if ( csqcg . time )
* csqcg . time = cl . time ;
2018-01-22 19:18:04 +00:00
if ( csqcg . frametime )
* csqcg . frametime = host_frametime ;
if ( csqcg . cltime )
2022-01-28 10:48:14 +00:00
* csqcg . cltime = realtime - cl . mapstarttime ;
2018-01-22 19:18:04 +00:00
G_FLOAT ( OFS_PARM0 + 0 ) = r_refdef . grect . width ;
G_FLOAT ( OFS_PARM0 + 1 ) = r_refdef . grect . height ;
G_FLOAT ( OFS_PARM0 + 2 ) = 0 ;
2018-01-23 01:49:49 +00:00
# ifdef QUAKEHUD
2018-01-22 19:18:04 +00:00
G_FLOAT ( OFS_PARM1 ) = ( pv - > sb_showscores ? 1 : 0 ) | ( pv - > sb_showteamscores ? 2 : 0 ) ;
2018-01-23 01:49:49 +00:00
# else
G_FLOAT ( OFS_PARM1 ) = false ; //hmm
# endif
G_FLOAT ( OFS_PARM2 + 0 ) = 0 ; //r_refdef.grect.x;
G_FLOAT ( OFS_PARM2 + 1 ) = 0 ; //r_refdef.grect.y;
G_FLOAT ( OFS_PARM2 + 2 ) = 0 ; //pv-cl.playerview;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_DrawScores ) ;
2018-01-22 19:18:04 +00:00
if ( * r_refdef . rt_destcolour [ 0 ] . texname )
{
if ( R2D_Flush )
R2D_Flush ( ) ;
Q_strncpyz ( r_refdef . rt_destcolour [ 0 ] . texname , " " , sizeof ( r_refdef . rt_destcolour [ 0 ] . texname ) ) ;
BE_RenderToTextureUpdate2d ( true ) ;
}
RSpeedEnd ( RSPEED_CSQCREDRAW ) ;
return true ;
}
return false ;
}
2016-07-21 19:27:59 +00:00
qboolean CSQC_KeyPress ( int key , int unicode , qboolean down , unsigned int devid )
2005-04-26 16:04:12 +00:00
{
2016-02-10 23:23:43 +00:00
static qbyte csqckeysdown [ K_MAX ] ;
2005-04-26 16:04:12 +00:00
void * pr_globals ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
int ie = down ? CSIE_KEYDOWN : CSIE_KEYUP ;
2005-04-26 16:04:12 +00:00
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_InputEvent | | ie > = dpcompat_csqcinputeventtypes . ival )
2005-04-26 16:04:12 +00:00
return false ;
2013-03-12 22:57:40 +00:00
# ifdef TEXTEDITOR
2013-03-12 22:53:23 +00:00
if ( editormodal )
return false ;
2013-03-12 22:57:40 +00:00
# endif
2005-04-26 16:04:12 +00:00
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
G_FLOAT ( OFS_PARM0 ) = ie ;
2013-05-03 04:28:08 +00:00
G_FLOAT ( OFS_PARM1 ) = MP_TranslateFTEtoQCCodes ( key ) ;
2009-07-25 11:05:06 +00:00
G_FLOAT ( OFS_PARM2 ) = unicode ;
2012-02-12 05:18:31 +00:00
G_FLOAT ( OFS_PARM3 ) = devid ;
2005-04-26 16:04:12 +00:00
2016-02-10 23:23:43 +00:00
//small sanity check, so things don't break too much if things get big.
2016-08-25 00:12:14 +00:00
if ( ( unsigned ) devid > = sizeof ( csqckeysdown [ 0 ] ) * 8 )
2016-02-10 23:23:43 +00:00
devid = sizeof ( csqckeysdown [ 0 ] ) * 8 - 1 ;
if ( key < 0 | | key > = K_MAX )
key = 0 ; //panic. everyone panic.
2013-08-27 13:18:09 +00:00
if ( down )
{
qcinput_scan = G_FLOAT ( OFS_PARM1 ) ;
qcinput_unicode = G_FLOAT ( OFS_PARM2 ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
2016-02-10 23:23:43 +00:00
csqckeysdown [ key ] | = ( 1u < < devid ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
else
{
2016-02-10 23:23:43 +00:00
if ( key & & ! ( csqckeysdown [ key ] & ( 1u < < devid ) ) )
return false ; //prevent up events being able to leak
csqckeysdown [ key ] & = ~ ( 1u < < devid ) ;
2013-08-27 13:18:09 +00:00
}
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_InputEvent ) ;
2013-08-27 13:18:09 +00:00
qcinput_scan = 0 ; //and stop replay attacks
qcinput_unicode = 0 ;
2005-04-26 16:04:12 +00:00
2005-08-11 04:14:33 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
2016-07-21 19:27:59 +00:00
qboolean CSQC_MousePosition ( float xabs , float yabs , unsigned int devid )
2011-09-03 03:49:43 +00:00
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_InputEvent | | CSIE_MOUSEABS > = dpcompat_csqcinputeventtypes . ival )
2011-09-03 03:49:43 +00:00
return false ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2012-02-12 05:18:31 +00:00
G_FLOAT ( OFS_PARM0 ) = CSIE_MOUSEABS ;
2013-06-23 02:17:02 +00:00
G_FLOAT ( OFS_PARM1 ) = ( xabs * vid . width ) / vid . pixelwidth ;
G_FLOAT ( OFS_PARM2 ) = ( yabs * vid . height ) / vid . pixelheight ;
2012-02-12 05:18:31 +00:00
G_FLOAT ( OFS_PARM3 ) = devid ;
2011-09-03 03:49:43 +00:00
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_InputEvent ) ;
2011-09-03 03:49:43 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
2016-07-21 19:27:59 +00:00
qboolean CSQC_MouseMove ( float xdelta , float ydelta , unsigned int devid )
2005-08-11 04:14:33 +00:00
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_InputEvent | | CSIE_MOUSEDELTA > = dpcompat_csqcinputeventtypes . ival )
2005-08-11 04:14:33 +00:00
return false ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2012-02-12 05:18:31 +00:00
G_FLOAT ( OFS_PARM0 ) = CSIE_MOUSEDELTA ;
2013-08-21 07:14:39 +00:00
G_FLOAT ( OFS_PARM1 ) = ( xdelta * vid . width ) / vid . pixelwidth ;
G_FLOAT ( OFS_PARM2 ) = ( ydelta * vid . height ) / vid . pixelheight ;
2012-02-12 05:18:31 +00:00
G_FLOAT ( OFS_PARM3 ) = devid ;
2005-08-11 04:14:33 +00:00
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_InputEvent ) ;
2005-08-11 04:14:33 +00:00
return G_FLOAT ( OFS_RETURN ) ;
2005-04-26 16:04:12 +00:00
}
2016-07-21 19:27:59 +00:00
qboolean CSQC_JoystickAxis ( int axis , float value , unsigned int devid )
2014-06-27 16:10:10 +00:00
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_InputEvent | | CSIE_JOYAXIS > = dpcompat_csqcinputeventtypes . ival )
2014-06-27 16:10:10 +00:00
return false ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSIE_JOYAXIS ;
G_FLOAT ( OFS_PARM1 ) = axis ;
G_FLOAT ( OFS_PARM2 ) = value ;
G_FLOAT ( OFS_PARM3 ) = devid ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_InputEvent ) ;
2014-06-27 16:10:10 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
2012-02-12 05:18:31 +00:00
qboolean CSQC_Accelerometer ( float x , float y , float z )
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_InputEvent | | CSIE_ACCELEROMETER > = dpcompat_csqcinputeventtypes . ival )
2012-02-12 05:18:31 +00:00
return false ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSIE_ACCELEROMETER ;
G_FLOAT ( OFS_PARM1 ) = x ;
G_FLOAT ( OFS_PARM2 ) = y ;
G_FLOAT ( OFS_PARM3 ) = z ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_InputEvent ) ;
2012-02-12 05:18:31 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
2016-02-10 23:23:43 +00:00
qboolean CSQC_Gyroscope ( float x , float y , float z )
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_InputEvent | | CSIE_GYROSCOPE > = dpcompat_csqcinputeventtypes . ival )
2016-02-10 23:23:43 +00:00
return false ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSIE_GYROSCOPE ;
G_FLOAT ( OFS_PARM1 ) = x ;
G_FLOAT ( OFS_PARM2 ) = y ;
G_FLOAT ( OFS_PARM3 ) = z ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_InputEvent ) ;
2016-02-10 23:23:43 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
2012-02-12 05:18:31 +00:00
2012-10-13 00:56:31 +00:00
qboolean CSQC_ConsoleLink ( char * text , char * info )
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_ConsoleLink )
2012-10-13 00:56:31 +00:00
return false ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
( ( ( string_t * ) pr_globals ) [ OFS_PARM1 ] = PR_TempString ( csqcprogs , info ) ) ;
* info = 0 ;
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( csqcprogs , text ) ) ;
* info = ' \\ ' ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_ConsoleLink ) ;
2012-10-13 00:56:31 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
2017-11-16 22:20:40 +00:00
qboolean CSQC_ConsoleCommand ( int seat , const char * cmd )
2005-05-15 18:49:04 +00:00
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_ConsoleCommand )
2005-05-15 18:49:04 +00:00
return false ;
2013-03-12 22:57:40 +00:00
# ifdef TEXTEDITOR
2013-03-12 22:53:23 +00:00
if ( editormodal )
return false ;
2013-03-12 22:57:40 +00:00
# endif
2005-05-15 18:49:04 +00:00
2017-11-16 22:20:40 +00:00
if ( seat < 0 )
seat = CL_TargettedSplit ( false ) ;
CSQC_ChangeLocalPlayer ( seat ) ;
2005-05-15 18:49:04 +00:00
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2007-03-11 16:51:45 +00:00
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( csqcprogs , cmd ) ) ;
2005-05-15 18:49:04 +00:00
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_ConsoleCommand ) ;
2005-07-14 01:57:34 +00:00
return G_FLOAT ( OFS_RETURN ) ;
2005-05-15 18:49:04 +00:00
}
2011-05-20 04:10:46 +00:00
static void CSQC_GameCommand_f ( void )
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . GameCommand )
2011-05-20 04:10:46 +00:00
return ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( csqcprogs , Cmd_Args ( ) ) ) ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . GameCommand ) ;
2011-05-20 04:10:46 +00:00
}
2005-05-15 18:49:04 +00:00
2019-06-17 04:21:41 +00:00
void CSQC_PlayerInfoChanged ( int player )
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_PlayerInfoChanged )
2019-06-17 04:21:41 +00:00
return ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = player ;
// (((string_t *)pr_globals)[OFS_PARM1] = PR_TempString(csqcprogs, keyname));
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_PlayerInfoChanged ) ;
2019-06-17 04:21:41 +00:00
}
void CSQC_ServerInfoChanged ( void )
{
// void *pr_globals;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_ServerInfoChanged )
2019-06-17 04:21:41 +00:00
return ;
// pr_globals = PR_globals(csqcprogs, PR_CURRENT);
// (((string_t *)pr_globals)[OFS_PARM0] = PR_TempString(csqcprogs, keyname));
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_ServerInfoChanged ) ;
2019-06-17 04:21:41 +00:00
}
2014-03-30 08:55:06 +00:00
qboolean CSQC_ParseTempEntity ( void )
2008-11-09 22:29:28 +00:00
{
2022-03-08 05:34:26 +00:00
int obit ;
2008-11-09 22:29:28 +00:00
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_Parse_TempEntity )
2008-11-09 22:29:28 +00:00
return false ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2013-09-06 22:57:44 +00:00
csqc_mayread = true ;
2022-03-08 05:34:26 +00:00
obit = net_message . currentbit ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Parse_TempEntity ) ;
2013-09-06 22:57:44 +00:00
csqc_mayread = false ;
2014-03-30 08:55:06 +00:00
if ( G_FLOAT ( OFS_RETURN ) )
return true ;
//failed. reset the read position.
2022-03-08 05:34:26 +00:00
net_message . currentbit = obit ;
2014-03-30 08:55:06 +00:00
msg_badread = false ;
return false ;
2008-11-09 22:29:28 +00:00
}
2020-09-08 05:11:09 +00:00
qboolean CSQC_ParseGamePacket ( int seat , qboolean sized )
2009-04-01 22:03:56 +00:00
{
2020-09-08 05:11:09 +00:00
int parsefnc = csqcg . CSQC_Parse_Event ? csqcg . CSQC_Parse_Event : csqcg . CSQC_Parse_TempEntity ;
2011-05-20 04:10:46 +00:00
2020-09-08 05:11:09 +00:00
if ( sized )
2011-05-20 04:10:46 +00:00
{
2013-04-13 08:15:18 +00:00
int len = ( unsigned short ) MSG_ReadShort ( ) ;
2022-03-08 05:34:26 +00:00
int start = MSG_GetReadCount ( ) , end ;
2011-05-20 04:10:46 +00:00
2013-04-13 08:15:18 +00:00
if ( ! csqcprogs | | ! parsefnc )
{
MSG_ReadSkip ( len ) ;
return false ;
}
2011-05-20 04:10:46 +00:00
2013-09-06 22:57:44 +00:00
csqc_mayread = true ;
2017-11-16 22:20:40 +00:00
CSQC_ChangeLocalPlayer ( seat ) ;
2013-04-13 08:15:18 +00:00
PR_ExecuteProgram ( csqcprogs , parsefnc ) ;
2022-03-08 05:34:26 +00:00
end = MSG_GetReadCount ( ) ;
if ( end ! = start + len )
2013-04-13 08:15:18 +00:00
{
2022-03-08 05:34:26 +00:00
Con_Printf ( " Gamecode misread a gamecode packet (%i bytes too much) \n " , end - ( start + len ) ) ;
MSG_ReadSkip ( start + len - end ) ; //unread or skip.
2013-04-13 08:15:18 +00:00
}
}
else
2011-05-20 04:10:46 +00:00
{
2013-04-13 08:15:18 +00:00
if ( ! csqcprogs | | ! parsefnc )
{
2020-09-08 05:11:09 +00:00
int next = MSG_ReadByte ( ) ;
2022-01-08 10:00:49 +00:00
if ( ! csqcprogs )
Host_EndGame ( " This server requires CSQC support, but \" csprogsvers/%x.dat \" wasn't loaded. \n " , csprogs_checksum ) ;
else
Host_EndGame ( " Loaded CSQC module is unable to parse events (lead byte %i). \n " , next ) ;
2013-04-13 08:15:18 +00:00
return false ;
}
2013-09-06 22:57:44 +00:00
csqc_mayread = true ;
2017-11-16 22:20:40 +00:00
CSQC_ChangeLocalPlayer ( seat ) ;
2013-04-13 08:15:18 +00:00
PR_ExecuteProgram ( csqcprogs , parsefnc ) ;
2011-05-20 04:10:46 +00:00
}
2013-09-06 22:57:44 +00:00
csqc_mayread = false ;
2011-05-20 04:10:46 +00:00
return true ;
2009-04-01 22:03:56 +00:00
}
2017-04-18 11:12:17 +00:00
void CSQC_MapEntityEdited ( int modelindex , int idx , const char * newe )
2016-12-07 18:45:25 +00:00
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_MapEntityEdited )
2016-12-07 18:45:25 +00:00
return ;
2017-04-18 11:12:17 +00:00
if ( modelindex ! = 1 )
return ;
2016-12-07 18:45:25 +00:00
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
G_INT ( OFS_PARM0 ) = idx ;
( ( ( string_t * ) pr_globals ) [ OFS_PARM1 ] = PR_TempString ( csqcprogs , newe ) ) ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_MapEntityEdited ) ;
2016-12-07 18:45:25 +00:00
}
2018-01-03 04:40:06 +00:00
/*qboolean CSQC_LoadResource(char *resname, char *restype)
2008-11-09 22:29:28 +00:00
{
void * pr_globals ;
if ( ! csqcprogs | | ! csqcg . loadresource )
return true ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( csqcprogs , resname ) ) ;
2013-03-12 22:35:33 +00:00
( ( ( string_t * ) pr_globals ) [ OFS_PARM1 ] = PR_TempString ( csqcprogs , restype ) ) ;
2008-11-09 22:29:28 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . loadresource ) ;
return ! ! G_FLOAT ( OFS_RETURN ) ;
2018-01-03 04:40:06 +00:00
} */
2008-11-09 22:29:28 +00:00
2017-08-14 16:38:44 +00:00
qboolean CSQC_Parse_Damage ( int seat , float save , float take , vec3_t source )
2015-03-03 00:14:43 +00:00
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_Parse_Damage )
2015-03-03 00:14:43 +00:00
return false ;
2017-08-14 16:38:44 +00:00
CSQC_ChangeLocalPlayer ( seat ) ;
2015-03-03 00:14:43 +00:00
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
( ( float * ) pr_globals ) [ OFS_PARM0 ] = save ;
( ( float * ) pr_globals ) [ OFS_PARM1 ] = take ;
( ( float * ) pr_globals ) [ OFS_PARM2 + 0 ] = source [ 0 ] ;
( ( float * ) pr_globals ) [ OFS_PARM2 + 1 ] = source [ 1 ] ;
( ( float * ) pr_globals ) [ OFS_PARM2 + 2 ] = source [ 2 ] ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Parse_Damage ) ;
2015-03-03 00:14:43 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
2009-05-24 10:28:26 +00:00
qboolean CSQC_ParsePrint ( char * message , int printlevel )
2009-05-24 10:11:17 +00:00
{
void * pr_globals ;
int bufferpos ;
char * nextline ;
qboolean doflush ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_Parse_Print )
2009-05-24 10:11:17 +00:00
{
2009-05-24 10:28:26 +00:00
return false ;
2009-05-24 10:11:17 +00:00
}
bufferpos = strlen ( csqc_printbuffer ) ;
//fix-up faked bot chat
if ( * message = = ' \1 ' & & * csqc_printbuffer = = ' \1 ' )
message + + ;
while ( * message )
{
nextline = strchr ( message , ' \n ' ) ;
if ( nextline )
{
nextline + = 1 ;
doflush = true ;
}
else
{
nextline = message + strlen ( message ) ;
doflush = false ;
}
if ( bufferpos + nextline - message > = sizeof ( csqc_printbuffer ) )
{
//if this would overflow the buffer, cap its length and flush the buffer
//this copes with too many strings and too long strings.
nextline = message + sizeof ( csqc_printbuffer ) - 1 - bufferpos ;
doflush = true ;
}
memcpy ( csqc_printbuffer + bufferpos , message , nextline - message ) ;
bufferpos + = nextline - message ;
csqc_printbuffer [ bufferpos ] = ' \0 ' ;
message = nextline ;
if ( doflush )
{
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( csqcprogs , csqc_printbuffer ) ) ;
G_FLOAT ( OFS_PARM1 ) = printlevel ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Parse_Print ) ;
2009-05-24 10:11:17 +00:00
bufferpos = 0 ;
csqc_printbuffer [ bufferpos ] = 0 ;
}
}
2009-05-24 10:28:26 +00:00
return true ;
2009-05-24 10:11:17 +00:00
}
2010-07-11 02:22:39 +00:00
qboolean CSQC_StuffCmd ( int lplayernum , char * cmd , char * cmdend )
2005-02-12 18:56:04 +00:00
{
void * pr_globals ;
2010-07-11 02:22:39 +00:00
char tmp [ 2 ] ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_Parse_StuffCmd )
2005-02-12 18:56:04 +00:00
return false ;
2008-11-28 20:34:51 +00:00
CSQC_ChangeLocalPlayer ( lplayernum ) ;
2005-02-12 18:56:04 +00:00
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2010-07-11 02:22:39 +00:00
tmp [ 0 ] = cmdend [ 0 ] ;
tmp [ 1 ] = cmdend [ 1 ] ;
cmdend [ 0 ] = ' \n ' ;
cmdend [ 1 ] = 0 ;
2007-03-11 16:51:45 +00:00
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( csqcprogs , cmd ) ) ;
2010-07-11 02:22:39 +00:00
cmdend [ 0 ] = tmp [ 0 ] ;
cmdend [ 1 ] = tmp [ 1 ] ;
2005-02-12 18:56:04 +00:00
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Parse_StuffCmd ) ;
2005-02-12 18:56:04 +00:00
return true ;
}
2017-08-14 16:38:44 +00:00
qboolean CSQC_CenterPrint ( int seat , const char * cmd )
2005-02-12 18:56:04 +00:00
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_Parse_CenterPrint )
2005-02-12 18:56:04 +00:00
return false ;
2017-08-14 16:38:44 +00:00
CSQC_ChangeLocalPlayer ( seat ) ;
2008-11-28 20:34:51 +00:00
2005-02-12 18:56:04 +00:00
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2007-03-11 16:51:45 +00:00
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( csqcprogs , cmd ) ) ;
2005-02-12 18:56:04 +00:00
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Parse_CenterPrint ) ;
2013-10-08 14:28:11 +00:00
return G_FLOAT ( OFS_RETURN ) | | csqc_isdarkplaces ;
2005-02-12 18:56:04 +00:00
}
2017-08-14 16:38:44 +00:00
qboolean CSQC_Parse_SetAngles ( int seat , vec3_t newangles , qboolean wasdelta )
{
void * pr_globals ;
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_Parse_SetAngles )
2017-08-14 16:38:44 +00:00
return false ;
CSQC_ChangeLocalPlayer ( seat ) ;
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
( ( float * ) pr_globals ) [ OFS_PARM0 + 0 ] = newangles [ 0 ] ;
( ( float * ) pr_globals ) [ OFS_PARM0 + 1 ] = newangles [ 1 ] ;
( ( float * ) pr_globals ) [ OFS_PARM0 + 2 ] = newangles [ 2 ] ;
( ( float * ) pr_globals ) [ OFS_PARM1 ] = wasdelta ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Parse_SetAngles ) ;
2017-08-14 16:38:44 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
void CSQC_Input_Frame ( int seat , usercmd_t * cmd )
2008-05-25 22:23:43 +00:00
{
2020-09-08 05:11:09 +00:00
if ( ! csqcprogs | | ! csqcg . CSQC_Input_Frame )
2008-05-25 22:23:43 +00:00
return ;
2017-08-14 16:38:44 +00:00
CSQC_ChangeLocalPlayer ( seat ) ;
2008-11-28 20:34:51 +00:00
2020-09-08 05:11:09 +00:00
if ( csqcg . time )
* csqcg . time = cl . servertime ;
2008-11-28 20:34:51 +00:00
if ( csqcg . cltime )
2022-01-28 10:48:14 +00:00
* csqcg . cltime = realtime - cl . mapstarttime ;
2008-11-28 20:34:51 +00:00
2008-05-25 22:23:43 +00:00
if ( csqcg . clientcommandframe )
2013-03-12 22:53:23 +00:00
* csqcg . clientcommandframe = cl . movesequence ;
2008-05-25 22:23:43 +00:00
cs_set_input_state ( cmd ) ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Input_Frame ) ;
2008-05-25 22:23:43 +00:00
cs_get_input_state ( cmd ) ;
}
2005-02-12 18:56:04 +00:00
//this protocol allows up to 32767 edicts.
2005-02-28 07:16:19 +00:00
# ifdef PEXT_CSQC
2015-04-14 23:12:17 +00:00
static void CSQC_EntityCheck ( unsigned int entnum )
2008-05-09 14:22:37 +00:00
{
2015-04-14 23:12:17 +00:00
unsigned int newmax ;
2008-05-09 14:22:37 +00:00
if ( entnum > = maxcsqcentities )
{
newmax = entnum + 64 ;
csqcent = BZ_Realloc ( csqcent , sizeof ( * csqcent ) * newmax ) ;
2008-05-25 22:23:43 +00:00
memset ( csqcent + maxcsqcentities , 0 , ( newmax - maxcsqcentities ) * sizeof ( csqcent ) ) ;
2008-05-09 14:22:37 +00:00
maxcsqcentities = newmax ;
}
}
2005-08-03 23:14:59 +00:00
2015-07-27 08:21:34 +00:00
int CSQC_StartSound ( int entnum , int channel , char * soundname , vec3_t pos , float vol , float attenuation , float pitchmod , float timeofs , unsigned int flags )
2005-08-03 23:14:59 +00:00
{
void * pr_globals ;
csqcedict_t * ent ;
2008-11-09 22:29:28 +00:00
if ( ! csqcprogs )
2005-08-03 23:14:59 +00:00
return false ;
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_Event_Sound )
2008-11-09 22:29:28 +00:00
{
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2005-08-03 23:14:59 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
CSQC_EntityCheck ( entnum ) ;
ent = csqcent [ entnum ] ;
if ( ent )
* csqcg . self = EDICT_TO_PROG ( csqcprogs , ( void * ) ent ) ;
else
* csqcg . self = 0 ;
2008-11-09 22:29:28 +00:00
G_FLOAT ( OFS_PARM0 ) = entnum ;
G_FLOAT ( OFS_PARM1 ) = channel ;
G_INT ( OFS_PARM2 ) = PR_TempString ( csqcprogs , soundname ) ;
G_FLOAT ( OFS_PARM3 ) = vol ;
G_FLOAT ( OFS_PARM4 ) = attenuation ;
VectorCopy ( pos , G_VECTOR ( OFS_PARM5 ) ) ;
2017-01-29 13:10:53 +00:00
G_FLOAT ( OFS_PARM6 ) = pitchmod * 100 ;
2015-07-27 08:21:34 +00:00
G_FLOAT ( OFS_PARM7 ) = flags ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
// G_FLOAT(OFS_PARM8) = timeofs;
2005-08-03 23:14:59 +00:00
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Event_Sound ) ;
2005-08-03 23:14:59 +00:00
2008-11-09 22:29:28 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
2020-09-08 05:11:09 +00:00
else if ( csqcg . CSQC_ServerSound )
2008-11-09 22:29:28 +00:00
{
CSQC_EntityCheck ( entnum ) ;
ent = csqcent [ entnum ] ;
if ( ! ent )
return false ;
2005-08-03 23:14:59 +00:00
2008-11-09 22:29:28 +00:00
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
* csqcg . self = EDICT_TO_PROG ( csqcprogs , ( void * ) ent ) ;
G_FLOAT ( OFS_PARM0 ) = channel ;
G_INT ( OFS_PARM1 ) = PR_TempString ( csqcprogs , soundname ) ;
VectorCopy ( pos , G_VECTOR ( OFS_PARM2 ) ) ;
G_FLOAT ( OFS_PARM3 ) = vol ;
G_FLOAT ( OFS_PARM4 ) = attenuation ;
2015-07-27 08:21:34 +00:00
G_FLOAT ( OFS_PARM5 ) = flags ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
G_FLOAT ( OFS_PARM6 ) = timeofs ;
2008-11-09 22:29:28 +00:00
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_ServerSound ) ;
2008-11-09 22:29:28 +00:00
return G_FLOAT ( OFS_RETURN ) ;
}
return false ;
2005-08-03 23:14:59 +00:00
}
2023-04-14 01:50:19 +00:00
qboolean CSQC_GetEntityOrigin ( unsigned int csqcent , float * out )
2014-10-05 20:04:11 +00:00
{
wedict_t * ent ;
if ( ! csqcprogs )
2023-04-14 01:50:19 +00:00
return false ;
2018-04-06 17:21:15 +00:00
ent = WEDICT_NUM_UB ( csqcprogs , csqcent ) ;
2014-10-05 20:04:11 +00:00
VectorCopy ( ent - > v - > origin , out ) ;
2023-04-14 01:50:19 +00:00
return true ;
}
qboolean CSQC_GetSSQCEntityOrigin ( unsigned int ssqcent , float * out )
{
csqcedict_t * ent ;
if ( csqcprogs & & ssqcent < maxcsqcentities )
{
ent = csqcent [ ssqcent ] ;
if ( ent )
{
if ( out )
VectorCopy ( ent - > v - > origin , out ) ;
return true ;
}
}
return false ;
2014-10-05 20:04:11 +00:00
}
2020-09-08 05:11:09 +00:00
void CSQC_ParseEntities ( qboolean sized )
2005-02-09 19:32:09 +00:00
{
2005-02-12 18:56:04 +00:00
csqcedict_t * ent ;
2015-04-14 23:12:17 +00:00
unsigned int entnum ;
2005-02-28 07:16:19 +00:00
void * pr_globals ;
2005-03-20 02:57:11 +00:00
int packetsize ;
int packetstart ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
qboolean removeflag ;
2005-02-12 18:56:04 +00:00
if ( ! csqcprogs )
2023-04-14 01:50:19 +00:00
{
const char * fname = va ( " csprogsvers/%x.dat " , ( unsigned int ) strtoul ( InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogs " ) , NULL , 0 ) ) ;
const char * msg ;
if ( cl_nocsqc . value )
msg = " blocked by cl_nocsqc. \n " ;
else if ( ! COM_FCheckExists ( fname ) )
{
extern cvar_t cl_downloads , cl_download_csprogs ;
if ( ! cl_downloads . ival | | ! cl_download_csprogs . ival )
msg = " downloading blocked by cl_downloads or cl_download_csprogs. \n " ;
else
msg = " unable to download. \n " ;
}
else
msg = " not initialised. \n " ;
Host_EndGame ( " %s required, but %s " , fname , msg ) ;
}
2005-03-01 15:36:23 +00:00
2020-09-08 05:11:09 +00:00
if ( ! csqcg . CSQC_Ent_Update | | ! csqcg . self )
2013-12-17 22:45:37 +00:00
Host_EndGame ( " CSQC has no CSQC_Ent_Update function \n " ) ;
2014-10-05 20:04:11 +00:00
if ( ! csqc_world . worldmodel | | csqc_world . worldmodel - > loadstate ! = MLS_LOADED )
2011-12-23 03:12:29 +00:00
Host_EndGame ( " world is not yet initialised \n " ) ;
2005-02-28 07:16:19 +00:00
pr_globals = PR_globals ( csqcprogs , PR_CURRENT ) ;
2008-11-28 20:34:51 +00:00
CL_CalcClientTime ( ) ;
2020-09-08 05:11:09 +00:00
if ( csqcg . time ) //estimated server time
* csqcg . time = cl . servertime ;
2008-11-28 20:34:51 +00:00
if ( csqcg . cltime ) //smooth client time.
2022-01-28 10:48:14 +00:00
* csqcg . cltime = realtime - cl . mapstarttime ;
2005-10-01 03:01:12 +00:00
2020-09-08 05:11:09 +00:00
if ( csqcg . servertime )
* csqcg . servertime = cl . gametime ;
if ( csqcg . serverprevtime )
* csqcg . serverprevtime = cl . oldgametime ;
if ( csqcg . serverdeltatime )
* csqcg . serverdeltatime = cl . gametime - cl . oldgametime ;
2013-10-08 14:28:11 +00:00
2017-08-29 02:29:06 +00:00
if ( ! csqc_isdarkplaces )
{
if ( csqcg . clientcommandframe )
* csqcg . clientcommandframe = cl . movesequence ;
if ( csqcg . servercommandframe )
* csqcg . servercommandframe = cl . ackedmovesequence ;
}
2005-02-12 18:56:04 +00:00
for ( ; ; )
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
//replacement deltas now also includes 22bit entity num indicies.
if ( cls . fteprotocolextensions2 & PEXT2_REPLACEMENTDELTAS )
{
2015-04-14 23:12:17 +00:00
entnum = ( unsigned short ) MSG_ReadShort ( ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
removeflag = ! ! ( entnum & 0x8000 ) ;
if ( entnum & 0x4000 )
entnum = ( entnum & 0x3fff ) | ( MSG_ReadByte ( ) < < 14 ) ;
else
entnum & = ~ 0x8000 ;
}
else
{
2015-04-14 23:12:17 +00:00
entnum = ( unsigned short ) MSG_ReadShort ( ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
removeflag = ! ! ( entnum & 0x8000 ) ;
entnum & = ~ 0x8000 ;
}
2016-07-12 00:40:13 +00:00
if ( ( ! entnum & & ! removeflag ) | | msg_badread )
2005-02-12 18:56:04 +00:00
break ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( removeflag )
{ //remove
2005-02-12 18:56:04 +00:00
if ( ! entnum )
2005-02-28 07:16:19 +00:00
Host_EndGame ( " CSQC cannot remove world! \n " ) ;
2008-05-09 14:22:37 +00:00
CSQC_EntityCheck ( entnum ) ;
2023-04-14 01:51:39 +00:00
if ( cl_shownet . ival = = 3 )
Con_Printf ( " %3i: Remove %i \n " , MSG_GetReadCount ( ) , entnum ) ;
else if ( cl_csqcdebug . ival )
2005-03-24 18:13:37 +00:00
Con_Printf ( " Remove %i \n " , entnum ) ;
2005-02-12 18:56:04 +00:00
ent = csqcent [ entnum ] ;
2005-04-26 16:04:12 +00:00
csqcent [ entnum ] = NULL ;
2005-02-12 18:56:04 +00:00
if ( ! ent ) //hrm.
continue ;
2015-04-21 20:06:27 +00:00
CSQC_EntRemove ( ent ) ;
2005-02-12 18:56:04 +00:00
//the csqc is expected to call the remove builtin.
}
else
{
2008-05-09 14:22:37 +00:00
CSQC_EntityCheck ( entnum ) ;
2005-02-28 07:16:19 +00:00
2020-09-08 05:11:09 +00:00
if ( sized )
2005-03-20 02:57:11 +00:00
{
packetsize = MSG_ReadShort ( ) ;
2022-03-08 05:34:26 +00:00
packetstart = MSG_GetReadCount ( ) ;
2005-03-20 02:57:11 +00:00
}
2005-06-14 04:52:10 +00:00
else
{
packetsize = 0 ;
packetstart = 0 ;
}
2005-03-20 02:57:11 +00:00
2005-02-12 18:56:04 +00:00
ent = csqcent [ entnum ] ;
if ( ! ent )
{
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_Ent_Spawn )
2017-08-29 02:29:06 +00:00
{
* csqcg . self = 0 ;
G_FLOAT ( OFS_PARM0 ) = entnum ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Ent_Spawn ) ;
2017-08-29 02:29:06 +00:00
ent = csqcent [ entnum ] = ( csqcedict_t * ) PROG_TO_WEDICT ( csqcprogs , * csqcg . self ) ; //allow the mod to change the ent.
}
else
{
ent = ( csqcedict_t * ) ED_Alloc ( csqcprogs , false , 0 ) ;
csqcent [ entnum ] = ent ;
ent - > xv - > entnum = entnum ;
}
2005-02-12 18:56:04 +00:00
G_FLOAT ( OFS_PARM0 ) = true ;
2005-03-24 18:13:37 +00:00
2023-04-14 01:51:39 +00:00
if ( cl_shownet . ival = = 3 )
Con_Printf ( " %3i: Added %i (%i) \n " , MSG_GetReadCount ( ) , entnum , packetsize ) ;
else if ( cl_csqcdebug . ival )
2005-03-24 18:13:37 +00:00
Con_Printf ( " Add %i \n " , entnum ) ;
2005-02-12 18:56:04 +00:00
}
else
2005-03-24 18:13:37 +00:00
{
2005-02-12 18:56:04 +00:00
G_FLOAT ( OFS_PARM0 ) = false ;
2023-04-14 01:51:39 +00:00
if ( cl_shownet . ival = = 3 )
Con_Printf ( " %3i: Update %i (%i) \n " , MSG_GetReadCount ( ) , entnum , packetsize ) ;
else if ( cl_csqcdebug . ival )
2005-03-24 18:13:37 +00:00
Con_Printf ( " Update %i \n " , entnum ) ;
}
2023-04-14 01:50:19 +00:00
# ifdef QUAKESTATS
if ( entnum - 1 < cl . allocated_client_slots & & cls . findtrack & & cl . players [ entnum - 1 ] . stats [ STAT_HEALTH ] > 0 )
{ //FIXME: is this still needed with the autotrack stuff?
Cam_Lock ( & cl . playerview [ 0 ] , entnum - 1 ) ;
cls . findtrack = false ;
}
# endif
2005-02-12 18:56:04 +00:00
2005-02-28 07:16:19 +00:00
* csqcg . self = EDICT_TO_PROG ( csqcprogs , ( void * ) ent ) ;
2013-09-06 22:57:44 +00:00
csqc_mayread = true ;
2020-09-08 05:11:09 +00:00
PR_ExecuteProgram ( csqcprogs , csqcg . CSQC_Ent_Update ) ;
2013-09-06 22:57:44 +00:00
csqc_mayread = false ;
2020-09-08 05:11:09 +00:00
if ( csqcg . CSQC_Ent_Spawn )
2017-08-29 02:29:06 +00:00
csqcent [ entnum ] = ( csqcedict_t * ) PROG_TO_WEDICT ( csqcprogs , * csqcg . self ) ; //allow the mod to change the ent.
2005-03-20 02:57:11 +00:00
2020-09-08 05:11:09 +00:00
if ( sized )
2005-03-20 02:57:11 +00:00
{
2022-03-08 05:34:26 +00:00
unsigned int readcount = MSG_GetReadCount ( ) ;
if ( readcount ! = packetstart + packetsize )
2005-03-20 02:57:11 +00:00
{
2022-03-08 05:34:26 +00:00
if ( readcount > packetstart + packetsize )
Con_Printf ( " CSQC overread entity %i. Size %i, read %i " , entnum , packetsize , readcount - packetstart ) ;
2005-03-20 02:57:11 +00:00
else
2022-03-08 05:34:26 +00:00
Con_Printf ( " CSQC underread entity %i. Size %i, read %i " , entnum , packetsize , readcount - packetstart ) ;
Con_Printf ( " , first byte is %i(%x) \n " , net_message . data [ readcount ] , net_message . data [ readcount ] ) ;
2005-03-20 02:57:11 +00:00
# ifndef CLIENTONLY
if ( sv . state )
{
2018-04-06 17:21:15 +00:00
Con_Printf ( " Server classname: \" %s \" \n " , PR_GetString ( svprogfuncs , EDICT_NUM_UB ( svprogfuncs , entnum ) - > v - > classname ) ) ;
2005-03-20 02:57:11 +00:00
}
# endif
}
2022-03-08 05:34:26 +00:00
MSG_ReadSkip ( packetstart + packetsize - readcount ) ; //unread or skip.
2005-03-20 02:57:11 +00:00
}
2005-02-12 18:56:04 +00:00
}
2005-02-28 07:16:19 +00:00
}
2005-02-09 19:32:09 +00:00
}
2005-02-28 07:16:19 +00:00
# endif
2005-02-09 19:32:09 +00:00
2005-01-17 17:43:13 +00:00
# endif