Fixed range of TraceAttack weapons
Fixed AWP inaccuracy
This commit is contained in:
parent
940fd4b084
commit
dbde5342d7
11 changed files with 180 additions and 120 deletions
|
@ -1,5 +1,5 @@
|
|||
<project version="Crimson Editor 3.60">
|
||||
<category name="Client" expanded="yes">
|
||||
<category name="Client" expanded="no">
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Defs.h" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Draw.c" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Entities.c" />
|
||||
|
@ -25,7 +25,7 @@
|
|||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\VGUITeamSelect.c" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\View.c" />
|
||||
</category>
|
||||
<category name="Server" expanded="no">
|
||||
<category name="Server" expanded="yes">
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\AmbientSound.c" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Ammo.c" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\ArmouryEntity.c" />
|
||||
|
@ -60,7 +60,7 @@
|
|||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\TraceAttack.c" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Triggers.c" />
|
||||
</category>
|
||||
<category name="Menu" expanded="no">
|
||||
<category name="Menu" expanded="yes">
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Menu\Defs.h" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Menu\Draw.c" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Menu\Header.c" />
|
||||
|
@ -71,7 +71,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="no">
|
||||
<category name="Shared" expanded="yes">
|
||||
<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" />
|
||||
|
@ -113,11 +113,37 @@
|
|||
</project>
|
||||
|
||||
<workspace version="Crimson Editor 3.60">
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Builtins.h" linenum="11" placement="0:1:-1:-1:-4:-23:132:132:980:597" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Init.c" linenum="29" placement="0:1:-1:-1:-4:-23:154:154:1006:623" />
|
||||
<localfile path="C:\Users\eukara\Dropbox\The Wastes Build\conhistory.txt" linenum="1" placement="0:1:-1:-1:-4:-23:176:176:1028:645" />
|
||||
<localfile path="C:\Users\eukara\Dropbox\The Wastes Build\SDK\COMPILE_ARGS.txt" linenum="1" placement="0:1:-1:-1:-4:-23:110:110:962:579" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\fteqw-code\specs\multiprogs.txt" linenum="1" placement="0:1:-1:-1:-4:-23:132:132:984:601" />
|
||||
<localfile path="E:\WORLDCRAFT\README.TXT" linenum="19" placement="2:3:-1:-1:-4:-23:154:154:1006:623" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\EntHostage.c" linenum="42" placement="0:1:-1:-1:-4:-23:110:110:958:575" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Player.c" linenum="80" placement="0:1:-1:-1:-4:-23:132:132:984:601" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Footsteps.c" linenum="1" placement="0:1:-1:-1:-4:-23:154:154:1006:623" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Math.h" linenum="32" placement="0:1:-1:-1:-4:-23:176:176:1028:645" />
|
||||
<localfile path="C:\Users\eukara\Dropbox\The Wastes Build\SDK\Source\Globals.h" linenum="369" placement="0:1:-1:-1:-4:-23:198:198:1050:667" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\View.c" linenum="1" placement="0:1:-1:-1:-4:-23:220:220:1072:689" />
|
||||
<localfile path="C:\Users\eukara\Dropbox\The Wastes Build\SDK\Source\Client\View.c" linenum="108" placement="0:1:-1:-1:-4:-23:0:0:852:469" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Defs.h" linenum="1" placement="0:1:-1:-1:-4:-23:22:22:874:491" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Menu\Defs.h" linenum="170" placement="0:1:-1:-1:-4:-23:44:44:896:513" />
|
||||
<localfile path="D:\Games\Half-Life\SDK\Single-Player Source\dlls\triggers.cpp" linenum="248" placement="0:1:-1:-1:-4:-23:66:66:918:535" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Entities.c" linenum="109" placement="0:1:-1:-1:-4:-23:154:154:1006:623" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\FuncDoor.c" linenum="209" placement="0:1:-1:-1:-4:-23:176:176:1028:645" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\FuncDoorRotating.c" linenum="180" placement="0:1:-1:-1:-4:-23:198:198:1050:667" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Defs.h" linenum="27" placement="0:1:-1:-1:-4:-23:220:220:1072:689" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Globals.h" linenum="289" placement="0:1:-1:-1:-4:-23:0:0:852:469" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\Rules.c" linenum="105" placement="0:1:-1:-1:-4:-23:22:22:874:491" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Weapons.c" linenum="396" placement="0:1:-1:-1:-4:-23:44:44:896:513" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponFlashbang.c" linenum="101" placement="0:1:-1:-1:-4:-23:66:66:918:535" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\Entities.c" linenum="38" placement="0:1:-1:-1:-4:-23:88:88:940:557" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\ArmouryEntity.c" linenum="78" placement="0:1:-1:-1:-4:-23:110:110:962:579" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\FuncEscapeZone.c" linenum="36" placement="0:1:-1:-1:-4:-23:132:132:984:601" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponAWP.c" linenum="41" placement="0:1:-1:-1:-4:-23:154:154:1006:623" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponAK47.c" linenum="1" placement="0:1:-1:-1:-4:-23:176:176:1028:645" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponAUG.c" linenum="1" placement="0:1:-1:-1:-4:-23:198:198:1050:667" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Server\TraceAttack.c" linenum="39" placement="0:1:-1:-1:-4:-23:220:220:1072:689" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponBase.c" linenum="99" placement="0:1:-1:-1:-4:-23:0:0:852:469" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponP228.c" linenum="1" placement="0:1:-1:-1:-4:-23:22:22:874:491" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponP90.c" linenum="1" placement="0:1:-1:-1:-4:-23:44:44:896:513" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponUMP45.c" linenum="1" placement="0:1:-1:-1:-4:-23:66:66:918:535" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponUSP45.c" linenum="1" placement="0:1:-1:-1:-4:-23:88:88:940:557" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponXM1014.c" linenum="47" placement="0:1:-1:-1:-4:-23:110:110:962:579" />
|
||||
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\freecs\default.cfg" linenum="34" placement="2:3:-1:-1:-4:-23:132:132:984:601" />
|
||||
</workspace>
|
||||
|
||||
|
|
|
@ -286,6 +286,7 @@ enum {
|
|||
#define FL_CROUCHING 16384
|
||||
#define FL_SEMI_TOGGLED 32768
|
||||
#define FL_FROZEN 131072
|
||||
#define FL_REMOVEME 262144
|
||||
|
||||
float clamp(float d, float imin, float imax) {
|
||||
float t;
|
||||
|
|
|
@ -174,8 +174,4 @@ typedef struct {
|
|||
} fcsMenu;
|
||||
|
||||
void Menu_SetClipArea( vector vPosition, vector vRegion );
|
||||
void Menu_ResetClipArea( void );
|
||||
|
||||
float Math_Lerp( float fA, float fB, float fPercent ) {
|
||||
return ( fA * ( 1 - fPercent ) ) + ( fB * fPercent );
|
||||
}
|
||||
void Menu_ResetClipArea( void );
|
|
@ -206,7 +206,7 @@ void FuncDoor_Touch( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( other.classname == "player" ) {
|
||||
if ( other.movetype == MOVETYPE_WALK ) {
|
||||
FuncDoor_Trigger();
|
||||
}
|
||||
}
|
||||
|
@ -237,48 +237,48 @@ func_door
|
|||
Spawn function of a moving door entity
|
||||
====================
|
||||
*/
|
||||
|
||||
void func_door( void ) {
|
||||
static void func_door_respawn( void ) {
|
||||
self.solid = SOLID_BSP;
|
||||
self.movetype = MOVETYPE_PUSH;
|
||||
setorigin( self, self.origin );
|
||||
setmodel( self, self.model );
|
||||
|
||||
self.blocked = FuncDoor_Blocked;
|
||||
self.vUse = FuncDoor_Trigger;
|
||||
|
||||
if ( self.wait == -1 ) {
|
||||
self.spawnflags = self.spawnflags | SF_MOV_TOGGLE;
|
||||
}
|
||||
|
||||
if ( !self.speed ) {
|
||||
self.speed = 100;
|
||||
}
|
||||
|
||||
if ( !self.dmg ) {
|
||||
self.dmg = 2;
|
||||
}
|
||||
|
||||
if ( self.spawnflags & SF_MOV_USE ) {
|
||||
self.iUsable = TRUE;
|
||||
} else {
|
||||
self.touch = FuncDoor_Touch;
|
||||
}
|
||||
|
||||
self.state = STATE_LOWERED;
|
||||
self.pos1 = self.origin;
|
||||
self.pos2 = ( self.pos1 + self.movedir * ( fabs( self.movedir * self.size ) - self.lip ) );
|
||||
|
||||
if ( self.spawnflags & SF_MOV_OPEN ) {
|
||||
setorigin( self, self.pos2 );
|
||||
self.pos2 = self.pos1;
|
||||
self.pos1 = self.origin;
|
||||
}
|
||||
}
|
||||
|
||||
FuncDoor_PrecacheSounds();
|
||||
Entities_SetMovementDirection();
|
||||
|
||||
self.solid = SOLID_BSP;
|
||||
|
||||
self.movetype = MOVETYPE_PUSH;
|
||||
setorigin( self, self.origin );
|
||||
setmodel( self, self.model );
|
||||
|
||||
self.blocked = FuncDoor_Blocked;
|
||||
self.vUse = FuncDoor_Trigger;
|
||||
|
||||
if ( self.wait == -1 ) {
|
||||
self.spawnflags = self.spawnflags | SF_MOV_TOGGLE;
|
||||
}
|
||||
|
||||
if ( !self.speed ) {
|
||||
self.speed = 100;
|
||||
}
|
||||
|
||||
if ( !self.dmg ) {
|
||||
self.dmg = 2;
|
||||
}
|
||||
|
||||
if ( self.spawnflags & SF_MOV_USE ) {
|
||||
self.iUsable = TRUE;
|
||||
} else {
|
||||
self.touch = FuncDoor_Touch;
|
||||
}
|
||||
|
||||
|
||||
self.pos1 = self.origin;
|
||||
self.pos2 = ( self.pos1 + self.movedir * ( fabs( self.movedir * self.size ) - self.lip ) );
|
||||
|
||||
if ( self.spawnflags & SF_MOV_OPEN ) {
|
||||
setorigin( self, self.pos2 );
|
||||
self.pos2 = self.pos1;
|
||||
self.pos1 = self.origin;
|
||||
}
|
||||
|
||||
self.state = STATE_LOWERED;
|
||||
func_door_respawn();
|
||||
Entities_InitRespawnable( func_door_respawn );
|
||||
Entities_RenderSetup();
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ void FuncDoorRotate_Touch( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( other.classname == "player" ) {
|
||||
if ( other.movetype == MOVETYPE_WALK ) {
|
||||
eActivator = other;
|
||||
FuncDoorRotate_Trigger();
|
||||
}
|
||||
|
@ -211,57 +211,59 @@ BrushRotate
|
|||
=================
|
||||
*/
|
||||
void func_door_rotating( void ) {
|
||||
static void func_door_rotating_respawn( void ) {
|
||||
self.solid = SOLID_BSP;
|
||||
self.movetype = MOVETYPE_PUSH;
|
||||
setorigin( self, self.origin );
|
||||
setmodel( self, self.model );
|
||||
|
||||
self.blocked = FuncDoorRotate_Blocked;
|
||||
self.vUse = FuncDoorRotate_Trigger;
|
||||
|
||||
if ( self.spawnflags & SF_ROT_USE ) {
|
||||
self.iUsable = TRUE;
|
||||
} else {
|
||||
self.touch = FuncDoorRotate_Touch;
|
||||
}
|
||||
|
||||
if ( !self.speed ) {
|
||||
self.speed = 100;
|
||||
}
|
||||
|
||||
if ( self.wait == 0 ) {
|
||||
self.wait = 4;
|
||||
}
|
||||
|
||||
self.state = STATE_LOWERED;
|
||||
self.pos1 = self.angles;
|
||||
|
||||
// Only do Y
|
||||
if ( self.spawnflags & SF_ROT_XAXIS ) {
|
||||
self.pos2_y = self.pos1_y + self.distance;
|
||||
|
||||
}
|
||||
|
||||
// Only do X
|
||||
if ( self.spawnflags & SF_ROT_YAXIS ) {
|
||||
self.pos2_x = self.pos1_x + self.distance;
|
||||
|
||||
}
|
||||
|
||||
// only do Y by default
|
||||
if ( !( self.spawnflags & SF_ROT_YAXIS ) && !( self.spawnflags & SF_ROT_XAXIS ) ) {
|
||||
self.pos2_y = self.pos1_y + self.distance;
|
||||
}
|
||||
|
||||
if ( self.spawnflags & SF_ROT_OPEN ) {
|
||||
vector vTemp = self.pos2;
|
||||
self.pos2 = self.pos1;
|
||||
self.pos1 = vTemp;
|
||||
self.angles = self.pos1;
|
||||
}
|
||||
}
|
||||
FuncDoor_PrecacheSounds();
|
||||
Entities_SetMovementDirection();
|
||||
self.solid = SOLID_BSP;
|
||||
self.movetype = MOVETYPE_PUSH;
|
||||
setorigin( self, self.origin );
|
||||
setmodel( self, self.model );
|
||||
|
||||
self.blocked = FuncDoorRotate_Blocked;
|
||||
self.vUse = FuncDoorRotate_Trigger;
|
||||
|
||||
if ( self.spawnflags & SF_ROT_USE ) {
|
||||
self.iUsable = TRUE;
|
||||
} else {
|
||||
self.touch = FuncDoorRotate_Touch;
|
||||
}
|
||||
|
||||
if ( !self.speed ) {
|
||||
self.speed = 100;
|
||||
}
|
||||
|
||||
if ( self.wait == 0 ) {
|
||||
self.wait = 4;
|
||||
}
|
||||
|
||||
self.pos1 = self.angles;
|
||||
|
||||
// Only do Y
|
||||
if ( self.spawnflags & SF_ROT_XAXIS ) {
|
||||
self.pos2_y = self.pos1_y + self.distance;
|
||||
|
||||
}
|
||||
|
||||
// Only do X
|
||||
if ( self.spawnflags & SF_ROT_YAXIS ) {
|
||||
self.pos2_x = self.pos1_x + self.distance;
|
||||
|
||||
}
|
||||
|
||||
// only do Y by default
|
||||
if ( !( self.spawnflags & SF_ROT_YAXIS ) && !( self.spawnflags & SF_ROT_XAXIS ) ) {
|
||||
self.pos2_y = self.pos1_y + self.distance;
|
||||
}
|
||||
|
||||
if ( self.spawnflags & SF_ROT_OPEN ) {
|
||||
vector vTemp = self.pos2;
|
||||
self.pos2 = self.pos1;
|
||||
self.pos1 = vTemp;
|
||||
self.angles = self.pos1;
|
||||
}
|
||||
|
||||
self.state = STATE_LOWERED;
|
||||
|
||||
func_door_rotating_respawn();
|
||||
Entities_InitRespawnable( func_door_rotating_respawn );
|
||||
Entities_RenderSetup();
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ void TraceAttack_FireSingle( vector vPos, vector vAngle ) {
|
|||
TraceAttack_FireSingle( vPos, vAngle );
|
||||
iTotalPenetrations++;
|
||||
}
|
||||
traceline( vPos, vPos + ( vAngle * 2048 ), MOVE_HITMODEL, self);
|
||||
traceline( vPos, vPos + ( vAngle * 8192 ), MOVE_HITMODEL, self);
|
||||
|
||||
if (trace_fraction != 1.0) {
|
||||
if ( trace_ent.takedamage == DAMAGE_YES ) {
|
||||
|
|
|
@ -165,21 +165,48 @@ void trigger_hurt( void ) {
|
|||
|
||||
self.fAttackFinished = self.ltime + 0.5;
|
||||
}
|
||||
static void trigger_hurt_respawn( void ) {
|
||||
self.angles = '0 0 0';
|
||||
self.solid = SOLID_TRIGGER;
|
||||
|
||||
self.angles = '0 0 0';
|
||||
self.solid = SOLID_TRIGGER;
|
||||
|
||||
setmodel( self, self.model );
|
||||
self.model = 0;
|
||||
|
||||
if ( self.spawnflags & SF_HURT_OFF ) {
|
||||
self.solid = SOLID_NOT;
|
||||
setmodel( self, self.model );
|
||||
self.model = 0;
|
||||
|
||||
if ( self.spawnflags & SF_HURT_OFF ) {
|
||||
self.solid = SOLID_NOT;
|
||||
}
|
||||
|
||||
self.vUse = trigger_hurt_use;
|
||||
self.touch = trigger_hurt_touch;
|
||||
}
|
||||
|
||||
self.vUse = trigger_hurt_use;
|
||||
self.touch = trigger_hurt_touch;
|
||||
trigger_hurt_respawn();
|
||||
Entities_InitRespawnable( trigger_hurt_respawn );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
trigger_relay
|
||||
|
||||
This entity acts as a relay between an event and its target.
|
||||
Its main advantage is that it can send a specific trigger state
|
||||
to its target (only turn it on, or only turn it off, as opposed
|
||||
to the toggling experienced with typical triggering).
|
||||
|
||||
Attributes:
|
||||
Name (targetname)
|
||||
Target (target)
|
||||
Delay before trigger (delay)
|
||||
Trigger State (triggerstate) - Off (0), On (1), or Toggle (2)
|
||||
|
||||
Flags:
|
||||
Remove On fire (1)
|
||||
=================
|
||||
*/
|
||||
void trigger_relay( void ) {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
multi_manager
|
||||
|
|
|
@ -91,7 +91,16 @@ void OpenCSGunBase_Draw( void ) {
|
|||
}
|
||||
|
||||
void OpenCSGunBase_AccuracyCalc( void ) {
|
||||
self.fAccuracy = ( self.iShotMultiplier / wptTable[ self.weapon ].fAccuracyDivisor );
|
||||
|
||||
if ( wptTable[ self.weapon ].fAccuracyDivisor == -1 ) {
|
||||
if ( self.viewzoom < 1.0f ) {
|
||||
self.fAccuracy = 0.0f;
|
||||
} else {
|
||||
self.fAccuracy = 0.05f;
|
||||
}
|
||||
} else {
|
||||
self.fAccuracy = ( self.iShotMultiplier / wptTable[ self.weapon ].fAccuracyDivisor );
|
||||
}
|
||||
}
|
||||
|
||||
// Returns whether or not to play an animation
|
||||
|
|
|
@ -32,7 +32,6 @@ bind SHIFT +speed
|
|||
bind b buy
|
||||
bind m chooseteam
|
||||
bind ESC togglemenu
|
||||
bind v noclip
|
||||
|
||||
// Movement Variables
|
||||
seta sv_maxspeed 240
|
||||
|
|
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