Sound events for the weapons are DONE; Func_Breakables are in (basic) and some minor fixes
This commit is contained in:
parent
2a69d07ee0
commit
d144d3e998
30 changed files with 247 additions and 50 deletions
|
@ -86,7 +86,7 @@ void HUD_Draw( void ) {
|
|||
HUD_DrawNums( getstatf( STAT_HEALTH ), vHealthPos + '72 0' );
|
||||
|
||||
// Armor
|
||||
vector vArmorPos = [ 136, vVideoResolution_y - 42 ];
|
||||
vector vArmorPos = [ 112, vVideoResolution_y - 42 ];
|
||||
drawsubpic( vArmorPos, '24 24 0', HUD_NUMFILE_LAYER, [ 0, NUMSIZE_Y], [ NUMSIZE_X, NUMSIZE_X ], VGUI_WINDOW_FGCOLOR, 1, DRAWFLAG_ADDITIVE );
|
||||
HUD_DrawNums( getstatf( STAT_ARMOR ), vArmorPos + '72 0' );
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ float CSQC_Event_Sound( float entnum, float channel, string soundname, float vol
|
|||
|
||||
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 );
|
||||
}
|
||||
|
|
|
@ -72,6 +72,7 @@ void PutClientInServer( void ) {
|
|||
|
||||
void SV_RunClientCommand( void ) {
|
||||
|
||||
// The individual zones will just override this behavior
|
||||
self.fInBombZone = FALSE;
|
||||
self.fInBuyZone = FALSE;
|
||||
self.fInHostageZone = FALSE;
|
||||
|
|
|
@ -82,8 +82,9 @@ string sCSPlayers[9] = {
|
|||
|
||||
void Client_SendEvent( entity eClient, float fEVType );
|
||||
|
||||
void OpenCSGunBase_AccuracyCalc( void );
|
||||
void OpenCSGunBase_Draw( void );
|
||||
float OpenCSGunBase_PrimaryFire( void );
|
||||
float OpenCSGunBase_Reload( void );
|
||||
|
||||
void TraceAttack_FireBullets( void );
|
||||
void TraceAttack_FireBullets( int iShots );
|
||||
|
|
|
@ -38,10 +38,6 @@ void func_door( void ) {
|
|||
func_wall();
|
||||
}
|
||||
|
||||
void func_breakable( void ) {
|
||||
func_wall();
|
||||
}
|
||||
|
||||
void func_button( void ) {
|
||||
func_wall();
|
||||
}
|
||||
|
|
130
Source/Server/FuncBreakable.c
Normal file
130
Source/Server/FuncBreakable.c
Normal file
|
@ -0,0 +1,130 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
// Entity information from http://twhl.info/wiki.php?id=164
|
||||
|
||||
|
||||
// These are the material types apparently
|
||||
.float material;
|
||||
enum {
|
||||
MATERIAL_GLASS = 0,
|
||||
MATERIAL_WOOD,
|
||||
MATERIAL_METAL,
|
||||
MATERIAL_FLESH,
|
||||
MATERIAL_CINDER,
|
||||
MATERIAL_TILE,
|
||||
MATERIAL_COMPUTER,
|
||||
MATERIAL_GLASS_UNBREAKABLE,
|
||||
MATERIAL_ROCK,
|
||||
MATERIAL_NONE
|
||||
};
|
||||
|
||||
// Whenever it gets damaged
|
||||
void func_breakable_pain( void ) {
|
||||
string sTypeSample = "";
|
||||
int iTypeCount = 0;
|
||||
|
||||
switch ( self.material ) {
|
||||
case MATERIAL_GLASS:
|
||||
case MATERIAL_COMPUTER:
|
||||
case MATERIAL_GLASS_UNBREAKABLE:
|
||||
sTypeSample = "debris/glass";
|
||||
iTypeCount = 3;
|
||||
break;
|
||||
case MATERIAL_WOOD:
|
||||
sTypeSample = "debris/wood";
|
||||
iTypeCount = 3;
|
||||
break;
|
||||
case MATERIAL_METAL:
|
||||
sTypeSample = "debris/metal";
|
||||
iTypeCount = 3;
|
||||
break;
|
||||
case MATERIAL_FLESH:
|
||||
sTypeSample = "debris/flesh";
|
||||
iTypeCount = 7;
|
||||
break;
|
||||
case MATERIAL_CINDER:
|
||||
case MATERIAL_ROCK:
|
||||
sTypeSample = "debris/concrete";
|
||||
iTypeCount = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( iTypeCount >= 1 ) {
|
||||
sound( self, CHAN_VOICE, sprintf( "%s%d.wav", sTypeSample, ceil( random() * iTypeCount ) ), 1.0, ATTN_NORM );
|
||||
}
|
||||
}
|
||||
|
||||
// Whenever it.. dies
|
||||
void func_breakable_die( void ) {
|
||||
string sTypeSample = "";
|
||||
int iTypeCount = 0;
|
||||
|
||||
switch ( self.material ) {
|
||||
case MATERIAL_GLASS:
|
||||
case MATERIAL_GLASS_UNBREAKABLE:
|
||||
sTypeSample = "debris/bustglass";
|
||||
iTypeCount = 2;
|
||||
break;
|
||||
case MATERIAL_WOOD:
|
||||
sTypeSample = "debris/bustwood";
|
||||
iTypeCount = 2;
|
||||
break;
|
||||
case MATERIAL_METAL:
|
||||
case MATERIAL_COMPUTER:
|
||||
sTypeSample = "debris/bustmetal";
|
||||
iTypeCount = 2;
|
||||
break;
|
||||
case MATERIAL_FLESH:
|
||||
sTypeSample = "debris/bustflesh";
|
||||
iTypeCount = 2;
|
||||
break;
|
||||
case MATERIAL_CINDER:
|
||||
case MATERIAL_ROCK:
|
||||
sTypeSample = "debris/bustconcrete";
|
||||
iTypeCount = 3;
|
||||
break;
|
||||
case MATERIAL_TILE:
|
||||
sTypeSample = "debris/bustceiling";
|
||||
iTypeCount = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( iTypeCount >= 1 ) {
|
||||
sound( self, CHAN_VOICE, sprintf( "%s%d.wav", sTypeSample, ceil( random() * iTypeCount ) ), 1.0, ATTN_NORM );
|
||||
}
|
||||
|
||||
remove( self );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
SPAWN: func_breakable
|
||||
|
||||
Entry function for the brushes that can die etc.
|
||||
=================
|
||||
*/
|
||||
void func_breakable( void ) {
|
||||
func_wall();
|
||||
self.vPain = func_breakable_pain;
|
||||
self.vDeath = func_breakable_die;
|
||||
self.iBleeds = FALSE;
|
||||
self.takedamage = DAMAGE_YES;
|
||||
}
|
|
@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
func_ladder_sound
|
||||
=================
|
||||
*/
|
||||
void func_ladder_sound( entity target )
|
||||
{
|
||||
void func_ladder_sound( entity target ) {
|
||||
if ( ( target.velocity_z == 0 ) || ( target.fStepTime > time ) ) {
|
||||
return;
|
||||
}
|
||||
|
@ -57,8 +56,7 @@ void func_ladder_sound( entity target )
|
|||
func_ladder_touch
|
||||
=================
|
||||
*/
|
||||
void func_ladder_touch( void )
|
||||
{
|
||||
void func_ladder_touch( void ) {
|
||||
vector vPlayerVector;
|
||||
|
||||
if ( other.classname != "player" ) {
|
||||
|
|
|
@ -48,7 +48,7 @@ void Timer_Update( void ) {
|
|||
} else {
|
||||
Timer_Begin( cvar( "mp_roundtime" ) * 60, GAME_ACTIVE ); // Unfreeze
|
||||
|
||||
float fRand = ceil( random() * 6 );
|
||||
float fRand = ceil( random() * 3 );
|
||||
if ( fRand == 1 ) {
|
||||
sound(world, CHAN_VOICE, "radio/moveout.wav", 1, ATTN_NONE );
|
||||
} else if ( fRand == 2 ) {
|
||||
|
|
|
@ -22,14 +22,12 @@ float Math_CRandom( void ) {
|
|||
return 2 * ( random() - 0.5 );
|
||||
}
|
||||
|
||||
void TraceAttack_FireBullets( void ) {
|
||||
void TraceAttack_FireBullets( int iShots ) {
|
||||
vector vSrc, vDir;
|
||||
|
||||
makevectors(self.v_angle);
|
||||
|
||||
vSrc = self.origin + self.view_ofs;
|
||||
|
||||
int iShots = wptTable[ self.weapon ].iBullets;
|
||||
|
||||
while ( iShots > 0) {
|
||||
vDir = aim( self, 100000 ) + Math_CRandom()*self.fAccuracy*v_right + Math_CRandom()*self.fAccuracy*v_up;
|
||||
|
|
|
@ -37,12 +37,13 @@ TraceAttack.c
|
|||
Timer.c
|
||||
Main.c
|
||||
EntHostage.c
|
||||
Entities.c
|
||||
FuncBreakable.c
|
||||
FuncLadder.c
|
||||
FuncHostageRescue.c
|
||||
FuncBombTarget.c
|
||||
FuncBuyZone.c
|
||||
Spawn.c
|
||||
Entities.c
|
||||
Footsteps.c
|
||||
Input.c
|
||||
Client.c
|
||||
|
|
|
@ -56,9 +56,9 @@ enum {
|
|||
void WeaponAUG_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/aug_boltpull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_AUG_DRAW );
|
||||
Sound_Delayed( "weapons/aug_boltpull.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -86,5 +86,10 @@ 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
|
||||
}
|
||||
|
|
|
@ -56,9 +56,9 @@ enum {
|
|||
void WeaponAWP_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/awp_deploy.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_AWP_DRAW );
|
||||
Sound_Delayed( "weapons/awp_deploy.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,8 @@ void WeaponAWP_PrimaryFire( void ) {
|
|||
} else {
|
||||
View_PlayAnimation( ANIM_AWP_SHOOT3 );
|
||||
}
|
||||
|
||||
Sound_Delayed( "weapons/awp_deploy.wav", 1.0, 0.4 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -87,5 +89,8 @@ 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
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ float OpenCSGunBase_PrimaryFire( void ) {
|
|||
}
|
||||
|
||||
OpenCSGunBase_AccuracyCalc();
|
||||
TraceAttack_FireBullets();
|
||||
TraceAttack_FireBullets( wptTable[ self.weapon ].iBullets );
|
||||
|
||||
self.(wptTable[ self.weapon ].iClipfld) -= 1;
|
||||
self.fAttackFinished = time + wptTable[ self.weapon ].fAttackFinished;
|
||||
|
|
|
@ -131,6 +131,13 @@ 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
|
||||
}
|
||||
|
|
|
@ -56,9 +56,9 @@ enum {
|
|||
void WeaponFIVESEVEN_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/fiveseven_slidepull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_FIVESEVEN_DRAW );
|
||||
Sound_Delayed( "weapons/fiveseven_slidepull.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -89,5 +89,9 @@ 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
|
||||
}
|
||||
|
|
|
@ -55,9 +55,9 @@ enum {
|
|||
void WeaponG3SG1_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/g3sg1_slide.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_G3SG1_DRAW );
|
||||
Sound_Delayed( "weapons/g3sg1_slide.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -85,5 +85,10 @@ 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
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ weaponinfo_t wptGLOCK18 = {
|
|||
0.75, // Range Modifier
|
||||
TYPE_SEMI,
|
||||
0.15, // Attack-Delay
|
||||
2.0, // Reload-Delay
|
||||
2.1, // Reload-Delay
|
||||
iAmmo_9MM, // Caliber Pointer
|
||||
iClip_GLOCK18, // Clip Pointer
|
||||
200, // Accuracy Divisor
|
||||
|
@ -81,13 +81,22 @@ void WeaponGLOCK18_Draw( void ) {
|
|||
|
||||
void WeaponGLOCK18_PrimaryFire( void ) {
|
||||
#ifdef SSQC
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
// Play Sound
|
||||
if ( self.iMode_GLOCK18 == FALSE ) {
|
||||
if ( self.iMode_GLOCK18 == FALSE ) {
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
sound( self, CHAN_WEAPON, "weapons/glock18-2.wav", 1, ATTN_NORM );
|
||||
} else {
|
||||
sound( self, CHAN_WEAPON, "weapons/glock18-1.wav", 1, ATTN_NORM );
|
||||
}
|
||||
} else {
|
||||
if ( (self.iClip_GLOCK18 - 3 ) < 0 ) {
|
||||
return FALSE;
|
||||
}
|
||||
OpenCSGunBase_AccuracyCalc();
|
||||
TraceAttack_FireBullets( 3 );
|
||||
|
||||
self.iClip_GLOCK18 -= 3;
|
||||
self.fAttackFinished = time + 0.5;
|
||||
|
||||
sound( self, CHAN_WEAPON, "weapons/glock18-1.wav", 1, ATTN_NORM );
|
||||
Client_SendEvent( self, EV_WEAPON_PRIMARYATTACK );
|
||||
}
|
||||
#else
|
||||
if ( iWeaponMode_GLOCK18 == FALSE ) {
|
||||
|
@ -110,7 +119,7 @@ void WeaponGLOCK18_Secondary( void ) {
|
|||
#ifdef SSQC
|
||||
// Just switch the modes quickly
|
||||
self.iMode_GLOCK18 = 1 - self.iMode_GLOCK18;
|
||||
self.fAttackFinished = time + 1.0;
|
||||
self.fAttackFinished = time + 0.2;
|
||||
|
||||
// Tell the client that we switched modes, too
|
||||
Client_SendEvent( self, EV_WEAPON_SECONDARYATTACK );
|
||||
|
@ -131,8 +140,11 @@ void WeaponGLOCK18_Reload( void ) {
|
|||
// Play Sound
|
||||
}
|
||||
#else
|
||||
if ( getstatf( STAT_CURRENT_CLIP ) == 0 ) {
|
||||
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 );
|
||||
|
|
|
@ -63,9 +63,9 @@ enum {
|
|||
void WeaponM3_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/m3_pump.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_M3_DRAW );
|
||||
Sound_Delayed( "weapons/m3_pump.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -114,6 +114,7 @@ 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
|
||||
}
|
||||
|
||||
|
@ -138,10 +139,9 @@ void WeaponM3_Reload( void ) {
|
|||
|
||||
if ( iWeaponMode_M3 == TRUE ) {
|
||||
View_PlayAnimation( ANIM_M3_RELOAD_START );
|
||||
print( "START!!!\n" );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_M3_RELOAD_END );
|
||||
print( "ENDE!!!\n" );
|
||||
Sound_Delayed( "weapons/m3_pump.wav", 1.0, 0.5 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ void WeaponM4A1_Secondary( void ) {
|
|||
#ifdef SSQC
|
||||
// Just switch the modes quickly
|
||||
self.iMode_M4A1 = 1 - self.iMode_M4A1;
|
||||
self.fAttackFinished = time + 3.0;
|
||||
self.fAttackFinished = time + 2;
|
||||
|
||||
// Tell the client that we switched modes, too
|
||||
Client_SendEvent( self, EV_WEAPON_SECONDARYATTACK );
|
||||
|
|
|
@ -56,9 +56,9 @@ enum {
|
|||
void WeaponMP5_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/mp5_slideback.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_MP5_DRAW );
|
||||
Sound_Delayed( "weapons/mp5_slideback.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -90,5 +90,8 @@ 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
|
||||
}
|
||||
|
|
|
@ -56,7 +56,6 @@ enum {
|
|||
void WeaponMAC10_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/mac10_boltpull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_MAC10_DRAW );
|
||||
#endif
|
||||
|
@ -87,5 +86,9 @@ 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
|
||||
}
|
||||
|
|
|
@ -57,9 +57,9 @@ enum {
|
|||
void WeaponP228_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/p228_slidepull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_P228_DRAW );
|
||||
Sound_Delayed( "weapons/p228_slidepull.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -94,5 +94,9 @@ 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
|
||||
}
|
||||
|
|
|
@ -56,9 +56,9 @@ enum {
|
|||
void WeaponP90_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/p90_boltpull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_P90_DRAW );
|
||||
Sound_Delayed( "weapons/p90_boltpull.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -87,5 +87,10 @@ 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
|
||||
}
|
||||
|
|
|
@ -46,17 +46,15 @@ weaponinfo_t wptPARA = {
|
|||
// Anim Table
|
||||
enum {
|
||||
ANIM_PARA_IDLE,
|
||||
ANIM_PARA_RELOAD,
|
||||
ANIM_PARA_DRAW,
|
||||
ANIM_PARA_SHOOT1,
|
||||
ANIM_PARA_SHOOT2,
|
||||
ANIM_PARA_SHOOT3
|
||||
ANIM_PARA_RELOAD,
|
||||
ANIM_PARA_DRAW
|
||||
};
|
||||
|
||||
void WeaponPARA_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/m249_chain.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_PARA_DRAW );
|
||||
#endif
|
||||
|
@ -72,13 +70,10 @@ void WeaponPARA_PrimaryFire( void ) {
|
|||
}
|
||||
}
|
||||
#else
|
||||
int iRand = ceil( random() * 3 );
|
||||
if ( iRand == 1 ) {
|
||||
if ( random() <= 0.5 ) {
|
||||
View_PlayAnimation( ANIM_PARA_SHOOT1 );
|
||||
} else if ( iRand == 2 ) {
|
||||
View_PlayAnimation( ANIM_PARA_SHOOT2 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_PARA_SHOOT3 );
|
||||
View_PlayAnimation( ANIM_PARA_SHOOT2 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -90,5 +85,12 @@ 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
|
||||
}
|
||||
|
|
|
@ -55,7 +55,6 @@ enum {
|
|||
void WeaponSG550_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/sg550_boltpull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_SG550_DRAW );
|
||||
#endif
|
||||
|
@ -83,5 +82,8 @@ 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
|
||||
}
|
||||
|
|
|
@ -56,9 +56,9 @@ enum {
|
|||
void WeaponSG552_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/sg552_boltpull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_SG552_DRAW );
|
||||
Sound_Delayed( "weapons/sg552_boltpull.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -90,5 +90,8 @@ void WeaponSG552_Reload( void ) {
|
|||
}
|
||||
#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
|
||||
}
|
||||
|
|
|
@ -55,7 +55,6 @@ enum {
|
|||
void WeaponSCOUT_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/scout_bolt.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_SCOUT_DRAW );
|
||||
#endif
|
||||
|
@ -73,6 +72,8 @@ void WeaponSCOUT_PrimaryFire( void ) {
|
|||
} else {
|
||||
View_PlayAnimation( ANIM_SCOUT_SHOOT2 );
|
||||
}
|
||||
|
||||
Sound_Delayed( "weapons/scout_bolt.wav", 1.0, 0.5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -83,5 +84,9 @@ 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
|
||||
}
|
||||
|
|
|
@ -89,5 +89,8 @@ 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
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ enum {
|
|||
void WeaponUMP45_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/ump45_boltslap.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
//sound( self, CHAN_WEAPON, "weapons/ump45_boltslap.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_UMP45_DRAW );
|
||||
#endif
|
||||
|
@ -87,5 +87,8 @@ 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
|
||||
}
|
||||
|
|
|
@ -63,7 +63,6 @@ enum {
|
|||
void WeaponXM1014_Draw( void ) {
|
||||
#ifdef SSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/m3_pump.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_XM1014_DRAW );
|
||||
#endif
|
||||
|
@ -114,6 +113,7 @@ 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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue