diff --git a/Source/Builtins.h b/Source/Builtins.h index 01c17dbf..78c958f3 100644 --- a/Source/Builtins.h +++ b/Source/Builtins.h @@ -182,8 +182,10 @@ Available options: #define FTE_FORCEINFOKEY /* Provides an easy way to change a user's userinfo from the server. */ #define FTE_GFX_QUAKE3SHADERS /* specifies that the engine has full support for vanilla quake3 shaders */ #define FTE_GFX_REMAPSHADER /* With the raw power of stuffcmds, the r_remapshader console command is exposed! This mystical command can be used to remap any shader to another. Remapped shaders that specify $diffuse etc in some form will inherit the textures implied by the surface. */ +#define FTE_GFX_MODELEVENTS /* Provides a query for per-animation events in model files, including from progs/foo.mdl.events files. */ #define FTE_ISBACKBUFFERED /* Allows you to check if a client has too many reliable messages pending. */ #define FTE_MEMALLOC /* Allows dynamically allocating memory. Use pointers to access this memory. Memory will not be saved into saved games. */ +#define FTE_MEDIA_AVI /* playfilm command supports avi files. */ #define FTE_MEDIA_CIN /* playfilm command supports q2 cin files. */ #define FTE_MEDIA_ROQ /* playfilm command supports q3 roq files. */ #define FTE_MULTIPROGS /* Multiple progs.dat files can be loaded inside the same qcvm. Insert new ones with addprogs inside the 'init' function, and use externvalue+externset to rewrite globals (and hook functions) to link them together. Note that the result is generally not very clean unless you carefully design for it beforehand. */ @@ -1886,8 +1888,10 @@ void(string dest, string content) sendpacket = #242; /* Part of FTE_QC_SENDPACKE #ifdef CSQC vector(entity ent, float tagnum) rotatevectorsbytag = #244; #endif -#ifdef SSQC +#if defined(CSQC) || defined(SSQC) float(float dividend, float divisor) mod = #245; +#endif +#ifdef SSQC float(optional string host, optional string user, optional string pass, optional string defaultdb, optional string driver) sqlconnect = #250; /* Part of FTE_SQL*/ void(float serveridx) sqldisconnect = #251; /* Part of FTE_SQL*/ float(float serveridx, void(float serveridx, float queryidx, float rows, float columns, float eof, float firstrow) callback, float querytype, string query) sqlopenquery = #252; /* Part of FTE_SQL*/ @@ -1969,6 +1973,12 @@ float(float modidx, string framename) frameforname = #276; /* Part of FTE_CSQC_S float(float modidx, float framenum) frameduration = #277; /* Part of FTE_CSQC_SKELETONOBJECTS Retrieves the duration (in seconds) of the specified framegroup. */ +float(float modidx, float framenum, __inout float basetime, float targettime, __inout float code, __inout string data) getnextmodelevent = #0:getnextmodelevent; /* Part of FTE_GFX_MODELEVENTS + Reports the next event within a model's animation. Returns a boolean if an event was found between basetime and targettime. Writes to basetime,code,data arguments (if an event was found, basetime is set to the event's time, otherwise to targettime). WARNING: this builtin cannot deal with multiple events with the same timestamp (only the first will be reported). */ + +float(float modidx, float framenum, int eventidx, __out float timestamp, __out int code, __out string data) getmodeleventidx = #0:getmodeleventidx; /* + Reports an indexed event within a model's animation. Writes to timestamp,code,data arguments on success. Returns false if the animation/event/model was out of range/invalid. Does not consider looping animations (retry from index 0 if it fails and you know that its a looping animation). This builtin is more annoying to use than getnextmodelevent, but can be made to deal with multiple events with the exact same timestamp. */ + #endif #define dotproduct(v1,v2) ((vector)(v1)*(vector)(v2)) vector(vector v1, vector v2) crossproduct = #0:crossproduct; /* Part of FTE_QC_CROSSPRODUCT @@ -2220,12 +2230,13 @@ void(vector pivot, vector mins, vector maxs, string pic, vector txmin, vector tx #endif #ifdef CSQC -float(float stnum) getstati = #330; /* +#define getstati_punf(stnum) (float)(__variant)getstati(stnum) +int(float stnum) getstati = #330; /* Retrieves the numerical value of the given EV_INTEGER or EV_ENTITY stat (converted to a float). */ #define getstatbits getstatf float(float stnum, optional float firstbit, optional float bitcount) getstatf = #331; /* - Retrieves the numerical value of the given EV_FLOAT stat. If firstbit and bitcount are specified, retrieves the upper bits of the STAT_ITEMS stat. */ + Retrieves the numerical value of the given EV_FLOAT stat. If firstbit and bitcount are specified, retrieves the upper bits of the STAT_ITEMS stat (converted into a float, so there are no VM dependancies). */ string(float stnum) getstats = #332; /* Retrieves the value of the given EV_STRING stat, as a tempstring. diff --git a/Source/Client/Defs.h b/Source/Client/Defs.h index d545d5dc..6e2d6eb0 100644 --- a/Source/Client/Defs.h +++ b/Source/Client/Defs.h @@ -75,7 +75,6 @@ vector vCameraAngle; float fCameraTime; void View_PlayAnimation( int iSequence ); -void Sound_Delayed( string sSample, float fVol, float fDelay ); // This actually belongs in Builtins.h since its an undocumented global vector pmove_vel; diff --git a/Source/Client/Init.c b/Source/Client/Init.c index 9666e541..77b9b273 100644 --- a/Source/Client/Init.c +++ b/Source/Client/Init.c @@ -32,6 +32,8 @@ void CSQC_Init(float apilevel, string enginename, float engineversion) { //} precache_model( HUD_NUMFILE ); + + precache_model( "sprites/muzzleflash1.spr" ); precache_model( "sprites/radar640.spr" ); precache_model( "sprites/640hud1.spr" ); precache_model( "sprites/640hud16.spr" ); @@ -59,7 +61,7 @@ void CSQC_Init(float apilevel, string enginename, float engineversion) { precache_sound( "debris/bustconcrete2.wav" ); precache_sound( "debris/bustceiling1.wav" ); - for ( int i = 1; i < CS_WEAPON_COUNT; i++ ) { + for ( int i = 0; i < ( CS_WEAPON_COUNT - 1 ); i++ ) { precache_model( sViewModels[ i ] ); } diff --git a/Source/Client/Project b/Source/Client/Project index 53b4485f..c1800fc3 100644 --- a/Source/Client/Project +++ b/Source/Client/Project @@ -58,7 +58,7 @@ CFT_00_LB=_Compile CFT_00_CM=fteqcc CFT_00_WD= CFT_01_LB=_Build -CFT_01_CM=fteqcc" +CFT_01_CM=fteqcc CFT_01_WD= CFT_02_LB=_Lint CFT_02_CM=fteqcc diff --git a/Source/Client/Sound.c b/Source/Client/Sound.c index c3ace4e0..33835d3f 100644 --- a/Source/Client/Sound.c +++ b/Source/Client/Sound.c @@ -21,24 +21,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /*float CSQC_Event_Sound( float entnum, float channel, string soundname, float vol, float attenuation, vector pos, float pitchmod, float flags ) { }*/ - -/* -================= -Sound_Delayed - -Now you can call sounds in advance -================= -*/ -void Sound_Delayed( string sSample, float fVol, float fDelay ) { - static void Sound_Delayed_PlayBack( void ) { - //print( sprintf( "[SOUND] Playing Event %s\n", self.sSoundSample ) ); - localsound( self.sSoundSample, CHAN_AUTO, self.fVolume ); - remove( self ); - } - entity eSound = spawn(); - eSound.classname = "event_sound"; - eSound.think = Sound_Delayed_PlayBack; - eSound.sSoundSample = sSample; - eSound.fVolume = fVol; - eSound.nextthink = time + fDelay; -} diff --git a/Source/Client/VGUIBuyMenu.c b/Source/Client/VGUIBuyMenu.c index 8f89b0ea..9a01a818 100644 --- a/Source/Client/VGUIBuyMenu.c +++ b/Source/Client/VGUIBuyMenu.c @@ -247,7 +247,7 @@ VGUI_BuyMenu_Rifles void VGUI_BuyMenu_Rifles( vector vPos ) { vVGUIButtonPos = vPos + '16 116 0'; - if ( getstati( STAT_TEAM ) == TEAM_T ) { + if ( stof( getplayerkeyvalue( player_localnum, "*team" ) ) == TEAM_T ) { VGUI_BuyMenu_WeaponButton( WEAPON_AK47 ); VGUI_BuyMenu_WeaponButton( WEAPON_SG552 ); @@ -257,7 +257,7 @@ void VGUI_BuyMenu_Rifles( vector vPos ) { VGUI_BuyMenu_WeaponButton( WEAPON_G3SG1 ); } - if ( getstati( STAT_TEAM ) == TEAM_CT ) { + if ( stof( getplayerkeyvalue( player_localnum, "*team" ) ) == TEAM_CT ) { VGUI_BuyMenu_WeaponButton( WEAPON_M4A1 ); VGUI_BuyMenu_WeaponButton( WEAPON_AUG ); diff --git a/Source/Client/View.c b/Source/Client/View.c index 3ffbba4f..4acf91c6 100644 --- a/Source/Client/View.c +++ b/Source/Client/View.c @@ -18,8 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -string sViewModels[ CS_WEAPON_COUNT ] = { - "", +string sViewModels[ CS_WEAPON_COUNT - 1 ] = { "models/v_knife.mdl", "models/v_usp.mdl", "models/v_glock18.mdl", @@ -82,23 +81,56 @@ float View_CalcBob( void ) { return fBob; } - + entity eViewModel; +entity eMuzzleflash; + void View_DrawViewModel( void ) { static float fLastTime; static float fBob; + static float fLastWeapon; + if( !eViewModel ) { eViewModel = spawn(); eViewModel.renderflags = RF_DEPTHHACK; + + eMuzzleflash = spawn(); + setmodel( eMuzzleflash, "sprites/muzzleflash1.spr" ); + eMuzzleflash.renderflags = RF_DEPTHHACK | RF_ADDITIVE; } + // Don't update when paused if ( time != fLastTime ) { fBob = View_CalcBob(); + if( getstatf( STAT_ACTIVEWEAPON ) < CS_WEAPON_COUNT ) { - setmodel( eViewModel, sViewModels[ getstatf( STAT_ACTIVEWEAPON ) ] ); + if ( fLastWeapon != getstatf( STAT_ACTIVEWEAPON ) ) { + setmodel( eViewModel, sViewModels[ getstatf( STAT_ACTIVEWEAPON ) - 1 ] ); + + eMuzzleflash.skeletonindex = skel_create( eViewModel.modelindex ); + eMuzzleflash.skin = skel_get_numbones( eMuzzleflash.skeletonindex ) + 1; + fLastWeapon = getstatf( STAT_ACTIVEWEAPON ); + } } - + + // Take away alpha once it has drawn fully at least once + if ( eMuzzleflash.alpha > 0.0f ) { + eMuzzleflash.alpha -= ( frametime * 45 ); + } + + static float fBaseTime; + static float fCode; + static string sData ; + getnextmodelevent( eViewModel.modelindex, eViewModel.frame, fBaseTime, eViewModel.frame1time - 0.001, fCode, sData ); + + if ( fCode == 5004 ) { + localsound( sData, CHAN_AUTO, 1.0 ); + } else if ( fCode == 5001 ) { + eMuzzleflash.alpha = 1.0f; + eMuzzleflash.scale = stof( sData ) * 0.01; + } + eViewModel.frame1time += frametime; } @@ -112,10 +144,18 @@ void View_DrawViewModel( void ) { } fLastTime = time; + + // Update muzzleflash position and draw it + if ( eMuzzleflash.alpha > 0.0f ) { + eMuzzleflash.origin = gettaginfo( eViewModel, eMuzzleflash.skin ); + dynamiclight_add( eMuzzleflash.origin, 400 * eMuzzleflash.alpha, '1 0.45 0'); + addentity( eMuzzleflash ); + } + addentity( eViewModel ); } void View_PlayAnimation( int iSequence ) { eViewModel.frame = (float)iSequence; - eViewModel.frame1time = 0; + eViewModel.frame1time = 0.0f; } diff --git a/Source/Shared/WeaponAK47.c b/Source/Shared/WeaponAK47.c index d76246e4..0b80de40 100644 --- a/Source/Shared/WeaponAK47.c +++ b/Source/Shared/WeaponAK47.c @@ -62,7 +62,6 @@ void WeaponAK47_Draw( void ) { OpenCSGunBase_Draw(); #else View_PlayAnimation( ANIM_AK47_DRAW ); - Sound_Delayed( "weapons/ak47_boltpull.wav", 1.0, 0.5 ); #endif } @@ -96,7 +95,5 @@ void WeaponAK47_Reload( void ) { } #else View_PlayAnimation( ANIM_AK47_RELOAD ); - Sound_Delayed( "weapons/ak47_clipout.wav", 1.0, 0.6 ); - Sound_Delayed( "weapons/ak47_clipin.wav", 1.0, 1.5 ); #endif } diff --git a/Source/Shared/WeaponAUG.c b/Source/Shared/WeaponAUG.c index 0f5c6852..865a7ca7 100644 --- a/Source/Shared/WeaponAUG.c +++ b/Source/Shared/WeaponAUG.c @@ -62,7 +62,6 @@ void WeaponAUG_Draw( void ) { OpenCSGunBase_Draw(); #else View_PlayAnimation( ANIM_AUG_DRAW ); - Sound_Delayed( "weapons/aug_boltpull.wav", 1.0, 0.5 ); #endif } @@ -104,10 +103,5 @@ void WeaponAUG_Reload( void ) { } #else View_PlayAnimation( ANIM_AUG_RELOAD ); - - Sound_Delayed( "weapons/aug_boltpull.wav", 1.0, 0.5 ); - Sound_Delayed( "weapons/aug_clipout.wav", 1.0, 1.3 ); - Sound_Delayed( "weapons/aug_clipin.wav", 1.0, 2.2 ); - Sound_Delayed( "weapons/aug_boltslap.wav", 1.0, 2.8 ); #endif } diff --git a/Source/Shared/WeaponAWP.c b/Source/Shared/WeaponAWP.c index b261f5e8..29cb4e29 100644 --- a/Source/Shared/WeaponAWP.c +++ b/Source/Shared/WeaponAWP.c @@ -62,7 +62,6 @@ void WeaponAWP_Draw( void ) { OpenCSGunBase_Draw(); #else View_PlayAnimation( ANIM_AWP_DRAW ); - Sound_Delayed( "weapons/awp_deploy.wav", 1.0, 0.5 ); #endif } @@ -83,7 +82,6 @@ void WeaponAWP_PrimaryFire( void ) { } OpenCSGunBase_ShotMultiplierHandle( 1 ); - Sound_Delayed( "weapons/awp_deploy.wav", 1.0, 0.4 ); #endif } @@ -108,8 +106,5 @@ void WeaponAWP_Reload( void ) { } #else View_PlayAnimation( ANIM_AWP_RELOAD ); - - Sound_Delayed( "weapons/awp_clipout.wav", 1.0, 0.9 ); - Sound_Delayed( "weapons/awp_clipin.wav", 1.0, 1.8 ); #endif } diff --git a/Source/Shared/WeaponBase.c b/Source/Shared/WeaponBase.c index cf653cc6..4bb2a77b 100644 --- a/Source/Shared/WeaponBase.c +++ b/Source/Shared/WeaponBase.c @@ -110,7 +110,6 @@ float OpenCSGunBase_PrimaryFire( void ) { self.(wptTable[ self.weapon ].iMagfld) -= 1; self.fAttackFinished = time + wptTable[ self.weapon ].fAttackFinished; Client_SendEvent( self, EV_WEAPON_PRIMARYATTACK ); - self.effects = self.effects | EF_MUZZLEFLASH; return TRUE; } diff --git a/Source/Shared/WeaponC4Bomb.c b/Source/Shared/WeaponC4Bomb.c index ad696bb7..2bb58f02 100644 --- a/Source/Shared/WeaponC4Bomb.c +++ b/Source/Shared/WeaponC4Bomb.c @@ -221,12 +221,5 @@ void WeaponC4BOMB_PrimaryFire( void ) { } #else View_PlayAnimation( ANIM_C4_ENTERCODE ); - Sound_Delayed( "weapons/c4_click.wav", 1.0, 1.18 ); - Sound_Delayed( "weapons/c4_click.wav", 1.0, 1.42 ); - Sound_Delayed( "weapons/c4_click.wav", 1.0, 1.63 ); - Sound_Delayed( "weapons/c4_click.wav", 1.0, 1.88 ); - Sound_Delayed( "weapons/c4_click.wav", 1.0, 2.12 ); - Sound_Delayed( "weapons/c4_click.wav", 1.0, 2.36 ); - Sound_Delayed( "weapons/c4_click.wav", 1.0, 2.55 ); #endif } diff --git a/Source/Shared/WeaponDeagle.c b/Source/Shared/WeaponDeagle.c index 3fd44d1c..48e737ec 100644 --- a/Source/Shared/WeaponDeagle.c +++ b/Source/Shared/WeaponDeagle.c @@ -96,7 +96,5 @@ void WeaponDEAGLE_Reload( void ) { } #else View_PlayAnimation( ANIM_DEAGLE_RELOAD ); - Sound_Delayed( "weapons/de_clipout.wav", 1.0, 0.5 ); - Sound_Delayed( "weapons/de_clipin.wav", 1.0, 1.2 ); #endif } diff --git a/Source/Shared/WeaponElites.c b/Source/Shared/WeaponElites.c index 02df8101..1ecd0c80 100644 --- a/Source/Shared/WeaponElites.c +++ b/Source/Shared/WeaponElites.c @@ -136,13 +136,6 @@ void WeaponELITES_Reload( void ) { } #else View_PlayAnimation( ANIM_ELITES_RELOAD ); - Sound_Delayed( "weapons/elite_reloadstart.wav", 1.0, 0.0 ); - Sound_Delayed( "weapons/elite_leftclipin.wav", 1.0, 1.5 ); - Sound_Delayed( "weapons/elite_clipout.wav", 1.0, 2.5 ); - Sound_Delayed( "weapons/elite_sliderelease.wav", 1.0, 2.7 ); - Sound_Delayed( "weapons/elite_rightclipin.wav", 1.0, 3.8 ); - Sound_Delayed( "weapons/elite_sliderelease.wav", 1.0, 4.2 ); - iWeaponMode_ELITES = 0; #endif } diff --git a/Source/Shared/WeaponFiveSeven.c b/Source/Shared/WeaponFiveSeven.c index cc61f7b9..5b473d09 100644 --- a/Source/Shared/WeaponFiveSeven.c +++ b/Source/Shared/WeaponFiveSeven.c @@ -62,7 +62,6 @@ void WeaponFIVESEVEN_Draw( void ) { OpenCSGunBase_Draw(); #else View_PlayAnimation( ANIM_FIVESEVEN_DRAW ); - Sound_Delayed( "weapons/fiveseven_slidepull.wav", 1.0, 0.5 ); #endif } @@ -92,9 +91,5 @@ void WeaponFIVESEVEN_Reload( void ) { } #else View_PlayAnimation( ANIM_FIVESEVEN_RELOAD ); - - Sound_Delayed( "weapons/p228_clipout.wav", 1.0, 0.5 ); - Sound_Delayed( "weapons/p228_clipin.wav", 1.0, 1.5 ); - Sound_Delayed( "weapons/p228_sliderelease.wav", 1.0, 2.4 ); #endif } diff --git a/Source/Shared/WeaponG3SG1.c b/Source/Shared/WeaponG3SG1.c index 20e5f6ba..d3f205e5 100644 --- a/Source/Shared/WeaponG3SG1.c +++ b/Source/Shared/WeaponG3SG1.c @@ -61,7 +61,6 @@ void WeaponG3SG1_Draw( void ) { OpenCSGunBase_Draw(); #else View_PlayAnimation( ANIM_G3SG1_DRAW ); - Sound_Delayed( "weapons/g3sg1_slide.wav", 1.0, 0.5 ); #endif } @@ -104,10 +103,5 @@ void WeaponG3SG1_Reload( void ) { } #else View_PlayAnimation( ANIM_G3SG1_RELOAD ); - - Sound_Delayed( "weapons/g3sg1_slide.wav", 1.0, 0.5 ); - Sound_Delayed( "weapons/g3sg1_clipout.wav", 1.0, 1.7 ); - Sound_Delayed( "weapons/g3sg1_clipin.wav", 1.0, 2.7 ); - Sound_Delayed( "weapons/g3sg1_slide.wav", 1.0, 3.7 ); #endif } diff --git a/Source/Shared/WeaponGlock18.c b/Source/Shared/WeaponGlock18.c index 6ef59a63..176dd101 100644 --- a/Source/Shared/WeaponGlock18.c +++ b/Source/Shared/WeaponGlock18.c @@ -79,7 +79,6 @@ void WeaponGLOCK18_Draw( void ) { } else { View_PlayAnimation( ANIM_GLOCK_DRAW2 ); } - Sound_Delayed( "weapons/slideback1.wav", 1.0, 0.5 ); #endif } @@ -150,14 +149,8 @@ void WeaponGLOCK18_Reload( void ) { #else if ( random() <= 0.5 ) { View_PlayAnimation( ANIM_GLOCK_RELOAD1 ); - Sound_Delayed( "weapons/clipout1.wav", 1.0, 0.6 ); - Sound_Delayed( "weapons/clipin1.wav", 1.0, 1.2 ); - Sound_Delayed( "weapons/sliderelease1.wav", 1.0, 1.9 ); } else { View_PlayAnimation( ANIM_GLOCK_RELOAD2 ); - Sound_Delayed( "weapons/clipout1.wav", 1.0, 0.6 ); - Sound_Delayed( "weapons/clipin1.wav", 1.0, 1.0 ); - Sound_Delayed( "weapons/sliderelease1.wav", 1.0, 1.7 ); } #endif } diff --git a/Source/Shared/WeaponM3.c b/Source/Shared/WeaponM3.c index d4f11491..33717034 100644 --- a/Source/Shared/WeaponM3.c +++ b/Source/Shared/WeaponM3.c @@ -69,7 +69,6 @@ void WeaponM3_Draw( void ) { OpenCSGunBase_Draw(); #else View_PlayAnimation( ANIM_M3_DRAW ); - Sound_Delayed( "weapons/m3_pump.wav", 1.0, 0.5 ); #endif } @@ -119,7 +118,6 @@ void WeaponM3_Secondary( void ) { self.nextthink = time + 0.5; #else View_PlayAnimation( ANIM_M3_INSERT ); - Sound_Delayed( "weapons/m3_insertshell.wav", 1.0, 0.25 ); #endif } @@ -146,7 +144,6 @@ void WeaponM3_Reload( void ) { View_PlayAnimation( ANIM_M3_RELOAD_START ); } else { View_PlayAnimation( ANIM_M3_RELOAD_END ); - Sound_Delayed( "weapons/m3_pump.wav", 1.0, 0.5 ); } #endif } diff --git a/Source/Shared/WeaponM4A1.c b/Source/Shared/WeaponM4A1.c index 14fa38f5..bee9798c 100644 --- a/Source/Shared/WeaponM4A1.c +++ b/Source/Shared/WeaponM4A1.c @@ -79,8 +79,6 @@ void WeaponM4A1_Draw( void ) { } else { View_PlayAnimation( ANIM_M4A1_DRAW ); } - - Sound_Delayed( "weapons/m4a1_boltpull.wav", 1.0, 0.5 ); #endif } @@ -136,10 +134,8 @@ void WeaponM4A1_Secondary( void ) { if ( iWeaponMode_M4A1 == TRUE ) { View_PlayAnimation( ANIM_M4A1_SILENCER_ADD ); - Sound_Delayed( "weapons/m4a1_silencer_on.wav", 1.0, 0.95 ); } else { View_PlayAnimation( ANIM_M4A1_SILENCER_REMOVE ); - Sound_Delayed( "weapons/m4a1_silencer_off.wav", 1.0, 0.6 ); } #endif } @@ -155,9 +151,5 @@ void WeaponM4A1_Reload( void ) { } else { View_PlayAnimation( ANIM_M4A1_RELOAD ); } - - Sound_Delayed( "weapons/m4a1_clipout.wav", 1.0, 0.5 ); - Sound_Delayed( "weapons/m4a1_clipin.wav", 1.0, 1.5 ); - Sound_Delayed( "weapons/m4a1_boltpull.wav", 1.0, 2.4 ); #endif } diff --git a/Source/Shared/WeaponMP5.c b/Source/Shared/WeaponMP5.c index 6ced15c0..57a7930d 100644 --- a/Source/Shared/WeaponMP5.c +++ b/Source/Shared/WeaponMP5.c @@ -62,7 +62,6 @@ void WeaponMP5_Draw( void ) { OpenCSGunBase_Draw(); #else View_PlayAnimation( ANIM_MP5_DRAW ); - Sound_Delayed( "weapons/mp5_slideback.wav", 1.0, 0.5 ); #endif } @@ -95,8 +94,5 @@ void WeaponMP5_Reload( void ) { } #else View_PlayAnimation( ANIM_MP5_RELOAD ); - Sound_Delayed( "weapons/mp5_clipout.wav", 1.0, 0.6 ); - Sound_Delayed( "weapons/mp5_clipin.wav", 1.0, 1.2 ); - Sound_Delayed( "weapons/mp5_slideback.wav", 1.0, 2.0 ); #endif } diff --git a/Source/Shared/WeaponMac10.c b/Source/Shared/WeaponMac10.c index dbea4fc9..95108216 100644 --- a/Source/Shared/WeaponMac10.c +++ b/Source/Shared/WeaponMac10.c @@ -91,9 +91,5 @@ void WeaponMAC10_Reload( void ) { } #else View_PlayAnimation( ANIM_MAC10_RELOAD ); - - Sound_Delayed( "weapons/mac10_clipout.wav", 1.0, 0.6 ); - Sound_Delayed( "weapons/mac10_clipin.wav", 1.0, 1.6 ); - Sound_Delayed( "weapons/mac10_boltpull.wav", 1.0, 2.5 ); #endif } diff --git a/Source/Shared/WeaponP228.c b/Source/Shared/WeaponP228.c index 1f118a36..41654fbd 100644 --- a/Source/Shared/WeaponP228.c +++ b/Source/Shared/WeaponP228.c @@ -62,7 +62,6 @@ void WeaponP228_Draw( void ) { OpenCSGunBase_Draw(); #else View_PlayAnimation( ANIM_P228_DRAW ); - Sound_Delayed( "weapons/p228_slidepull.wav", 1.0, 0.5 ); #endif } @@ -97,9 +96,5 @@ void WeaponP228_Reload( void ) { } #else View_PlayAnimation( ANIM_P228_RELOAD ); - - Sound_Delayed( "weapons/p228_clipout.wav", 1.0, 0.5 ); - Sound_Delayed( "weapons/p228_clipin.wav", 1.0, 1.5 ); - Sound_Delayed( "weapons/p228_sliderelease.wav", 1.0, 2.4 ); #endif } diff --git a/Source/Shared/WeaponP90.c b/Source/Shared/WeaponP90.c index dfb2ddd8..48d88517 100644 --- a/Source/Shared/WeaponP90.c +++ b/Source/Shared/WeaponP90.c @@ -62,7 +62,6 @@ void WeaponP90_Draw( void ) { OpenCSGunBase_Draw(); #else View_PlayAnimation( ANIM_P90_DRAW ); - Sound_Delayed( "weapons/p90_boltpull.wav", 1.0, 0.5 ); #endif } @@ -92,10 +91,5 @@ void WeaponP90_Reload( void ) { } #else View_PlayAnimation( ANIM_P90_RELOAD ); - - Sound_Delayed( "weapons/p90_cliprelease.wav", 1.0, 0.5 ); - Sound_Delayed( "weapons/p90_clipout.wav", 1.0, 1 ); - Sound_Delayed( "weapons/p90_clipin.wav", 1.0, 2.0 ); - Sound_Delayed( "weapons/p90_boltpull.wav", 1.0, 2.7 ); #endif } diff --git a/Source/Shared/WeaponPara.c b/Source/Shared/WeaponPara.c index c36ecca0..da2af8d1 100644 --- a/Source/Shared/WeaponPara.c +++ b/Source/Shared/WeaponPara.c @@ -90,12 +90,5 @@ void WeaponPARA_Reload( void ) { } #else View_PlayAnimation( ANIM_PARA_RELOAD ); - - //sound( self, CHAN_WEAPON, "weapons/m249_chain.wav", 1, ATTN_IDLE ); // TODO: Move to the client... - Sound_Delayed( "weapons/m249_coverup.wav", 1.0, 0.75 ); - Sound_Delayed( "weapons/m249_boxout.wav", 1.0, 1.6 ); - Sound_Delayed( "weapons/m249_boxin.wav", 1.0, 2.5 ); - Sound_Delayed( "weapons/m249_chain.wav", 1.0, 3.0 ); - Sound_Delayed( "weapons/m249_coverdown.wav", 1.0, 3.9 ); #endif } diff --git a/Source/Shared/WeaponSG550.c b/Source/Shared/WeaponSG550.c index da2ffc43..292fd08a 100644 --- a/Source/Shared/WeaponSG550.c +++ b/Source/Shared/WeaponSG550.c @@ -101,8 +101,5 @@ void WeaponSG550_Reload( void ) { } #else View_PlayAnimation( ANIM_SG550_RELOAD ); - Sound_Delayed( "weapons/sg550_clipout.wav", 1.0, 0.7 ); - Sound_Delayed( "weapons/sg550_clipin.wav", 1.0, 1.7 ); - Sound_Delayed( "weapons/sg550_boltpull.wav", 1.0, 2.9 ); #endif } diff --git a/Source/Shared/WeaponSG552.c b/Source/Shared/WeaponSG552.c index 06d95890..54a2be10 100644 --- a/Source/Shared/WeaponSG552.c +++ b/Source/Shared/WeaponSG552.c @@ -58,16 +58,15 @@ enum { }; void WeaponSG552_Draw( void ) { - #ifdef SSQC +#ifdef SSQC OpenCSGunBase_Draw(); - #else +#else View_PlayAnimation( ANIM_SG552_DRAW ); - Sound_Delayed( "weapons/sg552_boltpull.wav", 1.0, 0.5 ); - #endif +#endif } void WeaponSG552_PrimaryFire( void ) { - #ifdef SSQC +#ifdef SSQC if ( OpenCSGunBase_PrimaryFire() == TRUE ) { if ( random() <= 0.5 ) { sound( self, CHAN_WEAPON, "weapons/sg552-1.wav", 1, ATTN_NORM ); @@ -75,7 +74,7 @@ void WeaponSG552_PrimaryFire( void ) { sound( self, CHAN_WEAPON, "weapons/sg552-2.wav", 1, ATTN_NORM ); } } - #else +#else int iRand = (int)floor( random( 1, 4 ) ); if ( iRand == 1 ) { View_PlayAnimation( ANIM_SG552_SHOOT1 ); @@ -86,7 +85,7 @@ void WeaponSG552_PrimaryFire( void ) { } OpenCSGunBase_ShotMultiplierHandle( 1 ); - #endif +#endif } void WeaponSG552_SecondaryFire( void ) { @@ -102,14 +101,11 @@ void WeaponSG552_SecondaryFire( void ) { } void WeaponSG552_Reload( void ) { - #ifdef SSQC +#ifdef SSQC if ( OpenCSGunBase_Reload() == TRUE ) { // Play Sound } - #else +#else View_PlayAnimation( ANIM_SG552_RELOAD ); - Sound_Delayed( "weapons/sg552_clipout.wav", 1.0, 0.7 ); - Sound_Delayed( "weapons/sg552_clipin.wav", 1.0, 1.7 ); - Sound_Delayed( "weapons/sg552_boltpull.wav", 1.0, 2.4 ); - #endif +#endif } diff --git a/Source/Shared/WeaponScout.c b/Source/Shared/WeaponScout.c index 8e55e0a6..8810f27e 100644 --- a/Source/Shared/WeaponScout.c +++ b/Source/Shared/WeaponScout.c @@ -78,7 +78,6 @@ void WeaponSCOUT_PrimaryFire( void ) { } OpenCSGunBase_ShotMultiplierHandle( 1 ); - Sound_Delayed( "weapons/scout_bolt.wav", 1.0, 0.5 ); #endif } @@ -103,9 +102,5 @@ void WeaponSCOUT_Reload( void ) { } #else View_PlayAnimation( ANIM_SCOUT_RELOAD ); - - Sound_Delayed( "weapons/scout_clipout.wav", 1.0, 0.75 ); - Sound_Delayed( "weapons/scout_clipin.wav", 1.0, 1.25 ); - #endif } diff --git a/Source/Shared/WeaponTMP.c b/Source/Shared/WeaponTMP.c index bb72cd65..9bdbf6b5 100644 --- a/Source/Shared/WeaponTMP.c +++ b/Source/Shared/WeaponTMP.c @@ -95,8 +95,5 @@ void WeaponTMP_Reload( void ) { } #else View_PlayAnimation( ANIM_TMP_RELOAD ); - - Sound_Delayed( "weapons/mac10_clipout.wav", 1.0, 0.6 ); - Sound_Delayed( "weapons/mac10_clipin.wav", 1.0, 1.6 ); #endif } diff --git a/Source/Shared/WeaponUMP45.c b/Source/Shared/WeaponUMP45.c index a2e139e7..f95c6bc8 100644 --- a/Source/Shared/WeaponUMP45.c +++ b/Source/Shared/WeaponUMP45.c @@ -93,8 +93,5 @@ void WeaponUMP45_Reload( void ) { } #else View_PlayAnimation( ANIM_UMP45_RELOAD ); - Sound_Delayed( "weapons/ump45_clipout.wav", 1.0, 0.7 ); - Sound_Delayed( "weapons/ump45_clipin.wav", 1.0, 1.8 ); - Sound_Delayed( "weapons/ump45_boltslap.wav", 1.0, 2.7 ); #endif } diff --git a/Source/Shared/WeaponUSP45.c b/Source/Shared/WeaponUSP45.c index e899d644..272d5b97 100644 --- a/Source/Shared/WeaponUSP45.c +++ b/Source/Shared/WeaponUSP45.c @@ -81,8 +81,6 @@ void WeaponUSP45_Draw( void ) { } else { View_PlayAnimation( ANIM_USP45_DRAW ); } - - Sound_Delayed( "weapons/usp_slideback.wav", 1.0, 0.5 ); #endif } @@ -147,10 +145,8 @@ void WeaponUSP45_Secondary( void ) { if ( iWeaponMode_USP45 == TRUE ) { View_PlayAnimation( ANIM_USP45_SILENCER_ADD ); - Sound_Delayed( "weapons/usp_silencer_on.wav", 1.0, 0.95 ); } else { View_PlayAnimation( ANIM_USP45_SILENCER_REMOVE ); - Sound_Delayed( "weapons/usp_silencer_off.wav", 1.0, 0.6 ); } #endif } @@ -166,9 +162,5 @@ void WeaponUSP45_Reload( void ) { } else { View_PlayAnimation( ANIM_USP45_RELOAD ); } - - Sound_Delayed( "weapons/usp_clipout.wav", 1.0, 0.5 ); - Sound_Delayed( "weapons/usp_clipin.wav", 1.0, 1.1 ); - Sound_Delayed( "weapons/usp_sliderelease.wav", 1.0, 2.2 ); #endif } diff --git a/Source/Shared/WeaponXM1014.c b/Source/Shared/WeaponXM1014.c index 212163f9..594c5d7a 100644 --- a/Source/Shared/WeaponXM1014.c +++ b/Source/Shared/WeaponXM1014.c @@ -119,7 +119,6 @@ void WeaponXM1014_Secondary( void ) { self.nextthink = time + 0.5; #else View_PlayAnimation( ANIM_XM1014_INSERT ); - Sound_Delayed( "weapons/m3_insertshell.wav", 1.0, 0.25 ); #endif } diff --git a/opencs/csprogs.dat b/opencs/csprogs.dat index 28f49982..6cca4f22 100644 Binary files a/opencs/csprogs.dat and b/opencs/csprogs.dat differ diff --git a/opencs/progs.dat b/opencs/progs.dat index acfd3ba9..0007f11e 100644 Binary files a/opencs/progs.dat and b/opencs/progs.dat differ