Added custom, white bitmap font to resemble WON closer

Fixed the chat parsing
Fixed crouching not working
This commit is contained in:
Marco Hladik 2018-06-10 02:26:15 +02:00
parent a187712435
commit 53d4ac9591
12 changed files with 21 additions and 18 deletions

View file

@ -226,8 +226,8 @@ void CSQC_UpdateView( float fWinWidth, float fWinHeight, float fGameFocus ) {
setproperty( VF_VIEWENTITY, (float)player_localentnum );
}
setproperty( VF_AFOV, cvar( "fov" ) * ( getstatf( STAT_VIEWZOOM ) / 255 ) );
setsensitivityscaler( ( getstatf( STAT_VIEWZOOM ) / 255 ) );
setproperty( VF_AFOV, cvar( "fov" ) * ( getstatf( STAT_VIEWZOOM ) ) );
setsensitivityscaler( ( getstatf( STAT_VIEWZOOM ) ) );
// When Cameratime is active, draw on the forced coords instead
if ( pSeat->fCameraTime > time ) {

View file

@ -464,7 +464,7 @@ void HUD_Draw( void ) {
vHUDColor = autocvar_con_color * ( 1 / 255 );
// I guess viewzoom turns from 0.0-1.0 float into a 0-255 byte
if ( getstatf( STAT_VIEWZOOM ) < 255 ) {
if ( getstatf( STAT_VIEWZOOM ) < 1.0f ) {
HUD_DrawScope();
} else {
HUD_DrawCrosshair();

View file

@ -245,7 +245,7 @@ void View_DrawViewModel( void ) {
}
// Only bother when zoomed out
if ( getstatf( STAT_VIEWZOOM ) == 255 ) {
if ( getstatf( STAT_VIEWZOOM ) == 1.0f ) {
// Update muzzleflash position and draw it
if ( eMuzzleflash.alpha > 0.0f ) {
eMuzzleflash.origin = gettaginfo( eViewModel, eMuzzleflash.skin );

View file

@ -85,7 +85,6 @@ void runplayerphysics(void)
if ( trace_startsolid == FALSE ) {
setorigin( self, self.origin + '0 0 18' );
self.flags -= FL_CROUCHING;
if ( self.velocity_z <= 0 ) {
self.velocity_z = self.velocity_z + 25;
}
@ -105,7 +104,6 @@ void runplayerphysics(void)
self.view_ofs = VEC_PLAYER_VIEWPOS;
}
self.maxspeed = Game_GetMaxSpeed( self.weapon );
runstandardplayerphysics( self );
if ( ( self.flags & FL_ONGROUND ) && self.movetype == MOVETYPE_WALK && ( fallvel > 100 )) {
#ifdef SSQC

View file

@ -98,7 +98,7 @@ void func_vehicle( void ) {
static void func_vehicle_use( void ) {
bprint( "Used!\n" );
if ( self.eDriver ) {
if ( self.eDriver != eActivator ) {
if ( self.eDriver != eActivator ) {
// Someone else is using it, don't let him
return;
} else {
@ -124,8 +124,6 @@ void func_vehicle( void ) {
Entities_RenderSetup();
Entities_InitRespawnable( func_vehicle_respawn );
}
void path_track( void ) {
@ -181,4 +179,4 @@ The function that enables life
Entities_InitRespawnable( func_vehiclecontrols_respawn );
self.think = func_vehiclecontrols_setup;
self.nextthink = time + 0.1f;
}*/
}*/

View file

@ -49,6 +49,8 @@ chat messages and handle distribution ourselves.
void SV_ParseClientCommand( string sCommand ) {
tokenize( sCommand );
string chat = substring( sCommand, 4, strlen( sCommand ) - 4 )
if ( argv( 1 ) == "timeleft" ) {
float fTimeLeft = cvar( "mp_timelimit" ) - ( time / 60 );
Vox_Singlecast( self, sprintf( "we have %s minutes remaining", Vox_TimeToString( fTimeLeft ) ) );
@ -58,27 +60,27 @@ void SV_ParseClientCommand( string sCommand ) {
// Players talk to players, spectators to spectators.
if ( self.health ) {
if ( argv( 0 ) == "say" ) {
localcmd( sprintf( "echo %s: %s\n", self.netname, argv( 1 ) ) );
SV_SendChat( self, argv( 1 ), world, 0 );
localcmd( sprintf( "echo %s: %s\n", self.netname, chat ) );
SV_SendChat( self, chat, world, 0 );
return;
} else if ( argv( 0 ) == "say_team" ) {
localcmd( sprintf( "echo [TEAM %d] %s: %s\n", self.team, self.netname, argv( 1 ) ) );
localcmd( sprintf( "echo [TEAM %d] %s: %s\n", self.team, self.netname, chat ) );
for ( entity eFind = world; ( eFind = find( eFind, classname, "player" ) ); ) {
if ( eFind.team == self.team ) {
SV_SendChat( self, argv( 1 ), eFind, 1 );
SV_SendChat( self, chat, eFind, 1 );
}
}
return;
}
} else {
if ( argv( 0 ) == "say" ) {
localcmd( sprintf( "echo [DEAD] %s: %s\n", self.netname, argv( 1 ) ) );
localcmd( sprintf( "echo [DEAD] %s: %s\n", self.netname, chat ) );
for ( entity eFind = world; ( eFind = find( eFind, classname, "spectator" ) ); ) {
SV_SendChat( self, argv( 1 ), eFind, 1 );
SV_SendChat( self, chat, eFind, 1 );
}
return;
} else if ( argv( 0 ) == "say_team" ) {
localcmd( sprintf( "echo [DEAD] %s: %s\n", self.netname, argv( 1 ) ) );
localcmd( sprintf( "echo [DEAD] %s: %s\n", self.netname, chat ) );
return;
}
}
@ -619,6 +621,12 @@ void worldspawn( void ) {
lightstyle( 11, "abcdefghijklmnopqrrqponmlkjihgfedcba" );
// TODO: Merge these into a single field?
clientstat( 0, EV_FLOAT, health );
clientstat( 10, EV_FLOAT, weapon );
clientstat( 16, EV_FLOAT, view_ofs_z );
clientstat( 21, EV_FLOAT, viewzoom );
// clientstat( STAT_BOMBZONE, EV_FLOAT, fInBombZone );
clientstat( STAT_BUYZONE, EV_FLOAT, fInBuyZone );
clientstat( STAT_HOSTAGEZONE, EV_FLOAT, fInHostageZone );
clientstat( STAT_BOMBZONE, EV_FLOAT, fInBombZone );

Binary file not shown.

View file

@ -87,4 +87,3 @@ seta lang "en_us"
seta cfg_save_auto "1"
seta r_meshpitch "1"
seta gl_overbright "0"
seta gl_font "gfx/wfont?fmt=h"

Binary file not shown.

BIN
freecs/gfx.wad Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.