diff --git a/Source/Client/Draw.c b/Source/Client/Draw.c index ce415514..cde3489d 100755 --- a/Source/Client/Draw.c +++ b/Source/Client/Draw.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define CHAT_LINES 5 -#define CHAT_TIME 10 +#define CHAT_TIME 20 var int iLineScroll = 0; float fChatTime; diff --git a/Source/FreeCS-CE.prj b/Source/FreeCS-CE.prj index e4c2b427..01652c17 100644 --- a/Source/FreeCS-CE.prj +++ b/Source/FreeCS-CE.prj @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -114,14 +114,29 @@ - + - - + + - + + + + + + + + + + + + + + + + diff --git a/Source/Server/Client.c b/Source/Server/Client.c index d23c81d6..eea9a213 100755 --- a/Source/Server/Client.c +++ b/Source/Server/Client.c @@ -37,7 +37,7 @@ Suicide command 'kill' executes this function. ================= */ void ClientKill( void ) { - Damage_Apply( self, self, self.health, self.origin ); + Damage_Apply( self, self, self.health, self.origin, TRUE ); } /* diff --git a/Source/Server/Damage.c b/Source/Server/Damage.c index d6bc5c6f..682f23ad 100644 --- a/Source/Server/Damage.c +++ b/Source/Server/Damage.c @@ -94,7 +94,7 @@ Damage_Apply Generic function that applies damage, pain and suffering ================= */ -void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos ) { +void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos, int iSkipArmor ) { // Modify the damage based on the location if ( trace_surface_id == BODY_HEAD ) { if ( eTarget.iEquipment & EQUIPMENT_HELMET ) { @@ -137,7 +137,12 @@ void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos } eTarget.armor -= fNewArmor; } - eTarget.health -= fNewDmg; + + if ( iSkipArmor == TRUE ) { + eTarget.health -= iDamage; + } else { + eTarget.health -= fNewDmg; + } } else { // No armor eTarget.health -= iDamage; @@ -203,7 +208,7 @@ void Damage_Radius( vector vOrigin, entity eAttacker, float fDamage, float fRadi fDamage = fDamage * fDiff; if ( fDamage > 0 ) { - Damage_Apply( eDChain, eAttacker, fDamage, eDChain.origin ); + Damage_Apply( eDChain, eAttacker, fDamage, eDChain.origin, FALSE ); } } eDChain = eDChain.chain; diff --git a/Source/Server/Defs.h b/Source/Server/Defs.h index 512800de..1a2935ad 100755 --- a/Source/Server/Defs.h +++ b/Source/Server/Defs.h @@ -148,7 +148,7 @@ 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 ); +void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos, int iSkipArmor ); void Entities_UseTargets( void ); void Entities_InitRespawnable( void() vRespawnFunc ); diff --git a/Source/Server/FuncBreakable.c b/Source/Server/FuncBreakable.c index 02ac5cc6..20cb88ed 100755 --- a/Source/Server/FuncBreakable.c +++ b/Source/Server/FuncBreakable.c @@ -108,10 +108,10 @@ void func_breakable_touch( void ) { if ( fDamage >= self.health ) { self.touch = func_breakable_touch_NULL; - Damage_Apply( self, other, fDamage, self.absmin ); + Damage_Apply( self, other, fDamage, self.absmin, FALSE ); if ( ( self.material == MATERIAL_GLASS ) || ( self.material == MATERIAL_COMPUTER ) ) { - Damage_Apply( other, self, fDamage / 4, other.origin ); + Damage_Apply( other, self, fDamage / 4, other.origin, FALSE ); } } } diff --git a/Source/Server/FuncButton.c b/Source/Server/FuncButton.c index ec33ca90..369d8169 100755 --- a/Source/Server/FuncButton.c +++ b/Source/Server/FuncButton.c @@ -254,7 +254,7 @@ FuncButton_Blocked */ void FuncButton_Blocked( void ) { if ( self.dmg ) { - Damage_Apply( other, self, self.dmg, other.origin ); + Damage_Apply( other, self, self.dmg, other.origin, FALSE ); } if ( self.wait >= 0 ) { diff --git a/Source/Server/FuncDoor.c b/Source/Server/FuncDoor.c index 774ea0d5..0b7f8c74 100755 --- a/Source/Server/FuncDoor.c +++ b/Source/Server/FuncDoor.c @@ -220,7 +220,7 @@ FuncDoor_Blocked */ void FuncDoor_Blocked( void ) { if( self.dmg ) { - Damage_Apply( other, self, self.dmg, other.origin ); + Damage_Apply( other, self, self.dmg, other.origin, FALSE ); } if ( self.wait >= 0 ) { diff --git a/Source/Server/FuncDoorRotating.c b/Source/Server/FuncDoorRotating.c index ba4ce242..20e7a5d4 100755 --- a/Source/Server/FuncDoorRotating.c +++ b/Source/Server/FuncDoorRotating.c @@ -192,7 +192,7 @@ FuncDoorRotate_Blocked */ void FuncDoorRotate_Blocked( void ) { if ( self.dmg ) { - Damage_Apply( other, self, self.dmg, other.origin ); + Damage_Apply( other, self, self.dmg, other.origin, FALSE ); } if ( self.wait >= 0 ) { diff --git a/Source/Server/Player.c b/Source/Server/Player.c index 49ee796c..12ba3f9e 100755 --- a/Source/Server/Player.c +++ b/Source/Server/Player.c @@ -320,7 +320,7 @@ void PlayerPostThink( void ) { if ( self.fFallVelocity > 580 ) { self.fFallVelocity -= 580; float fFallDamage = self.fFallVelocity * ( 200 / ( 1024 - 580 ) ); - Damage_Apply( self, world, fFallDamage, self.origin ); + Damage_Apply( self, world, fFallDamage, self.origin, FALSE ); } self.fFallVelocity = 0; } diff --git a/Source/Server/TraceAttack.c b/Source/Server/TraceAttack.c index 5a4837cf..4e2492da 100755 --- a/Source/Server/TraceAttack.c +++ b/Source/Server/TraceAttack.c @@ -40,7 +40,7 @@ void TraceAttack_FireSingle( vector vPos, vector vAngle ) { if (trace_fraction != 1.0) { if ( trace_ent.takedamage == DAMAGE_YES ) { - Damage_Apply( trace_ent, self, wptTable[ self.weapon ].iDamage, trace_endpos ); + Damage_Apply( trace_ent, self, wptTable[ self.weapon ].iDamage, trace_endpos, FALSE ); } if ( trace_ent.iBleeds == TRUE ) { diff --git a/Source/Server/Triggers.c b/Source/Server/Triggers.c index b4a70991..b5db9d0c 100755 --- a/Source/Server/Triggers.c +++ b/Source/Server/Triggers.c @@ -156,7 +156,7 @@ void trigger_hurt( void ) { Entities_UseTargets(); } - Damage_Apply( other, self, self.dmg, other.origin ); + Damage_Apply( other, self, self.dmg, other.origin, FALSE ); // Shut it down if used once if ( self.spawnflags & SF_HURT_ONCE ) { diff --git a/Source/Shared/BaseMelee.c b/Source/Shared/BaseMelee.c index e2ac351b..e66ef99f 100755 --- a/Source/Shared/BaseMelee.c +++ b/Source/Shared/BaseMelee.c @@ -45,7 +45,7 @@ int BaseMelee_Attack( void ) { Effect_Impact( IMPACT_FLESH, trace_endpos, trace_plane_normal ); sound( self, CHAN_WEAPON, sprintf( "weapons/knife_hit%d.wav", floor( ( random() * 4 ) + 1 ) ), 1, ATTN_NORM ); } - Damage_Apply( trace_ent, self, wptTable[ self.weapon ].iDamage, trace_endpos ); + Damage_Apply( trace_ent, self, wptTable[ self.weapon ].iDamage, trace_endpos, FALSE ); } else { Effect_Impact( IMPACT_MELEE, trace_endpos, trace_plane_normal ); } diff --git a/Source/Shared/WeaponC4Bomb.c b/Source/Shared/WeaponC4Bomb.c index 07aef777..efe48fd5 100755 --- a/Source/Shared/WeaponC4Bomb.c +++ b/Source/Shared/WeaponC4Bomb.c @@ -94,6 +94,7 @@ static void WeaponC4BOMB_Use( void ) { } eActivator.fProgressBar = (fDefuseProgress * 0.1); + self.fProgressBar = time + 1.0f; // Make sure WeaponC4BOMB_Think knows who the user is self.eUser = eActivator; @@ -102,9 +103,11 @@ static void WeaponC4BOMB_Use( void ) { static void WeaponC4BOMB_Think( void ) { // If the guy who started using us stopped using us, reset the defuser counter if ( ( self.eUser != world ) && ( self.eUser.button6 == FALSE ) ) { - self.eUser.fProgressBar = 0; - self.eUser = world; - fDefuseProgress = 0; + if ( self.fProgressBar < time ) { + self.eUser.fProgressBar = 0; + self.eUser = world; + fDefuseProgress = 0; + } } // If our time has passed, explode diff --git a/Source/Shared/WeaponFlashbang.c b/Source/Shared/WeaponFlashbang.c index 734108a0..6471c5be 100755 --- a/Source/Shared/WeaponFlashbang.c +++ b/Source/Shared/WeaponFlashbang.c @@ -126,7 +126,7 @@ void WeaponFLASHBANG_Throw( void ) { return; } if ( other.classname == "func_breakable" ) { - Damage_Apply( other, self, 10, self.origin ); + Damage_Apply( other, self, 10, self.origin, FALSE ); } sound( self, CHAN_WEAPON, sprintf( "weapons/grenade_hit%d.wav", floor( random() * 3 ) + 1 ), 1, ATTN_NORM ); } diff --git a/Source/Shared/WeaponHEGrenade.c b/Source/Shared/WeaponHEGrenade.c index 991f2552..87edc3a0 100755 --- a/Source/Shared/WeaponHEGrenade.c +++ b/Source/Shared/WeaponHEGrenade.c @@ -108,7 +108,7 @@ void WeaponHEGRENADE_Throw( void ) { return; } if ( other.classname == "func_breakable" && other.material == MATERIAL_GLASS ) { - Damage_Apply( other, self, 10, self.origin ); + Damage_Apply( other, self, 10, self.origin, FALSE ); } sound( self, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1, ATTN_NORM ); diff --git a/Source/Shared/WeaponSmokeGrenade.c b/Source/Shared/WeaponSmokeGrenade.c index bc585a7b..546d1f44 100755 --- a/Source/Shared/WeaponSmokeGrenade.c +++ b/Source/Shared/WeaponSmokeGrenade.c @@ -114,7 +114,7 @@ void WeaponSMOKEGRENADE_Throw( void ) { return; } if ( other.classname == "func_breakable" ) { - Damage_Apply( other, self, 10, self.origin ); + Damage_Apply( other, self, 10, self.origin, FALSE ); } sound( self, CHAN_WEAPON, sprintf( "weapons/grenade_hit%d.wav", floor( random() * 3 ) + 1 ), 1, ATTN_NORM ); } diff --git a/freecs/csprogs.dat b/freecs/csprogs.dat index 1dfccfca..814ddba4 100644 Binary files a/freecs/csprogs.dat and b/freecs/csprogs.dat differ diff --git a/freecs/progs.dat b/freecs/progs.dat index 6e3017b3..f0a75a2c 100644 Binary files a/freecs/progs.dat and b/freecs/progs.dat differ