diff --git a/changelog.log b/changelog.log index 71ee0948..e248e5ec 100644 --- a/changelog.log +++ b/changelog.log @@ -13,24 +13,7 @@ SV_ClipToLinks SV_ClipMoveToEntities 1. Полная отладка PRVM 2. Пофиксить зависание bsplib при работе 3. Отладка и имплементация физики (physic.dll) - - -Текущие задачи: -1. Добавить поддержку текстур mip (Quake1) ОК -2. Включить все фичи нового компилера -{ - OP_POWER_I - добавить XOR для right result - разобраться с autoprototype - - корежится crc при автопрототипинге - - Препроцессинг для автопрототипинга: - 1. найти главный файл с описанием структур - - в этом файле должны быть ключевые слова end_sys_fields - и end_sys_globals (или это два различных файла) - -} +4. написать новый кастомный таймер игрового цикла studioframeadvance studiorewindframe @@ -38,6 +21,7 @@ studiorewindframe //================================================== // то, что уже готово //================================================== ++исправлен баг с проигрыванием видео и демок +исправлен баг с записью сжатых исходников в готовый файл +добавлен новый тип критичных ошибок - internal error +консольные приложения могут использовать расширенные пути, типа ./ или ..\ diff --git a/common/common.plg b/common/common.plg deleted file mode 100644 index 0d811cc0..00000000 --- a/common/common.plg +++ /dev/null @@ -1,87 +0,0 @@ - -
--- - diff --git a/common/common/filesystem.c b/common/common/filesystem.c index fcd7a416..2f929efb 100644 --- a/common/common/filesystem.c +++ b/common/common/filesystem.c @@ -1105,8 +1105,7 @@ void FS_LoadGameInfo( const char *filename ) // create default gameinfo if(!FS_FileExists( filename )) FS_CreateGameInfo( filename ); - - //now we have use search path and can load gameinfo.txt + // now we have use search path and can load gameinfo.txt load = FS_LoadScript( filename, NULL, 0 ); while( load ) @@ -1181,19 +1180,25 @@ void FS_Init( int argc, char **argv ) // checked nasty path if(FS_CheckNastyPath(gs_basedir, true ) || !stricmp("bin", gs_basedir )) // "bin" it's a reserved word { - Msg("FS_Init: invalid game directory \"%s\". Reset to default.\n", gs_basedir ); + MsgWarn("FS_Init: invalid game directory \"%s\". Use default gamedir \"xash\".\n", gs_basedir ); strcpy(gs_basedir, "xash" );//default dir } - //validate directories + // validate directories for (i = 0; i < dirs.numstrings; i++) { if(!stricmp(gs_basedir, dirs.strings[i])) break; } - if(i == dirs.numstrings) strcpy(gs_basedir, "xash" );//default dir + if(i == dirs.numstrings) + { + MsgWarn("FS_Init: game directory \"%s\" not exist. Use default gamedir \"xash\".\n", gs_basedir ); + strcpy(gs_basedir, "xash" );//default dir + } + stringlistfreecontents(&dirs); + MsgDev(D_INFO, "FS_Init: done\n"); } void FS_InitRootDir( char *path ) diff --git a/editor/editor.plg b/editor/editor.plg deleted file mode 100644 index 8c9fafb2..00000000 --- a/editor/editor.plg +++ /dev/null @@ -1,16 +0,0 @@ - - -Build Log
----------------------Configuration: common - Win32 Debug-------------------- -
-Command Lines
-Creating temporary file "C:\DOCUME~1\МИША\LOCALS~1\Temp\RSP14F9.tmp" with contents -[ -/nologo /MDd /W3 /Gm /Gi /GX /ZI /I "./" /I "../public" /I "./bsplib/" /I "./qcclib" /I "./common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"..\temp\common\!debug/" /Fo"..\temp\common\!debug/" /Fd"..\temp\common\!debug/" /FD /GZ /c -"D:\XASH3D\src_main\!source\common\platform.c" -"D:\XASH3D\src_main\!source\common\qcclib\pr_comp.c" -"D:\XASH3D\src_main\!source\common\qcclib\pr_lex.c" -"D:\XASH3D\src_main\!source\common\qcclib\pr_main.c" -"D:\XASH3D\src_main\!source\common\qcclib\pr_utils.c" -"D:\XASH3D\src_main\!source\common\common\utils.c" -] -Creating command line "cl.exe @"C:\DOCUME~1\МИША\LOCALS~1\Temp\RSP14F9.tmp"" -Creating temporary file "C:\DOCUME~1\МИША\LOCALS~1\Temp\RSP14FA.tmp" with contents -[ -common/zlib.lib winmm.lib user32.lib /nologo /dll /incremental:yes /pdb:"..\temp\common\!debug/common.pdb" /debug /machine:I386 /nodefaultlib:"libc.lib" /out:"..\temp\common\!debug/common.dll" /implib:"..\temp\common\!debug/common.lib" /pdbtype:sept -"\XASH3D\src_main\!source\temp\common\!debug\brushbsp.obj" -"\XASH3D\src_main\!source\temp\common\!debug\bspfile.obj" -"\XASH3D\src_main\!source\temp\common\!debug\csg.obj" -"\XASH3D\src_main\!source\temp\common\!debug\faces.obj" -"\XASH3D\src_main\!source\temp\common\!debug\filesystem.obj" -"\XASH3D\src_main\!source\temp\common\!debug\flow.obj" -"\XASH3D\src_main\!source\temp\common\!debug\image.obj" -"\XASH3D\src_main\!source\temp\common\!debug\imglib.obj" -"\XASH3D\src_main\!source\temp\common\!debug\leakfile.obj" -"\XASH3D\src_main\!source\temp\common\!debug\lightmap.obj" -"\XASH3D\src_main\!source\temp\common\!debug\map.obj" -"\XASH3D\src_main\!source\temp\common\!debug\memory.obj" -"\XASH3D\src_main\!source\temp\common\!debug\patches.obj" -"\XASH3D\src_main\!source\temp\common\!debug\platform.obj" -"\XASH3D\src_main\!source\temp\common\!debug\portals.obj" -"\XASH3D\src_main\!source\temp\common\!debug\pr_comp.obj" -"\XASH3D\src_main\!source\temp\common\!debug\pr_lex.obj" -"\XASH3D\src_main\!source\temp\common\!debug\pr_main.obj" -"\XASH3D\src_main\!source\temp\common\!debug\pr_utils.obj" -"\XASH3D\src_main\!source\temp\common\!debug\prtfile.obj" -"\XASH3D\src_main\!source\temp\common\!debug\qbsp3.obj" -"\XASH3D\src_main\!source\temp\common\!debug\qrad3.obj" -"\XASH3D\src_main\!source\temp\common\!debug\qvis3.obj" -"\XASH3D\src_main\!source\temp\common\!debug\shaders.obj" -"\XASH3D\src_main\!source\temp\common\!debug\spritegen.obj" -"\XASH3D\src_main\!source\temp\common\!debug\studio.obj" -"\XASH3D\src_main\!source\temp\common\!debug\studio_utils.obj" -"\XASH3D\src_main\!source\temp\common\!debug\textures.obj" -"\XASH3D\src_main\!source\temp\common\!debug\trace.obj" -"\XASH3D\src_main\!source\temp\common\!debug\tree.obj" -"\XASH3D\src_main\!source\temp\common\!debug\utils.obj" -"\XASH3D\src_main\!source\temp\common\!debug\winding.obj" -"\XASH3D\src_main\!source\temp\common\!debug\writebsp.obj" -] -Creating command line "link.exe @"C:\DOCUME~1\МИША\LOCALS~1\Temp\RSP14FA.tmp"" -Creating temporary file "C:\DOCUME~1\МИША\LOCALS~1\Temp\RSP14FB.bat" with contents -[ -@echo off -copy \XASH3D\src_main\!source\temp\common\!debug\common.dll "D:\Xash3D\bin\common.dll" -] -Creating command line ""C:\DOCUME~1\МИША\LOCALS~1\Temp\RSP14FB.bat"" -Compiling... -platform.c -pr_comp.c -d:\xash3d\src_main\!source\common\qcclib\pr_comp.c(6719) : error C2039: 'numfilename' : is not a member of 'search_s' - d:\xash3d\src_main\!source\public\ref_system.h(382) : see declaration of 'search_s' -d:\xash3d\src_main\!source\common\qcclib\pr_comp.c(6723) : error C2001: newline in constant -d:\xash3d\src_main\!source\common\qcclib\pr_comp.c(6723) : error C2015: too many characters in constant -d:\xash3d\src_main\!source\common\qcclib\pr_comp.c(6724) : error C2143: syntax error : missing ')' before '}' -d:\xash3d\src_main\!source\common\qcclib\pr_comp.c(6748) : fatal error C1004: unexpected end of file found -pr_lex.c -pr_main.c -pr_utils.c -utils.c -Generating Code... -Error executing cl.exe. -Output Window
- - - -Results
-common.dll - 5 error(s), 0 warning(s) -
-- - diff --git a/engine/client/cl_cin.c b/engine/client/cl_cin.c index 42d5fb08..e83acc13 100644 --- a/engine/client/cl_cin.c +++ b/engine/client/cl_cin.c @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct { byte *data; - int count; + int count; } cblock_t; typedef struct diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index e0042f73..2eec3af5 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -644,7 +644,7 @@ void CL_ParseFrame (void) { int cmd; int len; - frame_t *old; + frame_t *old; memset (&cl.frame, 0, sizeof(cl.frame)); @@ -682,7 +682,8 @@ void CL_ParseFrame (void) Msg ("Delta from invalid frame (not supposed to happen!).\n"); } if (old->serverframe != cl.frame.deltaframe) - { // The frame that the server did the delta from + { + // The frame that the server did the delta from // is too old, so we can't reconstruct it properly. Msg ("Delta frame too old.\n"); } @@ -690,8 +691,7 @@ void CL_ParseFrame (void) { Msg ("Delta parse_entities too old.\n"); } - else - cl.frame.valid = true; // valid delta parse + else cl.frame.valid = true; // valid delta parse } // clamp time @@ -727,13 +727,12 @@ void CL_ParseFrame (void) { cls.state = ca_active; cl.force_refdef = true; - cl.predicted_origin[0] = cl.frame.playerstate.pmove.origin[0]*0.125; - cl.predicted_origin[1] = cl.frame.playerstate.pmove.origin[1]*0.125; - cl.predicted_origin[2] = cl.frame.playerstate.pmove.origin[2]*0.125; + cl.predicted_origin[0] = cl.frame.playerstate.pmove.origin[0]*CL_COORD_FRAC; + cl.predicted_origin[1] = cl.frame.playerstate.pmove.origin[1]*CL_COORD_FRAC; + cl.predicted_origin[2] = cl.frame.playerstate.pmove.origin[2]*CL_COORD_FRAC; VectorCopy (cl.frame.playerstate.viewangles, cl.predicted_angles); - if (cls.disable_servercount != cl.servercount - && cl.refresh_prepped) - SCR_EndLoadingPlaque (); // get rid of loading plaque + if (cls.disable_servercount != cl.servercount && cl.refresh_prepped) + SCR_EndLoadingPlaque (); // get rid of loading plaque } cl.sound_prepped = true; // can start mixing ambient sounds @@ -1159,9 +1158,9 @@ void CL_CalcViewValues (void) ops = &oldframe->playerstate; // see if the player entity was teleported this frame - if ( fabs(ops->pmove.origin[0] - ps->pmove.origin[0]) > 256*8 - || abs(ops->pmove.origin[1] - ps->pmove.origin[1]) > 256*8 - || abs(ops->pmove.origin[2] - ps->pmove.origin[2]) > 256*8) + if ( fabs(ops->pmove.origin[0] - ps->pmove.origin[0]) > 256*SV_COORD_FRAC + || abs(ops->pmove.origin[1] - ps->pmove.origin[1]) > 256*SV_COORD_FRAC + || abs(ops->pmove.origin[2] - ps->pmove.origin[2]) > 256*SV_COORD_FRAC) ops = ps; // don't interpolate ent = &cl_entities[cl.playernum+1]; @@ -1187,9 +1186,9 @@ void CL_CalcViewValues (void) else { // just use interpolated values for (i=0 ; i<3 ; i++) - cl.refdef.vieworg[i] = ops->pmove.origin[i]*0.125 + ops->viewoffset[i] - + lerp * (ps->pmove.origin[i]*0.125 + ps->viewoffset[i] - - (ops->pmove.origin[i]*0.125 + ops->viewoffset[i]) ); + cl.refdef.vieworg[i] = ops->pmove.origin[i]*CL_COORD_FRAC + ops->viewoffset[i] + + lerp * (ps->pmove.origin[i]*CL_COORD_FRAC + ps->viewoffset[i] + - (ops->pmove.origin[i]*CL_COORD_FRAC + ops->viewoffset[i]) ); } // if not running a demo or on a locked frame, add the local angle movement diff --git a/engine/client/cl_fx.c b/engine/client/cl_fx.c index 60d1108b..310751ee 100644 --- a/engine/client/cl_fx.c +++ b/engine/client/cl_fx.c @@ -904,12 +904,12 @@ void CL_ItemRespawnParticles (vec3_t org) p->color = 0xd4 + (rand()&3); // green - p->org[0] = org[0] + crand()*8; - p->org[1] = org[1] + crand()*8; - p->org[2] = org[2] + crand()*8; + p->org[0] = org[0] + crand()*SV_COORD_FRAC; + p->org[1] = org[1] + crand()*SV_COORD_FRAC; + p->org[2] = org[2] + crand()*SV_COORD_FRAC; for (j=0 ; j<3 ; j++) - p->vel[j] = crand()*8; + p->vel[j] = crand()*SV_COORD_FRAC; p->accel[0] = p->accel[1] = 0; p->accel[2] = -PARTICLE_GRAVITY*0.2; @@ -1670,9 +1670,9 @@ void CL_TrapParticles (entity_t *ent) p->org[1] = org[1] + j + ((rand()&23) * crand()); p->org[2] = org[2] + k + ((rand()&23) * crand()); - dir[0] = j * 8; - dir[1] = i * 8; - dir[2] = k * 8; + dir[0] = j * SV_COORD_FRAC; + dir[1] = i * SV_COORD_FRAC; + dir[2] = k * SV_COORD_FRAC; VectorNormalize (dir); vel = 50 + rand()&63; @@ -1757,9 +1757,9 @@ void CL_TeleportParticles (vec3_t org) p->org[1] = org[1] + j + (rand()&3); p->org[2] = org[2] + k + (rand()&3); - dir[0] = j*8; - dir[1] = i*8; - dir[2] = k*8; + dir[0] = j*SV_COORD_FRAC; + dir[1] = i*SV_COORD_FRAC; + dir[2] = k*SV_COORD_FRAC; VectorNormalize (dir); vel = 50 + (rand()&63); diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index ee9a3e55..93d61839 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -990,7 +990,7 @@ void CL_ReadPackets (void) { while (NET_GetPacket (NS_CLIENT, &net_from, &net_message)) { -// Msg ("packet\n"); + //Msg ("packet\n"); // // remote command packet // @@ -1018,7 +1018,7 @@ void CL_ReadPackets (void) continue; } if (!Netchan_Process(&cls.netchan, &net_message)) - continue; // wasn't accepted for some reason + continue; // wasn't accepted for some reason CL_ParseServerMessage (); } @@ -1027,7 +1027,7 @@ void CL_ReadPackets (void) // if (cls.state >= ca_connected && cls.realtime - cls.netchan.last_received > cl_timeout->value) { - if (++cl.timeoutcount > 5) // timeoutcount saves debugger + if (++cl.timeoutcount > 5) // timeoutcount saves debugger { Msg ("\nServer connection timed out.\n"); CL_Disconnect (); @@ -1711,27 +1711,6 @@ void CL_Frame (float time) SCR_RunConsole (); cls.framecount++; - - if ( log_stats->value ) - { - if ( cls.state == ca_active ) - { - if ( !lasttimecalled ) - { - lasttimecalled = Sys_DoubleTime(); - if ( log_stats_file ) - FS_Printf( log_stats_file, "0\n" ); - } - else - { - float now = Sys_DoubleTime(); - - if ( log_stats_file ) - FS_Printf( log_stats_file, "%g\n", now - lasttimecalled ); - lasttimecalled = now; - } - } - } } diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index d610699d..a784a686 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -295,7 +295,8 @@ void CL_ParseServerData (void) { char *str; int i; - + + //Sys_Error("Serverdata packet received.\n"); MsgDev (D_INFO, "Serverdata packet received.\n"); // wipe the client_state_t struct diff --git a/engine/client/cl_pred.c b/engine/client/cl_pred.c index 3955854b..fd3e903d 100644 --- a/engine/client/cl_pred.c +++ b/engine/client/cl_pred.c @@ -59,7 +59,7 @@ void CL_CheckPredictionError (void) // save for error itnerpolation for (i=0 ; i<3 ; i++) - cl.prediction_error[i] = delta[i]*0.125; + cl.prediction_error[i] = delta[i]*CL_COORD_FRAC; } } @@ -263,15 +263,15 @@ void CL_PredictMovement (void) step = pm.s.origin[2] - oldz; if (step > 63 && step < 160 && (pm.s.pm_flags & PMF_ON_GROUND)) { - cl.predicted_step = step * 0.125; + cl.predicted_step = step * CL_COORD_FRAC; cl.predicted_step_time = cls.realtime - cls.frametime * 0.5f; } // copy results out for rendering - cl.predicted_origin[0] = pm.s.origin[0]*0.125; - cl.predicted_origin[1] = pm.s.origin[1]*0.125; - cl.predicted_origin[2] = pm.s.origin[2]*0.125; + cl.predicted_origin[0] = pm.s.origin[0]*CL_COORD_FRAC; + cl.predicted_origin[1] = pm.s.origin[1]*CL_COORD_FRAC; + cl.predicted_origin[2] = pm.s.origin[2]*CL_COORD_FRAC; VectorCopy (pm.viewangles, cl.predicted_angles); } diff --git a/engine/client/cl_view.c b/engine/client/cl_view.c index 123cccb3..cb06c740 100644 --- a/engine/client/cl_view.c +++ b/engine/client/cl_view.c @@ -531,9 +531,6 @@ void V_RenderView( float stereo_separation ) re->RenderFrame (&cl.refdef); if (cl_stats->value) Msg ("ent:%i lt:%i part:%i\n", r_numentities, r_numdlights, r_numparticles); - if ( log_stats->value && ( log_stats_file != 0 ) ) - FS_Printf( log_stats_file, "%i,%i,%i,",r_numentities, r_numdlights, r_numparticles); - SCR_AddDirtyPoint (scr_vrect.x, scr_vrect.y); SCR_AddDirtyPoint (scr_vrect.x+scr_vrect.width-1, diff --git a/engine/common.h b/engine/common.h index bc2adff7..47c1c215 100644 --- a/engine/common.h +++ b/engine/common.h @@ -604,9 +604,6 @@ float crand(void); // -1 to 1 extern cvar_t *developer; extern cvar_t *dedicated; extern cvar_t *host_speeds; -extern cvar_t *log_stats; - -extern file_t *log_stats_file; // host_speeds times extern float time_before_game; diff --git a/engine/common/cmodel.c b/engine/common/cmodel.c index 6922b2f5..a12808e6 100644 --- a/engine/common/cmodel.c +++ b/engine/common/cmodel.c @@ -110,11 +110,8 @@ int floodvalid; byte portalopen[MAX_MAP_AREAPORTALS]; - cvar_t *map_noareas; -int c_pointcontents; -int c_traces, c_brush_traces; /* @@ -776,9 +773,6 @@ int CM_PointLeafnum_r (vec3_t p, int num) else num = node->children[0]; } - - c_pointcontents++; // optimize counter - return -1 - num; } @@ -964,8 +958,6 @@ void CM_ClipBoxToBrush (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2, if (!brush->numsides) return; - c_brush_traces++; - getout = false; startout = false; leadside = NULL; @@ -1313,8 +1305,6 @@ trace_t CM_BoxTrace (vec3_t start, vec3_t end, checkcount++; // for multi-check avoidance - c_traces++; // for statistics, may be zeroed - // fill in a default trace memset (&trace_trace, 0, sizeof(trace_trace)); trace_trace.fraction = 1; diff --git a/engine/common/common.c b/engine/common/common.c index 43ef05e1..3f25786c 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -27,10 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. int com_argc; char *com_argv[MAX_NUM_ARGVS+1]; -file_t *log_stats_file; - cvar_t *host_speeds; -cvar_t *log_stats; cvar_t *developer; cvar_t *dedicated; diff --git a/engine/common/net_chan.c b/engine/common/net_chan.c index 464f4130..76b0d1bb 100644 --- a/engine/common/net_chan.c +++ b/engine/common/net_chan.c @@ -213,11 +213,11 @@ A 0 length will still generate a packet and deal with the reliable messages. void Netchan_Transmit (netchan_t *chan, int length, byte *data) { sizebuf_t send; - byte send_buf[MAX_MSGLEN]; + byte send_buf[MAX_MSGLEN]; bool send_reliable; - unsigned w1, w2; + uint w1, w2; -// check for message overflow + // check for message overflow if (chan->message.overflowed) { chan->fatal_error = true; @@ -237,7 +237,7 @@ void Netchan_Transmit (netchan_t *chan, int length, byte *data) } -// write the packet header + // write the packet header SZ_Init (&send, send_buf, sizeof(send_buf)); w1 = ( chan->outgoing_sequence & ~(1<<31) ) | (send_reliable<<31); @@ -260,7 +260,7 @@ void Netchan_Transmit (netchan_t *chan, int length, byte *data) } // add the unreliable part if space is available - if (send.maxsize - send.cursize >= length) + if (send.maxsize - send.cursize >= length) SZ_Write (&send, data, length); else MsgWarn("Netchan_Transmit: dumped unreliable\n"); @@ -295,11 +295,11 @@ modifies net_message so that it points to the packet payload */ bool Netchan_Process (netchan_t *chan, sizebuf_t *msg) { - unsigned sequence, sequence_ack; - unsigned reliable_ack, reliable_message; - int qport; + uint sequence, sequence_ack; + uint reliable_ack, reliable_message; + int qport; -// get sequence numbers + // get sequence numbers MSG_BeginReading (msg); sequence = MSG_ReadLong (msg); sequence_ack = MSG_ReadLong (msg); @@ -331,9 +331,7 @@ bool Netchan_Process (netchan_t *chan, sizebuf_t *msg) , reliable_ack); } -// -// discard stale or duplicated packets -// + // discard stale or duplicated packets if (sequence <= chan->incoming_sequence) { if (showdrop->value) @@ -344,9 +342,7 @@ bool Netchan_Process (netchan_t *chan, sizebuf_t *msg) return false; } -// -// dropped packets don't keep the message from being used -// + // dropped packets don't keep the message from being used chan->dropped = sequence - (chan->incoming_sequence+1); if (chan->dropped > 0) { diff --git a/engine/common/net_wins.c b/engine/common/net_wins.c index 2b55114e..7958bd31 100644 --- a/engine/common/net_wins.c +++ b/engine/common/net_wins.c @@ -370,7 +370,7 @@ void NET_SendLoopPacket (netsrc_t sock, int length, void *data, netadr_t to) i = loop->send & (MAX_LOOPBACK-1); loop->send++; - memcpy (loop->msgs[i].data, data, length); + Mem_Copy(loop->msgs[i].data, data, length); loop->msgs[i].datalen = length; } @@ -490,7 +490,7 @@ void NET_SendPacket (netsrc_t sock, int length, void *data, netadr_t to) if ((err == WSAEADDRNOTAVAIL) && ((to.type == NA_BROADCAST) || (to.type == NA_BROADCAST_IPX))) return; - if (dedicated->value) // let dedicated servers continue after errors + if (dedicated->value) // let dedicated servers continue after errors { Msg ("NET_SendPacket ERROR: %s to %s\n", NET_ErrorString(), NET_AdrToString (to)); } diff --git a/engine/common/pmove.c b/engine/common/pmove.c index 33a73f4a..7cb83d60 100644 --- a/engine/common/pmove.c +++ b/engine/common/pmove.c @@ -964,7 +964,7 @@ bool PM_GoodPosition (void) if (pm->s.pm_type == PM_SPECTATOR) return true; - for (i = 0; i < 3; i++) origin[i] = end[i] = pm->s.origin[i] * 0.125; + for (i = 0; i < 3; i++) origin[i] = end[i] = pm->s.origin[i] * CL_COORD_FRAC; trace = pm->trace (origin, pm->mins, pm->maxs, end); return !trace.allsolid; @@ -974,7 +974,7 @@ bool PM_GoodPosition (void) ================ PM_SnapPosition -On exit, the origin will have a value that is pre-quantized to the 0.125 +On exit, the origin will have a value that is pre-quantized to the CL_COORD_FRAC precision of the network channel and in a valid position. ================ */ @@ -987,14 +987,14 @@ void PM_SnapPosition (void) static int jitterbits[8] = {0,4,1,2,3,5,6,7}; // snap velocity to eigths - for (i = 0; i < 3; i++) pm->s.velocity[i] = (int)(pml.velocity[i]*8); + for (i = 0; i < 3; i++) pm->s.velocity[i] = (int)(pml.velocity[i]*SV_COORD_FRAC); for (i = 0; i < 3; i++) { if (pml.origin[i] >= 0) sign[i] = 1; else sign[i] = -1; - pm->s.origin[i] = (int)(pml.origin[i]*8); - if (pm->s.origin[i]*0.125 == pml.origin[i]) sign[i] = 0; + pm->s.origin[i] = (int)(pml.origin[i]*SV_COORD_FRAC); + if (pm->s.origin[i] * CL_COORD_FRAC == pml.origin[i]) sign[i] = 0; } VectorCopy (pm->s.origin, base); @@ -1039,9 +1039,9 @@ void PM_InitialSnapPosition(void) pm->s.origin[0] = base[0] + offset[ x ]; if (PM_GoodPosition ()) { - pml.origin[0] = pm->s.origin[0]*0.125; - pml.origin[1] = pm->s.origin[1]*0.125; - pml.origin[2] = pm->s.origin[2]*0.125; + pml.origin[0] = pm->s.origin[0]*CL_COORD_FRAC; + pml.origin[1] = pm->s.origin[1]*CL_COORD_FRAC; + pml.origin[2] = pm->s.origin[2]*CL_COORD_FRAC; VectorCopy (pm->s.origin, pml.previous_origin); return; } @@ -1109,13 +1109,13 @@ void Pmove (pmove_t *pmove) memset (&pml, 0, sizeof(pml)); // convert origin and velocity to float values - pml.origin[0] = pm->s.origin[0]*0.125; - pml.origin[1] = pm->s.origin[1]*0.125; - pml.origin[2] = pm->s.origin[2]*0.125; + pml.origin[0] = pm->s.origin[0]*CL_COORD_FRAC; + pml.origin[1] = pm->s.origin[1]*CL_COORD_FRAC; + pml.origin[2] = pm->s.origin[2]*CL_COORD_FRAC; - pml.velocity[0] = pm->s.velocity[0]*0.125; - pml.velocity[1] = pm->s.velocity[1]*0.125; - pml.velocity[2] = pm->s.velocity[2]*0.125; + pml.velocity[0] = pm->s.velocity[0]*CL_COORD_FRAC; + pml.velocity[1] = pm->s.velocity[1]*CL_COORD_FRAC; + pml.velocity[2] = pm->s.velocity[2]*CL_COORD_FRAC; // save old org in case we get stuck VectorCopy (pm->s.origin, pml.previous_origin); diff --git a/engine/common/vm_cmds.c b/engine/common/vm_cmds.c index 1a4a87df..c75f8b5c 100644 --- a/engine/common/vm_cmds.c +++ b/engine/common/vm_cmds.c @@ -181,7 +181,7 @@ void VM_bprint (void) VM_VarString(0, string, sizeof(string)); - if(sv.state != ss_game) + if(sv.state == ss_loading) { Con_Print( string ); return; diff --git a/engine/engine.plg b/engine/engine.plg deleted file mode 100644 index 45d2c2f7..00000000 --- a/engine/engine.plg +++ /dev/null @@ -1,16 +0,0 @@ - - -Build Log
----------------------Configuration: editor - Win32 Debug-------------------- -
-Command Lines
- - - -Results
-editor.dll - 0 error(s), 0 warning(s) -
-- - diff --git a/engine/host.c b/engine/host.c index 91b44d3e..32ec4b51 100644 --- a/engine/host.c +++ b/engine/host.c @@ -25,7 +25,6 @@ dll_info_t common_dll = { "common.dll", NULL, "CreateAPI", NULL, NULL, true, COM cvar_t *timescale; cvar_t *fixedtime; -cvar_t *showtrace; void Host_InitCommon( char *funcname, int argc, char **argv ) { @@ -122,11 +121,9 @@ void Host_Init (char *funcname, int argc, char **argv) Cmd_AddCommand ("error", Host_Error_f); host_speeds = Cvar_Get ("host_speeds", "0", 0); - log_stats = Cvar_Get ("log_stats", "0", 0); developer = Cvar_Get ("developer", "0", 0); timescale = Cvar_Get ("timescale", "1", 0); fixedtime = Cvar_Get ("fixedtime", "0", 0); - showtrace = Cvar_Get ("showtrace", "0", 0); if(host.type == HOST_DEDICATED) dedicated = Cvar_Get ("dedicated", "1", CVAR_NOSET); else dedicated = Cvar_Get ("dedicated", "0", CVAR_NOSET); @@ -169,42 +166,6 @@ void Host_Frame (double time) if (setjmp(host.abortframe)) return; - if ( log_stats->modified ) - { - log_stats->modified = false; - if ( log_stats->value ) - { - if ( log_stats_file ) - { - FS_Close( log_stats_file ); - log_stats_file = 0; - } - log_stats_file = FS_Open( "stats.log", "w" ); - if ( log_stats_file ) - FS_Printf( log_stats_file, "entities,dlights,parts,frame time\n" ); - } - else - { - if ( log_stats_file ) - { - FS_Close( log_stats_file ); - log_stats_file = 0; - } - } - } - - if (showtrace->value) - { - extern int c_traces, c_brush_traces; - extern int c_pointcontents; - - Msg ("%4i traces %4i points\n", c_traces, c_pointcontents); - c_traces = 0; - c_brush_traces = 0; - c_pointcontents = 0; - } - - rand(); // keep the random time dependent do diff --git a/engine/server/sv_ccmds.c b/engine/server/sv_ccmds.c index 5a009355..a1e48c80 100644 --- a/engine/server/sv_ccmds.c +++ b/engine/server/sv_ccmds.c @@ -148,6 +148,12 @@ Puts the server in demo mode on a specific map/cinematic */ void SV_DemoMap_f (void) { + if (Cmd_Argc() != 2) + { + Msg ("USAGE: demomapBuild Log
----------------------Configuration: engine - Win32 Debug-------------------- -
-Command Lines
- - - -Results
-engine.dll - 0 error(s), 0 warning(s) -