parent
794b08d64c
commit
7770b250d5
15 changed files with 53 additions and 24 deletions
|
@ -174,7 +174,6 @@ void View_DrawViewModel( void ) {
|
|||
|
||||
makevectors( '0 0 0');
|
||||
eViewModel.origin = '0 0 -1' + ( v_forward * ( pSeat->fBob * 0.4 ) );
|
||||
eViewModel.angles = pSeat->vPunchAngle;
|
||||
|
||||
// Left-handed weapons
|
||||
if ( autocvar_v_lefthanded ) {
|
||||
|
|
|
@ -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\User\FreeCS\Source\Client\Defs.h" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\Draw.c" />
|
||||
<localfile path="C:\cygwin\home\User\FreeCS\Source\Client\Entities.c" />
|
||||
|
@ -73,7 +73,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" />
|
||||
|
|
|
@ -100,7 +100,6 @@ float Menu_InputEvent( float fEventType, float fKey, float fCharacter, float fDe
|
|||
if ( fKey == K_ESCAPE ) {
|
||||
m_toggle( 0 );
|
||||
}
|
||||
|
||||
fInputKeyDown = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,12 +48,16 @@ void Ammo_BuyPrimary( float fFree ) {
|
|||
float fNew = ceil( ( (float)iRequiredAmmo / (float)ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iSize ) );
|
||||
|
||||
for ( int i = 0; i < fNew; i++ ) {
|
||||
self.(wptTable[ self.fSlotPrimary ].iCaliberfld) += ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iSize;
|
||||
Money_AddMoney( self, -ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iPrice );
|
||||
sound( self, CHAN_ITEM, "items/9mmclip1.wav", 1, ATTN_IDLE );
|
||||
|
||||
if ( self.(wptTable[ self.fSlotPrimary ].iCaliberfld) > ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iMaxAmount ) {
|
||||
self.(wptTable[ self.fSlotPrimary ].iCaliberfld) = ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iMaxAmount;
|
||||
if ( self.fMoney - ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iPrice >= 0 ) {
|
||||
self.(wptTable[ self.fSlotPrimary ].iCaliberfld) += ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iSize;
|
||||
Money_AddMoney( self, -ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iPrice );
|
||||
sound( self, CHAN_ITEM, "items/9mmclip1.wav", 1, ATTN_IDLE );
|
||||
|
||||
if ( self.(wptTable[ self.fSlotPrimary ].iCaliberfld) > ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iMaxAmount ) {
|
||||
self.(wptTable[ self.fSlotPrimary ].iCaliberfld) = ammoTable[ wptTable[ self.fSlotPrimary ].iCaliber ].iMaxAmount;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ var float autocvar_mp_fillweapons = 0;
|
|||
var float autocvar_mp_timelimit = 60;
|
||||
var string autocvar_motdfile = "motd.txt";
|
||||
|
||||
var int autocvar_mp_autoreload = FALSE;
|
||||
|
||||
|
||||
// Mapcycle features
|
||||
var string autocvar_mapcyclefile = "mapcycle.txt";
|
||||
|
|
|
@ -93,6 +93,7 @@ float ConsoleCmd( string sCommand ) {
|
|||
multicast( '0 0 0', MULTICAST_ALL );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,18 @@ float Rules_BuyingPossible( void ) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void Rules_MakeBomber( void ) {
|
||||
Weapon_AddItem( WEAPON_C4BOMB );
|
||||
centerprint( self, "You have the bomb!\nFind the target zone or DROP\nthe bomb for another Terrorist." );
|
||||
}
|
||||
|
||||
void Rules_MakeVIP( void ) {
|
||||
self.team = TEAM_VIP;
|
||||
Spawn_RespawnClient( self.team );
|
||||
centerprint( self, "You are the VIP\nMake your way to the safety zones!" );
|
||||
forceinfokey( self, "*dead", "2" );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
Rules_Restart
|
||||
|
@ -122,8 +134,7 @@ void Rules_Restart( void ) {
|
|||
|
||||
if ( iPickT == iRandomT ) {
|
||||
self = eFind;
|
||||
Weapon_AddItem( WEAPON_C4BOMB );
|
||||
centerprint( self, "You have the bomb!\nFind the target zone or DROP\nthe bomb for another Terrorist." );
|
||||
Rules_MakeBomber();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -139,10 +150,7 @@ void Rules_Restart( void ) {
|
|||
iPickCT++;
|
||||
if ( iPickCT == iRandomCT ) {
|
||||
self = eFind;
|
||||
self.team = TEAM_VIP;
|
||||
Spawn_RespawnClient( self.team );
|
||||
centerprint( self, "You are the VIP\nMake your way to the safety zones!" );
|
||||
forceinfokey( self, "*dead", "2" );
|
||||
Rules_MakeVIP();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -211,6 +211,7 @@ void Spawn_MakeSpectator( void ) {
|
|||
self.classname = "spectator";
|
||||
|
||||
self.health = 0;
|
||||
self.armor = 0;
|
||||
self.takedamage = DAMAGE_NO;
|
||||
self.solid = SOLID_NOT;
|
||||
self.movetype = MOVETYPE_NOCLIP;
|
||||
|
@ -231,7 +232,7 @@ void Spawn_MakeSpectator( void ) {
|
|||
}
|
||||
|
||||
// Clear the inventory
|
||||
self.fSlotMelee = self.fSlotPrimary = self.fSlotSecondary = self.fSlotGrenade = 0;
|
||||
self.fSlotMelee = self.fSlotPrimary = self.fSlotSecondary = self.fSlotGrenade = self.iEquipment = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -264,15 +265,22 @@ void CSEv_GamePlayerSpawn_f( float fChar ) {
|
|||
self.fSlotGrenade = 0;
|
||||
self.iEquipment = 0;
|
||||
|
||||
if ( iAlivePlayers_T + iAlivePlayers_CT == 1 ) {
|
||||
Rules_RoundOver( 0, 0, FALSE );
|
||||
}
|
||||
|
||||
// Spawn the players immediately when its in the freeze state
|
||||
switch ( fGameState ) {
|
||||
case GAME_FREEZE:
|
||||
self.fCharModel = fChar;
|
||||
Spawn_CreateClient( fChar );
|
||||
|
||||
if ( ( self.team == TEAM_T ) && ( iAlivePlayers_T == 1 ) ) {
|
||||
if ( iBombZones > 0 ) {
|
||||
Rules_MakeBomber();
|
||||
}
|
||||
} else if ( ( self.team == TEAM_CT ) && ( iAlivePlayers_CT == 1 ) ) {
|
||||
if ( iVIPZones > 0 ) {
|
||||
Rules_MakeVIP();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
if ( fChar == 0 ) {
|
||||
|
@ -296,6 +304,13 @@ void CSEv_GamePlayerSpawn_f( float fChar ) {
|
|||
self.frags = 0;
|
||||
self.fDeaths = 0;
|
||||
forceinfokey( self, "*deaths", "0" );
|
||||
|
||||
// Split up for readability and expandability?
|
||||
if ( ( self.team == TEAM_T ) && ( iAlivePlayers_T == 0 ) ) {
|
||||
Rules_RoundOver( FALSE, 0, FALSE );
|
||||
} else if ( ( self.team == TEAM_CT ) && ( iAlivePlayers_CT == 0 ) ) {
|
||||
Rules_RoundOver( FALSE, 0, FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -228,7 +228,7 @@ void WeaponC4BOMB_PrimaryFire( void ) {
|
|||
|
||||
// 3 seconds have passed, plant the bomb
|
||||
if ( self.fBombProgress <= time ) {
|
||||
WeaponC4BOMB_Drop( trace_endpos );
|
||||
WeaponC4BOMB_Drop( trace_endpos, trace_plane_normal );
|
||||
}
|
||||
#else
|
||||
View_PlayAnimation( ANIM_C4_ENTERCODE );
|
||||
|
|
|
@ -138,6 +138,7 @@ void WeaponFLASHBANG_Throw( void ) {
|
|||
setsize( eNade, '-4 -4 -4', '4 4 4' );
|
||||
|
||||
vector vDir = aim ( self, 100000 );
|
||||
eNade.classname = "remove_me";
|
||||
eNade.owner = self;
|
||||
eNade.solid = SOLID_TRIGGER;
|
||||
eNade.angles = vectoangles( vDir );
|
||||
|
|
|
@ -122,6 +122,7 @@ void WeaponHEGRENADE_Throw( void ) {
|
|||
|
||||
vector vDir = aim ( self, 100000 );
|
||||
eNade.owner = self;
|
||||
eNade.classname = "remove_me";
|
||||
eNade.solid = SOLID_TRIGGER; // This is so grenades will not get slowed down by windows they touch
|
||||
eNade.angles = vectoangles( vDir );
|
||||
eNade.velocity = ( vDir * 800 );
|
||||
|
|
|
@ -130,6 +130,7 @@ void WeaponSMOKEGRENADE_Throw( void ) {
|
|||
setsize( eNade, '-4 -4 -4', '4 4 4' );
|
||||
|
||||
vector vDir = aim ( self, 100000 );
|
||||
eNade.classname = "remove_me";
|
||||
eNade.owner = self;
|
||||
eNade.solid = SOLID_TRIGGER;
|
||||
eNade.angles = vectoangles( vDir );
|
||||
|
|
|
@ -447,8 +447,6 @@ void Weapon_DropWeapon( int iSlot ) {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
entity eDrop = spawn();
|
||||
setorigin( eDrop, self.origin + self.view_ofs );
|
||||
setmodel( eDrop, sWeaponModels[ fWeapon ] );
|
||||
|
|
Binary file not shown.
BIN
freecs/progs.dat
BIN
freecs/progs.dat
Binary file not shown.
Loading…
Reference in a new issue