From e1dfeb76556a28968a56d2279fa208cf0786efa9 Mon Sep 17 00:00:00 2001 From: g-cont Date: Sat, 17 Jan 2009 00:00:00 +0300 Subject: [PATCH] 17 Jan 2009 --- client/client.plg | 65 ---------- client/global/enginecallback.h | 3 +- client/global/tempents.cpp | 221 ++++++++++++++++++++++++++++++++- client/hud/hud.cpp | 12 +- client/hud/hud_iface.h | 1 - client/hud/hud_utils.cpp | 4 +- common/clgame_api.h | 2 +- common/effects_api.h | 4 +- engine/client/cl_game.c | 40 +++++- engine/client/cl_main.c | 10 +- engine/client/cl_parse.c | 2 +- engine/server/sv_game.c | 4 +- todo.log | 3 +- 13 files changed, 279 insertions(+), 92 deletions(-) delete mode 100644 client/client.plg diff --git a/client/client.plg b/client/client.plg deleted file mode 100644 index 47b67a28..00000000 --- a/client/client.plg +++ /dev/null @@ -1,65 +0,0 @@ - - -
-

Build Log

-

---------------------Configuration: client - Win32 Debug-------------------- -

-

Command Lines

-Creating temporary file "C:\DOCUME~1\MIKE\LOCALS~1\Temp\RSP5810.tmp" with contents -[ -/nologo /MDd /W3 /Gm /Gi /GX /ZI /Od /I "./" /I "../common" /I "global" /I "hud" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"..\temp\client\!debug/" /Fo"..\temp\client\!debug/" /Fd"..\temp\client\!debug/" /FD /c -"D:\Xash3D\src_main\client\global\tempents.cpp" -] -Creating command line "cl.exe @C:\DOCUME~1\MIKE\LOCALS~1\Temp\RSP5810.tmp" -Creating temporary file "C:\DOCUME~1\MIKE\LOCALS~1\Temp\RSP5811.tmp" with contents -[ -msvcrtd.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"..\temp\client\!debug/client.pdb" /debug /machine:I386 /nodefaultlib:"libc.lib" /def:".\client.def" /out:"..\temp\client\!debug/client.dll" /implib:"..\temp\client\!debug/client.lib" /pdbtype:sept /libpath:"..\common\libs" -"\Xash3D\src_main\temp\client\!debug\dll_int.obj" -"\Xash3D\src_main\temp\client\!debug\hud.obj" -"\Xash3D\src_main\temp\client\!debug\hud_ammo.obj" -"\Xash3D\src_main\temp\client\!debug\hud_ammohistory.obj" -"\Xash3D\src_main\temp\client\!debug\hud_battery.obj" -"\Xash3D\src_main\temp\client\!debug\hud_death.obj" -"\Xash3D\src_main\temp\client\!debug\hud_flashlight.obj" -"\Xash3D\src_main\temp\client\!debug\hud_geiger.obj" -"\Xash3D\src_main\temp\client\!debug\hud_health.obj" -"\Xash3D\src_main\temp\client\!debug\hud_icons.obj" -"\Xash3D\src_main\temp\client\!debug\hud_menu.obj" -"\Xash3D\src_main\temp\client\!debug\hud_message.obj" -"\Xash3D\src_main\temp\client\!debug\hud_motd.obj" -"\Xash3D\src_main\temp\client\!debug\hud_msg.obj" -"\Xash3D\src_main\temp\client\!debug\hud_saytext.obj" -"\Xash3D\src_main\temp\client\!debug\hud_scoreboard.obj" -"\Xash3D\src_main\temp\client\!debug\hud_sound.obj" -"\Xash3D\src_main\temp\client\!debug\hud_statusbar.obj" -"\Xash3D\src_main\temp\client\!debug\hud_text.obj" -"\Xash3D\src_main\temp\client\!debug\hud_train.obj" -"\Xash3D\src_main\temp\client\!debug\hud_utils.obj" -"\Xash3D\src_main\temp\client\!debug\hud_warhead.obj" -"\Xash3D\src_main\temp\client\!debug\hud_zoom.obj" -"\Xash3D\src_main\temp\client\!debug\tempents.obj" -"\Xash3D\src_main\temp\client\!debug\triapi.obj" -"\Xash3D\src_main\temp\client\!debug\view.obj" -] -Creating command line "link.exe @C:\DOCUME~1\MIKE\LOCALS~1\Temp\RSP5811.tmp" -Creating temporary file "C:\DOCUME~1\MIKE\LOCALS~1\Temp\RSP5812.bat" with contents -[ -@echo off -copy \Xash3D\src_main\temp\client\!debug\client.dll "D:\Xash3D\tmpQuArK\bin\client.dll" -] -Creating command line "C:\DOCUME~1\MIKE\LOCALS~1\Temp\RSP5812.bat" -Compiling... -tempents.cpp -Linking... -

Output Window

-Performing Custom Build Step on \Xash3D\src_main\temp\client\!debug\client.dll -‘ª®¯¨à®¢ ­® ä ©«®¢: 1. - - - -

Results

-client.dll - 0 error(s), 0 warning(s) -
- - diff --git a/client/global/enginecallback.h b/client/global/enginecallback.h index 95e788ac..aa2b1e32 100644 --- a/client/global/enginecallback.h +++ b/client/global/enginecallback.h @@ -13,7 +13,8 @@ #define FREE( x ) (*g_engfuncs.pfnMemFree)( x, __FILE__, __LINE__ ) // screen handlers -#define LOAD_SHADER (*g_engfuncs.pfnLoadShader) +#define SPR_Load( x ) (*g_engfuncs.pfnLoadShader)( x, true ) +#define TEX_Load( x ) (*g_engfuncs.pfnLoadShader)( x, false ) #define DrawImageExt (*g_engfuncs.pfnDrawImageExt) #define SetColor (*g_engfuncs.pfnSetColor) #define SetParms (*g_engfuncs.pfnSetParms) diff --git a/client/global/tempents.cpp b/client/global/tempents.cpp index 69ff7d67..0a8d82f7 100644 --- a/client/global/tempents.cpp +++ b/client/global/tempents.cpp @@ -119,9 +119,178 @@ void CL_ExplosionParticles( const Vector pos ) src.lengthVelocity = 0; src.rotation = RANDOM_LONG( 0, 360 ); + if( !g_engfuncs.pEfxAPI->R_AllocParticle( &src, gHUD.m_hSmoke, flags )) + return; + } +} + +/* +================= +CL_BubbleParticles +================= +*/ +void CL_BubbleParticles( const Vector org, int count, float magnitude ) +{ + cparticle_t src; + int i; + + if( !CVAR_GET_FLOAT( "cl_particles" )) + return; + + for( i = 0; i < count; i++ ) + { + src.origin.x = org[0] + RANDOM_FLOAT( -magnitude, magnitude ); + src.origin.y = org[1] + RANDOM_FLOAT( -magnitude, magnitude ); + src.origin.z = org[2] + RANDOM_FLOAT( -magnitude, magnitude ); + src.velocity.x = RANDOM_FLOAT( -5, 5 ); + src.velocity.y = RANDOM_FLOAT( -5, 5 ); + src.velocity.z = RANDOM_FLOAT( -5, 5 ) + (25 + RANDOM_FLOAT( -5, 5 )); + src.accel = Vector( 0, 0, 0 ); + src.color = Vector( 1, 1, 1 ); + src.colorVelocity = Vector( 0, 0, 0 ); + src.alpha = 1.0; + src.alphaVelocity = -(0.4 + RANDOM_FLOAT( 0, 0.2 )); + src.radius = 1 + RANDOM_FLOAT( -0.5, 0.5 ); + src.radiusVelocity = 0; + src.length = 1; + src.lengthVelocity = 0; + src.rotation = 0; + + if( !g_engfuncs.pEfxAPI->R_AllocParticle( &src, gHUD.m_hBubble, PARTICLE_UNDERWATER )) + return; + } +} + +/* +================= +CL_BulletParticles +================= +*/ +void CL_BulletParticles( const Vector org, const Vector dir ) +{ + cparticle_t src; + int flags; + int i, count; + + if( !CVAR_GET_FLOAT( "cl_particles" )) + return; + + count = RANDOM_LONG( 3, 8 ); + + if( POINT_CONTENTS( org ) & MASK_WATER ) + { + CL_BubbleParticles( org, count, 0 ); + return; + } + + // sparks + flags = (PARTICLE_STRETCH|PARTICLE_BOUNCE|PARTICLE_FRICTION); + + for( i = 0; i < count; i++ ) + { + src.origin.x = org[0] + dir[0] * 2 + RANDOM_FLOAT( -1, 1 ); + src.origin.y = org[1] + dir[1] * 2 + RANDOM_FLOAT( -1, 1 ); + src.origin.z = org[2] + dir[2] * 2 + RANDOM_FLOAT( -1, 1 ); + src.velocity.x = dir[0] * 180 + RANDOM_FLOAT( -60, 60 ); + src.velocity.y = dir[1] * 180 + RANDOM_FLOAT( -60, 60 ); + src.velocity.z = dir[2] * 180 + RANDOM_FLOAT( -60, 60 ); + src.accel.x = src.accel.y = 0; + src.accel.z = -120 + RANDOM_FLOAT( -60, 60 ); + src.color = Vector( 1.0, 1.0f, 1.0f ); + src.colorVelocity = Vector( 0, 0, 0 ); + src.alpha = 1.0; + src.alphaVelocity = -8.0; + src.radius = 0.4 + RANDOM_FLOAT( -0.2, 0.2 ); + src.radiusVelocity = 0; + src.length = 8 + RANDOM_FLOAT( -4, 4 ); + src.lengthVelocity = 8 + RANDOM_FLOAT( -4, 4 ); + src.rotation = 0; + src.bounceFactor = 0.2; + if( !g_engfuncs.pEfxAPI->R_AllocParticle( &src, gHUD.m_hSparks, flags )) return; } + + // smoke + flags = PARTICLE_VERTEXLIGHT; + + for( i = 0; i < 3; i++ ) + { + src.origin.x = org[0] + dir[0] * 5 + RANDOM_FLOAT( -1, 1 ); + src.origin.y = org[1] + dir[1] * 5 + RANDOM_FLOAT( -1, 1 ); + src.origin.z = org[2] + dir[2] * 5 + RANDOM_FLOAT( -1, 1 ); + src.velocity.x = RANDOM_FLOAT( -2.5, 2.5 ); + src.velocity.y = RANDOM_FLOAT( -2.5, 2.5 ); + src.velocity.z = RANDOM_FLOAT( -2.5, 2.5 ) + (25 + RANDOM_FLOAT( -5, 5 )); + src.accel = Vector( 0, 0, 0 ); + src.color = Vector( 0.4, 0.4, 0.4 ); + src.colorVelocity = Vector( 0.2, 0.2, 0.2 ); + src.alpha = 0.5; + src.alphaVelocity = -(0.4 + RANDOM_FLOAT( 0, 0.2 )); + src.radius = 3 + RANDOM_FLOAT( -1.5, 1.5 ); + src.radiusVelocity = 5 + RANDOM_FLOAT( -2.5, 2.5 ); + src.length = 1; + src.lengthVelocity = 0; + src.rotation = RANDOM_LONG( 0, 360 ); + + if( !g_engfuncs.pEfxAPI->R_AllocParticle( &src, gHUD.m_hSmoke, flags )) + return; + } +} + +/* +================= +CL_TeleportParticles + +creates a particle box +================= +*/ +void CL_TeleportParticles( const Vector org ) +{ + cparticle_t src; + vec3_t dir; + float vel, color; + int x, y, z; + + if( !CVAR_GET_FLOAT( "cl_particles" )) + return; + + for( x = -16; x <= 16; x += 4 ) + { + for( y = -16; y <= 16; y += 4 ) + { + for( z = -16; z <= 32; z += 4 ) + { + dir = Vector( y*8, x*8, z*8 ); + dir.Normalize(); + + vel = 50 + RANDOM_LONG( 0, 64 ); + color = RANDOM_FLOAT( 0.1, 0.3 ); + src.origin.x = org[0] + x + RANDOM_LONG( 0, 4 ); + src.origin.y = org[1] + y + RANDOM_LONG( 0, 4 ); + src.origin.z = org[2] + z + RANDOM_LONG( 0, 4 ); + src.velocity[0] = dir[0] * vel; + src.velocity[1] = dir[1] * vel; + src.velocity[2] = dir[2] * vel; + src.accel[0] = 0; + src.accel[1] = 0; + src.accel[2] = -40; + src.color = Vector( color, color, color ); + src.colorVelocity = Vector( 0, 0, 0 ); + src.alpha = 1.0; + src.alphaVelocity = -1.0 / (0.3 + RANDOM_LONG( 0, 0.16 )); + src.radius = 2; + src.radiusVelocity = 0; + src.length = 1; + src.lengthVelocity = 0; + src.rotation = 0; + + if( !g_engfuncs.pEfxAPI->R_AllocParticle( &src, gHUD.m_hGlowParticle, 0 )) + return; + + } + } + } } void CL_PlaceDecal( Vector pos, Vector dir, float scale, HSPRITE hDecal ) @@ -141,25 +310,67 @@ void CL_AllocDLight( Vector pos, float radius, float decay, float time ) void HUD_ParseTempEntity( void ) { - Vector pos, dir; - int flags; + Vector pos, dir, color; + float time, radius, decay; + int flags, scale; switch( READ_BYTE() ) { + case TE_GUNSHOT: + pos.x = READ_COORD(); + pos.y = READ_COORD(); + pos.z = READ_COORD(); + CL_BulletParticles( pos, Vector( 0, 0, -1 )); + break; + case TE_GUNSHOTDECAL: + pos.x = READ_COORD(); + pos.y = READ_COORD(); + pos.z = READ_COORD(); + READ_SHORT(); // FIXME: skip entindex + g_engfuncs.pEfxAPI->CL_FindExplosionPlane( pos, 10, dir ); + CL_PlaceDecal( pos, dir, 10, g_engfuncs.pEfxAPI->CL_DecalIndex( READ_BYTE() )); + break; + case TE_DECAL: + pos.x = READ_COORD(); + pos.y = READ_COORD(); + pos.z = READ_COORD(); + g_engfuncs.pEfxAPI->CL_FindExplosionPlane( pos, 10, dir ); + CL_PlaceDecal( pos, dir, 10, g_engfuncs.pEfxAPI->CL_DecalIndex( READ_BYTE() )); + READ_SHORT(); // FIXME: skip entindex + break; case TE_EXPLOSION: pos.x = READ_COORD(); pos.y = READ_COORD(); pos.z = READ_COORD(); READ_SHORT(); // FIXME: use sprite index as shader index - int scale = READ_BYTE(); + scale = READ_BYTE(); READ_BYTE(); // FIXME: use framerate for shader flags = READ_BYTE(); g_engfuncs.pEfxAPI->CL_FindExplosionPlane( pos, scale, dir ); if(!(flags & TE_EXPLFLAG_NOPARTICLES )) CL_ExplosionParticles( pos ); - CL_PlaceDecal( pos, dir, scale, SPR_Load( "decals/{scorch" )); + if( RANDOM_LONG( 0, 1 )) + CL_PlaceDecal( pos, dir, scale, g_engfuncs.pEfxAPI->CL_DecalIndexFromName( "{scorch1" )); + else CL_PlaceDecal( pos, dir, scale, g_engfuncs.pEfxAPI->CL_DecalIndexFromName( "{scorch2" )); if(!(flags & TE_EXPLFLAG_NODLIGHTS )) CL_AllocDLight( pos, 250.0f, 0.28f, 0.8f ); - if(!(flags & TE_EXPLFLAG_NOSOUND )) CL_PlaySound( "weapons/explosde3.wav", 1.0f, pos ); + if(!(flags & TE_EXPLFLAG_NOSOUND )) CL_PlaySound( "weapons/explode3.wav", 1.0f, pos ); + break; + case TE_TELEPORT: + pos.x = READ_COORD(); + pos.y = READ_COORD(); + pos.z = READ_COORD(); + break; + case TE_DLIGHT: + pos.x = READ_COORD(); + pos.y = READ_COORD(); + pos.z = READ_COORD(); + radius = (float)READ_BYTE() * 10.0f; + color.x = (float)READ_BYTE() / 255.0f; + color.y = (float)READ_BYTE() / 255.0f; + color.z = (float)READ_BYTE() / 255.0f; + time = (float)READ_BYTE() * 0.1f; + decay = (float)READ_BYTE() * 0.1f; + g_engfuncs.pEfxAPI->CL_AllocDLight( pos, color, radius, decay, time, 0 ); break; } } \ No newline at end of file diff --git a/client/hud/hud.cpp b/client/hud/hud.cpp index d769999e..0f5af96c 100644 --- a/client/hud/hud.cpp +++ b/client/hud/hud.cpp @@ -149,12 +149,12 @@ void CHud :: VidInit( void ) m_hHudFont = GetSprite( GetSpriteIndex( "hud_font" )); // loading TE shaders - m_hDefaultParticle = SPR_Load( "particles/default" ); - m_hGlowParticle = SPR_Load( "particles/glow" ); - m_hDroplet = SPR_Load( "particles/droplet" ); - m_hBubble = SPR_Load( "particles/bubble" ); - m_hSparks = SPR_Load( "particles/spark" ); - m_hSmoke = SPR_Load( "particles/smoke" ); + m_hDefaultParticle = TEX_Load( "particles/default" ); + m_hGlowParticle = TEX_Load( "particles/glow" ); + m_hDroplet = TEX_Load( "particles/droplet" ); + m_hBubble = TEX_Load( "particles/bubble" ); + m_hSparks = TEX_Load( "particles/spark" ); + m_hSmoke = TEX_Load( "particles/smoke" ); m_Sound.VidInit(); m_Ammo.VidInit(); diff --git a/client/hud/hud_iface.h b/client/hud/hud_iface.h index 72da8102..bd598ce7 100644 --- a/client/hud/hud_iface.h +++ b/client/hud/hud_iface.h @@ -152,7 +152,6 @@ extern float READ_ANGLE( void ); extern void END_READ( void ); // drawing stuff -#define SPR_Load( x ) LOAD_SHADER( x ) extern int SPR_Frames( HSPRITE hPic ); extern int SPR_Height( HSPRITE hPic, int frame ); extern int SPR_Width( HSPRITE hPic, int frame ); diff --git a/client/hud/hud_utils.cpp b/client/hud/hud_utils.cpp index 08bf1259..18d0565c 100644 --- a/client/hud/hud_utils.cpp +++ b/client/hud/hud_utils.cpp @@ -583,7 +583,7 @@ void V_RenderPlaque( void ) if( !strcmp( levelshot, "" )) levelshot = ""; // logo that shows up while upload next level - DrawImageRectangle( LOAD_SHADER( levelshot )); + DrawImageRectangle( SPR_Load( levelshot )); DrawImageBar( CVAR_GET_FLOAT( "scr_loading" ), "m_loading" ); if( !CVAR_GET_FLOAT( "scr_download" )) return; @@ -593,7 +593,7 @@ void V_RenderPlaque( void ) void V_RenderSplash( void ) { - DrawImageRectangle( LOAD_SHADER( "gfx/shell/splash" )); + DrawImageRectangle( SPR_Load( "gfx/shell/splash" )); } void SetScreenFade( Vector fadeColor, float alpha, float duration, float holdTime, int fadeFlags ) diff --git a/common/clgame_api.h b/common/clgame_api.h index c93f81ab..debd44b0 100644 --- a/common/clgame_api.h +++ b/common/clgame_api.h @@ -61,7 +61,7 @@ typedef struct cl_enginefuncs_s void (*pfnMemFree)( void *mem, const char *filename, const int fileline ); // screen handlers - HSPRITE (*pfnLoadShader)( const char *szShaderName ); + HSPRITE (*pfnLoadShader)( const char *szShaderName, int fShaderNoMip ); void (*pfnFillRGBA)( int x, int y, int width, int height, const float *color, float alpha ); void (*pfnDrawImageExt)( HSPRITE shader, float x, float y, float w, float h, float s1, float t1, float s2, float t2 ); void (*pfnSetColor)( float r, float g, float b, float a ); diff --git a/common/effects_api.h b/common/effects_api.h index e49ce7b8..bc741b23 100644 --- a/common/effects_api.h +++ b/common/effects_api.h @@ -29,7 +29,9 @@ typedef struct efxapi_s int (*R_AllocParticle)( cparticle_t *src, HSPRITE shader, int flags ); void (*R_SetDecal)( float *org, float *dir, float *rgba, float rot, float rad, HSPRITE hSpr, int flags ); void (*CL_AllocDLight)( const float *org, float *rgb, float rad, float decay, float time, int key ); - void (*CL_FindExplosionPlane)( vec3_t origin, float radius, float *result ); + void (*CL_FindExplosionPlane)( const float *origin, float radius, float *result ); + int (*CL_DecalIndexFromName)( const char *szDecalName ); + int (*CL_DecalIndex)( int id ); } efxapi_t; #endif//EFFECTS_API_H \ No newline at end of file diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index 6bd525c2..3ce38022 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -367,7 +367,7 @@ pfnLoadShader ============= */ -shader_t pfnLoadShader( const char *szShaderName ) +shader_t pfnLoadShader( const char *szShaderName, int fShaderNoMip ) { if( !re ) return 0; // render not initialized if( !szShaderName || !*szShaderName ) @@ -375,7 +375,10 @@ shader_t pfnLoadShader( const char *szShaderName ) MsgDev( D_ERROR, "CL_LoadShader: invalid shadername\n" ); return -1; } - return re->RegisterShader( szShaderName, SHADER_NOMIP ); + + if( fShaderNoMip ) + return re->RegisterShader( szShaderName, SHADER_NOMIP ); + return re->RegisterShader( szShaderName, SHADER_GENERIC ); } /* @@ -1038,6 +1041,37 @@ static void pfnFindExplosionPlane( const float *origin, float radius, float *res VectorCopy( dir, result ); } +/* +================= +pfnDecalIndexFromName + +================= +*/ +static int pfnDecalIndexFromName( const char *szDecalName ) +{ + int i; + + // look through the loaded sprite name list for SpriteName + for( i = 0; i < MAX_DECALS && cl.configstrings[CS_DECALS+i+1][0]; i++ ) + { + if( !strcmp( szDecalName, cl.configstrings[CS_DECALS+i+1] )) + return cl.decal_shaders[i+1]; + } + return 0; // invalid sprite +} + +/* +================= +pfnDecalIndex + +================= +*/ +static int pfnDecalIndex( int id ) +{ + id = bound( 0, id, MAX_DECALS - 1 ); + return cl.decal_shaders[id]; +} + static triapi_t gTriApi = { sizeof( triapi_t ), @@ -1050,6 +1084,8 @@ static efxapi_t gEfxApi = pfnAddDecal, pfnAddDLight, pfnFindExplosionPlane, + pfnDecalIndexFromName, + pfnDecalIndex, }; // engine callbacks diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 03d9680f..46f23401 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -741,19 +741,19 @@ void CL_PrepVideo( void ) com.strncpy( name, cl.configstrings[CS_MODELS+1+i], MAX_STRING ); re->RegisterModel( name, i+1 ); cl.models[i+1] = pe->RegisterModel( name ); - Cvar_SetValue("scr_loading", scr_loading->value + 45.0f/mdlcount ); + Cvar_SetValue("scr_loading", scr_loading->value + 45.0f / mdlcount ); SCR_UpdateScreen(); } - for( i = 0; i < MAX_DECALS && cl.configstrings[CS_DECALS+i][0]; i++ ) + for( i = 0; i < MAX_DECALS && cl.configstrings[CS_DECALS+1+i][0]; i++ ) { - com.strncpy( name, cl.configstrings[CS_DECALS+i], MAX_STRING ); - // FIXME: register shaders + com.strncpy( name, cl.configstrings[CS_DECALS+1+i], MAX_STRING ); + cl.decal_shaders[i+1] = re->RegisterShader( name, SHADER_GENERIC ); } // setup sky and free unneeded stuff re->EndRegistration( cl.configstrings[CS_SKYNAME] ); - Cvar_SetValue("scr_loading", 100.0f ); // all done + Cvar_SetValue( "scr_loading", 100.0f ); // all done Con_ClearNotify(); // clear any lines of console text SCR_UpdateScreen(); diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 5e628621..a24cff7f 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -335,7 +335,7 @@ void CL_ParseConfigString( sizebuf_t *msg ) } else if( i >= CS_DECALS && i < CS_DECALS+MAX_DECALS && cl.video_prepped ) { - // FIXME: register decal shaders here + cl.decal_shaders[i-CS_DECALS] = re->RegisterShader( cl.configstrings[i], SHADER_GENERIC ); } else if( i >= CS_USER_MESSAGES && i < CS_USER_MESSAGES+MAX_USER_MESSAGES ) { diff --git a/engine/server/sv_game.c b/engine/server/sv_game.c index d0459cab..e0ddcab0 100644 --- a/engine/server/sv_game.c +++ b/engine/server/sv_game.c @@ -1993,7 +1993,9 @@ pfnWriteCoord */ void pfnWriteCoord( float flValue ) { - _MSG_WriteBits( &sv.multicast, flValue, svgame.msg_name, NET_FLOAT, __FILE__, __LINE__ ); + union { float f; int l; } dat; + dat.f = flValue; + _MSG_WriteBits( &sv.multicast, dat.l, svgame.msg_name, NET_FLOAT, __FILE__, __LINE__ ); svgame.msg_realsize += 4; } diff --git a/todo.log b/todo.log index cab0060a..61007ebf 100644 --- a/todo.log +++ b/todo.log @@ -51,10 +51,11 @@ Beta 13.12.08 20.rename common.dll to xtools.dll OK 21.add missing builtins in enginefuncs_t OK 22.add missing builtins in cl_enginefuncs_t OK -23.first implement efxapi_t +23.first implement efxapi_t OK 24.ed_fields flags OK 25.install ALL missing models & sounds! OK 26.fixangle doesn't working correctly +27.fixup viewmodel drawing Ñïèñîê äîñòóïíûõ ðåíäåðåðîâ: ×òî â íèõ èíòåðåñíîãî