Fixed #41 and added HUD 'Caliber' graphics for the explosives

Removed temporary menu cursor fix, because the SVN version of FTE addressed the cursor issue! Yay for Spike!
This commit is contained in:
Marco Cawthorne 2017-10-26 19:43:38 -05:00
parent a6e7a22d95
commit edc0f6ac8d
14 changed files with 48 additions and 22 deletions

View file

@ -176,9 +176,6 @@ void CSQC_UpdateView( float fWinWidth, float fWinHeight, float fGameFocus ) {
Nightvision_PostDraw();
if( fGameFocus == TRUE ) {
// temporary
vMousePos = getmousepos();
// The spectator sees things... differently
if ( getplayerkeyvalue( player_localnum, "*spec" ) != "0" ) {
VGUI_DrawSpectatorHUD();

View file

@ -42,7 +42,7 @@ float vHUDNumPos[10] = {
};
// Ditto
vector vHUDCalPos[11] = {
vector vHUDCalPos[15] = {
'0 0 0',
'0.09375 0.28125 0', // 50AE
'0.28125 0.28125 0', // 762MM
@ -54,6 +54,10 @@ vector vHUDCalPos[11] = {
'0.375 0.28125 0', // 45ACP
'0.46875 0.28125 0', // 357SIG
'0.46875 0.375 0', // 57MM
'0.375 0.375', // C4
'0.5625 0.375', // SMOKE
'0.28125 0.375', // HE
'0.1875 0.375', // FLASH
};
/*
@ -331,6 +335,9 @@ Draws the current clip, the amount of ammo for the caliber and a matching calibe
void HUD_DrawAmmo( void ) {
static float fOldMag, fOldCal;
static float fAmmoAlpha;
static vector vAmmoMagPos;
static vector vAmmoCalPos;
if ( getstatf( STAT_ACTIVEWEAPON ) == WEAPON_KNIFE || getstatf( STAT_ACTIVEWEAPON ) == WEAPON_C4BOMB ) {
return;
}
@ -345,13 +352,18 @@ void HUD_DrawAmmo( void ) {
fAmmoAlpha = HUD_ALPHA;
}
vector vAmmoMagPos = [ vVideoResolution_x - 142, vVideoResolution_y - 42 ];
HUD_DrawNums( getstatf( STAT_CURRENT_MAG ), vAmmoMagPos, fAmmoAlpha, vHUDColor );
drawsubpic( [vVideoResolution_x - 118, vVideoResolution_y - 42], '3 25', HUD_NUMFILE_LAYER, [0.9375, 0], [ 0.01171875, 0.09765625 ], vHUDColor, fAmmoAlpha, DRAWFLAG_ADDITIVE );
vector vAmmoCalPos = [ vVideoResolution_x - 64, vVideoResolution_y - 42 ];
HUD_DrawNums( getstatf( STAT_CURRENT_CALIBER ), vAmmoCalPos, fAmmoAlpha, vHUDColor );
if ( wptTable[ getstatf( STAT_ACTIVEWEAPON ) ].iCaliber < 11 ) {
vAmmoMagPos = [ vVideoResolution_x - 142, vVideoResolution_y - 42 ];
HUD_DrawNums( getstatf( STAT_CURRENT_MAG ), vAmmoMagPos, fAmmoAlpha, vHUDColor );
drawsubpic( [vVideoResolution_x - 118, vVideoResolution_y - 42], '3 25', HUD_NUMFILE_LAYER, [0.9375, 0], [ 0.01171875, 0.09765625 ], vHUDColor, fAmmoAlpha, DRAWFLAG_ADDITIVE );
vAmmoCalPos = [ vVideoResolution_x - 64, vVideoResolution_y - 42 ];
HUD_DrawNums( getstatf( STAT_CURRENT_CALIBER ), vAmmoCalPos, fAmmoAlpha, vHUDColor );
} else {
vAmmoMagPos = [ vVideoResolution_x - 64, vVideoResolution_y - 42 ];
HUD_DrawNums( getstatf( STAT_CURRENT_MAG ), vAmmoMagPos, fAmmoAlpha, vHUDColor );
}
// Caliber icon
drawsubpic( vVideoResolution - '42 42', '24 24', HUD_NUMFILE_LAYER, vHUDCalPos[ wptTable[ getstatf( STAT_ACTIVEWEAPON ) ].iCaliber ], [ NUMSIZE_X, NUMSIZE_X ], vHUDColor, fAmmoAlpha, DRAWFLAG_ADDITIVE );

4
Source/Client/Makefile Normal file
View file

@ -0,0 +1,4 @@
CC=fteqcc
all:
$(CC)

View file

@ -133,7 +133,11 @@ enum {
CALIBER_BUCKSHOT,
CALIBER_45ACP,
CALIBER_357SIG,
CALIBER_57MM
CALIBER_57MM,
EXPLOSIVE_C4,
EXPLOSIVE_SMOKE,
EXPLOSIVE_HE,
EXPLOSIVE_FLASH,
};
.int iAmmo_50AE;

View file

@ -43,9 +43,6 @@ void m_draw( vector vScreenSize ) {
return;
}
// temporary
vMousePos = getmousepos();
if ( vVideoSize != vScreenSize ) {
vVideoSize = vScreenSize;
vMenuOffset_x = vVideoSize_x / 2 - 320;

4
Source/Menu/Makefile Normal file
View file

@ -0,0 +1,4 @@
CC=fteqcc
all:
$(CC)

4
Source/Server/Makefile Normal file
View file

@ -0,0 +1,4 @@
CC=fteqcc
all:
$(CC)

View file

@ -29,7 +29,7 @@ weaponinfo_t wptC4BOMB = {
WEAPON_C4BOMB, // Identifier
SLOT_GRENADE,
0, // Price
CALIBER_50AE, // Caliber ID
EXPLOSIVE_C4, // Caliber ID
1.0, // Max Player Speed
0, // Bullets Per Shot
0, // Clip/MagSize

View file

@ -30,7 +30,7 @@ weaponinfo_t wptFLASHBANG = {
WEAPON_FLASHBANG, // Identifier
SLOT_GRENADE, // Slot
200, // Price
0, // Caliber ID
EXPLOSIVE_FLASH, // Caliber ID
1.0, // Max Player Speed
1, // Bullets Per Shot
1, // Clip/MagSize

View file

@ -30,7 +30,7 @@ weaponinfo_t wptHEGRENADE = {
WEAPON_HEGRENADE, // Identifier
SLOT_GRENADE, // Slot
200, // Price
0, // Caliber ID
EXPLOSIVE_HE, // Caliber ID
1.0, // Max Player Speed
1, // Bullets Per Shot
1, // Clip/MagSize
@ -101,9 +101,13 @@ void WeaponHEGRENADE_Throw( void ) {
remove( self );
}
static void Weapon_HEGRENADE_Touch( void ) {
if ( other == self.owner ) {
return;
}
if ( other.classname == "func_breakable" && other.material == MATERIAL_GLASS ) {
Damage_Apply( other, self, 10, self.origin );
}
sound( self, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1, ATTN_NORM );
}
@ -115,7 +119,7 @@ void WeaponHEGRENADE_Throw( void ) {
vector vDir = aim ( self, 100000 );
eNade.owner = self;
eNade.solid = SOLID_TRIGGER;
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 );
eNade.avelocity = ( v_forward * 600 );
@ -147,4 +151,4 @@ void WeaponHEGRENADE_Release( void ) {
self.think = WeaponHEGRENADE_Throw;
}
#endif
}
}

View file

@ -30,7 +30,7 @@ weaponinfo_t wptSMOKEGRENADE = {
WEAPON_SMOKEGRENADE, // Identifier
SLOT_GRENADE, // Slot
200, // Price
0, // Caliber ID
EXPLOSIVE_SMOKE, // Caliber ID
1.0, // Max Player Speed
1, // Bullets Per Shot
1, // Clip/MagSize
@ -152,4 +152,4 @@ void WeaponSMOKEGRENADE_Release( void ) {
self.think = WeaponSMOKEGRENADE_Throw;
}
#endif
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.