20 Oct 2007

This commit is contained in:
g-cont 2007-10-20 00:00:00 +04:00 committed by Alibek Omarov
parent 8107e87be6
commit 04723783af
42 changed files with 191 additions and 453 deletions

View File

@ -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
+консольные приложения могут использовать расширенные пути, типа ./ или ..\

View File

@ -1,87 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: common - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
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.
<h3>Output Window</h3>
<h3>Results</h3>
common.dll - 5 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -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 )

View File

@ -1,16 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: editor - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
editor.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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;
}
}
}
}

View File

@ -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

View File

@ -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);
}

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)
{

View File

@ -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));
}

View File

@ -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);

View File

@ -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;

View File

@ -1,16 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: engine - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
engine.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -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

View File

@ -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: demomap <map>\n");
return;
}
SV_Map (true, Cmd_Argv(1), NULL, false );
}

View File

@ -170,40 +170,22 @@ void SV_WritePlayerstateToClient (client_frame_t *from, client_frame_t *to, size
if (ps->pmove.pm_type != ops->pmove.pm_type)
pflags |= PS_M_TYPE;
if (ps->pmove.origin[0] != ops->pmove.origin[0]
|| ps->pmove.origin[1] != ops->pmove.origin[1]
|| ps->pmove.origin[2] != ops->pmove.origin[2] )
pflags |= PS_M_ORIGIN;
if(!VectorICompare(ps->pmove.origin, ops->pmove.origin)) pflags |= PS_M_ORIGIN;
if(!VectorICompare(ps->pmove.velocity, ops->pmove.velocity)) pflags |= PS_M_VELOCITY;
if (ps->pmove.pm_time != ops->pmove.pm_time) pflags |= PS_M_TIME;
if (ps->pmove.pm_flags != ops->pmove.pm_flags) pflags |= PS_M_FLAGS;
if (ps->pmove.gravity != ops->pmove.gravity) pflags |= PS_M_GRAVITY;
if (ps->pmove.velocity[0] != ops->pmove.velocity[0]
|| ps->pmove.velocity[1] != ops->pmove.velocity[1]
|| ps->pmove.velocity[2] != ops->pmove.velocity[2] )
pflags |= PS_M_VELOCITY;
if (ps->pmove.pm_time != ops->pmove.pm_time)
pflags |= PS_M_TIME;
if (ps->pmove.pm_flags != ops->pmove.pm_flags)
pflags |= PS_M_FLAGS;
if (ps->pmove.gravity != ops->pmove.gravity)
pflags |= PS_M_GRAVITY;
if (ps->pmove.delta_angles[0] != ops->pmove.delta_angles[0]
|| ps->pmove.delta_angles[1] != ops->pmove.delta_angles[1]
|| ps->pmove.delta_angles[2] != ops->pmove.delta_angles[2] )
if(!VectorICompare(ps->pmove.delta_angles, ops->pmove.delta_angles))
{
Msg("update delta angles\n");
pflags |= PS_M_DELTA_ANGLES;
}
if (ps->viewoffset[0] != ops->viewoffset[0]
|| ps->viewoffset[1] != ops->viewoffset[1]
|| ps->viewoffset[2] != ops->viewoffset[2] )
if(!VectorCompare(ps->viewoffset, ops->viewoffset))
pflags |= PS_VIEWOFFSET;
if (ps->viewangles[0] != ops->viewangles[0]
|| ps->viewangles[1] != ops->viewangles[1]
|| ps->viewangles[2] != ops->viewangles[2] )
pflags |= PS_VIEWANGLES;
if(!VectorCompare(ps->viewangles, ops->viewangles)) pflags |= PS_VIEWANGLES;
if (ps->kick_angles[0] != ops->kick_angles[0]
|| ps->kick_angles[1] != ops->kick_angles[1]
@ -216,29 +198,16 @@ void SV_WritePlayerstateToClient (client_frame_t *from, client_frame_t *to, size
|| ps->blend[3] != ops->blend[3] )
pflags |= PS_BLEND;
if (ps->fov != ops->fov)
pflags |= PS_FOV;
if (ps->rdflags != ops->rdflags)
pflags |= PS_RDFLAGS;
if (ps->gunframe != ops->gunframe)
pflags |= PS_WEAPONFRAME;
if (ps->sequence != ops->sequence)
pflags |= PS_WEAPONSEQUENCE;
if (ps->gunbody != ops->gunbody)
pflags |= PS_WEAPONBODY;
if (ps->gunskin != ops->gunskin)
pflags |= PS_WEAPONSKIN;
if (ps->fov != ops->fov) pflags |= PS_FOV;
if (ps->rdflags != ops->rdflags) pflags |= PS_RDFLAGS;
if (ps->gunframe != ops->gunframe) pflags |= PS_WEAPONFRAME;
if (ps->sequence != ops->sequence) pflags |= PS_WEAPONSEQUENCE;
if (ps->gunbody != ops->gunbody) pflags |= PS_WEAPONBODY;
if (ps->gunskin != ops->gunskin) pflags |= PS_WEAPONSKIN;
pflags |= PS_WEAPONINDEX;
//
// write it
//
MSG_WriteByte (msg, svc_playerinfo);
MSG_WriteLong (msg, pflags);
@ -434,8 +403,8 @@ void SV_FatPVS (vec3_t org)
for (i = 0; i < 3; i++)
{
mins[i] = org[i] - 8;
maxs[i] = org[i] + 8;
mins[i] = org[i] - SV_COORD_FRAC;
maxs[i] = org[i] + SV_COORD_FRAC;
}
count = CM_BoxLeafnums (mins, maxs, leafs, 64, NULL);
@ -495,7 +464,7 @@ void SV_BuildClientFrame (client_t *client)
// find the client's PVS
for (i = 0; i < 3; i++)
org[i] = clent->priv.sv->client->ps.pmove.origin[i]*0.125 + clent->priv.sv->client->ps.viewoffset[i];
org[i] = clent->priv.sv->client->ps.pmove.origin[i]*CL_COORD_FRAC + clent->priv.sv->client->ps.viewoffset[i];
leafnum = CM_PointLeafnum (org);
clientarea = CM_LeafArea (leafnum);
@ -615,15 +584,14 @@ Used for recording footage for merged or assembled demos
*/
void SV_RecordDemoMessage (void)
{
int e;
int e;
edict_t *ent;
entity_state_t nostate;
sizebuf_t buf;
byte buf_data[32768];
int len;
int len;
if (!svs.demofile)
return;
if (!svs.demofile) return;
memset (&nostate, 0, sizeof(nostate));
SZ_Init (&buf, buf_data, sizeof(buf_data));
@ -631,7 +599,6 @@ void SV_RecordDemoMessage (void)
// write a frame message that doesn't contain a player_state_t
MSG_WriteByte (&buf, svc_frame);
MSG_WriteLong (&buf, sv.framenum);
MSG_WriteByte (&buf, svc_packetentities);
e = 1;
@ -639,10 +606,11 @@ void SV_RecordDemoMessage (void)
while (e < prog->num_edicts)
{
// ignore ents without visible models unless they have an effect
if (!ent->priv.sv->free && ent->priv.sv->serialnumber &&
(ent->priv.sv->s.modelindex || ent->progs.sv->effects || ent->progs.sv->noise3 || ent->priv.sv->event))
if (!ent->priv.sv->free && ent->priv.sv->serialnumber && (ent->priv.sv->s.modelindex || ent->progs.sv->effects || ent->progs.sv->noise3 || ent->priv.sv->event))
{
SV_UpdateEntityState( ent );
MSG_WriteDeltaEntity (&nostate, &ent->priv.sv->s, &buf, false, true);
}
e++;
ent = PRVM_EDICT_NUM(e);
}

View File

@ -421,7 +421,7 @@ gotnewcl:
newcl->state = cs_connected;
SZ_Init (&newcl->datagram, newcl->datagram_buf, sizeof(newcl->datagram_buf) );
newcl->lastmessage = svs.realtime; // don't timeout
newcl->lastmessage = svs.realtime; // don't timeout
newcl->lastconnect = svs.realtime;
}
@ -615,33 +615,28 @@ void SV_ReadPackets (void)
qport = MSG_ReadShort (&net_message) & 0xffff;
// check for packets from connected clients
for (i=0, cl=svs.clients ; i<maxclients->value ; i++,cl++)
for (i = 0, cl = svs.clients; i < maxclients->value; i++, cl++)
{
if (cl->state == cs_free)
continue;
if (!NET_CompareBaseAdr (net_from, cl->netchan.remote_address))
continue;
if (cl->netchan.qport != qport)
continue;
if (cl->state == cs_free) continue;
if (!NET_CompareBaseAdr (net_from, cl->netchan.remote_address)) continue;
if (cl->netchan.qport != qport) continue;
if (cl->netchan.remote_address.port != net_from.port)
{
Msg ("SV_ReadPackets: fixing up a translated port\n");
MsgDev(D_INFO, "SV_ReadPackets: fixing up a translated port\n");
cl->netchan.remote_address.port = net_from.port;
}
if (Netchan_Process(&cl->netchan, &net_message))
{ // this is a valid, sequenced packet, so process it
{
// this is a valid, sequenced packet, so process it
if (cl->state != cs_zombie)
{
cl->lastmessage = svs.realtime; // don't timeout
cl->lastmessage = svs.realtime; // don't timeout
SV_ExecuteClientMessage (cl);
}
}
break;
}
if (i != maxclients->value)
continue;
if (i != maxclients->value) continue;
}
}
@ -727,7 +722,7 @@ void SV_RunGameFrame (void)
// compression can get confused when a client
// has the "current" frame
sv.framenum++;
sv.frametime = 0.001f;//1000 fps
sv.frametime = 0.1f;//1000 fps
sv.time = sv.framenum * sv.frametime;
// don't run if paused

View File

@ -632,8 +632,8 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
if (i == 0 && enemy != prog->edicts)
{
dz = ent->progs.sv->origin[2] - PRVM_PROG_TO_EDICT(ent->progs.sv->enemy)->progs.sv->origin[2];
if (dz > 40) neworg[2] -= 8;
if (dz < 30) neworg[2] += 8;
if (dz > 40) neworg[2] -= SV_COORD_FRAC;
if (dz < 30) neworg[2] += SV_COORD_FRAC;
}
trace = SV_Trace(ent->progs.sv->origin, ent->progs.sv->mins, ent->progs.sv->maxs, neworg, ent, MASK_SOLID);

View File

@ -489,9 +489,9 @@ SV_SendClientMessages
*/
void SV_SendClientMessages (void)
{
int i;
client_t *c;
int msglen;
int i;
client_t *c;
int msglen;
byte msgbuf[MAX_MSGLEN];
msglen = 0;

View File

@ -40,9 +40,9 @@ void SV_PutClientInServer (edict_t *ent)
memset (&ent->priv.sv->client->ps, 0, sizeof(client->ps));
// info_player_start
client->ps.pmove.origin[0] = ent->progs.sv->origin[0] * 8;
client->ps.pmove.origin[1] = ent->progs.sv->origin[1] * 8;
client->ps.pmove.origin[2] = ent->progs.sv->origin[2] * 8;
client->ps.pmove.origin[0] = ent->progs.sv->origin[0] * SV_COORD_FRAC;
client->ps.pmove.origin[1] = ent->progs.sv->origin[1] * SV_COORD_FRAC;
client->ps.pmove.origin[2] = ent->progs.sv->origin[2] * SV_COORD_FRAC;
client->ps.fov = 90;
@ -277,7 +277,7 @@ void SV_CalcViewOffset (edict_t *ent)
// base angles
angles = ent->priv.sv->client->ps.kick_angles;
VectorCopy(ent->progs.sv->punchangle, angles);
// add angles based on velocity
delta = DotProduct (ent->progs.sv->velocity, forward);
angles[PITCH] += delta * 0.002;
@ -341,8 +341,8 @@ void ClientEndServerFrame (edict_t *ent)
//
for (i = 0; i < 3; i++)
{
current_client->ps.pmove.origin[i] = ent->progs.sv->origin[i]*8.0;
current_client->ps.pmove.velocity[i] = ent->progs.sv->velocity[i]*8.0;
current_client->ps.pmove.origin[i] = ent->progs.sv->origin[i]*SV_COORD_FRAC;
current_client->ps.pmove.velocity[i] = ent->progs.sv->velocity[i]*SV_COORD_FRAC;
}
AngleVectors (ent->priv.sv->client->v_angle, forward, right, up);
@ -351,12 +351,14 @@ void ClientEndServerFrame (edict_t *ent)
// set model angles from view angles so other things in
// the world can tell which direction you are looking
//
if (ent->priv.sv->client->v_angle[PITCH] > 180) ent->progs.sv->angles[PITCH] = (-360 + ent->priv.sv->client->v_angle[PITCH])/3;
if (ent->priv.sv->client->v_angle[PITCH] > 180)
ent->progs.sv->angles[PITCH] = (-360 + ent->priv.sv->client->v_angle[PITCH])/3;
else ent->progs.sv->angles[PITCH] = ent->priv.sv->client->v_angle[PITCH]/3;
ent->progs.sv->angles[YAW] = ent->priv.sv->client->v_angle[YAW];
ent->progs.sv->angles[ROLL] = 0;
ent->progs.sv->angles[ROLL] = SV_CalcRoll (ent->progs.sv->angles, ent->progs.sv->velocity)*4;
ent->priv.sv->client->ps.pmove.pm_time = ent->progs.sv->teleport_time * 1000; //in msecs
//
// calculate speed and cycle to be used for
@ -369,11 +371,11 @@ void ClientEndServerFrame (edict_t *ent)
bobmove = 0;
current_client->bobtime = 0; // start at beginning of cycle again
}
else
else if (ent->progs.sv->groundentity)
{
// so bobbing only cycles when on ground
if (xyspeed > 210) bobmove = 0.25;
else if (xyspeed > 100) bobmove = 0.125;
else if (xyspeed > 100) bobmove = CL_COORD_FRAC;
else bobmove = 0.0625;
}
@ -392,6 +394,11 @@ void ClientEndServerFrame (edict_t *ent)
SV_CalcGunOffset (ent);
SV_SetStats( ent );
// if the scoreboard is up, update it
if (!(sv.framenum & 31))
{
}
}
/*
@ -402,16 +409,13 @@ ClientEndServerFrames
void ClientEndServerFrames (void)
{
int i;
edict_t *ent;
// calc the player views now that all pushing
// and damage has been added
for (i = 0; i < maxclients->value; i++)
{
ent = PRVM_EDICT_NUM(i);
if (ent->priv.sv->free || !ent->priv.sv->client)
continue;
ClientEndServerFrame (ent);
if(svs.clients[i].state != cs_spawned) continue;
ClientEndServerFrame (svs.clients[i].edict);
}
}
@ -577,8 +581,8 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
for (i = 0; i < 3; i++)
{
pm.s.origin[i] = ent->progs.sv->origin[i]*8;
pm.s.velocity[i] = ent->progs.sv->velocity[i]*8;
pm.s.origin[i] = ent->progs.sv->origin[i]*SV_COORD_FRAC;
pm.s.velocity[i] = ent->progs.sv->velocity[i]*SV_COORD_FRAC;
}
if (memcmp(&client->old_pmove, &pm.s, sizeof(pm.s)))
@ -598,11 +602,13 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
for (i = 0; i < 3; i++)
{
ent->progs.sv->origin[i] = pm.s.origin[i]*0.125;
ent->progs.sv->velocity[i] = pm.s.velocity[i]*0.125;
ent->progs.sv->origin[i] = pm.s.origin[i]*CL_COORD_FRAC;
ent->progs.sv->velocity[i] = pm.s.velocity[i]*CL_COORD_FRAC;
}
VectorCopy (pm.mins, ent->progs.sv->mins);
VectorCopy (pm.maxs, ent->progs.sv->maxs);
VectorCopy (pm.viewangles, client->v_angle);
VectorCopy (pm.viewangles, client->ps.viewangles);
SV_LinkEdict(ent);

View File

@ -70,7 +70,7 @@ void SV_New_f (void)
// demo servers just dump the file message
if (sv.state == ss_demo)
{
SV_BeginDemoserver ();
SV_BeginDemoserver();
return;
}

View File

@ -437,6 +437,14 @@ void PF_sound (void)
SV_StartSound (NULL, entity, channel, sound_idx, volume / 255.0f, attenuation, 0 );
}
void PF_event( void )
{
edict_t *ent = PRVM_G_EDICT(OFS_PARM0);
// event effects
ent->priv.sv->event = (int)PRVM_G_FLOAT(OFS_PARM1);
}
/*
=================
PF_ambientsound
@ -1298,7 +1306,7 @@ PF_setstats, // #104 void setstats(entity e, float f, string stats)
PF_configstring, // #105 void configstring(float num, string s)
PF_makestatic, // #106 void makestatic(entity e)
PF_modelframes, // #107 float model_frames(float modelindex)
NULL, // #108
PF_event, // #108 void set_effect( entity e, float effect )
NULL, // #109
NULL, // #110
NULL, // #111

View File

@ -176,17 +176,17 @@ void SV_LinkEdict (edict_t *ent)
if (ent->progs.sv->solid == SOLID_BBOX && !((int)ent->progs.sv->flags & FL_DEADMONSTER))
{
// assume that x/y are equal and symetric
i = ent->progs.sv->maxs[0]/8;
i = ent->progs.sv->maxs[0]/SV_COORD_FRAC;
if (i<1) i = 1;
if (i>31) i = 31;
// z is not symetric
j = (-ent->progs.sv->mins[2])/8;
j = (-ent->progs.sv->mins[2])/SV_COORD_FRAC;
if (j < 1) j = 1;
if (j > 31) j = 31;
// and z maxs can be negative...
k = (ent->progs.sv->maxs[2]+32)/8;
k = (ent->progs.sv->maxs[2]+32)/SV_COORD_FRAC;
if (k<1) k = 1;
if (k>63) k = 63;
ent->priv.sv->solid = (k<<10) | (j<<5) | i;

View File

@ -1,16 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: launch - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
launch.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -279,8 +279,6 @@ void Draw_FadeScreen (void)
//====================================================================
/*
=============
Draw_StretchRaw

View File

@ -228,11 +228,11 @@ void EmitWaterPolys (msurface_t *fa)
os = v[3];
ot = v[4];
s = os + r_turbsin[(int)((ot * 0.125 + rdt) * TURBSCALE) & 255];
s = os + r_turbsin[(int)((ot * CL_COORD_FRAC + rdt) * TURBSCALE) & 255];
s += scroll;
s *= (1.0/64);
t = ot + r_turbsin[(int)((os * 0.125 + rdt) * TURBSCALE) & 255];
t = ot + r_turbsin[(int)((os * CL_COORD_FRAC + rdt) * TURBSCALE) & 255];
t *= (1.0/64);
qglTexCoord2f (s, t);

View File

@ -1,16 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: render - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
render.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -1,5 +1,5 @@
=======================================================================
Xash3D QuakeC Compiler started at Oct18 2007 [00:11:54]
Xash3D QuakeC Compiler started at Oct19 2007 [19:34:42]
=======================================================================
------------Configuration: server - Vm16 Release------------
Compiling...
@ -39,8 +39,8 @@ Linking...
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.
server.dat - 0 error(s), 0 warning(s)
0.435 seconds elapsed
0.450 seconds elapsed
=======================================================================
Xash3D QuakeC Compiler stopped at Oct18 2007 [00:11:55]
Xash3D QuakeC Compiler stopped at Oct19 2007 [19:34:43]
=======================================================================

View File

@ -323,6 +323,18 @@ vector VEC_HULL2_MAX = '32 32 64';
#define SVC_LAYOUT 4
#define SVC_INVENTORY 5
enum
{
EV_NONE,
EV_ITEM_RESPAWN,
EV_FOOTSTEP,
EV_FALLSHORT,
EV_FALL,
EV_FALLFAR,
EV_PLAYER_TELEPORT,
EV_OTHER_TELEPORT
};
float TE_SPIKE = 0;
float TE_SUPERSPIKE = 1;
float TE_GUNSHOT = 2;

View File

@ -24,12 +24,12 @@ void () CCam =
if (pev->aflag == FALSE)
{
pev->aflag = TRUE;
camera = create("camera", "progs/eyes.mdl", trace_endpos );
camera = create("camera", "models/supp1.mdl", trace_endpos );
pev->trigger_field = camera;
camera.classname = "camera";
camera.movetype = MOVETYPE_FLY;
camera.solid = SOLID_NOT;
setmodel (camera,"progs/eyes.mdl");
setmodel (camera,"models/supp1.mdl");
setsize (camera,'0 0 0','0 0 0');
makevectors (pev->v_angle);
traceline ((pev->origin + pev->view_ofs),(((pev->origin + pev->view_ofs) + (v_forward * -64.000))), FALSE, pev);

View File

@ -64,14 +64,4 @@ void() IEM_usetarget =
}
}
};
void(float effect_type, vector effect_org) IEM_effects =
{
MsgBegin(SVC_TEMP_ENTITY);
WriteByte(effect_type);
WriteCoord(effect_org_x);
WriteCoord(effect_org_y);
WriteCoord(effect_org_z);
MsgEnd( MSG_BROADCAST, effect_org, pev );
};

View File

@ -59,15 +59,16 @@ void() trigger_teleport_think =
t = find (world, targetname, pev->target);
if (!t) Error("couldn't find target\n");
IEM_effects(TE_TELEPORT, pev->triggerer.origin);
set_effect( t, EV_OTHER_TELEPORT );
spawn_tdeath(t.origin, pev->triggerer);
setorigin(pev->triggerer, t.origin);
setangles(pev->triggerer, t);
pev->triggerer->teleport_time = 0.014;
IEM_effects(TE_TELEPORT, t.origin);
set_effect( pev->triggerer, EV_PLAYER_TELEPORT );
if(pev->message)
centerprint(pev->triggerer, pev->message);

View File

@ -28,8 +28,8 @@ void() CheckImpulses =
if(pev->impulse == 150)
{
IEM_effects(TE_TELEPORT, pev->origin);
set_effect( pev, EV_PLAYER_TELEPORT );
}
pev->impulse = 0; // Clear impulse list.
pev->impulse = 0; // Clear impulse list.
};

View File

@ -123,13 +123,12 @@ Precaches for the game.
void() precaches =
{
precache_model ("models/player.mdl");
precache_model("progs/s_bubble.spr");
precache_model("progs/eyes.mdl");
precache_model ("models/player.mdl");
precache_model("models/supp1.mdl");
// pain sounds
precache_sound ("player/drown1.wav"); // drowning pain
precache_sound ("player/drown2.wav"); // drowning pain
precache_sound ("player/drown2.wav"); // drowning pain
precache_sound ("player/lburn1.wav"); // slime/lava burn
precache_sound ("player/lburn2.wav"); // slime/lava burn
precache_sound ("player/pain1.wav");

Binary file not shown.

View File

@ -113,5 +113,5 @@ void setstats(entity e, float f, string stats) = #104;
void configstring(float num, string s) = #105;
void makestatic(entity e) = #106;
float model_frames(float modelindex) = #107;
void set_effect( entity e, float effect ) = #108;