Made some tweaks to the bomb (Fixes #13)
Fixed a crash related to grenades and func_breakables.
This commit is contained in:
parent
cc582fa375
commit
79fa38562a
42 changed files with 24 additions and 39 deletions
|
@ -55,7 +55,7 @@ void HUD_DrawCrosshair( void ) {
|
|||
if ( iShotMultiplier > iOldShotMultiplier ) {
|
||||
fCrosshairDistance = min( 15, fCrosshairDistance + fDeltaDistance );
|
||||
} else if ( fCrosshairDistance > fDistance ) {
|
||||
// Slowly decrease the distance again, 0.02 seems to be the magic number here.
|
||||
// Slowly decrease the distance again
|
||||
fCrosshairDistance -= ( fCrosshairDistance * frametime );
|
||||
|
||||
if ( ( iShotMultiplier > 0 ) && ( fDecreaseShotTime < time ) ) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma target fte
|
||||
|
||||
#pragma progs_dat "../../freecs/csprogs.dat"
|
||||
|
||||
#define CSQC
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Menu\Objects.c" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Menu\progs.src" />
|
||||
</category>
|
||||
<category name="Shared" expanded="yes">
|
||||
<category name="Shared" expanded="no">
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Animations.c" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\BaseMelee.c" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Effects.c" />
|
||||
|
@ -112,22 +112,7 @@
|
|||
</project>
|
||||
|
||||
<workspace version="Crimson Editor 3.60">
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Defs.h" linenum="18" placement="0:1:-1:-1:-4:-23:22:22:914:394" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Draw.c" linenum="168" placement="0:1:-1:-1:-4:-23:44:44:940:420" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Event.c" linenum="425" placement="2:3:-1:-1:-4:-23:66:66:962:442" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\HUD.c" linenum="1" placement="0:1:-1:-1:-4:-23:88:88:984:464" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Init.c" linenum="21" placement="0:1:-1:-1:-4:-23:110:110:1006:486" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Player.c" linenum="65" placement="0:1:-1:-1:-4:-23:132:132:1028:508" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Nightvision.c" linenum="56" placement="0:1:-1:-1:-4:-23:132:132:1028:508" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Spawn.c" linenum="110" placement="0:1:-1:-1:-4:-23:154:154:1050:530" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Animations.c" linenum="149" placement="0:1:-1:-1:-4:-23:176:176:1072:552" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Weapons.c" linenum="114" placement="0:1:-1:-1:-4:-23:0:0:896:376" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\BaseMelee.c" linenum="26" placement="0:1:-1:-1:-4:-23:22:22:918:398" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponC4Bomb.c" linenum="187" placement="0:1:-1:-1:-4:-23:44:44:940:420" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponBase.c" linenum="90" placement="0:1:-1:-1:-4:-23:66:66:962:442" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Client.c" linenum="152" placement="0:1:-1:-1:-4:-23:88:88:984:464" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Globals.h" linenum="218" placement="0:1:-1:-1:-4:-23:110:110:1006:486" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Entities.c" linenum="1" placement="0:1:-1:-1:-4:-23:132:132:1028:508" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Entities.c" linenum="20" placement="0:1:-1:-1:-4:-23:154:154:1050:530" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Builtins.h" linenum="2247" placement="0:1:-1:-1:-4:-23:198:198:1046:676" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\HUD.c" linenum="15" placement="2:3:-1:-1:-4:-23:220:220:1072:702" />
|
||||
</workspace>
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma target fte
|
||||
|
||||
#pragma progs_dat "../../freecs/menu.dat"
|
||||
|
||||
#define MENU
|
||||
|
|
|
@ -18,8 +18,6 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#define VEC_PLAYER_VIEWPOS '0 0 20'
|
||||
#define VEC_PLAYER_CVIEWPOS '0 0 12'
|
||||
|
||||
|
@ -103,6 +101,7 @@ int iBombPlanted;
|
|||
.void( int iHitBody ) vDeath;
|
||||
.float fRespawns;
|
||||
.entity eUser;
|
||||
.float material;
|
||||
|
||||
// All about +use
|
||||
entity eActivator;
|
||||
|
|
|
@ -32,8 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define SF_TOUCH 2
|
||||
#define SF_PRESSURE 4
|
||||
|
||||
.float material;
|
||||
|
||||
/*
|
||||
=================
|
||||
func_breakable_pain
|
||||
|
|
|
@ -84,16 +84,15 @@ void Effect_Impact( int iType, vector vPos, vector vNormal ) {
|
|||
WriteByte( MSG_MULTICAST, SVC_CGAMEPACKET );
|
||||
WriteByte( MSG_MULTICAST, EV_IMPACT );
|
||||
WriteByte( MSG_MULTICAST, (float)iType );
|
||||
WriteCoord( MSG_MULTICAST, vPos_x);
|
||||
WriteCoord( MSG_MULTICAST, vPos_y);
|
||||
WriteCoord( MSG_MULTICAST, vPos_z);
|
||||
WriteCoord( MSG_MULTICAST, vNormal_x);
|
||||
WriteCoord( MSG_MULTICAST, vNormal_y);
|
||||
WriteCoord( MSG_MULTICAST, vNormal_z);
|
||||
WriteCoord( MSG_MULTICAST, vPos_x );
|
||||
WriteCoord( MSG_MULTICAST, vPos_y );
|
||||
WriteCoord( MSG_MULTICAST, vPos_z );
|
||||
WriteCoord( MSG_MULTICAST, vNormal_x );
|
||||
WriteCoord( MSG_MULTICAST, vNormal_y );
|
||||
WriteCoord( MSG_MULTICAST, vNormal_z );
|
||||
msg_entity = self;
|
||||
multicast( vPos, MULTICAST_PVS );
|
||||
#else
|
||||
|
||||
switch ( iType ) {
|
||||
case IMPACT_MELEE:
|
||||
pointparticles( DECAL_SHOT, vPos, vNormal, 1 );
|
||||
|
|
|
@ -62,10 +62,11 @@ enum {
|
|||
#ifdef SSQC
|
||||
var float fBeepTime; // Used for the beeping sounds that last 1.5 seconds
|
||||
var float fDefuseProgress; // Used to track... the progress
|
||||
|
||||
static void WeaponC4BOMB_Use( void ) {
|
||||
//if ( eActivator.team != TEAM_CT ) {
|
||||
// return;
|
||||
//}
|
||||
/*if ( eActivator.team != TEAM_CT ) {
|
||||
return;
|
||||
}*/
|
||||
|
||||
// On first use, play defusing sound
|
||||
if ( self.eUser == world ) {
|
||||
|
@ -160,9 +161,12 @@ void WeaponC4BOMB_Drop( vector vBombPos ) {
|
|||
// Do all the dirty entspawning stuff
|
||||
entity eBomb = spawn();
|
||||
eBomb.classname = "c4bomb";
|
||||
setorigin( eBomb, vBombPos );
|
||||
setmodel( eBomb, "models/w_c4.mdl" );
|
||||
|
||||
eBomb.solid = SOLID_BBOX;
|
||||
setmodel( eBomb, "models/w_c4.mdl" );
|
||||
setorigin( eBomb, vBombPos );
|
||||
setsize( eBomb, '-6 -6 0', '6 6 6' );
|
||||
|
||||
eBomb.customphysics = WeaponC4BOMB_Think;
|
||||
eBomb.fAttackFinished = time + autocvar_mp_c4timer;
|
||||
eBomb.vUse = WeaponC4BOMB_Use;
|
||||
|
@ -178,7 +182,7 @@ void WeaponC4BOMB_Drop( vector vBombPos ) {
|
|||
// Tell the bomb-planter to get rid of the weapon!
|
||||
self.fSlotGrenade = self.fSlotGrenade - WEAPON_C4BOMB;
|
||||
Weapon_SwitchBest();
|
||||
eprint( eBomb );
|
||||
//eprint( eBomb );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -195,6 +199,7 @@ void WeaponC4BOMB_Release( void ) {
|
|||
self.fBombProgress = 0;
|
||||
self.fAttackFinished = time + 1.0;
|
||||
#else
|
||||
// TODO: This does not happen, yet
|
||||
View_PlayAnimation( ANIM_C4_IDLE );
|
||||
iBombProgress = 0;
|
||||
#endif
|
||||
|
|
|
@ -100,7 +100,7 @@ void WeaponHEGRENADE_Throw( void ) {
|
|||
remove( self );
|
||||
}
|
||||
static void Weapon_HEGRENADE_Touch( void ) {
|
||||
if ( other.classname == "func_breakable" ) {
|
||||
if ( other.classname == "func_breakable" && other.material == MATERIAL_GLASS ) {
|
||||
Damage_Apply( other, self, 10, self.origin );
|
||||
}
|
||||
sound( self, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1, ATTN_NORM );
|
||||
|
|
Binary file not shown.
|
@ -70,3 +70,4 @@ seta com_nogamedirnativecode "0"
|
|||
seta cl_cursor_scale "1"
|
||||
seta r_shadow_realtime_world_shadows "0"
|
||||
seta r_shadow_realtime_dlight_shadows "0"
|
||||
seta r_imageexensions "tga bmp pcx"
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
freecs/menu.dat
BIN
freecs/menu.dat
Binary file not shown.
BIN
freecs/progs.dat
BIN
freecs/progs.dat
Binary file not shown.
Loading…
Reference in a new issue