Implemented smoke and flash grenades.
Fixed some equipment menu bug that caused you to money despite not getting any nades. v_lefthanded exists now! Use only on the newest FTE SVN build though.
This commit is contained in:
parent
06d1cf7a3c
commit
d8987e4135
21 changed files with 187 additions and 51 deletions
|
@ -30,8 +30,7 @@ All the weapons are implemented, so are the gamemodes:
|
|||
- **Assassination** (as)
|
||||
- **Escape** (es)
|
||||
|
||||
Not all equipment is implemented and no map radar/overview is recreated.
|
||||
Basically, the game is playable as long as you don't care about grenades (for now).
|
||||
The game is playable as long as you don't care about the radar/overview display.
|
||||
|
||||
# Installing
|
||||
1. Get the latest version of FTEQW from the [website](http://triptohell.info/moodles/).
|
||||
|
|
|
@ -40,16 +40,20 @@ var float autocvar_cl_bob = 0.01;
|
|||
var float autocvar_cl_bobcycle = 0.8;
|
||||
var float autocvar_cl_bobup = 0.5;
|
||||
var float autocvar_cl_bobclassic = 0;
|
||||
var float autocvar_v_lefthanded = 0;
|
||||
|
||||
// Particle stuff
|
||||
var float PARTICLE_SPARK;
|
||||
var float PARTICLE_PIECES_BLACK;
|
||||
var float PARTICLE_SMOKE_GREY;
|
||||
var float PARTICLE_SMOKE_BROWN;
|
||||
var float PARTICLE_SMOKEGRENADE;
|
||||
var float PARTICLE_BLOOD;
|
||||
var float DECAL_SHOT;
|
||||
var float DECAL_GLASS;
|
||||
|
||||
var float SHADER_CULLED;
|
||||
|
||||
vector vHUDColor; // Defined in HUD_Draw (HUD.c)
|
||||
vector vVGUIColor; // Defined in HUD_Draw (VGUI.c)
|
||||
vector vCrossColor; // Defined in HUD_Draw (HUDCrosshair.c)
|
||||
|
@ -101,6 +105,10 @@ float fWeaponEventPlayer;
|
|||
.float fWeaponLast;
|
||||
.float fWeaponBoneID;
|
||||
|
||||
// Flashbang'd
|
||||
var float fFlashTime;
|
||||
var float fFlashAlpha;
|
||||
|
||||
void Animation_ShootWeapon( entity ePlayer );
|
||||
void Animation_ReloadWeapon( entity ePlayer );
|
||||
|
||||
|
|
|
@ -490,6 +490,17 @@ void CSQC_Parse_Event( void ) {
|
|||
vSparkAngle_z = readcoord();
|
||||
|
||||
Effect_CreateSpark( vSparkPos, vSparkAngle );
|
||||
} else if ( fHeader == EV_SMOKE ) {
|
||||
vector vSmokePos;
|
||||
|
||||
vSmokePos_x = readcoord();
|
||||
vSmokePos_y = readcoord();
|
||||
vSmokePos_z = readcoord();
|
||||
|
||||
Effect_CreateSmoke( vSmokePos );
|
||||
} else if ( fHeader == EV_FLASH ) {
|
||||
fFlashTime = 3.0f;
|
||||
fFlashAlpha = 1.0f;
|
||||
} else if ( fHeader == EV_CHAT ) {
|
||||
float fSender = readbyte();
|
||||
float fTeam = readbyte();
|
||||
|
|
|
@ -386,6 +386,20 @@ void HUD_DrawRadar( void ) {
|
|||
drawpic( '16 16', "sprites/radar640.spr_0.tga", '128 128', '1 1 1', 0.5, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
void HUD_DrawFlash( void ) {
|
||||
if ( fFlashTime > 0.0f ) {
|
||||
fFlashTime -= frametime;
|
||||
} else {
|
||||
if ( fFlashAlpha > 0.0f ) {
|
||||
fFlashAlpha -= ( frametime * 0.5 );
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
drawfill( '0 0', vVideoResolution, '1 1 1', fFlashAlpha, fFlashTime );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
HUD_Draw
|
||||
|
@ -403,6 +417,7 @@ void HUD_Draw( void ) {
|
|||
HUD_DrawCrosshair();
|
||||
}
|
||||
|
||||
HUD_DrawFlash();
|
||||
HUD_DrawTimer();
|
||||
HUD_DrawRadar();
|
||||
HUD_DrawHealth();
|
||||
|
|
|
@ -328,7 +328,7 @@ void HUD_DrawWeaponSelect( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
vector vSelectPos = '138 12 0';
|
||||
vector vSelectPos = '160 12 0';
|
||||
|
||||
for ( int i = 0; i < 4; i++ ) {
|
||||
HUD_DrawWeaponSelect_Num( vSelectPos, i );
|
||||
|
@ -336,43 +336,36 @@ void HUD_DrawWeaponSelect( void ) {
|
|||
// Again, grenades are treated seperately
|
||||
if ( i == SLOT_GRENADE ) {
|
||||
if ( wptTable[ fHUDWeaponSelected ].iSlot == SLOT_GRENADE ) {
|
||||
vSelectPos_y -= 45;
|
||||
if ( getstati_punf( STAT_ITEM_HEGRENADE ) ) {
|
||||
vSelectPos_y += 45;
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', wpSymbolTable[ WEAPON_HEGRENADE ].sSprite, wpSymbolTable[ WEAPON_HEGRENADE ].vOrigin, [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
if ( iHUDGrenadesSelected == WEAPON_HEGRENADE ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', "sprites/640hud3.spr_0.tga", '0 0.703125', [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
vSelectPos_y += 45;
|
||||
}
|
||||
if ( iHUDGrenadesSelected == WEAPON_HEGRENADE ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', "sprites/640hud3.spr_0.tga", '0 0.703125', [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
if ( getstati_punf( STAT_ITEM_FLASHBANG ) ) {
|
||||
vSelectPos_y += 45;
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', wpSymbolTable[ WEAPON_FLASHBANG ].sSprite, wpSymbolTable[ WEAPON_FLASHBANG ].vOrigin, [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
if ( iHUDGrenadesSelected == WEAPON_FLASHBANG ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', "sprites/640hud3.spr_0.tga", '0 0.703125', [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
vSelectPos_y += 45;
|
||||
}
|
||||
if ( iHUDGrenadesSelected == WEAPON_FLASHBANG ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', "sprites/640hud3.spr_0.tga", '0 0.703125', [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
|
||||
if ( getstati_punf( STAT_ITEM_SMOKEGRENADE ) ) {
|
||||
vSelectPos_y += 45;
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', wpSymbolTable[ WEAPON_SMOKEGRENADE ].sSprite, wpSymbolTable[ WEAPON_SMOKEGRENADE ].vOrigin, [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
|
||||
}
|
||||
if ( iHUDGrenadesSelected == WEAPON_SMOKEGRENADE ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', "sprites/640hud3.spr_0.tga", '0 0.703125', [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
if ( getstatf( STAT_SLOT_GRENADE ) ) {
|
||||
if ( iHUDGrenadesSelected == WEAPON_SMOKEGRENADE ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', "sprites/640hud3.spr_0.tga", '0 0.703125', [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
vSelectPos_y += 45;
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', wpSymbolTable[ getstatf( STAT_SLOT_GRENADE ) ].sSprite, wpSymbolTable[ getstatf( STAT_SLOT_GRENADE ) ].vOrigin, [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
if ( iHUDGrenadesSelected == getstatf( STAT_SLOT_GRENADE ) ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', "sprites/640hud3.spr_0.tga", '0 0.703125', [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
if ( getstatf( STAT_SLOT_GRENADE ) ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', wpSymbolTable[ getstatf( STAT_SLOT_GRENADE ) ].sSprite, wpSymbolTable[ getstatf( STAT_SLOT_GRENADE ) ].vOrigin, [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
if ( iHUDGrenadesSelected == getstatf( STAT_SLOT_GRENADE ) ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', "sprites/640hud3.spr_0.tga", '0 0.703125', [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
vSelectPos_y += 45;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
if ( wptTable[ fHUDWeaponSelected ].iSlot == i ) {
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', wpSymbolTable[ fHUDWeaponSelected ].sSprite, wpSymbolTable[ fHUDWeaponSelected ].vOrigin, [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
drawsubpic( vSelectPos + '0 20', '170 45', "sprites/640hud3.spr_0.tga", '0 0.703125', [ 0.6640625, 0.17578125 ], vHUDColor, 1, DRAWFLAG_ADDITIVE );
|
||||
|
|
|
@ -80,8 +80,11 @@ void CSQC_Init(float apilevel, string enginename, float engineversion) {
|
|||
PARTICLE_BLOOD = particleeffectnum( "part_blood" );
|
||||
DECAL_SHOT = particleeffectnum( "decal_shot" );
|
||||
DECAL_GLASS = particleeffectnum( "decal_glass" );
|
||||
PARTICLE_SMOKEGRENADE = particleeffectnum( "smokegren" );
|
||||
|
||||
FONT_16 = loadfont( "16", "gfx/conchars_16", "16", -1 );
|
||||
|
||||
SHADER_CULLED = shaderforname( "mirror_cull" );
|
||||
|
||||
Radio_InitSounds();
|
||||
|
||||
|
|
|
@ -162,7 +162,19 @@ void View_DrawViewModel( void ) {
|
|||
makevectors( getproperty( VF_ANGLES ) );
|
||||
eViewModel.origin = getproperty( VF_ORIGIN ) + '0 0 -1' + ( v_forward * ( fBob * 0.4 ) );
|
||||
eViewModel.angles = getproperty( VF_ANGLES );
|
||||
|
||||
|
||||
// Left-handed weapons
|
||||
if ( autocvar_v_lefthanded ) {
|
||||
v_right *= -1;
|
||||
eViewModel.renderflags |= RF_USEAXIS;
|
||||
eViewModel.forceshader = SHADER_CULLED;
|
||||
} else {
|
||||
if ( eViewModel.forceshader ) {
|
||||
eViewModel.forceshader = 0;
|
||||
eViewModel.renderflags -= RF_USEAXIS;
|
||||
}
|
||||
}
|
||||
|
||||
// Give the gun a tilt effect like in old HL/CS versions
|
||||
if ( autocvar_cl_bobclassic == 1 ) {
|
||||
eViewModel.angles_z = -fBob;
|
||||
|
|
|
@ -113,18 +113,20 @@
|
|||
</project>
|
||||
|
||||
<workspace version="Crimson Editor 3.60">
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Event.c" linenum="498" placement="0:1:-1:-1:-4:-23:44:44:892:509" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Main.c" linenum="81" placement="0:1:-1:-1:-4:-23:66:66:918:535" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Draw.c" linenum="31" placement="0:1:-1:-1:-4:-23:88:88:940:557" />
|
||||
<localfile path="C:\Users\eukara\Dropbox\The Wastes Build\SDK\Source\Client\Defs.h" linenum="26" placement="0:1:-1:-1:-4:-23:110:110:962:579" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Builtins.h" linenum="873" placement="0:1:-1:-1:-4:-23:154:154:1006:623" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\VGUIScoreboard.c" linenum="49" placement="0:1:-1:-1:-4:-23:176:176:1028:645" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\VGUIObjects.c" linenum="39" placement="0:1:-1:-1:-4:-23:198:198:1050:667" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponAK47.c" linenum="1" placement="0:1:-1:-1:-4:-23:220:220:1072:689" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Radio.c" linenum="182" placement="0:1:-1:-1:-4:-23:0:0:852:469" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Spawn.c" linenum="300" placement="0:1:-1:-1:-4:-23:22:22:874:491" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Defs.h" linenum="93" placement="0:1:-1:-1:-4:-23:220:220:1072:689" />
|
||||
<localfile path="C:\Users\eukara\Dropbox\The Wastes Build\SDK\Source\Client\Draw.c" linenum="65" placement="0:1:-1:-1:-4:-23:0:0:852:469" />
|
||||
<localfile path="C:\Program Files (x86)\Winamp\Plugins\AudioScrobbler.log.txt" linenum="1" placement="2:3:-1:-1:-4:-23:22:22:874:491" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\View.c" linenum="149" placement="0:1:-1:-1:-4:-23:198:198:1046:663" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Builtins.h" linenum="1402" placement="0:1:-1:-1:-4:-23:220:220:1072:689" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Defs.h" linenum="109" placement="0:1:-1:-1:-4:-23:0:0:852:469" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Init.c" linenum="81" placement="0:1:-1:-1:-4:-23:22:22:874:491" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Globals.h" linenum="226" placement="0:1:-1:-1:-4:-23:88:88:940:557" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Effects.c" linenum="100" placement="0:1:-1:-1:-4:-23:110:110:962:579" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Rules.c" linenum="105" placement="0:1:-1:-1:-4:-23:154:154:1006:623" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponFlashbang.c" linenum="151" placement="0:1:-1:-1:-4:-23:176:176:1028:645" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Defs.h" linenum="137" placement="0:1:-1:-1:-4:-23:220:220:1072:689" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Event.c" linenum="503" placement="0:1:-1:-1:-4:-23:0:0:852:469" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponSmokeGrenade.c" linenum="138" placement="0:1:-1:-1:-4:-23:66:66:918:535" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Weapons.c" linenum="97" placement="0:1:-1:-1:-4:-23:88:88:940:557" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponHEGrenade.c" linenum="132" placement="0:1:-1:-1:-4:-23:110:110:962:579" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Equipment.c" linenum="41" placement="0:1:-1:-1:-4:-23:132:132:984:601" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\README.md" linenum="33" placement="2:3:-1:-1:-4:-23:154:154:1006:623" />
|
||||
</workspace>
|
||||
|
||||
|
|
|
@ -222,6 +222,8 @@ enum {
|
|||
EV_IMPACT,
|
||||
EV_EXPLOSION,
|
||||
EV_SPARK,
|
||||
EV_SMOKE,
|
||||
EV_FLASH,
|
||||
EV_MODELGIB,
|
||||
EV_CAMERATRIGGER,
|
||||
EV_RADIOMSG,
|
||||
|
|
|
@ -123,6 +123,7 @@ void Spawn_MakeSpectator( void );
|
|||
void Client_SendEvent( entity eClient, float fEVType );
|
||||
void Client_TriggerCamera( entity eTarget, vector vPos, vector vEndPos, float fResetTime );
|
||||
|
||||
void Weapon_Draw( float fWeapon );
|
||||
void Weapon_SwitchBest( void );
|
||||
void Weapon_UpdateCurrents( void );
|
||||
void Weapon_DropWeapon( int iSlot );
|
||||
|
@ -141,6 +142,10 @@ int BaseMelee_Attack( void );
|
|||
float Player_GetMaxSpeed( float fWeapon );
|
||||
|
||||
void Effect_Impact( int iType, vector vPos, vector vNormal );
|
||||
void Effect_CreateSmoke( vector vPos );
|
||||
void Effect_CreateExplosion( vector vPos );
|
||||
void Effect_CreateFlash( entity eTarget );
|
||||
|
||||
void TraceAttack_FireBullets( int iShots, vector vPos );
|
||||
void Damage_Radius( vector vOrigin, entity eAttacker, float fDamage, float fRadius );
|
||||
void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos );
|
||||
|
@ -158,9 +163,6 @@ void Animation_PlayerTop( float fFrame );
|
|||
void Animation_PlayerTopTemp( float fFrame, float fTime );
|
||||
void Footsteps_Update( void );
|
||||
|
||||
void Effect_CreateExplosion( vector vPos );
|
||||
|
||||
// WIP
|
||||
string __fullspawndata;
|
||||
hashtable hashMaterials;
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@ void Effect_CreateExplosion( vector vPos ) {
|
|||
|
||||
void Effect_CreateSpark( vector vPos, vector vAngle ) {
|
||||
#ifdef SSQC
|
||||
vPos_z += 48;
|
||||
WriteByte( MSG_MULTICAST, SVC_CGAMEPACKET );
|
||||
WriteByte( MSG_MULTICAST, EV_SPARK );
|
||||
WriteCoord( MSG_MULTICAST, vPos_x );
|
||||
|
@ -73,6 +72,44 @@ void Effect_CreateSpark( vector vPos, vector vAngle ) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef SSQC
|
||||
void Effect_CreateFlash( entity eTarget ) {
|
||||
WriteByte( MSG_MULTICAST, SVC_CGAMEPACKET );
|
||||
WriteByte( MSG_MULTICAST, EV_FLASH );
|
||||
msg_entity = eTarget;
|
||||
multicast( '0 0 0', MULTICAST_ONE );
|
||||
}
|
||||
#endif
|
||||
|
||||
void Effect_CreateSmoke( vector vPos ) {
|
||||
#ifdef SSQC
|
||||
WriteByte( MSG_MULTICAST, SVC_CGAMEPACKET );
|
||||
WriteByte( MSG_MULTICAST, EV_SMOKE );
|
||||
WriteCoord( MSG_MULTICAST, vPos_x );
|
||||
WriteCoord( MSG_MULTICAST, vPos_y );
|
||||
WriteCoord( MSG_MULTICAST, vPos_z );
|
||||
msg_entity = self;
|
||||
multicast( '0 0 0', MULTICAST_ALL );
|
||||
#else
|
||||
static void Effect_CreateSmoke_Think( void ) {
|
||||
if ( self.frame <= 0 ) {
|
||||
remove( self );
|
||||
return;
|
||||
}
|
||||
|
||||
pointparticles( PARTICLE_SMOKEGRENADE, self.origin, '0 0 0', 1 );
|
||||
self.frame--;
|
||||
self.nextthink = time + 0.2f;
|
||||
}
|
||||
|
||||
entity eSmoke = spawn();
|
||||
setorigin( eSmoke, vPos );
|
||||
eSmoke.think = Effect_CreateSmoke_Think;
|
||||
eSmoke.nextthink = time;
|
||||
eSmoke.frame = 200;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CSQC
|
||||
.float framerate;
|
||||
void Effect_AnimatedSprite( vector vPos, float fIndex, float fFPS, float fScale, float fAlpha, float fEffects ) {
|
||||
|
|
|
@ -38,18 +38,21 @@ void CSEv_PlayerBuyEquipment_f( float fID ) {
|
|||
if ( eqptTable[ fID ].iID == WEAPON_HEGRENADE ) {
|
||||
if ( self.iAmmo_HEGRENADE < 2 ) {
|
||||
self.iAmmo_HEGRENADE++;
|
||||
Money_AddMoney( self, -300 );
|
||||
} else {
|
||||
centerprint( self, "You can't carry any more!" );
|
||||
}
|
||||
} else if ( eqptTable[ fID ].iID == WEAPON_FLASHBANG ) {
|
||||
if ( self.iAmmo_FLASHBANG < 2 ) {
|
||||
self.iAmmo_FLASHBANG++;
|
||||
Money_AddMoney( self, -300 );
|
||||
} else {
|
||||
centerprint( self, "You can't carry any more!" );
|
||||
}
|
||||
} else if ( eqptTable[ fID ].iID == WEAPON_SMOKEGRENADE ) {
|
||||
if ( self.iAmmo_SMOKEGRENADE < 2 ) {
|
||||
self.iAmmo_SMOKEGRENADE++;
|
||||
Money_AddMoney( self, -300 );
|
||||
} else {
|
||||
centerprint( self, "You can't carry any more!" );
|
||||
}
|
||||
|
@ -95,9 +98,6 @@ void CSEv_PlayerBuyEquipment_f( float fID ) {
|
|||
self.fAttackFinished = time + 1.0;
|
||||
return;
|
||||
}
|
||||
|
||||
Money_AddMoney( self, -eqptTable[ fID ].iPrice );
|
||||
self.iEquipment = self.iEquipment | ( eqptTable[ fID ].iID );
|
||||
} else {
|
||||
centerprint( self, "You have insufficient funds!" );
|
||||
}
|
||||
|
|
|
@ -95,6 +95,22 @@ void WeaponFLASHBANG_PrimaryFire( void ) {
|
|||
#ifdef SSQC
|
||||
void WeaponFLASHBANG_Throw( void ) {
|
||||
static void WeaponFLASHBANG_Explode( void ) {
|
||||
vector vNorm;
|
||||
float fDot;
|
||||
|
||||
for ( entity eFind = world; ( eFind = find( eFind, classname, "player" ) ); ) {
|
||||
traceline( self.origin + '0 0 32', eFind.origin, FALSE, self );
|
||||
if ( trace_fraction == 1 ) {
|
||||
makevectors ( eFind.angles );
|
||||
vNorm = normalize ( self.origin - eFind.origin );
|
||||
fDot = vNorm * v_forward;
|
||||
|
||||
if ( fDot > 0.3 ) {
|
||||
Effect_CreateFlash( eFind );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( random() < 0.5 ) {
|
||||
sound( self, CHAN_WEAPON, "weapons/flashbang-1.wav", 1, ATTN_NORM );
|
||||
} else {
|
||||
|
@ -131,6 +147,8 @@ void WeaponFLASHBANG_Throw( void ) {
|
|||
|
||||
if ( !self.iAmmo_FLASHBANG ) {
|
||||
Weapon_SwitchBest();
|
||||
} else {
|
||||
Weapon_Draw( WEAPON_FLASHBANG );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -128,6 +128,8 @@ void WeaponHEGRENADE_Throw( void ) {
|
|||
|
||||
if ( !self.iAmmo_HEGRENADE ) {
|
||||
Weapon_SwitchBest();
|
||||
} else {
|
||||
Weapon_Draw( WEAPON_HEGRENADE );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -94,9 +94,18 @@ void WeaponSMOKEGRENADE_PrimaryFire( void ) {
|
|||
|
||||
#ifdef SSQC
|
||||
void WeaponSMOKEGRENADE_Throw( void ) {
|
||||
static void WeaponSMOKEGRENADE_Explode( void ) {
|
||||
static void WeaponSMOKEGRENADE_Die( void ) {
|
||||
remove( self );
|
||||
}
|
||||
static void WeaponSMOKEGRENADE_Explode( void ) {
|
||||
Effect_CreateSmoke( self.origin );
|
||||
|
||||
self.solid = SOLID_NOT;
|
||||
self.movetype = MOVETYPE_NONE;
|
||||
|
||||
self.think = WeaponSMOKEGRENADE_Die;
|
||||
self.nextthink = time + 5.0f;
|
||||
}
|
||||
static void Weapon_SMOKEGRENADE_Touch( void ) {
|
||||
if ( other.classname == "func_breakable" ) {
|
||||
Damage_Apply( other, self, 10, self.origin );
|
||||
|
@ -118,7 +127,6 @@ void WeaponSMOKEGRENADE_Throw( void ) {
|
|||
eNade.avelocity = ( v_forward * 600 );
|
||||
eNade.movetype = MOVETYPE_BOUNCE;
|
||||
eNade.touch = Weapon_SMOKEGRENADE_Touch;
|
||||
|
||||
eNade.think = WeaponSMOKEGRENADE_Explode;
|
||||
eNade.nextthink = time + 3.0f;
|
||||
|
||||
|
@ -126,6 +134,8 @@ void WeaponSMOKEGRENADE_Throw( void ) {
|
|||
|
||||
if ( !self.iAmmo_SMOKEGRENADE ) {
|
||||
Weapon_SwitchBest();
|
||||
} else {
|
||||
Weapon_Draw( WEAPON_SMOKEGRENADE );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -86,7 +86,7 @@ weaponfunc_t wpnFuncTable[ CS_WEAPON_COUNT ] = {
|
|||
{ WeaponC4BOMB_Draw, WeaponC4BOMB_PrimaryFire, Temp_Nothing, Temp_Nothing },
|
||||
{ WeaponFLASHBANG_Draw, WeaponFLASHBANG_PrimaryFire, Temp_Nothing, Temp_Nothing },
|
||||
{ WeaponHEGRENADE_Draw, WeaponHEGRENADE_PrimaryFire, Temp_Nothing, Temp_Nothing },
|
||||
{ WeaponFLASHBANG_Draw, WeaponFLASHBANG_PrimaryFire, Temp_Nothing, Temp_Nothing }
|
||||
{ WeaponSMOKEGRENADE_Draw, WeaponSMOKEGRENADE_PrimaryFire, Temp_Nothing, Temp_Nothing }
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Binary file not shown.
BIN
freecs/menu.dat
BIN
freecs/menu.dat
Binary file not shown.
|
@ -184,3 +184,18 @@ r_part te_explosion
|
|||
blend add
|
||||
assoc expgib
|
||||
}
|
||||
|
||||
r_part smokegren
|
||||
{
|
||||
texture ball
|
||||
count 1
|
||||
scale 512
|
||||
scalefactor 1
|
||||
die 3
|
||||
alpha 0.7
|
||||
rgb 128 128 128
|
||||
spawnmode ball
|
||||
gravity -25
|
||||
veladd -20
|
||||
randomvel 64 -64
|
||||
}
|
BIN
freecs/progs.dat
BIN
freecs/progs.dat
Binary file not shown.
7
freecs/scripts/view.shader
Executable file
7
freecs/scripts/view.shader
Executable file
|
@ -0,0 +1,7 @@
|
|||
mirror_cull {
|
||||
cull back
|
||||
program defaultskin
|
||||
{
|
||||
map $diffuse
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue