diff --git a/Source/Builtins.h b/Source/Builtins.h
index a604ea58..c42a5d83 100755
--- a/Source/Builtins.h
+++ b/Source/Builtins.h
@@ -2184,7 +2184,7 @@ string(string name, optional float trywad) precache_pic = #317; /*
void(string imagename, int width, int height, int *pixeldata) r_uploadimage = #0:r_uploadimage; /* Part of FTE_CSQC_RAWIMAGES
Updates a texture with the specified rgba data. Will be created if needed. */
-int*(string filename, __out int width, __out int height) r_readimage = #0:r_readimage; /* Part of FTE_CSQC_RAWIMAGES
+int*(string filename, __inout int width, __inout int height) r_readimage = #0:r_readimage; /* Part of FTE_CSQC_RAWIMAGES
Reads and decodes an image from disk, providing raw pixel data. Returns __NULL__ if the image could not be read for any reason. Use memfree to free the data once you're done with it. */
#define draw_getimagesize drawgetimagesize
diff --git a/Source/Client/Defs.h b/Source/Client/Defs.h
index 4b1f0e5e..ba6e88eb 100755
--- a/Source/Client/Defs.h
+++ b/Source/Client/Defs.h
@@ -42,6 +42,7 @@ var float autocvar_cl_bobup = 0.5;
var int autocvar_cl_bobclassic = FALSE;
var int autocvar_v_lefthanded = FALSE;
var int autocvar_cl_thirdperson = FALSE;
+var int autocvar_cl_radar = 2;
// Particle stuff
var float PARTICLE_SPARK;
@@ -59,12 +60,20 @@ vector vHUDColor; // Defined in HUD_Draw (HUD.c)
vector vVGUIColor; // Defined in HUD_Draw (VGUI.c)
vector vCrossColor; // Defined in HUD_Draw (HUDCrosshair.c)
+string sShellModel [ 4 ] = {
+ "models/pshell.mdl",
+ "models/rshell.mdl",
+ "models/rshell_big.mdl",
+ "models/shotgunshell.mdl"
+};
+
struct
{
//Viewmodel stuff
entity eViewModel;
entity eMuzzleflash;
float fNumBones;
+ float fEjectBone;
vector vPunchAngle;
float fLastWeapon;
float fBobTime;
@@ -92,6 +101,8 @@ struct
// Testing
int iOverview;
+ int iMapExpand;
+ float fMapLerp;
//crosshair
int iOldShotMultiplier;
diff --git a/Source/Client/Draw.c b/Source/Client/Draw.c
index d86a3566..d750d098 100755
--- a/Source/Client/Draw.c
+++ b/Source/Client/Draw.c
@@ -74,11 +74,20 @@ void CSQC_DrawChat( void ) {
}
if ( fChatAlpha > 0.0f ) {
+#if 1
for ( int i = 0; i < CHAT_LINES; i++ ) {
drawstring( vChatPos + '1 1', sMSGBuffer[ i ], '8 8', '0 0 0', fChatAlpha, 0 );
drawstring( vChatPos, sMSGBuffer[ i ], '8 8', '1 1 1', fChatAlpha, 0 );
vChatPos_y += 12;
}
+#else
+ string sDraw = sMSGBuffer[ 0 ];
+ for ( int i = 1; i < CHAT_LINES; i++ ) {
+ sDraw = sprintf( "%s\n%s\n", sDraw, sMSGBuffer[ i ] );
+ }
+
+ drawtextfield( vChatPos, [vVideoResolution_x - 32, CHAT_LINES * 12 ], 1, sDraw );
+#endif
}
}
@@ -143,6 +152,32 @@ float CSQC_Parse_CenterPrint( string sMessage ) {
return TRUE;
}
+void CSQC_CalcViewport( int s, float fWinWidth, float fWinHeight ) {
+ //FIXME: this is awkward. renderscene internally rounds to pixels.
+ //on the other hand, drawpic uses linear filtering and multisample and stuff.
+ //this means that there can be a pixel or so difference between scene and 2d.
+ //as a general rule, you won't notice unless there's some big drawfills.
+ switch ( numclientseats ) {
+ case 3:
+ if (!s)
+ {
+ case 2:
+ vVideoResolution = [ fWinWidth, fWinHeight * 0.5 ];
+ vVideoMins = [ 0, ( s & 1 ) * vVideoResolution_y ];
+ break;
+ }
+ s++;
+ case 4:
+ vVideoResolution = [ fWinWidth, fWinHeight ] * 0.5;
+ vVideoMins = [ (s&1) * vVideoResolution_x, ( s / 2i ) * vVideoResolution_y ];
+ break;
+ default:
+ vVideoResolution = [ fWinWidth, fWinHeight ];
+ vVideoMins = [ 0, 0 ];
+ break;
+ }
+}
+
/*
=================
CSQC_UpdateView
@@ -179,71 +214,47 @@ void CSQC_UpdateView( float fWinWidth, float fWinHeight, float fGameFocus ) {
}
}
-
+ addentities( MASK_ENGINE );
+ // Render 3D Game Loop
+ for ( s = 0; s < numclientseats; s++ ) {
+ pSeat = &seats[ s ];
+ setproperty( VF_ACTIVESEAT, (float)s );
+ Nightvision_PreDraw();
+
+
+ if ( autocvar_cl_thirdperson == TRUE && getstatf( STAT_HEALTH ) ) {
+ setproperty( VF_VIEWENTITY, (float)0 );
+ } else {
+ setproperty( VF_VIEWENTITY, (float)player_localentnum );
+ }
+
+ setproperty( VF_AFOV, cvar( "fov" ) * ( getstatf( STAT_VIEWZOOM ) / 255 ) );
+ setsensitivityscaler( ( getstatf( STAT_VIEWZOOM ) / 255 ) );
+
+ // When Cameratime is active, draw on the forced coords instead
+ if ( pSeat->fCameraTime > time ) {
+ setproperty( VF_ORIGIN, pSeat->vCameraPos ) ;
+ } else {
+ setproperty( VF_ORIGIN, pSeat->vPlayerOrigin + [ 0, 0, getstatf( STAT_VIEWHEIGHT ) ] );
+ View_DrawViewModel();
+ }
+
+ CSQC_CalcViewport( s, fWinWidth, fWinHeight );
+ setproperty( VF_MIN, vVideoMins );
+ setproperty( VF_SIZE, vVideoResolution );
+ setproperty( VF_ANGLES, view_angles + pSeat->vPunchAngle );
+ setproperty( VF_DRAWWORLD, 1 );
+ renderscene();
+ }
+
+ // Render Overlays, such as the HUD
for ( s = 0; s < numclientseats; s++ ) {
pSeat = &seats[ s ];
setproperty( VF_ACTIVESEAT, (float)s );
- if ( pSeat.iOverview == FALSE ) {
- addentities( MASK_ENGINE );
- }
- Nightvision_PreDraw();
-
- if ( pSeat.iOverview == FALSE ) {
- if ( autocvar_cl_thirdperson == TRUE && getstatf( STAT_HEALTH ) ) {
- setproperty( VF_VIEWENTITY, (float)0 );
- } else {
- setproperty( VF_VIEWENTITY, (float)player_localentnum );
- }
-
- setproperty( VF_AFOV, cvar( "fov" ) * ( getstatf( STAT_VIEWZOOM ) / 255 ) );
- setsensitivityscaler( ( getstatf( STAT_VIEWZOOM ) / 255 ) );
-
- // When Cameratime is active, draw on the forced coords instead
- if ( pSeat->fCameraTime > time ) {
- setproperty( VF_ORIGIN, pSeat->vCameraPos ) ;
- } else {
- setproperty( VF_ORIGIN, pSeat->vPlayerOrigin + [ 0, 0, getstatf( STAT_VIEWHEIGHT ) ] );
- View_DrawViewModel();
- }
-
- //FIXME: this is awkward. renderscene internally rounds to pixels.
- //on the other hand, drawpic uses linear filtering and multisample and stuff.
- //this means that there can be a pixel or so difference between scene and 2d.
- //as a general rule, you won't notice unless there's some big drawfills.
- switch ( numclientseats ) {
- case 3:
- if (!s)
- {
- case 2:
- vVideoResolution = [ fWinWidth, fWinHeight * 0.5 ];
- vVideoMins = [ 0, ( s & 1 ) * vVideoResolution_y ];
- break;
- }
- s++;
- case 4:
- vVideoResolution = [ fWinWidth, fWinHeight ] * 0.5;
- vVideoMins = [ (s&1) * vVideoResolution_x, ( s / 2i ) * vVideoResolution_y ];
- break;
- default:
- vVideoResolution = [ fWinWidth, fWinHeight ];
- vVideoMins = [ 0, 0 ];
- break;
- }
- setproperty( VF_MIN, vVideoMins );
- setproperty( VF_SIZE, vVideoResolution );
- setproperty( VF_ANGLES, view_angles + pSeat->vPunchAngle );
- setproperty( VF_DRAWWORLD, 1 );
- } else {
- setproperty( VF_DRAWWORLD, 0 );
- Overview_Draw();
- }
-
- renderscene();
-
+ CSQC_CalcViewport( s, fWinWidth, fWinHeight );
View_DropPunchAngle();
-
Nightvision_PostDraw();
if( fGameFocus == TRUE ) {
diff --git a/Source/Client/Event.c b/Source/Client/Event.c
index 3bb4f265..7711a0a1 100755
--- a/Source/Client/Event.c
+++ b/Source/Client/Event.c
@@ -26,6 +26,7 @@ Init all the cmds in one place
=================
*/
void CSQC_ConsoleCommand_Init( void ) {
+ registercommand( "minimap" );
registercommand( "overview_test" );
registercommand( "vox_test" );
registercommand( "+attack2" );
@@ -120,6 +121,10 @@ float CSQC_ConsoleCommand( string sCMD ) {
tokenize( sCMD );
switch ( argv(0) ) {
+ case "minimap":
+ pSeat.iMapExpand = 1 - pSeat.iMapExpand;
+ return TRUE;
+ break;
case "overview_test":
pSeat.iOverview = 1 - pSeat.iOverview;
return TRUE;
diff --git a/Source/Client/HUD.c b/Source/Client/HUD.c
index afc396a0..18a60bb2 100755
--- a/Source/Client/HUD.c
+++ b/Source/Client/HUD.c
@@ -112,8 +112,13 @@ void HUD_DrawHealth( void ) {
}
vector vHealthPos = vVideoMins + [ 16, vVideoResolution_y - 42 ];
- drawsubpic( vHealthPos, '24 24 0', HUD_NUMFILE_LAYER, [ NUMSIZE_X * 2, NUMSIZE_Y], [ NUMSIZE_X, NUMSIZE_X ], vHUDColor, HUD_ALPHA, DRAWFLAG_ADDITIVE );
- HUD_DrawNums( getstatf( STAT_HEALTH ), vHealthPos + '72 0', HUD_ALPHA, vHUDColor );
+ if ( getstatf( STAT_HEALTH ) > 25 ) {
+ drawsubpic( vHealthPos, '24 24 0', HUD_NUMFILE_LAYER, [ NUMSIZE_X * 2, NUMSIZE_Y], [ NUMSIZE_X, NUMSIZE_X ], vHUDColor, HUD_ALPHA, DRAWFLAG_ADDITIVE );
+ HUD_DrawNums( getstatf( STAT_HEALTH ), vHealthPos + '72 0', HUD_ALPHA, vHUDColor );
+ } else {
+ drawsubpic( vHealthPos, '24 24 0', HUD_NUMFILE_LAYER, [ NUMSIZE_X * 2, NUMSIZE_Y], [ NUMSIZE_X, NUMSIZE_X ], '1 0 0', HUD_ALPHA, DRAWFLAG_ADDITIVE );
+ HUD_DrawNums( getstatf( STAT_HEALTH ), vHealthPos + '72 0', HUD_ALPHA, '1 0 0' );
+ }
fOldHealth = getstatf( STAT_HEALTH );
}
@@ -139,7 +144,7 @@ void HUD_DrawArmor( void ) {
vector vArmorPos = vVideoMins + [ 128, vVideoResolution_y - 42 ];
drawsubpic( vArmorPos, '24 24 0', HUD_NUMFILE_LAYER, [ 0, NUMSIZE_Y], [ NUMSIZE_X, NUMSIZE_X ], vHUDColor, fArmorAlpha, DRAWFLAG_ADDITIVE );
- HUD_DrawNums( getstatf( STAT_ARMOR ), vArmorPos + '72 0', fArmorAlpha, vHUDColor);
+ HUD_DrawNums( getstatf( STAT_ARMOR ), vArmorPos + '72 0', fArmorAlpha, vHUDColor );
fOldArmor = getstatf( STAT_ARMOR );
}
@@ -382,9 +387,56 @@ void HUD_DrawProgressBar( void ) {
}
}
-
void HUD_DrawRadar( void ) {
- drawpic( vVideoMins + '16 16', "sprites/radar640.spr_0.tga", '128 128', '1 1 1', 0.5, DRAWFLAG_ADDITIVE );
+ if ( autocvar_cl_radar == 1 ) {
+ drawpic( vVideoMins + '16 16', "sprites/radar640.spr_0.tga", '128 128', '1 1 1', 0.5, DRAWFLAG_ADDITIVE );
+ } else if ( autocvar_cl_radar == 2 ) {
+ static int iLastMode = 0;
+ static vector vMapSize;
+ static float fZoom;
+
+ if ( iLastMode != pSeat.iMapExpand ) {
+ iLastMode = pSeat.iMapExpand;
+ }
+
+ if ( pSeat.iMapExpand == 1 ) {
+ if ( pSeat.fMapLerp < 1.0f ) {
+ vMapSize_x = rint( Math_Lerp( 128, vVideoResolution_x - 32, pSeat.fMapLerp ) );
+ vMapSize_y = rint( Math_Lerp( 128, vVideoResolution_y - 32, pSeat.fMapLerp ) );
+ fZoom = Math_Lerp( ( ovMap.fCameraHeight * ( 128 / ( vVideoResolution_y - 32 ) ) ), ovMap.fCameraHeight - 32, pSeat.fMapLerp );
+ pSeat.fMapLerp += frametime * 2;
+ } else {
+ pSeat.fMapLerp = 1.0f;
+ fZoom = ovMap.fCameraHeight;
+ vMapSize = vVideoResolution + '-32 -32';
+ }
+ } else {
+ if ( pSeat.fMapLerp > 0.0f ) {
+ vMapSize_x = rint( Math_Lerp( 128, vVideoResolution_x - 32, pSeat.fMapLerp ) );
+ vMapSize_y = rint( Math_Lerp( 128, vVideoResolution_y - 32, pSeat.fMapLerp ) );
+ fZoom = Math_Lerp( ( ovMap.fCameraHeight * ( 128 / ( vVideoResolution_y - 32 ) ) ), ovMap.fCameraHeight - 32, pSeat.fMapLerp );
+ pSeat.fMapLerp -= frametime * 2;
+ } else {
+ pSeat.fMapLerp = 0.0f;
+ fZoom = ( ovMap.fCameraHeight * ( 128 / ( vVideoResolution_y - 32 ) ) );
+ vMapSize = '128 128';
+ }
+ }
+
+ clearscene();
+ drawfill( vVideoMins + '15 15', vMapSize + '2 2', vHUDColor, 1.0f, DRAWFLAG_ADDITIVE );
+ drawfill( vVideoMins + '16 16', vMapSize, '0 0 0', 1.0f, 0 );
+ setproperty( VF_MIN, vVideoMins + '16 16' );
+ setproperty( VF_SIZE, vMapSize );
+
+ Overview_DrawLayer();
+
+ makevectors( view_angles );
+ setproperty( VF_ORIGIN, [ pSeat->vPlayerOrigin[0], pSeat->vPlayerOrigin[1], fZoom ] );
+ setproperty( VF_ANGLES, [ Math_Lerp( 90, 60, pSeat.fMapLerp ), view_angles_y, 0 ] );
+ setproperty( VF_DRAWWORLD, 0 );
+ renderscene();
+ }
}
void HUD_DrawFlash( void ) {
@@ -419,14 +471,16 @@ void HUD_Draw( void ) {
}
HUD_DrawFlash();
+
HUD_DrawTimer();
- HUD_DrawRadar();
HUD_DrawHealth();
HUD_DrawArmor();
HUD_DrawIcons();
HUD_DrawMoney();
HUD_DrawAmmo();
+ HUD_DrawRadar();
+
HUD_DrawProgressBar();
HUD_DrawWeaponSelect();
}
diff --git a/Source/Client/HUDOrbituaries.c b/Source/Client/HUDOrbituaries.c
index 894c95ec..92c2c4bc 100755
--- a/Source/Client/HUDOrbituaries.c
+++ b/Source/Client/HUDOrbituaries.c
@@ -106,7 +106,11 @@ void HUD_DrawOrbituaries( void ) {
drawstring( vOrbPos, orbBuffer[ i ].sAttacker, '8 8', orbBuffer[ i ].vColor1, VGUI_WINDOW_FGALPHA, 0 );
// Draw the weapon icon
- drawsubpic( vOrbPos + [ orbBuffer[ i ].fOffset1, 0 ], wpIconTable[ orbBuffer[ i ].fWeapon ].vSize * 256, wpIconTable[ orbBuffer[ i ].fWeapon ].sSprite, wpIconTable[ orbBuffer[ i ].fWeapon ].vOrigin, wpIconTable[ orbBuffer[ i ].fWeapon ].vSize, '1 0.5 0', 1, DRAWFLAG_ADDITIVE );
+ if ( orbBuffer[ i ].fHeadShot == TRUE ) {
+ drawsubpic( vOrbPos + [ orbBuffer[ i ].fOffset1 - 4, -4 ], '36 16', "sprites/640hud1.spr_0.tga", '0 0.9375', '0.140625 0.0625', '1 0.5 0', 1, DRAWFLAG_ADDITIVE );
+ } else {
+ drawsubpic( vOrbPos + [ orbBuffer[ i ].fOffset1, -4 ], wpIconTable[ orbBuffer[ i ].fWeapon ].vSize * 256, wpIconTable[ orbBuffer[ i ].fWeapon ].sSprite, wpIconTable[ orbBuffer[ i ].fWeapon ].vOrigin, wpIconTable[ orbBuffer[ i ].fWeapon ].vSize, '1 0.5 0', 1, DRAWFLAG_ADDITIVE );
+ }
// Draw the victim's name, shadow first again
drawstring( vOrbPos + [ orbBuffer[ i ].fOffset2 + orbBuffer[ i ].fOffset1, 0 ] + '1 1', orbBuffer[ i ].sVictim, '8 8', '0 0', VGUI_WINDOW_FGALPHA, 0 );
diff --git a/Source/Client/Init.c b/Source/Client/Init.c
index be8f7708..3a551584 100755
--- a/Source/Client/Init.c
+++ b/Source/Client/Init.c
@@ -69,6 +69,13 @@ void CSQC_Init(float apilevel, string enginename, float engineversion) {
precache_sound( "debris/bustconcrete1.wav" );
precache_sound( "debris/bustconcrete2.wav" );
precache_sound( "debris/bustceiling.wav" );
+ precache_model( "sprites/iplayervip.spr" );
+ precache_model( "sprites/ihostage.spr" );
+
+ precache_model( "models/pshell.mdl" );
+ precache_model( "models/rshell.mdl" );
+ precache_model( "models/rshell_big.mdl" );
+ precache_model( "models/shotgunshell.mdl" );
precache_pic( "gfx/vgui/icntlk_sv" );
precache_pic( sprintf( "overviews/%s.bmp", mapname ) );
@@ -94,12 +101,15 @@ void CSQC_Init(float apilevel, string enginename, float engineversion) {
CSQC_ConsoleCommand_Init();
CSQC_VGUI_Init();
-
Overview_Init();
pSeat.iOverview = FALSE;
}
+void CSQC_RendererRestarted( string sDescr ) {
+ Overview_Init();
+}
+
/*
=================
CSQC_WorldLoaded
diff --git a/Source/Client/Overview.c b/Source/Client/Overview.c
index 27029751..6bc3dd8f 100755
--- a/Source/Client/Overview.c
+++ b/Source/Client/Overview.c
@@ -31,6 +31,11 @@ typedef struct {
int iRotated;
float fHeight;
string sImagePath;
+ float fCameraHeight;
+ vector vVert1;
+ vector vVert2;
+ vector vVert3;
+ vector vVert4;
} overview_t;
overview_t ovMap;
@@ -43,6 +48,9 @@ Initializes the globals and whatnot
=================
*/
void Overview_Init( void ) {
+ int *iImageSrc;
+ int iImageWidth = 0;
+ int iImageHeight = 0;
int iImageCount = 0;
string sTemp;
@@ -70,13 +78,69 @@ void Overview_Init( void ) {
}
}
fclose( fOverview );
- ovMap.sImagePath = sprintf( "overviews/%s.bmp", mapname );
} else {
- error( sprintf( "[OVERVIEW] Couldn't load overviews/%s.txt", mapname ) );
+ print( sprintf( "[OVERVIEW] Couldn't load overviews/%s.txt\n", mapname ) );
ovMap.sImagePath = __NULL__;
+ return;
+ }
+
+ if ( ovMap.iRotated == TRUE ) {
+ ovMap.vVert1 = ovMap.vOrigin -( ( 4096/ovMap.fZoom ) * '1 0.75 0' );
+ ovMap.vVert4 = ovMap.vOrigin + ( 4096/ovMap.fZoom ) * '1 0.75 0';
+ ovMap.vVert2 = [ ovMap.vVert1[0], ovMap.vVert4[1] ] ;
+ ovMap.vVert3 = [ ovMap.vVert4[0], ovMap.vVert1[1] ] ;
+ } else {
+ ovMap.vVert1 = ovMap.vOrigin -( ( 4096/ovMap.fZoom ) * '0.75 1 0' );
+ ovMap.vVert4 = ovMap.vOrigin + ( 4096/ovMap.fZoom ) * '0.75 1 0';
+ ovMap.vVert2 = [ ovMap.vVert1[0], ovMap.vVert4[1] ] ;
+ ovMap.vVert3 = [ ovMap.vVert4[0], ovMap.vVert1[1] ] ;
+ }
+
+ ovMap.fCameraHeight = fabs( 4096/ovMap.fZoom );
+
+ ovMap.sImagePath = "overview";
+ shaderforname( ovMap.sImagePath, sprintf("{\n{\nprogram default2d\nmap $rt:%s\n}\n}\n", ovMap.sImagePath ) );
+
+ // Read the image and get rid of the burning green
+ iImageSrc = r_readimage( sprintf( "overviews/%s.bmp", mapname ), iImageWidth, iImageHeight );
+ if ( iImageSrc != __NULL__ ) {
+ for ( int i = 0; i < ( iImageWidth * iImageHeight ); i++ ) {
+ if ( iImageSrc[ i ] == 0xff00ff00i ) {
+ iImageSrc[ i ] = 0x00000000i;
+ }
+ }
+ r_uploadimage( ovMap.sImagePath, iImageWidth, iImageHeight, iImageSrc );
+ memfree( iImageSrc );
}
}
+void Overview_DrawLayer( void ) {
+ if ( ovMap.iRotated == TRUE ) {
+ R_BeginPolygon( ovMap.sImagePath );
+ R_PolygonVertex( [ ovMap.vVert4[0], ovMap.vVert4[1], ovMap.fHeight ], '1 0', '1 1 1', 1.0f ); // Top Left
+ R_PolygonVertex( [ ovMap.vVert3[0], ovMap.vVert3[1], ovMap.fHeight ], '1 1', '1 1 1', 1.0f ); // Top Right
+ R_PolygonVertex( [ ovMap.vVert1[0], ovMap.vVert1[1], ovMap.fHeight ], '0 1', '1 1 1', 1.0f ); // Bottom right
+ R_PolygonVertex( [ ovMap.vVert2[0], ovMap.vVert2[1], ovMap.fHeight ], '0 0', '1 1 1', 1.0f ); // Bottom left
+ R_EndPolygon();
+ } else {
+ R_BeginPolygon( ovMap.sImagePath );
+ R_PolygonVertex( [ ovMap.vVert4[0], ovMap.vVert4[1], ovMap.fHeight ], '0 0', '1 1 1', 1.0f ); // Top Left
+ R_PolygonVertex( [ ovMap.vVert3[0], ovMap.vVert3[1], ovMap.fHeight ], '1 0', '1 1 1', 1.0f ); // Top Right
+ R_PolygonVertex( [ ovMap.vVert1[0], ovMap.vVert1[1], ovMap.fHeight ], '1 1', '1 1 1', 1.0f ); // Bottom right
+ R_PolygonVertex( [ ovMap.vVert2[0], ovMap.vVert2[1], ovMap.fHeight ], '0 1', '1 1 1', 1.0f ); // Bottom left
+ R_EndPolygon();
+ }
+
+ for ( entity eFind = world; ( eFind = find( eFind, classname, "player" ) ); ) {
+ R_BeginPolygon( "sprites/iplayervip.spr_0.tga" );
+ R_PolygonVertex( [ eFind.absmax_x + 16, eFind.absmin_y - 16, ovMap.fHeight + 16 ], '1 0', '1 1 1', 1.0f ); // Top Right
+ R_PolygonVertex( [ eFind.absmin_x - 16, eFind.absmin_y - 16, ovMap.fHeight + 16 ], '0 0', '1 1 1', 1.0f ); // Top left
+ R_PolygonVertex( [ eFind.absmin_x - 16, eFind.absmax_y + 16, ovMap.fHeight + 16 ], '0 1', '1 1 1', 1.0f ); // Bottom left
+ R_PolygonVertex( [ eFind.absmax_x + 16, eFind.absmax_y + 16, ovMap.fHeight + 16 ], '1 1', '1 1 1', 1.0f ); // Bottom right
+ R_EndPolygon();
+ }
+
+}
/*
=================
@@ -87,57 +151,14 @@ This is for spectators.
=================
*/
void Overview_Draw( void ) {
- float fCameraHeight;
- vector vVert1, vVert2, vVert3, vVert4;
-
if ( ovMap.sImagePath == __NULL__ ) {
return;
}
drawfill( vVideoMins, vVideoResolution, '0 0 0', 1.0f, 0 );
- if ( ovMap.iRotated == TRUE ) {
-
- vVert1 = ovMap.vOrigin -( ( 4096/ovMap.fZoom ) * '1 0.75 0' );
- vVert4 = ovMap.vOrigin + ( 4096/ovMap.fZoom ) * '1 0.75 0';
-
- vVert2 = [ vVert1_x, vVert4_y ] ;
- vVert3 = [ vVert4_x, vVert1_y ] ;
- R_BeginPolygon( ovMap.sImagePath );
- R_PolygonVertex( [ vVert4_x, vVert4_y, ovMap.fHeight ], '1 0', '1 1 1', 1.0f ); // Top Left
- R_PolygonVertex( [ vVert3_x, vVert3_y, ovMap.fHeight ], '1 1', '1 1 1', 1.0f ); // Top Right
- R_PolygonVertex( [ vVert2_x, vVert2_y, ovMap.fHeight ], '0 0', '1 1 1', 1.0f ); // Bottom left
- R_EndPolygon();
-
- R_BeginPolygon( ovMap.sImagePath );
- R_PolygonVertex( [ vVert1_x, vVert1_y, ovMap.fHeight ], '0 1', '1 1 1', 1.0f ); // Bottom right
- R_PolygonVertex( [ vVert2_x, vVert2_y, ovMap.fHeight ], '0 0', '1 1 1', 1.0f ); // Bottom left
- R_PolygonVertex( [ vVert3_x, vVert3_y, ovMap.fHeight ], '1 1', '1 1 1', 1.0f ); // Top Right
- R_EndPolygon();
-
- fCameraHeight = fabs( 4096/ovMap.fZoom );
- } else {
-
- vVert1 = ovMap.vOrigin -( ( 4096/ovMap.fZoom ) * '0.75 1 0' );
- vVert4 = ovMap.vOrigin + ( 4096/ovMap.fZoom ) * '0.75 1 0';
-
- vVert2 = [ vVert1_x, vVert4_y ] ;
- vVert3 = [ vVert4_x, vVert1_y ] ;
- R_BeginPolygon( ovMap.sImagePath );
- R_PolygonVertex( [ vVert4_x, vVert4_y, ovMap.fHeight ], '0 0', '1 1 1', 1.0f ); // Top Left
- R_PolygonVertex( [ vVert3_x, vVert3_y, ovMap.fHeight ], '1 0', '1 1 1', 1.0f ); // Top Right
- R_PolygonVertex( [ vVert2_x, vVert2_y, ovMap.fHeight ], '0 1', '1 1 1', 1.0f ); // Bottom left
- R_EndPolygon();
-
- R_BeginPolygon( ovMap.sImagePath );
- R_PolygonVertex( [ vVert1_x, vVert1_y, ovMap.fHeight ], '1 1', '1 1 1', 1.0f ); // Bottom right
- R_PolygonVertex( [ vVert2_x, vVert2_y, ovMap.fHeight ], '0 1', '1 1 1', 1.0f ); // Bottom left
- R_PolygonVertex( [ vVert3_x, vVert3_y, ovMap.fHeight ], '1 0', '1 1 1', 1.0f ); // Top Right
- R_EndPolygon();
-
- fCameraHeight = fabs( 4096/ovMap.fZoom );
- }
+ Overview_DrawLayer();
makevectors( view_angles );
- setproperty( VF_ORIGIN, ovMap.vOrigin + ( v_forward * -fCameraHeight ) ) ;
+ setproperty( VF_ORIGIN, ovMap.vOrigin + ( v_forward * -ovMap.fCameraHeight ) ) ;
}
\ No newline at end of file
diff --git a/Source/Client/View.c b/Source/Client/View.c
index febc098f..6223aa8f 100755
--- a/Source/Client/View.c
+++ b/Source/Client/View.c
@@ -90,6 +90,26 @@ void View_AddPunchAngle( vector vAdd ) {
pSeat->vPunchAngle += vAdd;
}
+void View_ShellEject( void ) {
+ static void View_ShellEject_Death( void ) {
+ remove( self );
+ }
+ vector vOrigin = pSeat->vPlayerOrigin;
+ vector vEndPos = gettaginfo( pSeat->eViewModel, pSeat->fEjectBone );
+ makevectors( view_angles );
+
+ vOrigin += ( v_forward * vEndPos_x ) + ( v_right * -vEndPos_y ) + ( v_up * vEndPos_z ) + [ 0, 0, getstatf( STAT_VIEWHEIGHT ) ];
+
+ entity eShell = spawn();
+ setorigin( eShell, vOrigin );
+ setmodel( eShell, sShellModel[ wptTable[ getstati( STAT_ACTIVEWEAPON ) ].iShellType ] );
+ eShell.movetype = MOVETYPE_BOUNCE;
+ eShell.drawmask = MASK_ENGINE;
+ eShell.velocity = pSeat->vPlayerVelocity + ( v_up * random( 70, 120 ) ) + ( v_right * -random( 50, 70 ) );
+ eShell.think = View_ShellEject_Death;
+ eShell.nextthink = time + 2.5f;
+}
+
/*
====================
View_ProcessEvent
@@ -103,21 +123,25 @@ void View_ProcessEvent( float fTimeStamp, int iCode, string sData ) {
pSeat->eMuzzleflash.scale = 0.5;
pSeat->eMuzzleflash.skin = pSeat->fNumBones;
setmodel( pSeat->eMuzzleflash, sprintf( "sprites/muzzleflash%s.spr", substring( sData, 1, 1 ) ) );
+ View_ShellEject();
} else if( iCode == 5011 ) {
pSeat->eMuzzleflash.alpha = 1.0f;
pSeat->eMuzzleflash.scale = 0.5;
pSeat->eMuzzleflash.skin = pSeat->fNumBones + 1;
setmodel( pSeat->eMuzzleflash, sprintf( "sprites/muzzleflash%s.spr", substring( sData, 1, 1 ) ) );
+ View_ShellEject();
} else if ( iCode == 5021 ) {
pSeat->eMuzzleflash.alpha = 1.0f;
pSeat->eMuzzleflash.scale = 0.5;
pSeat->eMuzzleflash.skin = pSeat->fNumBones + 2;
setmodel( pSeat->eMuzzleflash, sprintf( "sprites/muzzleflash%s.spr", substring( sData, 1, 1 ) ) );
+ View_ShellEject();
} else if ( iCode == 5031 ) {
pSeat->eMuzzleflash.alpha = 1.0f;
pSeat->eMuzzleflash.scale = 0.5;
pSeat->eMuzzleflash.skin = pSeat->fNumBones + 3;
setmodel( pSeat->eMuzzleflash, sprintf( "sprites/muzzleflash%s.spr", substring( sData, 1, 1 ) ) );
+ View_ShellEject();
}
}
@@ -156,6 +180,7 @@ void View_DrawViewModel( void ) {
skel_delete( eMuzzleflash.skeletonindex );
eMuzzleflash.skeletonindex = skel_create( eViewModel.modelindex );
pSeat->fNumBones = skel_get_numbones( eMuzzleflash.skeletonindex ) + 1;
+ pSeat->fEjectBone = pSeat->fNumBones + 1;
}
}
}
diff --git a/Source/FreeCS-CE.prj b/Source/FreeCS-CE.prj
index 162415a1..b021c670 100644
--- a/Source/FreeCS-CE.prj
+++ b/Source/FreeCS-CE.prj
@@ -63,7 +63,7 @@
-
+
@@ -117,5 +117,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Globals.h b/Source/Globals.h
index d4de07f0..a04b9cbe 100755
--- a/Source/Globals.h
+++ b/Source/Globals.h
@@ -200,8 +200,16 @@ typedef struct {
int iCrosshairDeltaDistance; // Scale factor of sorts
float fWeaponArmorRatio; // Some weapons seem to do more damage to the kevlar than others I guess
float fAnimType;
+ int iShellType; // Type of shell the weapon ejects
} weaponinfo_t;
+enum {
+ SHELL_PISTOL,
+ SHELL_RIFLE,
+ SHELL_RIFLEBIG,
+ SHELL_SHOTGUN
+};
+
typedef struct {
int iID;
int iPrice;
diff --git a/Source/Menu/MenuMultiplayer.c b/Source/Menu/MenuMultiplayer.c
index 6ebcf6c5..ceecb61f 100755
--- a/Source/Menu/MenuMultiplayer.c
+++ b/Source/Menu/MenuMultiplayer.c
@@ -65,7 +65,7 @@ void Menu_Multiplayer_Find_Item( vector vPosition, int i, __inout int iSelected
iSelected = i;
fInputKeyCode = 0;
fMouseClick = FALSE;
- fServerClickTime = time + 0.2;
+ fServerClickTime = time + 0.5;
} else {
if ( fServerClickTime > time ) {
Menu_Multiplayer_Connect( i );
@@ -82,12 +82,12 @@ void Menu_Multiplayer_Find_Item( vector vPosition, int i, __inout int iSelected
if ( iSelected == i ) {
drawfill( [ vPosition_x, vPosition_y - 1 ], [ 397, 10 ], '1 1 1', 0.5, 2 );
drawstring( [vPosition_x + 8, vPosition_y], sprintf( "%.25s", gethostcachestring( fldName, i ) ), '8 8 0', '1 1 1', 1.0f, FALSE );
- drawstring( [vPosition_x + 218, vPosition_y], sprintf( "%.10s", gethostcachestring( fldMap, i ) ), '8 8 0', '1 1 1', 1.0f, FALSE );
+ drawstring( [vPosition_x + 186, vPosition_y], sprintf( "%.10s", gethostcachestring( fldMap, i ) ), '8 8 0', '1 1 1', 1.0f, FALSE );
drawstring( [vPosition_x + 298, vPosition_y], sprintf( "%d/%d", gethostcachenumber( fldPlayers, i ), gethostcachenumber( fldMaxplayers, i ) ), '8 8 0', '1 1 1', 1.0f, FALSE );
drawstring( [vPosition_x + 362, vPosition_y], sprintf( "%.3s", ftos( gethostcachenumber( fldPing, i ) ) ), '8 8 0', '1 1 1', 1.0f, FALSE );
} else {
drawstring( [vPosition_x + 8, vPosition_y], sprintf( "^3%.25s", gethostcachestring( fldName, i ) ), '8 8 0', '1 1 1', fItemAlpha, FALSE );
- drawstring( [vPosition_x + 218, vPosition_y], sprintf( "%.10s", gethostcachestring( fldMap, i ) ), '8 8 0', '1 1 1', fItemAlpha, FALSE );
+ drawstring( [vPosition_x + 186, vPosition_y], sprintf( "%.10s", gethostcachestring( fldMap, i ) ), '8 8 0', '1 1 1', fItemAlpha, FALSE );
drawstring( [vPosition_x + 298, vPosition_y], sprintf( "%d/%d", gethostcachenumber( fldPlayers, i ), gethostcachenumber( fldMaxplayers, i ) ), '8 8 0', '1 1 1', fItemAlpha, FALSE );
drawstring( [vPosition_x + 362, vPosition_y], sprintf( "%.3s", ftos( gethostcachenumber( fldPing, i ) ) ), '8 8 0', '1 1 1', fItemAlpha, FALSE );
}
@@ -150,9 +150,11 @@ void Menu_Multiplayer( void ) {
Object_Button( '32 180', BTN_CREATE, Multiplayer_ButtonCreate, fButtonAlpha[1] );
Object_Button( '32 212', BTN_GAMEINFO, __NULL__, fButtonAlpha[2] );
Object_Button( '32 244', BTN_REFRESHLIST, Multiplayer_ButtonRefresh, fButtonAlpha[3] );
+
if ( checkcommand( "irc" ) ) {
Object_Button( '32 276', BTN_IRCCHAT, Multiplayer_ButtonIRC, fButtonAlpha[4] );
}
+
Object_Button( '32 308', BTN_DONE, Multiplayer_ButtonDone, fButtonAlpha[5] );
Menu_ResetClipArea();
@@ -160,7 +162,7 @@ void Menu_Multiplayer( void ) {
Object_Scrollbar( '604 140', 308, iScrollServer );
Object_Label( '208 124', _("MP_GAME"), '8 8' );
- Object_Label( '418 124', _("MP_MAP"), '8 8' );
+ Object_Label( '386 124', _("MP_MAP"), '8 8' );
Object_Label( '498 124', _("MP_PLAYERS"), '8 8' );
Object_Label( '562 124', _("MP_PING"), '8 8' );
diff --git a/Source/Server/Damage.c b/Source/Server/Damage.c
index 5f27b2e6..11d5676a 100755
--- a/Source/Server/Damage.c
+++ b/Source/Server/Damage.c
@@ -174,7 +174,7 @@ void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos
eAttacker.frags--;
}
- Damage_CastOrbituary( eAttacker, eTarget, eAttacker.weapon, FALSE );
+ Damage_CastOrbituary( eAttacker, eTarget, eAttacker.weapon, trace_surface_id == BODY_HEAD ? TRUE:FALSE );
}
}
diff --git a/Source/Server/Input.c b/Source/Server/Input.c
index ced9bdc8..30dcf0b8 100755
--- a/Source/Server/Input.c
+++ b/Source/Server/Input.c
@@ -30,6 +30,10 @@ void Input_Handle( void ) {
return;
}
+ if ( fGameState == GAME_FREEZE ) {
+ return;
+ }
+
// TODO: Make this fast switch only
if ( self.impulse == 3 ) {
Weapon_Switch( SLOT_MELEE );
diff --git a/Source/Shared/WeaponAK47.c b/Source/Shared/WeaponAK47.c
index eb19ef79..7aae84d2 100755
--- a/Source/Shared/WeaponAK47.c
+++ b/Source/Shared/WeaponAK47.c
@@ -44,7 +44,8 @@ weaponinfo_t wptAK47 = {
4, // Minimum Crosshair Distance
4, // Crosshair Movement Delta
1.55, // Armor penetration ratio
- ATYPE_AK47 // Animation Type
+ ATYPE_AK47, // Animation Type
+ SHELL_RIFLE
};
// Anim Table
diff --git a/Source/Shared/WeaponAUG.c b/Source/Shared/WeaponAUG.c
index 91bd2e7a..c8027fce 100755
--- a/Source/Shared/WeaponAUG.c
+++ b/Source/Shared/WeaponAUG.c
@@ -44,7 +44,8 @@ weaponinfo_t wptAUG = {
3, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.4, // Armor penetration ratio
- ATYPE_RIFLE // Animation Type
+ ATYPE_RIFLE, // Animation Type
+ SHELL_RIFLE
};
// Anim Table
diff --git a/Source/Shared/WeaponAWP.c b/Source/Shared/WeaponAWP.c
index 4ec02530..44fdad97 100755
--- a/Source/Shared/WeaponAWP.c
+++ b/Source/Shared/WeaponAWP.c
@@ -44,7 +44,8 @@ weaponinfo_t wptAWP = {
8, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.95, // Armor penetration ratio
- ATYPE_CARBINE // Animation Type
+ ATYPE_CARBINE, // Animation Type
+ SHELL_RIFLEBIG
};
// Anim Table
diff --git a/Source/Shared/WeaponC4Bomb.c b/Source/Shared/WeaponC4Bomb.c
index c4e4e74c..7243f682 100755
--- a/Source/Shared/WeaponC4Bomb.c
+++ b/Source/Shared/WeaponC4Bomb.c
@@ -48,7 +48,8 @@ weaponinfo_t wptC4BOMB = {
8, // Minimum Crosshair Distance
4, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_C4 // Animation Type
+ ATYPE_C4, // Animation Type
+ FALSE
};
// Anim Table
diff --git a/Source/Shared/WeaponDeagle.c b/Source/Shared/WeaponDeagle.c
index 1c0dbce2..c7eb2bfc 100755
--- a/Source/Shared/WeaponDeagle.c
+++ b/Source/Shared/WeaponDeagle.c
@@ -44,7 +44,8 @@ weaponinfo_t wptDEAGLE = {
8, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.5, // Armor penetration ratio
- ATYPE_ONEHAND // Animation Type
+ ATYPE_ONEHAND, // Animation Type
+ SHELL_PISTOL
};
// Anim Table
diff --git a/Source/Shared/WeaponElites.c b/Source/Shared/WeaponElites.c
index cf096bcc..e4f25bfd 100755
--- a/Source/Shared/WeaponElites.c
+++ b/Source/Shared/WeaponElites.c
@@ -50,7 +50,8 @@ weaponinfo_t wptELITES = {
4, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.05, // Armor penetration ratio
- ATYPE_DUALPISTOLS // Animation Type
+ ATYPE_DUALPISTOLS, // Animation Type
+ SHELL_PISTOL
};
// Anim Table
diff --git a/Source/Shared/WeaponFiveSeven.c b/Source/Shared/WeaponFiveSeven.c
index 59eeac04..c27ae119 100755
--- a/Source/Shared/WeaponFiveSeven.c
+++ b/Source/Shared/WeaponFiveSeven.c
@@ -44,7 +44,8 @@ weaponinfo_t wptFIVESEVEN = {
8, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.5, // Armor penetration ratio
- ATYPE_ONEHAND // Animation Type
+ ATYPE_ONEHAND, // Animation Type
+ SHELL_PISTOL
};
// Anim Table
diff --git a/Source/Shared/WeaponFlashbang.c b/Source/Shared/WeaponFlashbang.c
index 23a4b149..7255038f 100755
--- a/Source/Shared/WeaponFlashbang.c
+++ b/Source/Shared/WeaponFlashbang.c
@@ -49,7 +49,8 @@ weaponinfo_t wptFLASHBANG = {
7, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_GRENADE // Animation Type
+ ATYPE_GRENADE, // Animation Type
+ FALSE
};
// Anim Table
diff --git a/Source/Shared/WeaponG3SG1.c b/Source/Shared/WeaponG3SG1.c
index a12de26f..3ed31aa7 100755
--- a/Source/Shared/WeaponG3SG1.c
+++ b/Source/Shared/WeaponG3SG1.c
@@ -44,7 +44,8 @@ weaponinfo_t wptG3SG1 = {
6, // Minimum Crosshair Distance
4, // Crosshair Movement Delta
1.65, // Armor penetration ratio
- ATYPE_CARBINE // Animation Type
+ ATYPE_CARBINE, // Animation Type
+ SHELL_RIFLE
};
// Anim Table
diff --git a/Source/Shared/WeaponGlock18.c b/Source/Shared/WeaponGlock18.c
index 83578dd1..516a9f88 100755
--- a/Source/Shared/WeaponGlock18.c
+++ b/Source/Shared/WeaponGlock18.c
@@ -50,7 +50,8 @@ weaponinfo_t wptGLOCK18 = {
8, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.05, // Armor penetration ratio
- ATYPE_ONEHAND // Animation Type
+ ATYPE_ONEHAND, // Animation Type
+ SHELL_PISTOL
};
// Anim Table
diff --git a/Source/Shared/WeaponHEGrenade.c b/Source/Shared/WeaponHEGrenade.c
index 1cc51e70..dc9cdc27 100755
--- a/Source/Shared/WeaponHEGrenade.c
+++ b/Source/Shared/WeaponHEGrenade.c
@@ -49,7 +49,8 @@ weaponinfo_t wptHEGRENADE = {
7, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_GRENADE // Animation Type
+ ATYPE_GRENADE, // Animation Type
+ FALSE
};
// Anim Table
diff --git a/Source/Shared/WeaponKnife.c b/Source/Shared/WeaponKnife.c
index 3b9b46c3..ee93ce7d 100755
--- a/Source/Shared/WeaponKnife.c
+++ b/Source/Shared/WeaponKnife.c
@@ -42,7 +42,8 @@ weaponinfo_t wptKNIFE = {
7, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.7, // Armor penetration ratio
- ATYPE_KNIFE // Animation Type
+ ATYPE_KNIFE, // Animation Type
+ FALSE
};
// Anim Table
diff --git a/Source/Shared/WeaponM3.c b/Source/Shared/WeaponM3.c
index 747fff26..e326fbb0 100755
--- a/Source/Shared/WeaponM3.c
+++ b/Source/Shared/WeaponM3.c
@@ -50,7 +50,8 @@ weaponinfo_t wptM3 = {
8, // Minimum Crosshair Distance
6, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_SHOTGUN // Animation Type
+ ATYPE_SHOTGUN, // Animation Type
+ SHELL_SHOTGUN
};
// Anim Table
diff --git a/Source/Shared/WeaponM4A1.c b/Source/Shared/WeaponM4A1.c
index b4d9eb01..81aa80f2 100755
--- a/Source/Shared/WeaponM4A1.c
+++ b/Source/Shared/WeaponM4A1.c
@@ -50,7 +50,8 @@ weaponinfo_t wptM4A1 = {
4, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.4, // Armor penetration ratio
- ATYPE_RIFLE // Animation Type
+ ATYPE_RIFLE, // Animation Type
+ SHELL_RIFLE
};
enum {
diff --git a/Source/Shared/WeaponMP5.c b/Source/Shared/WeaponMP5.c
index fd2b5a22..74287f1d 100755
--- a/Source/Shared/WeaponMP5.c
+++ b/Source/Shared/WeaponMP5.c
@@ -44,7 +44,8 @@ weaponinfo_t wptMP5 = {
6, // Minimum Crosshair Distance
2, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_MP5 // Animation Type
+ ATYPE_MP5, // Animation Type
+ SHELL_PISTOL
};
// Anim Table
diff --git a/Source/Shared/WeaponMac10.c b/Source/Shared/WeaponMac10.c
index 07b69734..96b459f9 100755
--- a/Source/Shared/WeaponMac10.c
+++ b/Source/Shared/WeaponMac10.c
@@ -44,7 +44,8 @@ weaponinfo_t wptMAC10 = {
9, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
0.95, // Armor penetration ratio
- ATYPE_MP5 // Animation Type
+ ATYPE_MP5, // Animation Type
+ SHELL_PISTOL
};
// Anim Table
diff --git a/Source/Shared/WeaponP228.c b/Source/Shared/WeaponP228.c
index e7f51789..e649b3b4 100755
--- a/Source/Shared/WeaponP228.c
+++ b/Source/Shared/WeaponP228.c
@@ -43,7 +43,8 @@ weaponinfo_t wptP228 = {
8, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.25, // Armor penetration ratio
- ATYPE_ONEHAND // Animation Type
+ ATYPE_ONEHAND, // Animation Type
+ SHELL_PISTOL
};
// Anim Table
diff --git a/Source/Shared/WeaponP90.c b/Source/Shared/WeaponP90.c
index 0b379709..710e8ff3 100755
--- a/Source/Shared/WeaponP90.c
+++ b/Source/Shared/WeaponP90.c
@@ -44,7 +44,8 @@ weaponinfo_t wptP90 = {
7, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.5, // Armor penetration ratio
- ATYPE_MP5 // Animation Type
+ ATYPE_MP5, // Animation Type
+ SHELL_RIFLE
};
// Anim Table
diff --git a/Source/Shared/WeaponPara.c b/Source/Shared/WeaponPara.c
index 159d15d7..55446141 100755
--- a/Source/Shared/WeaponPara.c
+++ b/Source/Shared/WeaponPara.c
@@ -44,7 +44,8 @@ weaponinfo_t wptPARA = {
6, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.6, // Armor penetration ratio
- ATYPE_PARA // Animation Type
+ ATYPE_PARA, // Animation Type
+ SHELL_RIFLEBIG
};
// Anim Table
diff --git a/Source/Shared/WeaponSG550.c b/Source/Shared/WeaponSG550.c
index d8619c31..b53c69aa 100755
--- a/Source/Shared/WeaponSG550.c
+++ b/Source/Shared/WeaponSG550.c
@@ -44,7 +44,8 @@ weaponinfo_t wptSG550 = {
5, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.45, // Armor penetration ratio
- ATYPE_RIFLE // Animation Type
+ ATYPE_RIFLE, // Animation Type
+ SHELL_RIFLE
};
// Anim Table
diff --git a/Source/Shared/WeaponSG552.c b/Source/Shared/WeaponSG552.c
index 7be2182e..73c8fdc2 100755
--- a/Source/Shared/WeaponSG552.c
+++ b/Source/Shared/WeaponSG552.c
@@ -44,7 +44,8 @@ weaponinfo_t wptSG552 = {
5, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.4, // Armor penetration ratio
- ATYPE_RIFLE // Animation Type
+ ATYPE_RIFLE, // Animation Type
+ SHELL_RIFLE
};
// Anim Table
diff --git a/Source/Shared/WeaponScout.c b/Source/Shared/WeaponScout.c
index 9498e769..fc6d6a5a 100755
--- a/Source/Shared/WeaponScout.c
+++ b/Source/Shared/WeaponScout.c
@@ -44,7 +44,8 @@ weaponinfo_t wptSCOUT = {
5, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.7, // Armor penetration ratio
- ATYPE_CARBINE // Animation Type
+ ATYPE_CARBINE, // Animation Type
+ SHELL_RIFLE
};
// Anim Table
diff --git a/Source/Shared/WeaponSmokeGrenade.c b/Source/Shared/WeaponSmokeGrenade.c
index 615e7130..00a5be56 100755
--- a/Source/Shared/WeaponSmokeGrenade.c
+++ b/Source/Shared/WeaponSmokeGrenade.c
@@ -49,7 +49,8 @@ weaponinfo_t wptSMOKEGRENADE = {
7, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_GRENADE // Animation Type
+ ATYPE_GRENADE, // Animation Type
+ FALSE
};
// Anim Table
diff --git a/Source/Shared/WeaponTMP.c b/Source/Shared/WeaponTMP.c
index c6735d9e..b8135ebf 100755
--- a/Source/Shared/WeaponTMP.c
+++ b/Source/Shared/WeaponTMP.c
@@ -44,7 +44,8 @@ weaponinfo_t wptTMP = {
7, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_MP5 // Animation Type
+ ATYPE_MP5, // Animation Type
+ SHELL_PISTOL
};
// Anim Table
diff --git a/Source/Shared/WeaponUMP45.c b/Source/Shared/WeaponUMP45.c
index 6ca089af..b2d4dada 100755
--- a/Source/Shared/WeaponUMP45.c
+++ b/Source/Shared/WeaponUMP45.c
@@ -44,7 +44,8 @@ weaponinfo_t wptUMP45 = {
6, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_MP5 // Animation Type
+ ATYPE_MP5, // Animation Type
+ SHELL_RIFLE
};
// Anim Table
diff --git a/Source/Shared/WeaponUSP45.c b/Source/Shared/WeaponUSP45.c
index 0cb3698f..6788cfb1 100755
--- a/Source/Shared/WeaponUSP45.c
+++ b/Source/Shared/WeaponUSP45.c
@@ -50,7 +50,8 @@ weaponinfo_t wptUSP45 = {
8, // Minimum Crosshair Distance
3, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_ONEHAND // Animation Type
+ ATYPE_ONEHAND, // Animation Type
+ SHELL_PISTOL
};
enum {
diff --git a/Source/Shared/WeaponXM1014.c b/Source/Shared/WeaponXM1014.c
index 99c332ed..ff00b197 100755
--- a/Source/Shared/WeaponXM1014.c
+++ b/Source/Shared/WeaponXM1014.c
@@ -50,7 +50,8 @@ weaponinfo_t wptXM1014 = {
9, // Minimum Crosshair Distance
4, // Crosshair Movement Delta
1.0, // Armor penetration ratio
- ATYPE_SHOTGUN // Animation Type
+ ATYPE_SHOTGUN, // Animation Type
+ SHELL_SHOTGUN
};
// Anim Table
diff --git a/freecs/csprogs.dat b/freecs/csprogs.dat
index 1e457d61..7d927b84 100644
Binary files a/freecs/csprogs.dat and b/freecs/csprogs.dat differ
diff --git a/freecs/menu.dat b/freecs/menu.dat
index ac57ed18..e315ec28 100755
Binary files a/freecs/menu.dat and b/freecs/menu.dat differ
diff --git a/freecs/progs.dat b/freecs/progs.dat
index cce683fb..7d69758e 100644
Binary files a/freecs/progs.dat and b/freecs/progs.dat differ