Added sv_autoreload for those who really want it
Tweaked shell ejections just a little bit
This commit is contained in:
parent
57bf1c9576
commit
979c1d1d95
9 changed files with 58 additions and 37 deletions
|
@ -36,13 +36,14 @@ var float FONT_16;
|
|||
var vector autocvar_con_color = '255 170 0'; // autocvar of "con_color"
|
||||
var vector autocvar_vgui_color = '255 170 0'; // autocvar of "vgui_color"
|
||||
var vector autocvar_cross_color = '0 255 0'; // autocvar of "cross_color"
|
||||
var float autocvar_cl_bob = 0.01;
|
||||
var float autocvar_cl_bobcycle = 0.8;
|
||||
var float autocvar_cl_bobup = 0.5;
|
||||
var int autocvar_cl_bobclassic = FALSE;
|
||||
var float autocvar_cl_bob = 0;
|
||||
var float autocvar_v_bob = 0.01;
|
||||
var float autocvar_v_bobcycle = 0.8;
|
||||
var float autocvar_v_bobup = 0.5;
|
||||
var int autocvar_v_bobclassic = FALSE;
|
||||
var int autocvar_v_lefthanded = FALSE;
|
||||
var int autocvar_cl_thirdperson = FALSE;
|
||||
var int autocvar_cl_radar = 2;
|
||||
var int autocvar_cl_radar = 1;
|
||||
|
||||
// Particle stuff
|
||||
var float PARTICLE_SPARK;
|
||||
|
|
|
@ -40,9 +40,9 @@ void CSQC_Ent_Update( float flIsNew ) {
|
|||
self.predraw = Player_PreDraw;
|
||||
self.drawmask = MASK_ENGINE;
|
||||
self.pmove_frame = servercommandframe;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
Player_PreUpdate();
|
||||
}
|
||||
|
||||
self.modelindex = readbyte();
|
||||
self.origin_x = readcoord();
|
||||
|
|
|
@ -63,33 +63,54 @@ void View_CalcBob( void ) {
|
|||
}
|
||||
|
||||
pSeat->fBobTime += frametime;
|
||||
fCycle = pSeat->fBobTime - (int)( pSeat->fBobTime / autocvar_cl_bobcycle ) * autocvar_cl_bobcycle;
|
||||
fCycle /= autocvar_cl_bobcycle;
|
||||
fCycle = pSeat->fBobTime - (int)( pSeat->fBobTime / autocvar_v_bobcycle ) * autocvar_v_bobcycle;
|
||||
fCycle /= autocvar_v_bobcycle;
|
||||
|
||||
if ( fCycle < autocvar_cl_bobup ) {
|
||||
fCycle = MATH_PI * fCycle / autocvar_cl_bobup;
|
||||
if ( fCycle < autocvar_v_bobup ) {
|
||||
fCycle = MATH_PI * fCycle / autocvar_v_bobup;
|
||||
} else {
|
||||
fCycle = MATH_PI + MATH_PI * ( fCycle - autocvar_cl_bobup )/( 1.0 - autocvar_cl_bobup );
|
||||
fCycle = MATH_PI + MATH_PI * ( fCycle - autocvar_v_bobup )/( 1.0 - autocvar_v_bobup );
|
||||
}
|
||||
|
||||
vVelocity = pSeat->vPlayerVelocity;
|
||||
vVelocity_z = 0;
|
||||
|
||||
float fBob = sqrt( vVelocity_x * vVelocity_x + vVelocity_y * vVelocity_y ) * autocvar_cl_bob;
|
||||
float fBob = sqrt( vVelocity_x * vVelocity_x + vVelocity_y * vVelocity_y ) * autocvar_v_bob;
|
||||
fBob = fBob * 0.3 + fBob * 0.7 * sin( fCycle );
|
||||
pSeat->fBob = bound( -7, fBob, 4 );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
View_DropPunchAngle
|
||||
|
||||
Quickly lerp to the original viewposition
|
||||
====================
|
||||
*/
|
||||
void View_DropPunchAngle( void ) {
|
||||
float fLerp;
|
||||
fLerp = 1.0f - ( frametime * 4 );
|
||||
pSeat->vPunchAngle *= fLerp;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
View_AddPunchAngle
|
||||
|
||||
Gives the angle a bit of an offset/punch/kick
|
||||
====================
|
||||
*/
|
||||
void View_AddPunchAngle( vector vAdd ) {
|
||||
pSeat->vPunchAngle += vAdd;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
View_ShellEject
|
||||
|
||||
Spawns a shell tempentity. Looking fancy
|
||||
====================
|
||||
*/
|
||||
void View_ShellEject( void ) {
|
||||
static void View_ShellEject_Death( void ) {
|
||||
remove( self );
|
||||
|
@ -105,6 +126,7 @@ void View_ShellEject( void ) {
|
|||
setmodel( eShell, sShellModel[ wptTable[ getstati( STAT_ACTIVEWEAPON ) ].iShellType ] );
|
||||
eShell.movetype = MOVETYPE_BOUNCE;
|
||||
eShell.drawmask = MASK_ENGINE;
|
||||
eShell.angles = [ 0, view_angles_y, 0 ];
|
||||
eShell.velocity = pSeat->vPlayerVelocity + ( v_up * random( 70, 120 ) ) + ( v_right * -random( 50, 70 ) );
|
||||
eShell.think = View_ShellEject_Death;
|
||||
eShell.nextthink = time + 2.5f;
|
||||
|
@ -113,6 +135,9 @@ void View_ShellEject( void ) {
|
|||
/*
|
||||
====================
|
||||
View_ProcessEvent
|
||||
|
||||
Called by the engine whenever a model
|
||||
tries to play an event.
|
||||
====================
|
||||
*/
|
||||
void View_ProcessEvent( float fTimeStamp, int iCode, string sData ) {
|
||||
|
@ -148,6 +173,9 @@ void View_ProcessEvent( float fTimeStamp, int iCode, string sData ) {
|
|||
/*
|
||||
====================
|
||||
View_DrawViewModel
|
||||
|
||||
Really convoluted function that makes the gun,
|
||||
muzzleflash, dynamic lights and so on appear
|
||||
====================
|
||||
*/
|
||||
void View_DrawViewModel( void ) {
|
||||
|
@ -193,7 +221,6 @@ void View_DrawViewModel( void ) {
|
|||
float fBaseTime = eViewModel.frame1time;
|
||||
eViewModel.frame1time += frametime;
|
||||
eViewModel.frame2time += frametime;
|
||||
|
||||
processmodelevents( eViewModel.modelindex, eViewModel.frame, fBaseTime, eViewModel.frame1time, View_ProcessEvent );
|
||||
}
|
||||
|
||||
|
@ -213,7 +240,7 @@ void View_DrawViewModel( void ) {
|
|||
}
|
||||
|
||||
// Give the gun a tilt effect like in old HL/CS versions
|
||||
if ( autocvar_cl_bobclassic == 1 ) {
|
||||
if ( autocvar_v_bobclassic == 1 ) {
|
||||
eViewModel.angles_z = -pSeat->fBob;
|
||||
}
|
||||
|
||||
|
@ -225,14 +252,16 @@ void View_DrawViewModel( void ) {
|
|||
dynamiclight_add( pSeat->vPlayerOrigin, 400 * eMuzzleflash.alpha, '1 0.45 0');
|
||||
addentity( eMuzzleflash );
|
||||
}
|
||||
|
||||
addentity( eViewModel );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
View_DrawViewModel
|
||||
View_PlayAnimation
|
||||
|
||||
Resets the timeline and plays a new sequence
|
||||
onto the view model
|
||||
====================
|
||||
*/
|
||||
void View_PlayAnimation( int iSequence ) {
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Server\Triggers.c" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Server\Vox.c" />
|
||||
</category>
|
||||
<category name="Menu" expanded="yes">
|
||||
<category name="Menu" expanded="no">
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Menu\Defs.h" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Menu\Draw.c" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Menu\Header.c" />
|
||||
|
@ -75,7 +75,7 @@
|
|||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Menu\Objects.c" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Menu\progs.src" />
|
||||
</category>
|
||||
<category name="Shared" expanded="yes">
|
||||
<category name="Shared" expanded="no">
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Shared\Animations.c" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Shared\BaseGun.c" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Shared\BaseMelee.c" />
|
||||
|
@ -117,20 +117,6 @@
|
|||
</project>
|
||||
|
||||
<workspace version="Crimson Editor 3.60">
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\VGUIRadio.c" linenum="146" placement="0:1:-1:-1:-4:-23:0:0:868:432" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Shared\Radio.c" linenum="247" placement="0:1:-1:-1:-4:-23:22:22:894:458" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\Draw.c" linenum="31" placement="0:1:-1:-1:-4:-23:44:44:916:480" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Builtins.h" linenum="2166" placement="0:1:-1:-1:-4:-23:66:66:938:502" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Menu\MenuMultiplayer.c" linenum="48" placement="0:1:-1:-1:-4:-23:88:88:960:524" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\Defs.h" linenum="69" placement="0:1:-1:-1:-4:-23:110:110:982:546" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\HUD.c" linenum="1" placement="0:1:-1:-1:-4:-23:132:132:1004:568" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\Event.c" linenum="1" placement="0:1:-1:-1:-4:-23:154:154:1026:590" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\Entities.c" linenum="41" placement="0:1:-1:-1:-4:-23:176:176:1048:612" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\Nightvision.c" linenum="18" placement="0:1:-1:-1:-4:-23:198:198:1070:634" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\View.c" linenum="101" placement="2:3:-1:-1:-4:-23:0:0:872:436" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Shared\Effects.c" linenum="20" placement="0:1:-1:-1:-4:-23:22:22:894:458" />
|
||||
<localfile path="C:\Users\User\Dropbox\The Wastes Build\sdk\Source\Shared\Effect.c" linenum="231" placement="0:1:-1:-1:-4:-23:44:44:916:480" />
|
||||
<localfile path="C:\cygwin\home\User\SourceCode\cl_dll\ev_common.cpp" linenum="152" placement="0:1:-1:-1:-4:-23:66:66:938:502" />
|
||||
<localfile path="C:\cygwin\home\User\SourceCode\cl_dll\ev_hldm.cpp" linenum="450" placement="0:1:-1:-1:-4:-23:88:88:960:524" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\Defs.h" linenum="46" placement="2:3:-1:-1:-4:-23:22:22:894:458" />
|
||||
</workspace>
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ void Weapon_DropWeapon( int iSlot );
|
|||
float Weapon_GetAnimType( float fWeapon );
|
||||
float Weapon_GetFireRate( float fWeapon );
|
||||
float Weapon_GetReloadTime( float fWeapon );
|
||||
void Weapon_Reload( float fWeapon );
|
||||
|
||||
void BaseGun_AccuracyCalc( void );
|
||||
void BaseGun_Draw( void );
|
||||
|
|
|
@ -135,6 +135,9 @@ Returns whether or not to play an animation
|
|||
float BaseGun_PrimaryFire( void ) {
|
||||
// Nothing in the clip anymore? Don't even attempt
|
||||
if ( ( self.(wptTable[ self.weapon ].iMagfld) - 1 ) < 0 ) {
|
||||
if ( autocvar_mp_autoreload == TRUE ) {
|
||||
Weapon_Reload( self.weapon );
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -45,9 +45,10 @@ seta mp_freezetime 6
|
|||
seta mp_c4timer 45
|
||||
seta mp_roundtime 5
|
||||
seta mp_fillweapons 0
|
||||
seta cl_bobcycle 0.8
|
||||
seta cl_bob 0.01
|
||||
seta cl_bobup 0.5
|
||||
seta cl_bob 0
|
||||
seta v_bobcycle 0.8
|
||||
seta v_bob 0.01
|
||||
seta v_bobup 0.5
|
||||
seta r_particledesc default
|
||||
seta pm_bunnyspeedcap "1"
|
||||
seta sv_accelerate "4"
|
||||
|
|
BIN
freecs/progs.dat
BIN
freecs/progs.dat
Binary file not shown.
Loading…
Reference in a new issue