as released 2002-09-24

This commit is contained in:
archive 2002-09-24 00:00:00 +00:00
parent a4cc9a51a3
commit db6a3bc168
79 changed files with 1847 additions and 2888 deletions

View File

@ -1 +0,0 @@
start spradiant .\sof2SP.qe4

BIN
bin/SoF2MPDev.exe Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
sof2sdk-101a.zip README:
Released: Friday, July 19th, 2002
This SDK release is a supplement to the sof2sdk-101.msi release.
It includes the following Single Player SDK files:
- EntitiesSP.def - Single Player Entities Definition File
- RadiantSP.bat - Batch file for running the single player QERadiant Editor
- sof2SP.qe4 - Project file for SOF2 single player QERadiant
- spradiant.exe - Single Player QERadiant Executable
Place these four files in your C:\SoF2SDK\bin (by default) folder with the rest of your 1.01 tools.
These tools are released "as is" and are unsupported by Raven Software or Activision technical support.
Enjoy!
- Raven Software
SOF2 Development Team

View File

@ -1,23 +0,0 @@
{
"mapspath" ""
"basepath" "C:\SoF2SDK\base"
"rshcmd" ""
"remotebasepath" "C:\SoF2SDK\base"
"entitypath" "C:\SoF2SDK\bin\entitiesSP.def"
"texturepath" "C:\Program Files\Soldier of Fortune II - Double Helix\base\textures\"
"autosave" "C:\SoF2SDK\base\maps\autosave.map"
"confusedpath" "C:\SOF2SDK\confusEd\*.*"
"npcpath" "C:\SOF2SDK\npcs\*.*"
"bsp FullVis (1/2 LMs)" "C:\SoF2SDK\bin\sof2map -bsp -rename -samplesize 32 $ -class 4 && C:\SoF2SDK\bin\sof2map -vis $ -class 2 && C:\SoF2SDK\bin\sof2map -light -extra -samplesize 32 $"
"bsp FullVis" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis $ && C:\SoF2SDK\bin\sof2map -light $"
"bsp FullVis (extra)" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis $ && C:\SoF2SDK\bin\sof2map -light -extra $"
"bsp FullVis (nolight)" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis $"
"bsp FastVis (nolight)" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis -fast $"
"bsp FastVis" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis -fast $ && C:\SoF2SDK\bin\sof2map -light $"
"bsp NoVis" "C:\SoF2SDK\bin\localbatch\novis.bat $"
"bsp OnlyEnts" "C:\SoF2SDK\bin\sof2map -bsp -rename -onlyents $"
"bsp Info" "C:\SoF2SDK\bin\sof2map -info $"
"bsp Relight (extra)" "C:\SoF2SDK\bin\sof2map -bsp -rename -onlyents $ && C:\SoF2SDK\bin\sof2map -light -extra $"
"bsp Relight (1/2 LM)" "C:\SoF2SDK\bin\sof2map -bsp -rename -onlyents $ && C:\SoF2SDK\bin\sof2map -light -extra -samplesize 32 $"
"brush_primit" "0"
}

Binary file not shown.

Binary file not shown.

View File

@ -1,31 +1,31 @@
# Microsoft Developer Studio Project File - Name="Sof2MP" - Package Owner=<4>
# Microsoft Developer Studio Project File - Name="SoF2MP" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Generic Project" 0x010a
CFG=Sof2MP - Win32 Debug
CFG=SoF2MP - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Sof2MP.mak".
!MESSAGE NMAKE /f "SoF2MP.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Sof2MP.mak" CFG="Sof2MP - Win32 Debug"
!MESSAGE NMAKE /f "SoF2MP.mak" CFG="SoF2MP - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Sof2MP - Win32 Release" (based on "Win32 (x86) Generic Project")
!MESSAGE "Sof2MP - Win32 Debug" (based on "Win32 (x86) Generic Project")
!MESSAGE "SoF2MP - Win32 Release" (based on "Win32 (x86) Generic Project")
!MESSAGE "SoF2MP - Win32 Debug" (based on "Win32 (x86) Generic Project")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
MTL=midl.exe
!IF "$(CFG)" == "Sof2MP - Win32 Release"
!IF "$(CFG)" == "SoF2MP - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@ -38,7 +38,7 @@ MTL=midl.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
!ELSEIF "$(CFG)" == "Sof2MP - Win32 Debug"
!ELSEIF "$(CFG)" == "SoF2MP - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@ -55,7 +55,7 @@ MTL=midl.exe
# Begin Target
# Name "Sof2MP - Win32 Release"
# Name "Sof2MP - Win32 Debug"
# Name "SoF2MP - Win32 Release"
# Name "SoF2MP - Win32 Debug"
# End Target
# End Project

View File

@ -3,6 +3,45 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
###############################################################################
Project: "SoF2MP"=.\SoF2MP.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name gt_ctf
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_dem
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_dm
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_elim
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_inf
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_tdm
End Project Dependency
Begin Project Dependency
Project_Dep_Name SoF2cgame
End Project Dependency
Begin Project Dependency
Project_Dep_Name SoF2game
End Project Dependency
Begin Project Dependency
Project_Dep_Name ui
End Project Dependency
}}}
###############################################################################
Project: "SoF2cgame"=.\cgame\sof2_cgame.dsp - Package Owner=<4>
Package=<5>
@ -27,54 +66,6 @@ Package=<4>
###############################################################################
Project: "SoF2ui"=.\ui\sof2_ui.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "Sof2MP"=.\Sof2MP.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name SoF2cgame
End Project Dependency
Begin Project Dependency
Project_Dep_Name SoF2game
End Project Dependency
Begin Project Dependency
Project_Dep_Name SoF2ui
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_ctf
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_dm
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_elim
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_inf
End Project Dependency
Begin Project Dependency
Project_Dep_Name gt_tdm
End Project Dependency
}}}
###############################################################################
Project: "gt_ctf"=.\gametype\gt_ctf\gt_ctf.dsp - Package Owner=<4>
Package=<5>
@ -91,10 +82,6 @@ Project: "gt_dem"=.\gametype\gt_dem\gt_dem.dsp - Package Owner=<4>
Package=<5>
{{{
begin source code control
"$/SoF2/code/gametype/gt_dem", ZRDAAAAA
.\gametype\gt_dem
end source code control
}}}
Package=<4>
@ -151,6 +138,18 @@ Package=<4>
###############################################################################
Project: "ui"=.\ui\sof2_ui.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>

View File

@ -586,6 +586,7 @@ void CG_InitConsoleCommands( void )
//
trap_AddCommand ("kill");
trap_AddCommand ("say");
trap_AddCommand ("ignore");
trap_AddCommand ("say_team");
trap_AddCommand ("tell");
trap_AddCommand ("vsay_team");

View File

@ -337,6 +337,22 @@ static void CG_DrawTeamScores ( float y )
char scores[2][16];
float w;
const char* s;
vec4_t fade = {1,1,1,0.7f};
float x1;
float y1;
float x2;
float y2;
// Make sure the radar should be showing
if ( cg.weaponMenuUp )
{
return;
}
if ( cgs.clientinfo[cg.predictedPlayerState.clientNum].team == TEAM_SPECTATOR )
{
return;
}
if ( cgs.scores1 == SCORE_NOT_PRESENT )
{
@ -356,11 +372,70 @@ static void CG_DrawTeamScores ( float y )
Com_sprintf (scores[1], sizeof(scores[1]), "%i", cgs.scores2);
}
s = va ( "Red: %s Blue: %s", scores[0], scores[1] );
if ( cg_drawTeamScores.integer > 0 && cg_drawTeamScores.integer < 5 )
{
switch ( cg_drawTeamScores.integer )
{
default:
case 3:
x1 = 438;
x2 = 400;
y1 = 5;
y2 = 5;
break;
case 1:
x1 = 430;
y1 = 425;
x2 = 470;
y2 = 425;
break;
case 2:
x1 = 340;
y1 = 395;
x2 = 380;
y2 = 395;
break;
case 4:
x1 = 600;
x2 = 600;
y1 = 200;
y2 = 250;
break;
}
trap_R_SetColor ( fade );
CG_DrawPic ( x1, y1, 32, 32, cgs.media.redFriendShader );
CG_DrawPic ( x2, y2, 32, 32, cgs.media.blueFriendShader );
w = trap_R_GetTextWidth ( scores[0], cgs.media.hudFont, 0.5f, 0 );
CG_DrawText ( x1 + 16 - w / 2, y1 + 6, cgs.media.hudFont, 0.5f, colorWhite, scores[0], 0, DT_OUTLINE );
w = trap_R_GetTextWidth ( scores[1], cgs.media.hudFont, 0.5f, 0 );
CG_DrawText ( x2 + 16 - w / 2, y2 + 6, cgs.media.hudFont, 0.45f, colorWhite, scores[1], 0, DT_OUTLINE );
if ( cgs.gametypeData->respawnType == RT_NONE )
{
s = va("%d/%d", cg.predictedPlayerState.persistant[PERS_RED_ALIVE_COUNT], CG_TeamCount(TEAM_RED) );
w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 );
CG_DrawText ( x1 + 16 - w / 2, y1 + 24, cgs.media.hudFont, 0.35f, colorMdGrey, s, 0, DT_OUTLINE );
s = va("%d/%d", cg.predictedPlayerState.persistant[PERS_BLUE_ALIVE_COUNT], CG_TeamCount(TEAM_BLUE) );
w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 );
CG_DrawText ( x2 + 16 - w / 2, y2 + 24, cgs.media.hudFont, 0.35f, colorMdGrey, s, 0, DT_OUTLINE );
}
trap_R_SetColor ( NULL );
}
else
{
s = va ( "Red: %s Blue: %s", scores[0], scores[1] );
w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 );
CG_DrawText ( RADAR_X + RADAR_RADIUS - w / 2, y, cgs.media.hudFont, 0.35f, g_color_table[ColorIndex(COLOR_GREEN)], s, 0, DT_OUTLINE );
}
}
/*
@ -1046,6 +1121,11 @@ static void CG_DrawCrosshair(void)
scale = 1;
}
if ( scale > 2 )
{
scale = 2;
}
w = w * scale;
h = h * scale;
@ -1736,16 +1816,15 @@ static void CG_Draw2D( void )
CG_DrawUpperRight();
}
if ( !CG_DrawFollow() )
{
CG_DrawWarmup();
}
// don't draw center string if scoreboard is up
cg.scoreBoardShowing = CG_DrawScoreboard();
if ( !cg.scoreBoardShowing)
{
CG_DrawCenterText();
if ( !CG_DrawFollow() )
{
CG_DrawWarmup();
}
}
// Always Draw chat

View File

@ -353,6 +353,7 @@ static void CG_Obituary( entityState_t *ent )
case MOD_M1911A1_PISTOL:
case MOD_USSOCOM_PISTOL:
case MOD_SILVER_TALON:
if ( attack == ATTACK_ALTERNATE )
{
message = "was pistol whipped by";
@ -377,11 +378,24 @@ static void CG_Obituary( entityState_t *ent )
}
break;
case MOD_M4_ASSAULT_RIFLE:
if ( attack == ATTACK_ALTERNATE )
{
message = "was detonated by";
message2 = va("'s %s", "M203" );
}
else
{
message = "was shot by";
message2 = va("'s %s", weaponParseInfo[mod].mName );
}
break;
case MOD_M60_MACHINEGUN:
case MOD_MICRO_UZI_SUBMACHINEGUN:
case MOD_MP5:
case MOD_M3A1_SUBMACHINEGUN:
case MOD_M4_ASSAULT_RIFLE:
case MOD_SIG551:
message = "was shot by";
message2 = va("'s %s", weaponParseInfo[mod].mName );
break;
@ -778,6 +792,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.waterWade[rand()%2], -1, -1 );
break;
case EV_ITEM_PICKUP_QUIET:
case EV_ITEM_PICKUP:
{
gitem_t *item;
@ -790,7 +805,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
autoswitch = (es->eventParm & ITEM_AUTOSWITCHBIT)?qtrue:qfalse;
// player predicted index
index = es->eventParm & ~ITEM_AUTOSWITCHBIT;
index = es->eventParm & ~(ITEM_AUTOSWITCHBIT|ITEM_QUIETPICKUP);
if ( index < 1 || index >= bg_numItems )
{
@ -799,7 +814,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
item = &bg_itemlist[ index ];
if ( item->pickup_sound )
if ( event != EV_ITEM_PICKUP_QUIET && item->pickup_sound )
{
trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound ), -1, -1 );
}
@ -939,7 +954,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
case EV_BULLET_HIT_WALL:
DEBUGNAME("EV_BULLET_HIT_WALL");
if ( !(cg_antiLag.integer && cg_impactPrediction.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
if ( !(cg_antiLag.integer && cg_impactPrediction.integer && !cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
{
// eventParm contains the direction byte and the material id
ByteToDir( (es->eventParm >> MATERIAL_BITS), dir );
@ -970,7 +985,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
}
#ifdef _SOF2_FLESHIMPACTPREDICTION
if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && !!cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) )
#endif
{
int fxtype = MATERIAL_FLESH;

View File

@ -236,6 +236,7 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi
// Smaller guns with pistol whip altfires
case WP_M1911A1_PISTOL:
case WP_SILVER_TALON:
case WP_USSOCOM_PISTOL:
if (attack==ATTACK_ALTERNATE)
{ // Bonk on the head
@ -293,6 +294,7 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi
// Medium guns
case WP_M3A1_SUBMACHINEGUN:
case WP_MP5:
case WP_SIG551:
CG_AddGore(irand(PGORE_BULLET_E, PGORE_BULLET_G), flrand( 5.25f, 7.5f),
hitloc, hitdirection, entnum, entposition, entangle, ghoul2);
if (cg_goreDetail.integer>0)

View File

@ -265,7 +265,19 @@ void CG_DrawInformation( void )
cg.cheats = qtrue;
}
else
{
s = Info_ValueForKey( info, "sv_punkbuster" );
if ( s[0] == '1' )
{
s = "PUNKBUSTER ENABLED";
CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y,
cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 );
y += PROP_HEIGHT;
}
cg.cheats = qfalse;
}
s = cgs.gametypeData->displayName;
CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y,
@ -289,6 +301,15 @@ void CG_DrawInformation( void )
cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 );
y += PROP_HEIGHT;
}
value = atoi( Info_ValueForKey( info, "g_friendlyFire" ) );
if ( value )
{
s = va( "FRIENDLY FIRE ON" );
CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y,
cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 );
y += PROP_HEIGHT;
}
}
/*

View File

@ -712,6 +712,7 @@ typedef struct
int timelimit;
int maxclients;
qboolean friendlyFire;
qboolean punkbuster;
char mapname[MAX_QPATH];
char gameover[MAX_QPATH];
@ -905,6 +906,8 @@ void CG_LoadMenus ( const char *menuFile);
void CG_KeyEvent ( int key, qboolean down);
void CG_MouseEvent ( int x, int y);
void CG_EventHandling ( int type);
int CG_TeamCount ( int team );
//
// cg_view.c

View File

@ -27,6 +27,7 @@ static void C_GetLerpAngles (void);
static void C_GetModelScale (void);
static void C_Trace (void);
static void C_CameraShake (void);
int CG_TeamScore ( int team );
/*
================
@ -132,6 +133,7 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a
// server is going to attempt to send out multiple broadcasts in hopes that
// the client will receive one of them
cg.mMapChange = qtrue;
cgs.voteTime = cgs.voteDuration = 0;
trap_S_ClearLoopingSounds ( qtrue );
trap_S_StopAllSounds ( );
trap_UI_CloseAll ( );
@ -160,6 +162,12 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a
return 0;
case CG_GET_TEAM_COUNT:
return CG_TeamCount ( arg0 );
case CG_GET_TEAM_SCORE:
return CG_TeamScore ( arg0 );
default:
Com_Error( ERR_FATAL, "vmMain: unknown command %i", command );
break;
@ -501,6 +509,7 @@ void CG_RegisterCvars( void )
trap_Cvar_Register(NULL, "ui_about_gametypename", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
trap_Cvar_Register(NULL, "ui_about_scorelimit", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
trap_Cvar_Register(NULL, "ui_about_timelimit", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
trap_Cvar_Register(NULL, "ui_about_friendlyfire", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
trap_Cvar_Register(NULL, "ui_about_maxclients", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
trap_Cvar_Register(NULL, "ui_about_dmflags", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
trap_Cvar_Register(NULL, "ui_about_mapname", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 );
@ -544,6 +553,59 @@ static void CG_ForceModelChange( void )
}
}
/*
==================
CG_TeamScore
==================
*/
int CG_TeamScore ( int team )
{
switch ( team )
{
case TEAM_RED:
return cg.predictedPlayerState.persistant[PERS_RED_SCORE];
case TEAM_BLUE:
return cg.predictedPlayerState.persistant[PERS_BLUE_SCORE];
}
return 0;
}
/*
==================
CG_TeamCount
==================
*/
int CG_TeamCount ( int team )
{
int count;
int i;
count = 0;
for ( i = 0 ; i < cgs.maxclients ; i++ )
{
clientInfo_t* cl;
cl = &cgs.clientinfo[ i ];
if ( !cl->infoValid )
{
continue;
}
if ( team != cl->team )
{
continue;
}
count++;
}
return count;
}
/*
==================
CG_UpdateTeamCountCvars
@ -1913,6 +1975,11 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum )
if ( cgs.gametypeData->description || cgs.pickupsDisabled || cgs.gametypeData->teams )
{
cg.popupObjectives = qtrue;
trap_Cvar_Set ( "ui_info_showobjectives", "1" );
}
else
{
trap_Cvar_Set ( "ui_info_showobjectives", "0" );
}
trap_Cvar_Set ( "ui_info_gametype", va("%i",cgs.gametype ) );

View File

@ -57,13 +57,7 @@ static void CG_DrawPlayerSniperMagnification ( rectDef_t *rect, qhandle_t font,
{
const char* mag;
switch ( cg.predictedPlayerState.zoomFov )
{
default:
case 20: mag = "5x"; break;
case 10: mag = "10x"; break;
case 5: mag = "20x"; break;
}
mag = weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].name;
// Center the text
CG_DrawText (rect->x, rect->y, font, scale, color, mag, 0, 0 );
@ -574,6 +568,19 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
visible = (cg.predictedPlayerState.pm_flags&PMF_ZOOMED)?qtrue:qfalse;
flags &= ~(CG_SHOW_HUD_SNIPERSCOPE);
}
// Only draw the sniper clip when zoomed
else if ( flags & CG_SHOW_HUD_SNIPERCLIP )
{
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 )
{
visible = (cg.predictedPlayerState.pm_flags&PMF_ZOOMED)?qtrue:qfalse;
flags &= ~(CG_SHOW_HUD_SNIPERCLIP);
}
else
{
visible = qfalse;
}
}
// Draw the health as long as we arent zoomed
else if ( flags & CG_SHOW_HUD_HEALTH )
{
@ -596,11 +603,14 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
}
// Should the alternate weapon information be shown?
else if (flags & (CG_SHOW_PLAYER_ALT_WEAPONINFO|CG_HIDE_PLAYER_ALT_WEAPONINFO) )
{
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 )
{
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
{
visible = qfalse;
}
}
if ( cg.showScores )
{
@ -623,7 +633,7 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
// INvert the visible flag for hidden
if ( flags & CG_HIDE_PLAYER_ALT_WEAPONINFO )
{
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) )
{
visible = qfalse;
}
@ -639,7 +649,12 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param )
// Draw the weapon info when we arent zoomed
else if ( flags & CG_SHOW_HUD_WEAPONINFO )
{
visible = (cg.showScores||(cg.predictedPlayerState.pm_flags&PMF_ZOOMED))?qfalse:qtrue;
qboolean zoomed = qfalse;
if ( cg.predictedPlayerState.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) )
{
zoomed = qtrue;
}
visible = (cg.showScores||zoomed)?qfalse:qtrue;
flags &= ~(CG_SHOW_HUD_WEAPONINFO);
}
else if (flags & CG_SHOW_ANYTEAMGAME)

View File

@ -578,6 +578,7 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader )
{
int rf;
refEntity_t ent;
clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum];
if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson )
{
@ -590,8 +591,6 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader )
}
memset( &ent, 0, sizeof( ent ) );
VectorCopy( cent->lerpOrigin, ent.origin );
ent.origin[2] += 58;
ent.reType = RT_SPRITE;
ent.customShader = shader;
ent.radius = 10;
@ -600,6 +599,20 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader )
ent.shaderRGBA[1] = 255;
ent.shaderRGBA[2] = 255;
ent.shaderRGBA[3] = 255;
if ( ci->boltNightvision == -1 )
{
ci->boltNightvision = trap_G2API_AddBolt( cent->ghoul2, 0, "*head_t" );
}
// Fall back to make sure its correct
if ( !G2_PositionEntityOnBolt ( &ent, cent->ghoul2, 0, ci->boltNightvision, cent->lerpOrigin, cent->pe.ghoulLegsAngles, cent->modelScale ) )
{
ci->boltNightvision = -1;
}
ent.origin[2] += 15;
trap_R_AddRefEntityToScene( &ent );
}
@ -861,21 +874,12 @@ static void CG_UpdatePlayerAnimations ( centity_t* cent )
CG_PlayerGametypeItems
===============
*/
void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles )
void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles, int rf )
{
clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum];
int i;
int rf;
if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson )
{
// only show in mirrors
rf = RF_THIRD_PERSON;
}
else
{
rf = 0;
}
rf = rf & RF_THIRD_PERSON;
// If the player is wearing goggles then draw them on their head
if ( cent->currentState.eFlags & EF_GOGGLES )
@ -924,7 +928,10 @@ void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles )
memset ( &item, 0, sizeof(item) );
item.renderfx = rf | RF_MINLIGHT;
item.ghoul2 = cg_items[ MODELINDEX_GAMETYPE_ITEM + i ].boltModel;
G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale );
if ( !G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale ) )
{
ci->boltGametypeItems[i] = -1;
}
trap_R_AddRefEntityToScene(&item);
}
}
@ -958,9 +965,12 @@ void CG_UpdatePlayerWeaponModel ( centity_t* cent, qboolean force )
}
// If the weapon model hasnt changed then dont update it
else if ( !force && cent->currentState.weapon == cent->pe.weapon )
{
if ( -1 != trap_G2API_GetBoltIndex ( cent->ghoul2, cent->pe.weaponModelSpot ) )
{
return;
}
}
else
{
// Ensure the weapon is registered
@ -972,7 +982,7 @@ void CG_UpdatePlayerWeaponModel ( centity_t* cent, qboolean force )
}
// Get rid of whats in their hand
if ( cent->pe.weaponModelSpot )
if ( cent->pe.weaponModelSpot && cent->pe.weaponModelSpot != -1 )
{
trap_G2API_DetachG2Model ( cent->ghoul2, cent->pe.weaponModelSpot );
trap_G2API_RemoveGhoul2Model( &cent->ghoul2, cent->pe.weaponModelSpot );
@ -1211,7 +1221,7 @@ void CG_Player( centity_t *cent )
// Render any of the floating sprites above the players head
CG_PlayerSprites ( cent );
CG_PlayerGametypeItems ( cent, cent->pe.ghoulLegsAngles );
CG_PlayerGametypeItems ( cent, cent->pe.ghoulLegsAngles, renderfx );
VectorCopy ( save, cent->lerpOrigin );
}
@ -1225,6 +1235,11 @@ A player just came into view or teleported, so reset all animation info
*/
void CG_ResetPlayerEntity( centity_t *cent )
{
clientInfo_t *ci;
int i;
ci = &cgs.clientinfo[cent->currentState.clientNum];
cent->errorTime = -99999; // guarantee no error decay added
cent->extrapolated = qfalse;
@ -1236,6 +1251,7 @@ void CG_ResetPlayerEntity( centity_t *cent )
cent->pe.legs.anim = -1;
cent->pe.torso.anim = -1;
cent->pe.weapon = -1;
memset( &cent->pe.legs, 0, sizeof( cent->pe.legs ) );
cent->pe.legs.yawAngle = cent->rawAngles[YAW];
@ -1248,6 +1264,12 @@ void CG_ResetPlayerEntity( centity_t *cent )
cent->pe.torso.yawing = qfalse;
cent->pe.torso.pitchAngle = cent->rawAngles[PITCH];
cent->pe.torso.pitching = qfalse;
// Reset all bolt position
for ( i = 0; i < MAX_GAMETYPE_ITEMS; i ++ )
{
ci->boltGametypeItems[i] = -1;
}
}
/*

View File

@ -226,7 +226,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops )
}
// Look for a zoom transition that isnt the first zoom in
if ( ops->zoomFov && (ps->zoomFov != ops->zoomFov) )
if ( weaponData[ops->weapon].zoom[ops->zoomFov].fov && (weaponData[ps->weapon].zoom[ps->zoomFov].fov != weaponData[ops->weapon].zoom[ops->zoomFov].fov) )
{
trap_S_StartLocalSound ( cgs.media.zoomSound, CHAN_AUTO );
}
@ -252,6 +252,9 @@ void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops )
cg.thisFrameTeleport = qtrue;
// make sure we don't get any unwanted transition effects
*ops = *ps;
CG_SetWeaponAnim(ps->weaponAnimId&(~ANIM_TOGGLEBIT),ps);
CG_UpdateViewWeaponSurfaces ( ps );
}
// damage events (player is getting wounded)

View File

@ -369,6 +369,7 @@ static void CG_TouchItem( centity_t *cent )
{
gitem_t *item;
qboolean autoswitch = qfalse;
int eventID;
if ( !cg_predictItems.integer )
{
@ -413,8 +414,17 @@ static void CG_TouchItem( centity_t *cent )
}
}
if ( cg.predictedPlayerState.pm_flags & PMF_DUCKED )
{
eventID = EV_ITEM_PICKUP_QUIET;
}
else
{
eventID = EV_ITEM_PICKUP;
}
// grab it
BG_AddPredictableEventToPlayerstate( EV_ITEM_PICKUP, cent->currentState.modelindex|(autoswitch?ITEM_AUTOSWITCHBIT:0) , &cg.predictedPlayerState);
BG_AddPredictableEventToPlayerstate( eventID, cent->currentState.modelindex|(autoswitch?ITEM_AUTOSWITCHBIT:0) , &cg.predictedPlayerState);
// remove it from the frame so it won't be drawn
cent->currentState.eFlags |= EF_NODRAW;

View File

@ -346,6 +346,9 @@ typedef enum
CG_VOICE_EVENT,
CG_GET_TEAM_COUNT,
CG_GET_TEAM_SCORE,
} cgameExport_t;
// CG_POINT_CONTENTS

View File

@ -90,6 +90,7 @@ void CG_ParseServerinfo( void )
cgs.timelimit = atoi( Info_ValueForKey( info, "timelimit" ) );
cgs.maxclients = atoi( Info_ValueForKey( info, "sv_maxclients" ) );
cgs.friendlyFire = atoi( Info_ValueForKey( info, "g_friendlyFire" ) ) ? qtrue : qfalse;
cgs.punkbuster = atoi( Info_ValueForKey( info, "sv_punkbster" ) ) ? qtrue : qfalse;
mapname = Info_ValueForKey( info, "mapname" );
Com_sprintf( cgs.mapname, sizeof( cgs.mapname ), "maps/%s.bsp", mapname );
@ -97,6 +98,7 @@ void CG_ParseServerinfo( void )
trap_Cvar_Set ( "ui_about_gametypename", cgs.gametypeData->displayName );
trap_Cvar_Set ( "ui_about_scorelimit", va("%i", cgs.scorelimit ) );
trap_Cvar_Set ( "ui_about_timelimit", va("%i", cgs.timelimit ) );
trap_Cvar_Set ( "ui_about_friendlyfire", va("%i", cgs.friendlyFire) );
trap_Cvar_Set ( "ui_about_maxclients", va("%i", cgs.maxclients ) );
trap_Cvar_Set ( "ui_about_dmflags", va("%i", cgs.dmflags ) );
trap_Cvar_Set ( "ui_about_mapname", mapname );

View File

@ -27,8 +27,6 @@ static void CG_ResetEntity( centity_t *cent )
{
CG_ResetPlayerEntity( cent );
}
cent->pe.weapon = 0;
}
/*

View File

@ -588,7 +588,6 @@ static void CG_OffsetFirstPersonView( void )
float f;
vec3_t predictedVelocity;
int timeDelta;
vec3_t right;
if ( cg.snap->ps.pm_type == PM_INTERMISSION ) {
return;
@ -732,8 +731,8 @@ static void CG_OffsetFirstPersonView( void )
leanOffset = (float)(cg.predictedPlayerState.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
angles[ROLL] += leanOffset / 4;
AngleVectors( cg.predictedPlayerState.viewangles, NULL, right, NULL );
VectorMA( origin, leanOffset, right, origin );
BG_ApplyLeanOffset ( &cg.predictedPlayerState, origin );
}
// Make sure view doesnt invert on itself
@ -856,7 +855,7 @@ static int CG_CalcFov( void ) {
if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED )
{
zoomFov = (float)cg.predictedPlayerState.zoomFov;
zoomFov = (float)weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].fov;
if (!cg.predictedPlayerState.pm_flags & PMF_ZOOM_LOCKED )
{
@ -885,6 +884,8 @@ static int CG_CalcFov( void ) {
}
else
{
zoomFov = (float)weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].fov;
f = ( cg.time - cg.predictedPlayerState.zoomTime ) / ZOOM_OUT_TIME;
if ( f > 1.0 )
{
@ -892,7 +893,7 @@ static int CG_CalcFov( void ) {
}
else
{
fov_x = cg.predictedPlayerState.zoomFov + f * ( fov_x - cg.predictedPlayerState.zoomFov );
fov_x = zoomFov + f * ( fov_x - zoomFov );
}
}
}
@ -1284,9 +1285,16 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
cg.renderingThirdPerson = qfalse;
}
else if ( cg.snap->ps.pm_flags & PMF_FOLLOW )
{
if ( cg.snap->ps.pm_flags & PMF_FOLLOWFIRST )
{
cg.renderingThirdPerson = qfalse;
}
else
{
cg.renderingThirdPerson = qtrue;
}
}
else
{
cg.renderingThirdPerson = cg_thirdPerson.integer || (cg.snap->ps.stats[STAT_HEALTH] <= 0);

View File

@ -382,6 +382,7 @@ void CG_UpdateViewWeaponSurfaces ( playerState_t* ps )
break;
case WP_M1911A1_PISTOL:
case WP_SILVER_TALON:
case WP_USSOCOM_PISTOL:
{
int forward;
@ -1000,7 +1001,7 @@ void CG_PredictedBullet ( centity_t* cent, attackType_t attack )
ent = &cent->currentState;
// Dont bother if antilag is turned off or its a projectile weapon
if ( cg_antiLag.integer < 1 || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE))
if ( cg_antiLag.integer < 1 || cg_synchronousClients.integer || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE))
{
return;
}
@ -1019,12 +1020,7 @@ void CG_PredictedBullet ( centity_t* cent, attackType_t attack )
VectorCopy(cg.predictedPlayerState.viewangles, fireAngs);
if ( cg.predictedPlayerState.pm_flags & PMF_LEANING )
{
vec3_t right;
float leanOffset;
leanOffset = (float)(cg.predictedPlayerState.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
AngleVectors( fireAngs, NULL, right, NULL );
VectorMA( start, leanOffset, right, start );
BG_ApplyLeanOffset ( &cg.predictedPlayerState, start );
}
seed = cg.predictedPlayerState.stats[STAT_SEED];
@ -1778,7 +1774,7 @@ void CG_WeaponCallback ( playerState_t* ps, centity_t* cent, int weapon, int ani
{
// Play sound.
// FIXME: randomly select sound??
trap_S_StartSound(NULL,ent->number,CHAN_WEAPON,weaponInfo->otherWeaponSounds[i][0], -1, -1);
trap_S_StartSound(NULL,ent->number,CHAN_AUTO,weaponInfo->otherWeaponSounds[i][0], -1, -1);
break;
}
}

View File

@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=SoF2cgame - Win32 SH Debug SoF2
CFG=SoF2cgame - Win32 Release SoF2
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@ -13,19 +13,16 @@ CFG=SoF2cgame - Win32 SH Debug SoF2
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "sof2_cgame.mak" CFG="SoF2cgame - Win32 SH Debug SoF2"
!MESSAGE NMAKE /f "sof2_cgame.mak" CFG="SoF2cgame - Win32 Release SoF2"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "SoF2cgame - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "SoF2cgame - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "SoF2cgame - Win32 SH Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
@ -88,562 +85,152 @@ LINK32=link.exe
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x30000000" /subsystem:windows /dll /map:"..\Debug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\Debug\sof2mp_cgamex86.dll"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "SoF2cgame___Win32_SH_Debug_SoF2"
# PROP BASE Intermediate_Dir "SoF2cgame___Win32_SH_Debug_SoF2"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "SoF2cgame___Win32_SH_Debug_SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G5 /MTd /W4 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_SOF2" /FR /YX /FD /c
# ADD CPP /nologo /G5 /MTd /W4 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_SOF2" /D "MEM_DEBUG" /D "CGAME" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "_Debug SoF2" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_Debug SoF2" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_Debug SoF2"
# ADD RSC /l 0x409 /d "_Debug SoF2"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map:"..\Debug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\Debug\sof2mp_cgamex86.dll"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /pdb:"..\SHDebug/sof2mp_cgamex86.pdb" /map:"..\SHDebug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\SHDebug\sof2mp_cgamex86.dll"
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "SoF2cgame - Win32 Release SoF2"
# Name "SoF2cgame - Win32 Debug SoF2"
# Name "SoF2cgame - Win32 SH Debug SoF2"
# Begin Group "Source Files"
# PROP Default_Filter "c"
# Begin Source File
SOURCE=..\game\bg_gametype.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\game\bg_lib.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP BASE Exclude_From_Build 1
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
# PROP Exclude_From_Build 1
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\game\bg_misc.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\game\bg_player.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\game\bg_pmove.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\game\bg_slidemove.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\game\bg_weapons.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_consolecmds.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_draw.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_drawtools.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_effects.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_ents.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_event.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_gametype.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_gore.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_info.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_light.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_localents.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_main.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_miscents.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_newDraw.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_players.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_playerstate.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_predict.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_scoreboard.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_servercmds.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_snapshot.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_syscalls.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_view.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_weaponinit.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\cg_weapons.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\game\q_math.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\game\q_shared.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\ui\ui_shared.c
!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2"
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP Intermediate_Dir "..\SHDebug\SoF2cgame"
!ENDIF
# End Source File
# End Group
# Begin Group "Header Files"
@ -679,10 +266,18 @@ SOURCE=.\cg_public.h
# End Source File
# Begin Source File
SOURCE=.\cg_was.h
# End Source File
# Begin Source File
SOURCE=..\qcommon\disablewarnings.h
# End Source File
# Begin Source File
SOURCE=.\fx_local.h
# End Source File
# Begin Source File
SOURCE=..\ghoul2\G2.h
# End Source File
# Begin Source File
@ -748,11 +343,6 @@ SOURCE=.\SoF2_cgame.def
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2"
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
!ENDIF
# End Source File

View File

@ -726,6 +726,7 @@ int BotAISetupClient(int client, struct bot_settings_s *settings, qboolean resta
bs->botWeaponWeights[WP_NONE] = 0;
bs->botWeaponWeights[WP_KNIFE] = 1;
bs->botWeaponWeights[WP_M1911A1_PISTOL] = 3;
bs->botWeaponWeights[WP_SILVER_TALON] = 4;
bs->botWeaponWeights[WP_USSOCOM_PISTOL] = 2;
bs->botWeaponWeights[WP_M4_ASSAULT_RIFLE] = 10;
bs->botWeaponWeights[WP_AK74_ASSAULT_RIFLE] = 9;
@ -742,6 +743,7 @@ int BotAISetupClient(int client, struct bot_settings_s *settings, qboolean resta
bs->botWeaponWeights[WP_ANM14_GRENADE] = 2;
bs->botWeaponWeights[WP_M15_GRENADE] = 2;
bs->botWeaponWeights[WP_MP5] = 7;
bs->botWeaponWeights[WP_SIG551] = 7;
BotUtilizePersonality(bs);
@ -3489,6 +3491,7 @@ float BotWeaponCanLead(bot_state_t *bs)
// no leading needed for any bullet weapons
case WP_M1911A1_PISTOL:
case WP_SILVER_TALON:
case WP_USSOCOM_PISTOL:
case WP_M4_ASSAULT_RIFLE:
case WP_AK74_ASSAULT_RIFLE:
@ -3496,6 +3499,7 @@ float BotWeaponCanLead(bot_state_t *bs)
case WP_MICRO_UZI_SUBMACHINEGUN:
case WP_M3A1_SUBMACHINEGUN:
case WP_MP5:
case WP_SIG551:
case WP_MSG90A1:
case WP_USAS_12_SHOTGUN:
case WP_M590_SHOTGUN:

View File

@ -1353,6 +1353,7 @@ float botGlobalNavWeaponWeights[WP_NUM_WEAPONS] =
6,//WP_M15_GRENADE,
6,//WP_MP5
6,//WP_SIG551
};
int GetNearestVisibleWPToItem(vec3_t org, int ignore)

View File

@ -223,6 +223,27 @@ Pistol, uses 45 rounds
OUTFITTING_GROUP_PISTOL,
},
/*QUAKED pickup_weapon_silvertalon (0 .6 .6) (-15 -15 -15) (15 15 15)
Pistol, uses 45 rounds
*/
{
"pickup_weapon_silvertalon",
"sound/player/pickup/weapon.wav",
{ "models/weapons/silver_talon/world/silver_talonworld.glm",
0, 0, 0},
/* icon */ "gfx/menus/hud/weapon_icons/silver_talonicon",
"*gfx/menus/weapon_renders/silver_talon",
"a",
/* pickup */ "Silver Talon",
7,
IT_WEAPON,
WP_SILVER_TALON,
/* precache */ "",
/* sounds */ "",
OUTFITTING_GROUP_PISTOL,
},
/*QUAKED pickup_weapon_microuzi (0 .6 .6) (-15 -15 -15) (15 15 15)
Sub-Machinegun, uses 9mm rounds
*/
@ -265,6 +286,27 @@ Sub-Machinegun, uses 45 rounds
OUTFITTING_GROUP_SECONDARY,
},
/*QUAKED pickup_weapon_MP5 (0 .6 .6) (-15 -15 -15) (15 15 15)
Sub-Machinegun, uses 9mm rounds
*/
{
"pickup_weapon_MP5",
"sound/player/pickup/weapon.wav",
{ "models/weapons/mp5/world/mp5world.glm",
0, 0, 0},
/* icon */ "gfx/menus/hud/weapon_icons/mp5_icon",
"gfx/menus/weapon_renders/mp5",
"a",
/* pickup */ "MP5 Sub-machinegun",
30,
IT_WEAPON,
WP_MP5,
/* precache */ "",
/* sounds */ "",
OUTFITTING_GROUP_PRIMARY,
},
/*QUAKED pickup_weapon_USAS_12 (0 .6 .6) (-15 -15 -15) (15 15 15)
Shotgun, uses 12-gauge rounds
ammo ---------- amount of ammo (defaults to 10)
@ -371,6 +413,27 @@ Assault Rifle, uses 5.56 rounds
OUTFITTING_GROUP_PRIMARY,
},
/*QUAKED pickup_weapon_SIG551 (0 .6 .6) (-15 -15 -15) (15 15 15)
Assault Rifle, uses 5.56 rounds
*/
{
"pickup_weapon_SIG551",
"sound/player/pickup/weapon.wav",
{ "models/weapons/sig551/world/sig551world.glm",
0, 0, 0},
/* icon */ "gfx/menus/hud/weapon_icons/sig551_icon",
"gfx/menus/weapon_renders/sig551",
"an",
/* pickup */ "SIG551 Assault",
30,
IT_WEAPON,
WP_SIG551,
/* precache */ "",
/* sounds */ "",
OUTFITTING_GROUP_PRIMARY,
},
/*QUAKED pickup_weapon_M60 (0 .6 .6) (-15 -15 -15) (15 15 15)
Machinegun, uses 7.62 rounds
*/
@ -518,27 +581,6 @@ White Phosphorus Grenade
OUTFITTING_GROUP_GRENADE,
},
/*QUAKED pickup_weapon_MP5 (0 .6 .6) (-15 -15 -15) (15 15 15)
Sub-Machinegun, uses 9mm rounds
*/
{
"pickup_weapon_MP5",
"sound/player/pickup/weapon.wav",
{ "models/weapons/mp5/world/mp5world.glm",
0, 0, 0},
/* icon */ "gfx/menus/hud/weapon_icons/mp5_icon",
"gfx/menus/weapon_renders/mp5",
"a",
/* pickup */ "MP5 Sub-machinegun",
30,
IT_WEAPON,
WP_MP5,
/* precache */ "",
/* sounds */ "",
OUTFITTING_GROUP_PRIMARY,
},
//
// AMMO ITEMS
//

View File

@ -36,11 +36,11 @@ char bg_availableOutfitting[WP_NUM_WEAPONS] = {-1};
int bg_outfittingGroups[OUTFITTING_GROUP_MAX][MAX_OUTFITTING_GROUPITEM] =
{
{ MODELINDEX_WEAPON_AK74, MODELINDEX_WEAPON_M4, MODELINDEX_WEAPON_USAS12, MODELINDEX_WEAPON_MSG90A1, MODELINDEX_WEAPON_M60, MODELINDEX_WEAPON_MP5, MODELINDEX_WEAPON_RPG7, MODELINDEX_WEAPON_MM1, -1, -1 },
{ MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_MICROUZI, MODELINDEX_WEAPON_M3A1, -1, -1, -1, -1, -1, -1, - 1 },
{ MODELINDEX_WEAPON_M19, MODELINDEX_WEAPON_SOCOM, -1, -1, -1, -1, -1, -1, -1, -1 },
{ MODELINDEX_WEAPON_SMOHG92, MODELINDEX_WEAPON_M84, MODELINDEX_WEAPON_M15, MODELINDEX_WEAPON_ANM14, -1, -1, -1, -1, -1, -1 },
{ MODELINDEX_ARMOR, MODELINDEX_NIGHTVISION, MODELINDEX_THERMAL, -1, -1, -1, -1, -1, -1, -1 },
{ MODELINDEX_WEAPON_AK74, MODELINDEX_WEAPON_M4, MODELINDEX_WEAPON_SIG551, MODELINDEX_WEAPON_USAS12, MODELINDEX_WEAPON_MSG90A1, MODELINDEX_WEAPON_M60, MODELINDEX_WEAPON_MP5, MODELINDEX_WEAPON_RPG7, MODELINDEX_WEAPON_MM1, -1, -1, -1 },
{ MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_MICROUZI, MODELINDEX_WEAPON_M3A1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
{ MODELINDEX_WEAPON_M19, MODELINDEX_WEAPON_SOCOM, MODELINDEX_WEAPON_SILVERTALON, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
{ MODELINDEX_WEAPON_SMOHG92, MODELINDEX_WEAPON_M84, MODELINDEX_WEAPON_M15, MODELINDEX_WEAPON_ANM14, -1, -1, -1, -1, -1, -1, -1, -1 },
{ MODELINDEX_ARMOR, MODELINDEX_NIGHTVISION, MODELINDEX_THERMAL, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
};
/*
@ -1743,4 +1743,21 @@ int BG_ParseOutfittingTemplates ( qboolean force )
return bg_outfittingCount;
}
/*
========================
BG_ApplyLeanOffset
Applies the given lean offset to the origin
========================
*/
void BG_ApplyLeanOffset ( playerState_t* ps, vec3_t origin )
{
float leanOffset;
vec3_t up;
vec3_t right;
leanOffset = (float)(ps->leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
AngleVectors( ps->viewangles, NULL, right, up);
VectorMA( origin, leanOffset, right, origin );
VectorMA( origin, Q_fabs(leanOffset) * -0.20f, up, origin );
}

View File

@ -1197,7 +1197,7 @@ static void PM_CrashLand( int impactMaterial, vec3_t impactNormal )
pm->ps->velocity[0] *= 0.25f;
pm->ps->velocity[1] *= 0.25f;
pm->ps->pm_time = 500;
pm->ps->pm_time = 750;
}
// create a local entity event to play the sound
@ -2382,7 +2382,7 @@ static void PM_FinishWeaponChange( void )
PM_HandleWeaponAction(WACT_READY);
pm->ps->weaponTime = min(500,pm->ps->weaponTime);
pm->ps->weaponTime = min(150,pm->ps->weaponTime);
PM_StartTorsoAnim( pm->ps, weaponData[pm->ps->weapon].animRaise, pm->ps->weaponAnimTime );
}
@ -2500,6 +2500,24 @@ int PM_GetAttackButtons(void)
pm->ps->pm_debounce &= ~PMD_FIREMODE;
}
// As soon as the button is released you are ok to press attack again
if ( pm->ps->pm_debounce & PMD_ATTACK )
{
if ( !(buttons & BUTTON_ATTACK) )
{
pm->ps->pm_debounce &= ~(PMD_ATTACK);
}
else if ( pm->ps->firemode[pm->ps->weapon] != WP_FIREMODE_AUTO )
{
buttons &= ~BUTTON_ATTACK;
}
}
if ( pm->ps->stats[STAT_FROZEN] )
{
buttons &= ~BUTTON_ATTACK;
}
// Handle firebutton in varous firemodes.
switch( pm->ps->firemode[pm->ps->weapon] )
{
@ -2507,26 +2525,16 @@ int PM_GetAttackButtons(void)
break;
case WP_FIREMODE_BURST:
// Debounce attack button and disable other buttons during burst fire.
if(buttons&BUTTON_ATTACK)
{
if( !(pm->ps->pm_debounce & PMD_ATTACK))
{
pm->ps->pm_debounce |= PMD_ATTACK;
if(!pm->ps->weaponFireBurstCount)
{
pm->ps->weaponFireBurstCount=3;
}
}
else
{
buttons &= ~BUTTON_ATTACK;
}
}
else
{
pm->ps->pm_debounce &= ~PMD_ATTACK;
}
if(pm->ps->weaponFireBurstCount)
{
buttons|=BUTTON_ATTACK;
@ -2539,23 +2547,6 @@ int PM_GetAttackButtons(void)
break;
case WP_FIREMODE_SINGLE:
// Debounce attack button.
if(buttons&BUTTON_ATTACK)
{
if(!(pm->ps->pm_debounce & PMD_ATTACK))
{
pm->ps->pm_debounce |= PMD_ATTACK;
}
else
{
buttons&=~BUTTON_ATTACK;
}
}
else
{
pm->ps->pm_debounce &= ~PMD_ATTACK;
}
break;
}
@ -2598,15 +2589,19 @@ static void PM_Weapon_AddInaccuracy( attackType_t attack )
// Zoomed sniper weapons don't add innacuracy if ont hte ground
if( (pm->ps->pm_flags & PMF_ZOOMED) && pml.groundPlane )
{
return;
pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].zoomInaccuracy;
}
else
{
pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].inaccuracy;
}
pm->ps->inaccuracyTime = RECOVER_TIME;
if ( pm->ps->inaccuracy > weaponData[pm->ps->weapon].attack[attack].maxInaccuracy )
{
pm->ps->inaccuracy = weaponData[pm->ps->weapon].attack[attack].maxInaccuracy;
}
}
/*
@ -2948,11 +2943,6 @@ static void PM_Weapon( void )
if( pm->ps->weaponstate == WEAPON_ZOOMIN )
{
// The zoomfov may still be remembered from a reload while zooming
if ( !pm->ps->zoomFov )
{
pm->ps->zoomFov = 20;
}
pm->ps->pm_flags |= PMF_ZOOMED;
pm->ps->pm_flags |= PMF_ZOOM_LOCKED;
pm->ps->pm_flags &= ~PMF_ZOOM_REZOOM;
@ -3026,6 +3016,7 @@ static void PM_Weapon( void )
pm->ps->weaponstate=WEAPON_READY;
return;
}
break;
default:
break;
}
@ -3116,7 +3107,7 @@ static void PM_Weapon( void )
}
// Handle zooming in/out for sniper rifle.
if(pm->ps->weapon==WP_MSG90A1)
if( weaponData[pm->ps->weapon].zoom[0].fov )
{
if( (attackButtons&BUTTON_ALT_ATTACK) || (pm->ps->pm_flags & PMF_ZOOM_REZOOM) )
{
@ -3134,22 +3125,20 @@ static void PM_Weapon( void )
{
if(pm->cmd.buttons&BUTTON_ZOOMIN)
{
pm->ps->zoomFov = pm->ps->zoomFov >> 1;
if ( pm->ps->zoomFov < 5)
if ( pm->ps->zoomFov + 1 < ZOOMLEVEL_MAX && weaponData[pm->ps->weapon].zoom[pm->ps->zoomFov+1].fov )
{
pm->ps->zoomFov = 5;
}
pm->ps->zoomFov++;
pm->ps->weaponTime=175;
}
return;
}
else if(pm->cmd.buttons&BUTTON_ZOOMOUT)
{
pm->ps->zoomFov = pm->ps->zoomFov << 1;
if(pm->ps->zoomFov > 20 )
if ( pm->ps->zoomFov > 0 )
{
pm->ps->zoomFov = 20;
}
pm->ps->zoomFov--;
pm->ps->weaponTime=175;
}
return;
}
}
@ -3263,6 +3252,8 @@ static void PM_Weapon( void )
return;
}
pm->ps->pm_debounce |= PMD_ATTACK;
// Decrease the ammo
(*ammoSource) -= attackData->fireAmount;
@ -3408,10 +3399,9 @@ static void PM_CheckLean( void )
// check for collision
VectorCopy( pm->ps->origin, start );
start[2] += pm->ps->viewheight;
AngleVectors( pm->ps->viewangles, NULL, right, NULL );
VectorSet( mins, -6, -6, -8 );
VectorSet( maxs, 6, 6, 8 );
VectorSet( mins, -6, -6, -20 );
VectorSet( maxs, 6, 6, 20 );
// since we're moving the camera over
// check that move
@ -3877,13 +3867,8 @@ void PM_UpdatePVSOrigin ( pmove_t *pmove )
// Set a pm flag for leaning and calculate the view origin for the lean
if ( pm->ps->leanTime - LEAN_TIME != 0 )
{
vec3_t right;
float leanOffset;
leanOffset = (float)(pm->ps->leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
AngleVectors( pm->ps->viewangles, NULL, right, NULL );
VectorMA( pm->ps->origin, leanOffset, right, pm->ps->pvsOrigin );
VectorCopy ( pm->ps->origin, pm->ps->pvsOrigin );
BG_ApplyLeanOffset ( pm->ps, pm->ps->pvsOrigin );
}
else
{

View File

@ -12,10 +12,36 @@
#include "../../ui/menudef.h"
#include "inv.h"
//#define GAME_VERSION "sof2mp-0.01" sent on 11/26/2001
//#define GAME_VERSION "sof2mp-0.02" sent on 12/10/2001
//#define GAME_VERSION "sof2mp-0.03" sent on 12/16/2001
//#define GAME_VERSION "sof2mp-0.081" sent on 1/15/2002
//#define GAME_VERSION "sof2mp-0.09" sent on 1/24/2002
//#define GAME_VERSION "sof2mp-0.10" sent on 1/31/2002
//#define GAME_VERSION "sof2mp-0.11" sent on 2/7/2002
//#define GAME_VERSION "sof2mp-0.12" sent on 2/14/2002
//#define GAME_VERSION "sof2mp-0.13" sent on 2/21/2002
//#define GAME_VERSION "sof2mp-0.13b" public beta #1 on 3/1/3002
//#define GAME_VERSION "sof2mp-0.14" sent on 3/4/2002
//#define GAME_VERSION "sof2mp-0.15" sent on 3/11/2002
//#define GAME_VERSION "sof2mp-0.15b" public beta #2 on 3/13/2002
//#define GAME_VERSION "sof2mp-0.16" sent on 3/18/2002
//#define GAME_VERSION "sof2mp-0.16b" public beta #3 on 3/20/2002
//#define GAME_VERSION "sof2mp-0.17" sent on 3/24/2002
//#define GAME_VERSION "sof2mp-1.01t" sent on 3/28/2002
//#define GAME_VERSION "sof2mp-0.18" sent on 4/1/2002 - April Fools!
//#define GAME_VERSION "sof2mp-1.02t" sent on 4/5/2002
//#define GAME_VERSION "sof2mp-0.19" sent on 4/8/2002
//#define GAME_VERSION "sof2mp-0.20" sent on 4/15/2002 - Tax Day!
//#define GAME_VERSION "sof2mp-0.21" sent on 4/22/2002
//#define GAME_VERSION "sof2mp-1.00.22" sent on 4/26/2002
//#define GAME_VERSION "sof2mp-1.00.23" sent on 4/27/2002
#ifdef GERMAN_BUILD
#define GAME_VERSION "sof2mp-mod-1.01g"
// #define GAME_VERSION "sof2mp-1.00g"
#define GAME_VERSION "sof2mp-1.02g"
#else
#define GAME_VERSION "sof2mp-mod-1.01"
// #define GAME_VERSION "sof2mp-1.00"
#define GAME_VERSION "sof2mp-1.02"
#endif
#define DEFAULT_GRAVITY 800
@ -36,12 +62,12 @@
#define SCORE_NOT_PRESENT -9999 // for the CS_SCORES[12] when only one player is present
#define DEFAULT_PLAYER_Z_MAX 43
#define CROUCH_PLAYER_Z_MAX 26
#define CROUCH_PLAYER_Z_MAX 18
#define PRONE_PLAYER_Z_MAX -12
#define DEAD_PLAYER_Z_MAX -30
#define DUCK_ACCURACY_MODIFIER 0.75f
#define JUMP_ACCURACY_MODIFIER 1.5f
#define JUMP_ACCURACY_MODIFIER 2.0f
#define MINS_Z -46
@ -325,6 +351,7 @@ typedef struct ladder_s
// changes so a restart of the same anim can be detected
#define ANIM_TOGGLEBIT 2048 // Note that there are 12 bits (max 4095) for animations.
#define ITEM_AUTOSWITCHBIT (1<<31)
#define ITEM_QUIETPICKUP (1<<30)
typedef enum
{
@ -382,6 +409,7 @@ typedef enum {
#define PMF_AUTORELOAD 0x00400000 // autoreloading enabled
#define PMF_SIAMESETWINS 0x00800000
#define PMF_FOLLOWFIRST 0x01000000 // First person following
#define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK)
#define PMF_ZOOM_FLAGS (PMF_ZOOMED|PMF_ZOOM_LOCKED|PMF_ZOOM_REZOOM|PMF_ZOOM_DEFER_RELOAD)
@ -503,6 +531,9 @@ typedef enum
PERS_RED_SCORE, // Blue team score
PERS_BLUE_SCORE, // red team score
PERS_RED_ALIVE_COUNT, // number of alive people on the red team
PERS_BLUE_ALIVE_COUNT, // number of alive people on the blue team
} persEnum_t;
@ -591,6 +622,7 @@ typedef enum
EV_WATER_CLEAR,
EV_ITEM_PICKUP, // normal item pickups are predictable
EV_ITEM_PICKUP_QUIET, // quiet pickup
EV_NOAMMO,
EV_CHANGE_WEAPON,
@ -1018,7 +1050,7 @@ typedef struct SSkinTemplate
#define MAX_MODEL_SOUNDS 8
#define MAX_IDENTITIES 256
#define MAX_OUTFITTINGS 64
#define MAX_OUTFITTING_GROUPITEM 10
#define MAX_OUTFITTING_GROUPITEM 12
typedef struct SModelSounds
{
@ -1064,7 +1096,7 @@ extern TIdentity bg_identities[];
extern int bg_identityCount;
extern goutfitting_t bg_outfittings[];
extern int bg_outfittingCount;
extern int bg_outfittingGroups[][10];
extern int bg_outfittingGroups[][MAX_OUTFITTING_GROUPITEM];
extern char *bg_weaponNames[WP_NUM_WEAPONS];
extern stringID_table_t bg_animTable [MAX_ANIMATIONS+1];
@ -1081,6 +1113,7 @@ void BG_DecompressOutfitting ( const char* compressed, goutfitting_t* outf
void BG_CompressOutfitting ( goutfitting_t* outfitting, char* compressed, int size );
int BG_ParseOutfittingTemplates ( qboolean force );
int BG_FindOutfitting ( goutfitting_t* outfitting);
void BG_ApplyLeanOffset ( playerState_t* ps, vec3_t origin );
/*******************************************************************************
*

View File

@ -14,6 +14,7 @@ char *bg_weaponNames[WP_NUM_WEAPONS] =
"Knife", // WP_KNIFE,
"M1911A1", // WP_M1911A1_PISTOL,
"US SOCOM", // WP_US_SOCOM_PISTOL,
"Silver Talon", // WP_SILVER_TALON,
"M590", // WP_M590_SHOTGUN,
"Micro Uzi", // WP_MICRO_UZI_SUBMACHINEGUN,
"M3A1", // WP_M3A1_SUBMACHINEGUN,
@ -21,6 +22,7 @@ char *bg_weaponNames[WP_NUM_WEAPONS] =
"USAS-12", // WP_USAS_12_SHOTGUN,
"M4", // WP_M4_ASSAULT_RIFLE,
"AK74", // WP_AK74_ASSAULT_RIFLE,
"Sig 551", // WP_SIG551
"MSG90A1", // WP_MSG90A1_SNIPER_RIFLE,
"M60", // WP_M60_MACHINEGUN,
"MM1", // WP_MM1_GRENADE_LAUNCHER,
@ -156,6 +158,38 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void
return qtrue;
}
// Zoom information
trap_GPG_FindPairValue(attacksub, "action", "", tmpStr);
if ( !Q_stricmp ( tmpStr, "toggleZoom" ) )
{
weaponData_t *weapon;
void *value;
int zoomlvl;
weapon = &weaponData[weaponNum];
sub = trap_GPG_FindSubGroup(attacksub, "zoomFactors");
if ( !sub )
{
return qfalse;
}
value = trap_GPG_GetPairs(sub);
zoomlvl = 0;
while(value)
{
trap_GPV_GetName ( value, weapon->zoom[zoomlvl].name );
trap_GPV_GetTopValue(value, tmpStr );
weapon->zoom[zoomlvl].fov = atoi ( tmpStr );
value = trap_GPV_GetNext ( value );
zoomlvl ++;
}
return qtrue;
}
// Assign a melee attribute if there is one
trap_GPG_FindPairValue(attacksub, "mp_melee||melee", "none", tmpStr );
if ( Q_stricmp ( tmpStr, "none" ) )
@ -219,6 +253,8 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void
attack->damage = atoi(tmpStr);
trap_GPG_FindPairValue(attacksub, "mp_inaccuracy||inaccuracy", "0", tmpStr);
attack->inaccuracy = (int)(atof(tmpStr)*1000.0f);
trap_GPG_FindPairValue(attacksub, "mp_zoominaccuracy", "0", tmpStr);
attack->zoomInaccuracy = (int)(atof(tmpStr)*1000.0f);
trap_GPG_FindPairValue(attacksub, "mp_maxInaccuracy||maxInaccuracy", "0", tmpStr);
attack->maxInaccuracy = (int)(atof(tmpStr)*1000.0f);
trap_GPG_FindPairValue(attacksub, "mp_gore||gore", "YES", tmpStr);
@ -1196,12 +1232,12 @@ void BG_CalculateBulletEndpoint ( vec3_t muzzlePoint, vec3_t fireAngs, float ina
float f1;
float f2;
f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
f2 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
fGaussianX = (f1-0.5f) + (f2-0.5f);
f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
f2 = (float)(Q_rand ( seed ) % 15000) / 15000.0f;
f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f;
fGaussianY = (f1-0.5f) + (f2-0.5f);
fGaussian = fGaussianX * fGaussianX + fGaussianY * fGaussianY;

View File

@ -16,6 +16,7 @@ typedef enum
// Pistols
MOD_M1911A1_PISTOL,
MOD_USSOCOM_PISTOL,
MOD_SILVER_TALON,
// Secondarys
MOD_M590_SHOTGUN,
@ -27,6 +28,8 @@ typedef enum
MOD_USAS_12_SHOTGUN,
MOD_M4_ASSAULT_RIFLE,
MOD_AK74_ASSAULT_RIFLE,
MOD_SIG551,
MOD_MSG90A1_SNIPER_RIFLE,
MOD_M60_MACHINEGUN,
MOD_MM1_GRENADE_LAUNCHER,
@ -60,6 +63,7 @@ typedef enum
// Pistols
WP_M1911A1_PISTOL,
WP_USSOCOM_PISTOL,
WP_SILVER_TALON,
// Secondarys
WP_M590_SHOTGUN,
@ -71,6 +75,8 @@ typedef enum
WP_USAS_12_SHOTGUN,
WP_M4_ASSAULT_RIFLE,
WP_AK74_ASSAULT_RIFLE,
WP_SIG551,
WP_MSG90A1,
WP_M60_MACHINEGUN,
WP_MM1_GRENADE_LAUNCHER,
@ -140,6 +146,16 @@ typedef enum
} ECategory;
#define MAX_ZOOMNAME 8
#define ZOOMLEVEL_MAX 3
typedef struct zoomData_s
{
int fov;
char name[MAX_ZOOMNAME];
} zoomData_t;
typedef struct attackData_s
{
char name[MAX_QPATH];
@ -160,6 +176,7 @@ typedef struct attackData_s
int fireFromClip; // 0 = fire from approp. ammo pool, 1 = fire from clip
int damage; // how much damage is done per hit
float inaccuracy; // how inaccurate is weapon
float zoomInaccuracy; // how inaccurate is the weapon when zoomed
float maxInaccuracy; // maximum lvl of inaccuracy
int pellets; // how many individual 'bullets' are shot with one trigger pull?
int weaponFlags; // which fire modes are available, projectiles timed or impact, .etc
@ -207,6 +224,7 @@ typedef struct weaponData_s
attackData_t attack[ATTACK_MAX];
zoomData_t zoom[ZOOMLEVEL_MAX];
} weaponData_t;

View File

@ -499,6 +499,9 @@ void G_UpdatePlayerStateScores ( gentity_t* ent )
{
ent->client->ps.persistant[PERS_RED_SCORE] = level.teamScores[TEAM_RED];
ent->client->ps.persistant[PERS_BLUE_SCORE] = level.teamScores[TEAM_BLUE];
ent->client->ps.persistant[PERS_BLUE_ALIVE_COUNT] = level.teamAliveCount[TEAM_BLUE];
ent->client->ps.persistant[PERS_RED_ALIVE_COUNT] = level.teamAliveCount[TEAM_RED];
}
else
{
@ -566,6 +569,11 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
// attack button cycles through spectators
if ( client->sess.spectatorState != SPECTATOR_FOLLOW && g_forceFollow.integer )
{
if ( g_forceFollow.integer > 1 )
{
client->sess.spectatorFirstPerson = qtrue;
}
Cmd_FollowCycle_f( ent, 1 );
}
if ( ( client->buttons & BUTTON_ATTACK ) && ! ( client->oldbuttons & BUTTON_ATTACK ) )
@ -580,6 +588,28 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
{
G_StopFollowing( ent );
}
else if ( (client->buttons & BUTTON_USE) && !( client->oldbuttons & BUTTON_USE ) )
{
// If not following then go to either third or first
if ( client->sess.spectatorState != SPECTATOR_FOLLOW )
{
client->sess.spectatorFirstPerson = g_forceFollow.integer < 2 ? qfalse : qtrue;
Cmd_FollowCycle_f( ent, -1 );
}
// If in first person then either go to free float or third person
else if ( client->sess.spectatorFirstPerson )
{
if ( g_forceFollow.integer < 2 )
{
client->sess.spectatorFirstPerson = qfalse;
}
}
// Must be in third person so just go to first
else
{
client->sess.spectatorFirstPerson = qtrue;
}
}
}
/*
@ -1102,6 +1132,15 @@ void ClientThink_real( gentity_t *ent )
// Update the client animation info
G_UpdateClientAnimations ( ent );
if ( ent->client->ps.pm_flags & PMF_LEANING )
{
ent->r.svFlags |= SVF_LINKHACK;
}
else
{
ent->r.svFlags &= ~SVF_LINKHACK;
}
// link entity now, after any personal teleporters have been used
trap_LinkEntity (ent);
if ( !ent->client->noclip )
@ -1358,6 +1397,10 @@ void SpectatorClientEndFrame( gentity_t *ent )
ent->client->ps = cl->ps;
ent->client->ps.pm_flags |= PMF_FOLLOW;
if ( ent->client->sess.spectatorFirstPerson )
{
ent->client->ps.pm_flags |= PMF_FOLLOWFIRST;
}
ent->client->ps.eFlags = flags;
ent->client->ps.persistant[PERS_SPAWN_COUNT] = count;
ent->client->ps.persistant[PERS_SCORE] = score;

View File

@ -232,15 +232,17 @@ void G_UndoAntiLag ( void )
continue;
}
if ( other->r.svFlags & SVF_DOUBLED_BBOX )
if ( other->r.svFlags & SVF_INFLATED_BBOX )
{
// Put the hitbox back the way it was
other->r.maxs[0] = other->client->maxSave[0];
other->r.maxs[1] = other->client->maxSave[1];
other->r.maxs[2] = other->client->maxSave[2];
other->r.mins[0] = other->client->minSave[0];
other->r.mins[1] = other->client->minSave[1];
other->r.svFlags &= (~SVF_DOUBLED_BBOX);
other->r.svFlags &= (~SVF_INFLATED_BBOX);
}
G_UndoClientAntiLag ( other );
@ -306,8 +308,15 @@ void G_ApplyAntiLag ( gentity_t* ref, qboolean enlargeHitBox )
{
other->client->minSave[0] = other->r.mins[0];
other->client->minSave[1] = other->r.mins[1];
other->client->maxSave[0] = other->r.maxs[0];
other->client->maxSave[1] = other->r.maxs[1];
other->client->maxSave[2] = other->r.maxs[2];
if ( other->client->ps.pm_flags & PMF_DUCKED )
{
other->r.maxs[2] += 10;
}
// Adjust the hit box to account for hands and such
// that are sticking out of the normal bounding box
@ -327,7 +336,7 @@ void G_ApplyAntiLag ( gentity_t* ref, qboolean enlargeHitBox )
other->r.mins[1] *= 2.0f;
}
other->r.svFlags |= SVF_DOUBLED_BBOX;
other->r.svFlags |= SVF_INFLATED_BBOX;
}
// Relink the entity into the world

View File

@ -182,6 +182,23 @@ const char *G_GetArenaInfoByMap( const char *map )
return NULL;
}
/*
===============
G_DoesMapExist
determines whether or not the given map exists on the server
===============
*/
qboolean G_DoesMapExist ( const char* mapname )
{
if ( G_GetArenaInfoByMap ( mapname ) )
{
return qtrue;
}
return qfalse;
}
/*
===============
G_DoesMapSupportGametype

View File

@ -176,7 +176,9 @@ gspawn_t* G_SelectRandomSpawnPoint ( team_t team )
return tfspawns[ rand() % tfcount ];
}
return spawns[ rand() % count ];
i = rand() % count;
return spawns[ i ];
}
/*
@ -1218,12 +1220,16 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
gclient_t *client;
char userinfo[MAX_INFO_STRING];
char ip[128];
char guid[64];
gentity_t *ent;
ent = &g_entities[ clientNum ];
trap_GetUserinfo( clientNum, userinfo, sizeof( userinfo ) );
value = Info_ValueForKey (userinfo, "cl_guid");
Com_sprintf ( guid, sizeof(guid), value );
// check to see if they are on the banned IP list
value = Info_ValueForKey (userinfo, "ip");
Com_sprintf ( ip, sizeof(ip), value );
@ -1271,7 +1277,7 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
}
// get and distribute relevent paramters
G_LogPrintf( "ClientConnect: %i - %s\n", clientNum, ip );
G_LogPrintf( "ClientConnect: %i - %s [%s]\n", clientNum, ip, guid );
ClientUserinfoChanged( clientNum );
// don't do the "xxx connected" messages if they were caried over from previous level
@ -1290,6 +1296,7 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot )
CalculateRanks();
// Make sure they are unlinked
ent->s.number = clientNum;
trap_UnlinkEntity ( ent );
return NULL;
@ -1366,7 +1373,7 @@ void ClientBegin( int clientNum )
{
// If there are ghosts already then spawn as a ghost because
// the game is already in progress.
if ( (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) )
if ( !level.warmupTime && (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) )
{
G_StartGhosting ( ent );
}
@ -1554,6 +1561,7 @@ void ClientSpawn(gentity_t *ent)
VectorCopy (playerMaxs, ent->r.maxs);
client->ps.clientNum = index;
ent->s.number = index;
// Bring back the saved firemodes
memcpy ( client->ps.firemode, client->pers.firemode, sizeof(client->ps.firemode) );
@ -1566,7 +1574,7 @@ void ClientSpawn(gentity_t *ent)
// Give the client their weapons depending on whether or not pickups are enabled
if ( level.pickupsDisabled )
{
G_UpdateOutfitting ( ent->s.number );
G_UpdateOutfitting ( index );
// Prevent the client from picking up a whole bunch of stuff
client->ps.pm_flags |= PMF_LIMITED_INVENTORY;
@ -1659,6 +1667,10 @@ void ClientSpawn(gentity_t *ent)
client->ps.torsoAnim = -1;
client->ps.legsAnim = LEGS_IDLE;
client->ps.weaponAnimIdChoice = 0;
client->ps.weaponCallbackStep = 0;
client->ps.weaponCallbackTime = 0;
// Not on a ladder
client->ps.ladder = -1;
@ -1670,6 +1682,12 @@ void ClientSpawn(gentity_t *ent)
MoveClientToIntermission( ent );
}
// Frozen?
if ( level.gametypeDelayTime > level.time )
{
ent->client->ps.stats[STAT_FROZEN] = level.gametypeDelayTime - level.time;
}
// run a client frame to drop exactly to the floor,
// initialize animations and other things
client->ps.commandTime = level.time - 100;
@ -1690,12 +1708,6 @@ void ClientSpawn(gentity_t *ent)
// clear entity state values
BG_PlayerStateToEntityState( &client->ps, &ent->s, qtrue );
// Frozen?
if ( level.gametypeDelayTime > level.time )
{
ent->client->ps.stats[STAT_FROZEN] = level.gametypeDelayTime - level.time;
}
// Handle a deferred name change
if ( client->pers.deferredname[0] )
{
@ -1901,3 +1913,51 @@ gentity_t* G_FindNearbyClient ( vec3_t origin, team_t team, float radius, gentit
return NULL;
}
/*
===========
G_IgnoreClientChat
Instructs all chat to be ignored by the given
============
*/
void G_IgnoreClientChat ( int ignorer, int ignoree, qboolean ignore )
{
// Cant ignore yourself
if ( ignorer == ignoree )
{
return;
}
// If there is no client connected then dont bother
if ( g_entities[ignoree].client->pers.connected != CON_CONNECTED )
{
return;
}
if ( ignore )
{
g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] |= (1<<(ignorer%32));
}
else
{
g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] &= ~(1<<(ignorer%32));
}
}
/*
===========
G_IsClientChatIgnored
Checks to see if the given client is being ignored by a specific client
============
*/
qboolean G_IsClientChatIgnored ( int ignorer, int ignoree )
{
if ( g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] & (1<<(ignorer%32)) )
{
return qtrue;
}
return qfalse;
}

View File

@ -288,7 +288,7 @@ void Cmd_DropItem_f ( gentity_t* ent )
return;
}
G_DropGametypeItems ( ent );
G_DropGametypeItems ( ent, 3000 );
}
/*
@ -753,6 +753,9 @@ void SetTeam( gentity_t *ent, char *s, const char* identity )
client->sess.spectatorState = specState;
client->sess.spectatorClient = specClient;
// Kill any child entities of this client to protect against grenade team changers
G_FreeEnitityChildren ( ent );
// Always spawn into a ctf game using a respawn timer.
if ( team != TEAM_SPECTATOR && level.gametypeData->respawnType == RT_INTERVAL )
{
@ -767,7 +770,7 @@ void SetTeam( gentity_t *ent, char *s, const char* identity )
{
// If there are ghosts already then spawn as a ghost because
// the game is already in progress.
if ( (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) || noOutfittingChange || client->sess.noTeamChange )
if ( !level.warmupTime && (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) || noOutfittingChange || client->sess.noTeamChange )
{
ghost = qtrue;
}
@ -903,19 +906,6 @@ void G_StopFollowing( gentity_t *ent )
ent->client->ps.persistant[PERS_TEAM] = ent->client->sess.team;
ent->r.svFlags &= ~SVF_BOT;
// Ghots dont really become spectators, just psuedo spectators
if ( ent->client->sess.ghost )
{
// Do a start and stop to ensure the variables are all set properly
G_StopGhosting ( ent );
G_StartGhosting ( ent );
}
else
{
ent->client->sess.team = TEAM_SPECTATOR;
ent->client->ps.persistant[ PERS_TEAM ] = TEAM_SPECTATOR;
}
// If we were in fact following someone, then make the angles and origin nice for
// when we stop
if ( ent->client->sess.spectatorClient != -1 )
@ -936,7 +926,18 @@ void G_StopFollowing( gentity_t *ent )
BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, qtrue );
}
ent->client->sess.spectatorClient = -1;
// Ghots dont really become spectators, just psuedo spectators
if ( ent->client->sess.ghost )
{
// Do a start and stop to ensure the variables are all set properly
G_StopGhosting ( ent );
G_StartGhosting ( ent );
}
else
{
ent->client->sess.team = TEAM_SPECTATOR;
ent->client->ps.persistant[ PERS_TEAM ] = TEAM_SPECTATOR;
}
}
/*
@ -1186,6 +1187,11 @@ static void G_SayTo( gentity_t *ent, gentity_t *other, int mode, const char *nam
return;
}
if ( ent->client->sess.muted || G_IsClientChatIgnored ( other->s.number, ent->s.number ) )
{
return;
}
if ( !level.intermissiontime && !level.intermissionQueued )
{
// Spectators cant talk to alive people
@ -1737,6 +1743,12 @@ void Cmd_CallVote_f( gentity_t *ent )
}
else if ( !Q_stricmp( arg1, "map" ) )
{
if ( !G_DoesMapExist ( arg2 ) )
{
trap_SendServerCommand( ent-g_entities, "print \"Unknown mapname.\n\"" );
return;
}
Com_sprintf( level.voteString, sizeof( level.voteString ), "%s %s", arg1, arg2 );
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString );
}
@ -1749,7 +1761,7 @@ void Cmd_CallVote_f( gentity_t *ent )
trap_Argv( 4, arg4, sizeof( arg4 ) );
Com_sprintf( level.voteString, sizeof( level.voteString ), "rmgmap 1 %s 2 %s 3 %s 4 \"%s\" 0", arg2, arg3, arg4, ConcatArgs ( 5 ) );
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString );
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "Randomly Generated Map" );
}
else if ( !Q_stricmp( arg1, "mapcycle" ) )
{
@ -1823,9 +1835,19 @@ void Cmd_CallVote_f( gentity_t *ent )
trap_SendServerCommand( ent-g_entities, va("print \"This server does not allow time extensions.\n\"") );
return;
}
Com_sprintf ( level.voteString, sizeof(level.voteString ), "extendtime %d", g_timeextension.integer );
Com_sprintf ( level.voteDisplayString, sizeof(level.voteDisplayString), "extend timelimit by %d minutes", g_timeextension.integer );
}
else if ( !Q_stricmp ( arg1, "timelimit" ) ||
!Q_stricmp ( arg1, "scorelimit" ) ||
!Q_stricmp ( arg1, "map_restart" ) ||
!Q_stricmp ( arg1, "g_doWarmup" ) ||
!Q_stricmp ( arg1, "g_friendlyfire" ) )
{
Com_sprintf ( level.voteString, sizeof(level.voteString ), "%s %d", arg1, atoi(arg2) );
Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString );
}
else
{
Com_sprintf( level.voteString, sizeof( level.voteString ), "%s \"%s\"", arg1, arg2 );
@ -1900,6 +1922,39 @@ void Cmd_Vote_f( gentity_t *ent )
// for players entering or leaving
}
/*
=================
Cmd_Ignore_f
=================
*/
void Cmd_Ignore_f( gentity_t *ent )
{
char buffer[MAX_TOKEN_CHARS];
int ignoree;
qboolean ignore;
trap_Argv( 1, buffer, sizeof( buffer ) );
ignoree = atoi( buffer );
ignore = G_IsClientChatIgnored ( ent->s.number, ignoree ) ? qfalse : qtrue;
if ( ignoree == ent->s.number )
{
trap_SendServerCommand( ent-g_entities, va("print \"cant ignore yourself.\n\""));
return;
}
G_IgnoreClientChat ( ent->s.number, ignoree, ignore);
if ( ignore )
{
trap_SendServerCommand( ent-g_entities, va("print \"%s ignored.\n\"", g_entities[ignoree].client->pers.netname));
}
else
{
trap_SendServerCommand( ent-g_entities, va("print \"%s unignored.\n\"", g_entities[ignoree].client->pers.netname));
}
}
/*
=================
@ -2030,6 +2085,8 @@ void ClientCommand( int clientNum ) {
Cmd_Vote_f (ent);
else if (Q_stricmp (cmd, "setviewpos") == 0)
Cmd_SetViewpos_f( ent );
else if (Q_stricmp ( cmd, "ignore" ) == 0 )
Cmd_Ignore_f ( ent );
#ifdef _SOF2_BOTS
else if (Q_stricmp (cmd, "addbot") == 0)

View File

@ -67,7 +67,7 @@ void TossClientItems( gentity_t *self )
G_DropWeapon ( self, weapon, 0 );
}
G_DropGametypeItems ( self );
G_DropGametypeItems ( self, 0 );
}
/*
@ -115,6 +115,7 @@ char *modNames[] =
"MOD_M1911A1_PISTOL",
"MOD_US_SOCOM_PISTOL",
"MOD_SILVER_TALON",
"MOD_M590_SHOTGUN",
"MOD_MICRO_UZI_SUBMACHINEGUN",
@ -124,6 +125,7 @@ char *modNames[] =
"MOD_USAS_12_SHOTGUN",
"MOD_M4_ASSAULT_RIFLE",
"MOD_AK74_ASSAULT_RIFLE",
"MOD_SIG551",
"MOD_MSG90A1_SNIPER_RIFLE",
"MOD_M60_MACHINEGUN",
"MOD_MM1_GRENADE_LAUNCHER",
@ -246,7 +248,12 @@ void player_die(
{
gentity_t* missile;
missile = G_FireWeapon( self, ATTACK_NORMAL );
if ( attacker && attacker->client && attacker->client->sess.team != self->client->sess.team )
{
missile->dflags |= DAMAGE_NO_TEAMKILL;
}
if ( missile )
{
VectorClear ( missile->s.pos.trDelta );
@ -879,7 +886,7 @@ int G_Damage (
// if the attacker was on the same team
if ( targ != attacker && OnSameTeam (targ, attacker) )
{
if ( !g_friendlyFire.integer )
if ( !g_friendlyFire.integer || level.warmupTime )
{
return 0;
}
@ -920,6 +927,17 @@ int G_Damage (
{
int actualtake = Com_Clamp ( 0, targ->health, take );
if ( targ->client->ps.stats[STAT_GAMETYPE_ITEMS] )
{
actualtake *= 2;
}
// See if this damage falls into the no excuse damage
if ( level.gametypeData->respawnType == RT_NONE && level.time - level.gametypeDelayTime < g_teamkillNoExcuseTime.integer * 1000 )
{
actualtake *= g_teamkillNoExcuseMultiplier.integer;
}
attacker->client->sess.teamkillDamage += actualtake;
attacker->client->sess.teamkillForgiveTime = level.time;
}
@ -1027,7 +1045,7 @@ int G_Damage (
}
// Friendly fire
if ( g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) )
if ( !level.warmupTime && g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) )
{
vec3_t diff;
@ -1333,7 +1351,10 @@ qboolean G_RadiusDamage (
if ( d && ent->client )
{
// Only one of the grenade hits will count for tk damage
if ( ent != attacker )
{
dflags |= DAMAGE_NO_TEAMKILL;
}
// Put some procedural gore on the target.
tent = G_TempEntity( origin, EV_EXPLOSION_HIT_FLESH );

View File

@ -285,7 +285,7 @@ void G_ResetGametypeEntities ( void )
G_RespawnClients
===============
*/
void G_RespawnClients ( qboolean force, team_t team )
void G_RespawnClients ( qboolean force, team_t team, qboolean fullRestart )
{
int i;
@ -339,6 +339,16 @@ void G_RespawnClients ( qboolean force, team_t team )
trap_UnlinkEntity (ent);
ClientSpawn ( ent );
if ( fullRestart )
{
ent->client->sess.score = 0;
ent->client->sess.kills = 0;
ent->client->sess.deaths = 0;
ent->client->sess.teamkillDamage = 0;
ent->client->sess.teamkillForgiveTime = 0;
ent->client->pers.enterTime = level.time;
}
}
}
@ -422,7 +432,7 @@ void G_ResetEntities ( void )
G_ResetGametype
===============
*/
void G_ResetGametype ( void )
void G_ResetGametype ( qboolean fullRestart )
{
gentity_t* tent;
@ -435,6 +445,13 @@ void G_ResetGametype ( void )
// Reset the gametype itself
G_ResetGametypeEntities ( );
// Cant have a 0 roundtimelimit
if ( g_roundtimelimit.integer < 1 )
{
trap_Cvar_Set ( "g_roundtimelimit", "1" );
trap_Cvar_Update ( &g_roundtimelimit );
}
// Initialize the respawn interval since this is a interval gametype
switch ( level.gametypeData->respawnType )
{
@ -446,7 +463,7 @@ void G_ResetGametype ( void )
case RT_NONE:
level.gametypeDelayTime = level.time + g_roundstartdelay.integer * 1000;
level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000);
level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000) + g_roundstartdelay.integer * 1000;
if ( level.gametypeDelayTime != level.time )
{
@ -466,12 +483,21 @@ void G_ResetGametype ( void )
}
// Respawn all clients
G_RespawnClients ( qtrue, TEAM_RED );
G_RespawnClients ( qtrue, TEAM_BLUE );
G_RespawnClients ( qtrue, TEAM_RED, fullRestart );
G_RespawnClients ( qtrue, TEAM_BLUE, fullRestart );
level.gametypeStartTime = level.time;
level.gametypeResetTime = 0;
if ( fullRestart )
{
level.warmupTime = 0;
level.startTime = level.time;
memset ( level.teamScores, 0, sizeof(level.teamScores) );
trap_SetConfigstring( CS_WARMUP, va("%i", level.warmupTime) );
trap_SetConfigstring( CS_LEVEL_START_TIME, va("%i", level.startTime ) );
}
// Reset the clients local effects
tent = G_TempEntity( vec3_origin, EV_GAMETYPE_RESTART );
tent->r.svFlags |= SVF_BROADCAST;
@ -615,7 +641,7 @@ G_DropGametypeItems
Drops all of the gametype items held by the player
=================
*/
void G_DropGametypeItems ( gentity_t* self )
void G_DropGametypeItems ( gentity_t* self, int delayPickup )
{
float angle;
int i;
@ -642,9 +668,12 @@ void G_DropGametypeItems ( gentity_t* self )
drop->count = 1;
angle += 45;
drop->nextthink = level.time + 3000;
if ( delayPickup )
{
drop->nextthink = level.time + delayPickup;
drop->s.eFlags |= EF_NOPICKUP;
drop->think = G_EnableGametypeItemPickup;
}
// TAke it away from the client just in case
self->client->ps.stats[STAT_GAMETYPE_ITEMS] &= ~(1<<i);
@ -675,10 +704,9 @@ void CheckGametype ( void )
// the first person joins
if ( !level.gametypeStartTime )
{
int counts[TEAM_NUM_TEAMS];
int i;
memset ( counts, 0, sizeof(counts) );
memset ( level.teamAliveCount, 0, sizeof(level.teamAliveCount) );
for ( i = 0; i < level.numConnectedClients; i ++ )
{
@ -694,12 +722,12 @@ void CheckGametype ( void )
continue;
}
counts[other->client->sess.team]++;
level.teamAliveCount[other->client->sess.team]++;
}
if ( counts[TEAM_RED] || counts[TEAM_BLUE] )
if ( level.teamAliveCount[TEAM_RED] || level.teamAliveCount[TEAM_BLUE] || level.teamAliveCount[TEAM_FREE] )
{
G_ResetGametype ( );
G_ResetGametype ( qfalse );
return;
}
}
@ -712,7 +740,7 @@ void CheckGametype ( void )
// Dont do this again
level.gametypeResetTime = 0;
G_ResetGametype ( );
G_ResetGametype ( qfalse );
}
return;
@ -727,7 +755,7 @@ void CheckGametype ( void )
if ( level.gametypeRespawnTime[team] && level.time > level.gametypeRespawnTime[team] )
{
// Respawn all dead clients
G_RespawnClients ( qfalse, team );
G_RespawnClients ( qfalse, team, qfalse );
// Next interval
level.gametypeRespawnTime[team] = 0;
@ -736,13 +764,12 @@ void CheckGametype ( void )
}
// If we are in RT_NONE respawn mode then we need to look for everyone being dead
if ( level.time > level.gametypeDelayTime && level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime )
if ( level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime )
{
int i;
int alive[TEAM_NUM_TEAMS];
int dead[TEAM_NUM_TEAMS];
memset ( &alive[0], 0, sizeof(alive) );
memset ( &level.teamAliveCount[0], 0, sizeof(level.teamAliveCount) );
memset ( &dead[0], 0, sizeof(dead) );
for ( i = 0; i < level.numConnectedClients; i ++ )
{
@ -759,17 +786,19 @@ void CheckGametype ( void )
}
else
{
alive[ent->client->sess.team] ++;
level.teamAliveCount[ent->client->sess.team] ++;
}
}
if ( level.time > level.gametypeDelayTime )
{
// If everyone is dead on a team then reset the gametype, but only if
// there was someone on that team to begin with.
if ( !alive[TEAM_RED] && dead[TEAM_RED] )
if ( !level.teamAliveCount[TEAM_RED] && dead[TEAM_RED] )
{
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_RED, 0, 0, 0, 0 );
}
else if ( !alive[TEAM_BLUE] && dead[TEAM_BLUE] )
else if ( !level.teamAliveCount[TEAM_BLUE] && dead[TEAM_BLUE] )
{
trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_BLUE, 0, 0, 0, 0 );
}
@ -780,6 +809,7 @@ void CheckGametype ( void )
trap_GT_SendEvent ( GTEV_TIME_EXPIRED, level.time, 0, 0, 0, 0, 0 );
}
}
}
}
/*
@ -796,7 +826,7 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg
case GTCMD_RESTART:
if ( arg0 <= 0 )
{
G_ResetGametype ( );
G_ResetGametype ( qfalse );
}
else
{

View File

@ -298,6 +298,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace)
int respawn;
qboolean predict;
qboolean autoswitch;
int eventID;
if (!other->client)
return;
@ -362,19 +363,25 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace)
return;
}
if ( !respawn )
if ( !respawn && !(ent->flags & FL_DROPPED_ITEM) )
{
return;
}
eventID = EV_ITEM_PICKUP;
if ( other->client && (other->client->ps.pm_flags & PMF_DUCKED ) )
{
eventID = EV_ITEM_PICKUP_QUIET;
}
// play the normal pickup sound
if (predict)
{
G_AddPredictableEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
G_AddPredictableEvent( other, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
}
else
{
G_AddEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
G_AddEvent( other, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) );
}
// fire item targets
@ -610,6 +617,12 @@ gentity_t* G_DropWeapon ( gentity_t* ent, weapon_t weapon, int pickupDelay )
return NULL;
}
// Make sure they have the weapon
if ( !(ent->client->ps.stats[STAT_WEAPONS] & (1<<weapon) ) )
{
return NULL;
}
// No more outfitting changes
ent->client->noOutfittingChange = qtrue;
@ -847,11 +860,28 @@ void SaveRegisteredItems( void )
G_ItemDisabled
============
*/
int G_ItemDisabled( gitem_t *item )
qboolean G_ItemDisabled( gitem_t *item )
{
char name[128];
int val;
Com_sprintf(name, sizeof(name), "disable_%s", item->classname);
return trap_Cvar_VariableIntegerValue( name );
val = trap_Cvar_VariableIntegerValue( name );
if ( !val )
{
return qfalse;
}
if ( val == 2 )
{
if ( !level.gametypeData->pickupsDisabled )
{
return qfalse;
}
}
return qtrue;
}
/*

View File

@ -188,6 +188,7 @@ typedef enum
SPECTATOR_NOT,
SPECTATOR_FREE,
SPECTATOR_FOLLOW,
SPECTATOR_FOLLOWFIRST,
SPECTATOR_SCOREBOARD
} spectatorState_t;
@ -233,6 +234,7 @@ typedef struct
team_t team; // current team
int spectatorTime; // for determining next-in-line to play
spectatorState_t spectatorState;
qboolean spectatorFirstPerson; // First person following?
int spectatorClient; // for chasecam and follow mode
int score; // total score
int kills; // number of kills
@ -241,6 +243,8 @@ typedef struct
int teamkillDamage; // amount of damage death to teammates
int teamkillForgiveTime; // time when team damage will be forgivin
qboolean noTeamChange; // cant change teams when this is true (rt_none only)
int chatIgnoreClients[2]; // Clients which are ignoring this client. [0] = (0-31) [1] = (32-63)
qboolean muted;
} clientSession_t;
@ -424,6 +428,7 @@ typedef struct
int globalVoiceTime; // last global voice
int teamScores[TEAM_NUM_TEAMS];
int teamAliveCount[TEAM_NUM_TEAMS];
int lastTeamLocationTime; // last time of client team location update
qboolean newSession; // don't use any old session data, because
@ -607,6 +612,7 @@ void G_Sound( gentity_t *ent, int channel, int soundIndex );
void G_SoundAtLoc( vec3_t loc, int channel, int soundIndex );
void G_EntitySound( gentity_t *ent, int channel, int soundIndex );
void G_FreeEntity( gentity_t *e );
void G_FreeEnitityChildren( gentity_t* ent );
qboolean G_EntitiesFree( void );
void G_TouchTriggers (gentity_t *ent);
@ -747,6 +753,8 @@ void G_UpdateClientAnimations ( gentity_t* ent );
void G_SetRespawnTimer ( gentity_t* ent );
gentity_t* G_FindNearbyClient ( vec3_t origin, team_t team, float radius, gentity_t* ignore );
void G_AddClientSpawn ( gentity_t* ent, team_t team );
qboolean G_IsClientChatIgnored ( int ignorer, int ingnoree );
void G_IgnoreClientChat ( int ignorer, int ignoree, qboolean ignore );
//
// g_svcmds.c
@ -827,6 +835,7 @@ void Svcmd_AddBot_f( void );
void Svcmd_BotList_f( void );
void BotInterbreedEndMatch( void );
qboolean G_DoesMapSupportGametype ( const char* gametype );
qboolean G_DoesMapExist ( const char* mapname );
void G_LoadArenas ( void );
//
@ -837,11 +846,11 @@ gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped,
gentity_t* G_SelectRandomGametypeSpawnPoint ( team_t team );
qboolean G_ParseGametypeFile ( void );
qboolean G_ExecuteGametypeScript ( gentity_t* activator, const char* name );
void G_ResetGametype ( void );
void G_ResetGametype ( qboolean fullRestart );
qboolean G_CanGametypeTriggerBeUsed ( gentity_t* self, gentity_t* activator );
void G_ResetGametypeItem ( gitem_t* item );
void gametype_item_use ( gentity_t* self, gentity_t* other );
void G_DropGametypeItems ( gentity_t* self );
void G_DropGametypeItems ( gentity_t* self, int delayPickup );
// ai_main.c
#define MAX_FILEPATH 144
@ -928,6 +937,8 @@ extern vmCvar_t g_teamkillPenalty;
extern vmCvar_t g_teamkillDamageMax;
extern vmCvar_t g_teamkillDamageForgive;
extern vmCvar_t g_teamkillBanTime;
extern vmCvar_t g_teamkillNoExcuseTime;
extern vmCvar_t g_teamkillNoExcuseMultiplier;
extern vmCvar_t g_voiceFloodCount;
extern vmCvar_t g_voiceFloodPenalty;
extern vmCvar_t g_voiceTalkingGhosts;

View File

@ -79,6 +79,8 @@ vmCvar_t g_teamkillPenalty; // Amount of score added for killing a teammates
vmCvar_t g_teamkillDamageMax; // max damage one can do to teammates before being kicked
vmCvar_t g_teamkillDamageForgive; // amount of teamkill damage forgiven each minute
vmCvar_t g_teamkillBanTime; // number of minutes to ban someone for after being kicked
vmCvar_t g_teamkillNoExcuseTime; // number of seconds into a round where tk damage is inexcusable
vmCvar_t g_teamkillNoExcuseMultiplier; // multipier for tk damage that is inexcusable
vmCvar_t g_voiceFloodCount; // Number of voice messages in one minute to be concidered flooding
vmCvar_t g_voiceFloodPenalty; // Amount of time a void flooder must wait before they can use voice again
vmCvar_t g_suddenDeath;
@ -166,7 +168,28 @@ static cvarTable_t gameCvarTable[] =
{ &g_roundstartdelay, "g_roundstartdelay", "5", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
{ &g_availableWeapons, "g_availableWeapons", "22222222222211", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ &g_availableWeapons, "g_availableWeapons", "0", CVAR_SERVERINFO|CVAR_ROM|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_weapon_knife", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_US_SOCOM", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M19", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_silvertalon", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_microuzi", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M3A1", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_MP5", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_USAS_12", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M590", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_MSG90A1", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M4", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_AK_74", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_SIG551", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M60", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_RPG_7", "2", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_MM_1", "2", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M84", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_SMOHG92", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_AN_M14", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_M15", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ &g_forceFollow, "g_forceFollow", "0", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
{ &g_followEnemy, "g_followEnemy", "1", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse },
@ -184,6 +207,8 @@ static cvarTable_t gameCvarTable[] =
{ &g_teamkillDamageMax, "g_teamkillDamageMax", "300", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ &g_teamkillDamageForgive, "g_teamkillDamageForgive", "50", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ &g_teamkillBanTime, "g_teamkillBanTime", "5", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ &g_teamkillNoExcuseTime, "g_teamkillNoExcuseTime", "8", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ &g_teamkillNoExcuseMultiplier, "g_teamkillNoExcuseMultiplier", "3", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ &g_suddenDeath, "g_suddenDeath", "1", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
@ -417,6 +442,47 @@ void G_UpdateCvars( void )
}
}
/*
===============
G_UpdateAvailableWeapons
Updates the g_availableWeapons cvar using the disable cvars.
===============
*/
void G_UpdateAvailableWeapons ( void )
{
weapon_t weapon;
char available[WP_NUM_WEAPONS+1];
memset ( available, 0, sizeof(available) );
for ( weapon = WP_KNIFE; weapon < WP_NUM_WEAPONS; weapon ++ )
{
gitem_t* item = BG_FindWeaponItem ( weapon );
if ( !item )
{
continue;
}
switch ( (int)trap_Cvar_VariableValue ( va("disable_%s", item->classname ) ) )
{
case 0:
available[weapon-1] = '2';
break;
case 1:
available[weapon-1] = '0';
break;
case 2:
available[weapon-1] = '1';
break;
}
}
trap_Cvar_Set ( "g_availableWeapons", available );
}
/*
===============
G_SetGametype
@ -512,6 +578,9 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
// Set the current gametype
G_SetGametype(g_gametype.string);
// Sets the available weapons cvar from the disable_ cvars.
G_UpdateAvailableWeapons ( );
// Set the available outfitting
BG_SetAvailableOutfitting ( g_availableWeapons.string );
@ -1361,6 +1430,8 @@ void CheckExitRules( void )
// Check to see if the timelimit was hit
if ( g_timelimit.integer && !level.warmupTime )
{
if ( level.gametypeData->respawnType != RT_NONE || level.gametypeResetTime )
{
if ( level.time - level.startTime >= (g_timelimit.integer + level.timeExtension)*60000 )
{
@ -1373,6 +1444,7 @@ void CheckExitRules( void )
return;
}
}
}
// Check to see if the score was hit
if ( g_scorelimit.integer )
@ -1509,10 +1581,12 @@ void CheckWarmup ( void )
// if the warmup time has counted down, restart
if ( level.time > level.warmupTime )
{
level.warmupTime += 10000;
trap_Cvar_Set( "g_restarted", "1" );
trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
level.restarted = qtrue;
// level.warmupTime += 10000;
// trap_Cvar_Set( "g_restarted", "1" );
G_ResetGametype ( qtrue );
// trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
// level.restarted = qtrue;
return;
}
}

View File

@ -119,7 +119,7 @@ void G_ExplodeMissile( gentity_t *ent ) {
if (ent->dflags & DAMAGE_AREA_DAMAGE)
{
// do damage over time rather than instantly
G_CreateDamageArea ( ent->r.currentOrigin, ent->parent, ent->splashDamage*0.05f,ent->splashRadius, 8000,ent->methodOfDeath );
G_CreateDamageArea ( ent->r.currentOrigin, ent->parent, ent->splashDamage*0.06f,ent->splashRadius, 8000,ent->methodOfDeath );
// do some instant damage
G_RadiusDamage( ent->r.currentOrigin, ent->parent, ent->damage, ent->splashRadius, ent,
@ -443,7 +443,7 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace )
if (ent->dflags & DAMAGE_AREA_DAMAGE)
{
// do damage over time rather than instantly
G_CreateDamageArea ( trace->endpos, ent->parent, ent->splashDamage*0.10f,ent->splashRadius*2, 8000,ent->methodOfDeath );
G_CreateDamageArea ( trace->endpos, ent->parent, ent->splashDamage*0.06f,ent->splashRadius*2, 8000,ent->methodOfDeath );
// do some instant damage
G_RadiusDamage( trace->endpos, ent->parent, ent->damage, ent->splashRadius, other,
@ -554,23 +554,15 @@ void G_RunMissile( gentity_t *ent )
if ( tr.fraction != 1 )
{
// Hit the sky or moving through something
if ( tr.surfaceFlags & SURF_NOIMPACT )
if ( (tr.surfaceFlags & SURF_NOIMPACT) && (tr.surfaceFlags & SURF_SKY) )
{
// Dont kill a missle that hits the sky and has gravity
if ( tr.surfaceFlags & SURF_SKY )
{
ent->s.eFlags |= EF_INSKY;
ent->r.svFlags |= SVF_BROADCAST;
VectorCopy ( origin, ent->r.currentOrigin );
trap_LinkEntity( ent );
}
else
{
G_FreeEntity( ent );
return;
}
}
else
{
G_MissileImpact( ent, &tr );

View File

@ -24,7 +24,10 @@
#define SVF_GLASS_BRUSH 0x08000000 // Ent is a glass brush
#define SVF_DOUBLED_BBOX 0x00001000 // Bounding box has been doubled
#define SVF_INFLATED_BBOX 0x00001000 // Bounding box has been doubled
#define SVF_LINKHACK 0x10000000 // Hack to link an entity into extra clusters
#define SVF_DETAIL 0x20000000 // Entity is a detail entity and can be dropped from the snapshot
#define SVF_SKIP 0x80000000 // Dont include this entity in the current snapshot (internal use only)
//===============================================================
@ -63,6 +66,8 @@ typedef struct {
// by the second array index.
int broadcastClients[2];
int detailTime;
} entityShared_t;

View File

@ -261,6 +261,7 @@ spawn_t spawns[] =
{"pickup_ammo", 0},
{"script_runner", 0},
{"trigger_arioche_objective", 0},
{"func_brushmodel_child", 0},
{0, 0}
};
@ -1017,7 +1018,7 @@ void SP_worldspawn( void )
trap_SetConfigstring( CS_MOTD, g_motd.string ); // message of the day
G_SpawnString( "gravity", "800", &text );
G_SpawnString( "gravity", va("%d", g_gravity.integer), &text );
trap_Cvar_Set( "g_gravity", text );
// Handle all the worldspawn stuff common to both main bsp and sub bsp

View File

@ -103,6 +103,44 @@ void Svcmd_AutoKickList_f ( void )
}
}
void Svcmd_Mute_f ( void )
{
char str[MAX_TOKEN_CHARS];
int clientnum;
if ( trap_Argc() < 2 )
{
Com_Printf("Usage: mute <clientid>\n");
return;
}
trap_Argv( 1, str, sizeof( str ) );
clientnum = atoi ( str );
if ( clientnum < 0 || clientnum > MAX_CLIENTS )
{
Com_Printf("invalid client id\n");
return;
}
if ( level.clients[clientnum].pers.connected != CON_CONNECTED )
{
Com_Printf("no client connected with that client id\n" );
return;
}
level.clients[clientnum].sess.muted = level.clients[clientnum].sess.muted ? qfalse : qtrue;
if ( level.clients[clientnum].sess.muted )
{
Com_Printf("client %d muted\n", clientnum );
}
else
{
Com_Printf("client %d unmuted\n", clientnum );
}
}
gclient_t *ClientForString( const char *s ) {
gclient_t *cl;
int i;
@ -228,7 +266,8 @@ qboolean ConsoleCommand( void )
if (Q_stricmp (cmd, "gametype_restart" ) == 0 )
{
G_ResetGametype ( );
trap_Argv( 1, cmd, sizeof( cmd ) );
G_ResetGametype ( Q_stricmp ( cmd, "full" ) == 0 );
return qtrue;
}
@ -244,6 +283,12 @@ qboolean ConsoleCommand( void )
return qtrue;
}
if ( Q_stricmp ( cmd, "mute" ) == 0 )
{
Svcmd_Mute_f ( );
return qtrue;
}
if (g_dedicated.integer)
{
if (Q_stricmp (cmd, "say") == 0)

View File

@ -518,6 +518,33 @@ void G_FreeEntity( gentity_t *ed )
ed->inuse = qfalse;
}
/*
=================
G_FreeEnitityChildren
Frees any entity that is a child of the given entity
=================
*/
void G_FreeEnitityChildren( gentity_t* ent )
{
gentity_t* from;
for ( from = g_entities; from < &g_entities[level.num_entities] ; from++)
{
if ( !from->inuse )
{
continue;
}
if ( from->parent != ent )
{
continue;
}
G_FreeEntity ( from );
}
}
/*
=================
G_TempEntity
@ -695,6 +722,7 @@ void G_SoundAtLoc( vec3_t loc, int channel, int soundIndex ) {
te = G_TempEntity( loc, EV_GENERAL_SOUND );
te->s.eventParm = soundIndex;
te->r.svFlags |= SVF_BROADCAST;
}
/*

View File

@ -210,6 +210,8 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
int i;
vec3_t muzzlePoint;
vec3_t fwd;
vec3_t right;
vec3_t up;
vec3_t fireAngs;
float damageMult;
int hitcount;
@ -239,14 +241,14 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
inaccuracy = (float)ent->client->ps.inaccuracy / 1000.0f;
if ( detailed )
{
if ( ent->client->ps.pm_flags & PMF_DUCKED )
{
inaccuracy *= DUCK_ACCURACY_MODIFIER;
}
else if ( ent->client->ps.pm_flags & PMF_JUMPING )
if ( ent->client->ps.pm_flags & PMF_JUMPING )
{
inaccuracy *= JUMP_ACCURACY_MODIFIER;
}
else if ( ent->client->ps.pm_flags & PMF_DUCKED )
{
inaccuracy *= DUCK_ACCURACY_MODIFIER;
}
}
// Anti-lag
@ -258,18 +260,14 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
// Handle leaning
VectorCopy(ent->client->ps.viewangles, fireAngs);
AngleVectors( fireAngs, fwd, right, up);
if ( ent->client->ps.pm_flags & PMF_LEANING )
{
vec3_t right;
float leanOffset;
leanOffset = (float)(ent->client->ps.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
AngleVectors( fireAngs, NULL, right, NULL );
VectorMA( muzzlePoint, leanOffset, right, muzzlePoint );
BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint );
}
AngleVectors( fireAngs, fwd, NULL, NULL );
// Move the start trace back a bit to account for bumping up against someone
VectorMA ( muzzlePoint, -15, fwd, muzzlePoint );
@ -486,7 +484,7 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
if ( level.time - traceEnt->client->invulnerableTime >= g_respawnInvulnerability.integer * 1000 )
{
// Shot my a teammate with ff off?
if ( !level.gametypeData->teams || (ent->client && !(OnSameTeam(ent,traceEnt) && !g_friendlyFire.integer ) ) )
if ( !level.gametypeData->teams || (ent->client && !(OnSameTeam(ent,traceEnt) && (!g_friendlyFire.integer || level.warmupTime) ) ) )
{
flesh = qtrue;
}
@ -526,6 +524,8 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack )
tent->s.eventParm <<= MATERIAL_BITS;
tent->s.eventParm |= (tr.surfaceFlags & MATERIAL_MASK);
tent->s.time = weapon + ((attack&0xFF)<<8);
tent->r.detailTime = level.time + rand() % 1000;
tent->r.svFlags |= SVF_DETAIL;
}
tent->s.otherEntityNum = ent->s.number;
@ -601,12 +601,7 @@ gentity_t* G_FireProjectile ( gentity_t *ent, weapon_t weapon, attackType_t atta
if ( ent->client->ps.pm_flags & PMF_LEANING )
{
float leanOffset;
leanOffset = (float)(ent->client->ps.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET;
fireAngs[ROLL] += leanOffset / 4;
AngleVectors( fireAngs, NULL, right, NULL );
VectorMA( muzzlePoint, leanOffset /* * 0.75f */, right, muzzlePoint );
BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint );
}
AngleVectors( fireAngs, fwd, right, up );

View File

@ -54,42 +54,44 @@ typedef enum
MODELINDEX_WEAPON_KNIFE, // 6
MODELINDEX_WEAPON_SOCOM,
MODELINDEX_WEAPON_M19,
MODELINDEX_WEAPON_SILVERTALON,
MODELINDEX_WEAPON_MICROUZI,
MODELINDEX_WEAPON_M3A1,
MODELINDEX_WEAPON_USAS12, // 11
MODELINDEX_WEAPON_M3A1, // 11
MODELINDEX_WEAPON_MP5,
MODELINDEX_WEAPON_USAS12,
MODELINDEX_WEAPON_M590,
MODELINDEX_WEAPON_MSG90A1,
MODELINDEX_WEAPON_M4,
MODELINDEX_WEAPON_AK74,
MODELINDEX_WEAPON_M60, // 16
MODELINDEX_WEAPON_M4, // 16
MODELINDEX_WEAPON_AK74,
MODELINDEX_WEAPON_SIG551,
MODELINDEX_WEAPON_M60,
MODELINDEX_WEAPON_RPG7,
MODELINDEX_WEAPON_MM1,
MODELINDEX_WEAPON_MM1, // 21
MODELINDEX_WEAPON_M84,
MODELINDEX_WEAPON_SMOHG92,
MODELINDEX_WEAPON_ANM14, // 21
MODELINDEX_WEAPON_ANM14,
MODELINDEX_WEAPON_M15,
MODELINDEX_WEAPON_MP5,
MODELINDEX_AMMO_045,
MODELINDEX_AMMO_045, // 26
MODELINDEX_AMMO_9MM,
MODELINDEX_AMMO_12GAUGE,
MODELINDEX_AMMO_762, // 26
MODELINDEX_AMMO_762,
MODELINDEX_AMMO_556,
MODELINDEX_AMMO_40MM,
MODELINDEX_AMMO_40MM, // 31
MODELINDEX_AMMO_RPG7,
MODELINDEX_BACKPACK,
MODELINDEX_GAMETYPE_ITEM, // 31
MODELINDEX_GAMETYPE_ITEM, // 34
MODELINDEX_GAMETYPE_ITEM_2,
MODELINDEX_GAMETYPE_ITEM_3,
MODELINDEX_GAMETYPE_ITEM_4,
MODELINDEX_GAMETYPE_ITEM_5,
MODELINDEX_ARMOR, // 36
MODELINDEX_ARMOR, // 39
MODELINDEX_NIGHTVISION,
MODELINDEX_THERMAL,

View File

@ -6,12 +6,49 @@
// q_shared.h -- included first by ALL program modules.
// A user mod should never modify this file
#ifdef GERMAN_BUILD
#define Q3_VERSION "SOF2MP V1.01g" // sent on 6/10/2002
#define SOF2_VERSION_ID "1.01g" // sent on 6/10/2002
//#define Q3_VERSION "SOF2MP V0.01" sent on 11/26/2001
//#define Q3_VERSION "SOF2MP V0.02" sent on 12/10/2001
//#define Q3_VERSION "SOF2MP V0.03" sent on 12/16/2001
//#define Q3_VERSION "SOF2MP V0.081" sent on 1/15/2002
//#define Q3_VERSION "SOF2MP V0.09" sent on 1/24/2002
//#define Q3_VERSION "SOF2MP V0.10" sent on 1/31/2002
//#define Q3_VERSION "SOF2MP V0.11" sent on 2/7/2002
//#define Q3_VERSION "SOF2MP V0.12" sent on 2/14/2002
//#define Q3_VERSION "SOF2MP V0.13" sent on 2/21/2002
//#define Q3_VERSION "SOF2MP V0.13b" public beta #1 on 3/1/3002
//#define Q3_VERSION "SOF2MP V0.14" sent on 3/4/2002
//#define Q3_VERSION "SOF2MP V0.15" sent on 3/11/2002
//#define Q3_VERSION "SOF2MP V0.15b" public beta #2 on 3/13/2002
//#define Q3_VERSION "SOF2MP V0.16" sent on 3/18/2002
//#define Q3_VERSION "SOF2MP V0.16b" public beta #3 on 3/20/2002
//#define Q3_VERSION "SOF2MP V0.17" sent on 3/24/2002
//#define Q3_VERSION "SOF2MP TEST V1.01t" sent on 3/28/2002
//#define Q3_VERSION "SOF2MP V0.18" sent on 4/1/2002 - April Fools!
//#define Q3_VERSION "SOF2MP V1.02t" sent on 4/5/2002
//#define Q3_VERSION "SOF2MP V0.19" sent on 4/8/2002
//#define Q3_VERSION "SOF2MP V0.20" sent on 4/15/2002 - Tax Day!
//#define Q3_VERSION "SOF2MP V0.21" sent on 4/22/2002
//#define Q3_VERSION "SOF2MP V1.00.22" sent on 4/26/2002
//#define Q3_VERSION "SOF2MP V1.00.23" sent on 4/27/2002
#if !defined(_SOF2DEV_) || defined(_DEBUG)
#ifdef GERMAN_BUILD
// #define Q3_VERSION "SOF2MP V1.00g"
#define Q3_VERSION "SOF2MP V1.02g" // sent on 6/10/2002
// #define SOF2_VERSION_ID "1.00g"
#define SOF2_VERSION_ID "1.02g" // sent on 6/10/2002
#else
// #define Q3_VERSION "SOF2MP V1.00"
#define Q3_VERSION "SOF2MP V1.02" // sent on 6/10/2002
// #define SOF2_VERSION_ID "1.00"
#define SOF2_VERSION_ID "1.02" // sent on 6/10/2002
#endif
#else
#define Q3_VERSION "SOF2MP V1.01" // sent on 6/10/2002
#define SOF2_VERSION_ID "1.01" // sent on 6/10/2002
#define Q3_VERSION "SOF2MP V1.02 Developer" // sent on 6/10/2002
// #define SOF2_VERSION_ID "1.00"
#define SOF2_VERSION_ID "1.02D" // sent on 6/10/2002
#endif
//#define SPECIAL_PRE_CACHE 1

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,7 @@ CFG=gt_ctf - Win32 Debug SoF2
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gt_ctf - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "gt_ctf - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
@ -26,8 +27,38 @@ CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "gt_ctf - Win32 Debug SoF2"
!IF "$(CFG)" == "gt_ctf - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GT_CTF_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GT_CTF_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ELSEIF "$(CFG)" == "gt_ctf - Win32 Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug SoF2"
# PROP BASE Intermediate_Dir "Debug SoF2"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug"
@ -51,6 +82,7 @@ LINK32=link.exe
# Begin Target
# Name "gt_ctf - Win32 Debug"
# Name "gt_ctf - Win32 Debug SoF2"
# Begin Group "Source Files"

View File

@ -36,10 +36,9 @@ static cvarTable_t gametypeCvarTable[] =
// don't override the cheat state set by the system
{ &gt_flagReturnTime, "gt_flagReturnTime", "30", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ &gt_simpleScoring, "gt_simpleScoring", "0", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ NULL, NULL, NULL, 0, 0.0f, 0.0f, 0, qfalse },
};
static int gametypeCvarTableSize = sizeof( gametypeCvarTable ) / sizeof( gametypeCvarTable[0] );
/*
================
vmMain
@ -79,10 +78,9 @@ GT_RegisterCvars
*/
void GT_RegisterCvars( void )
{
int i;
cvarTable_t *cv;
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ )
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
{
trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue );
@ -100,10 +98,9 @@ GT_UpdateCvars
*/
void GT_UpdateCvars( void )
{
int i;
cvarTable_t *cv;
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ )
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
{
if ( cv->vmCvar )
{

View File

@ -23,8 +23,6 @@ CFG=gt_dem - Win32 Debug SoF2
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""$/SoF2/code/gametype/gt_dem", ZRDAAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe

View File

@ -41,7 +41,7 @@ static cvarTable_t gametypeCvarTable[] =
{ &gt_bombDefuseTime, "gt_bombDefuseTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse },
{ &gt_bombPlantTime, "gt_bombPlantTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse },
{ &gt_simpleScoring, "gt_simpleScoring", "0", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse },
{ NULL, NULL, NULL, 0, 0.0f, 0.0f, 0, qfalse },
};
static int gametypeCvarTableSize = sizeof( gametypeCvarTable ) / sizeof( gametypeCvarTable[0] );
@ -88,10 +88,9 @@ GT_RegisterCvars
*/
void GT_RegisterCvars( void )
{
int i;
cvarTable_t *cv;
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ )
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
{
trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue );
@ -109,10 +108,9 @@ GT_UpdateCvars
*/
void GT_UpdateCvars( void )
{
int i;
cvarTable_t *cv;
for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ )
for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ )
{
if ( cv->vmCvar )
{
@ -248,13 +246,13 @@ void GT_RunFrame ( int time )
trap_Cmd_TextMessage ( -1, "Blue team has destroyed the target!" );
trap_Cmd_StartGlobalSound ( gametype.bombExplodedSound );
trap_Cmd_Restart ( 5 );
}
// Give the guy who planted it some props
if ( !gt_simpleScoring.integer )
{
trap_Cmd_AddClientScore ( gametype.bombPlantClient, 10 );
}
}
gametype.bombPlantTime = 0;
@ -341,6 +339,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar
trap_Cmd_TextMessage ( -1, "Red team has defended the bomb site!" );
trap_Cmd_AddTeamScore ( TEAM_RED, 1 );
trap_Cmd_Restart ( 5 );
gametype.roundOver = qtrue;
break;
case GTEV_TEAM_ELIMINATED:

View File

@ -17,6 +17,7 @@ CFG=gt_dm - Win32 Debug SoF2
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gt_dm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "gt_dm - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
@ -26,8 +27,38 @@ CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "gt_dm - Win32 Debug SoF2"
!IF "$(CFG)" == "gt_dm - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dm_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dm_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ELSEIF "$(CFG)" == "gt_dm - Win32 Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug SoF2"
# PROP BASE Intermediate_Dir "Debug SoF2"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug"
@ -51,6 +82,7 @@ LINK32=link.exe
# Begin Target
# Name "gt_dm - Win32 Debug"
# Name "gt_dm - Win32 Debug SoF2"
# Begin Group "Source Files"

View File

@ -22,9 +22,9 @@ set cc=..\..\..\..\bin\sof2lcc -A -DQ3_VM -DMISSIONPACK -S -Wf-target=bytecode -
..\..\..\..\bin\sof2asm -f ../gt_elim
@if errorlevel 1 goto quit
mkdir "..\..\..\..\base\vm"
copy *.map "..\..\..\..\base\vm"
copy *.qvm "..\..\..\..\base\vm"
mkdir "..\..\..\Debug\base\MP\vm"
copy *.map "..\..\..\Debug\base\MP\vm"
copy *.qvm "..\..\..\Debug\base\MP\vm"
:quit
cd ..

View File

@ -17,6 +17,7 @@ CFG=gt_inf - Win32 Debug SoF2
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gt_inf - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "gt_inf - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
@ -26,8 +27,38 @@ CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "gt_inf - Win32 Debug SoF2"
!IF "$(CFG)" == "gt_inf - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_inf_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_inf_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ELSEIF "$(CFG)" == "gt_inf - Win32 Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug SoF2"
# PROP BASE Intermediate_Dir "Debug SoF2"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug"
@ -51,6 +82,7 @@ LINK32=link.exe
# Begin Target
# Name "gt_inf - Win32 Debug"
# Name "gt_inf - Win32 Debug SoF2"
# Begin Group "Source Files"

View File

@ -17,6 +17,7 @@ CFG=gt_tdm - Win32 Debug SoF2
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gt_tdm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "gt_tdm - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
@ -26,8 +27,38 @@ CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "gt_tdm - Win32 Debug SoF2"
!IF "$(CFG)" == "gt_tdm - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_tdm_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_tdm_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ELSEIF "$(CFG)" == "gt_tdm - Win32 Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug SoF2"
# PROP BASE Intermediate_Dir "Debug SoF2"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\Debug"
@ -51,6 +82,7 @@ LINK32=link.exe
# Begin Target
# Name "gt_tdm - Win32 Debug"
# Name "gt_tdm - Win32 Debug SoF2"
# Begin Group "Source Files"

View File

@ -53,6 +53,8 @@ typedef enum {
K_F14,
K_F15,
K_SCROLL,
K_KP_HOME,
K_KP_UPARROW,
K_KP_PGUP,

View File

@ -1,4 +1,4 @@
# Microsoft Developer Studio Project File - Name="SoF2ui" - Package Owner=<4>
# Microsoft Developer Studio Project File - Name="ui" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
@ -13,13 +13,12 @@ CFG=ui - Win32 SH Debug SoF2
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "sof2_ui.mak" CFG="SoF2ui - Win32 SH Debug SoF2"
!MESSAGE NMAKE /f "sof2_ui.mak" CFG="ui - Win32 SH Debug SoF2"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "SoF2ui - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "SoF2ui - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "SoF2ui - Win32 SH Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ui - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ui - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
@ -28,12 +27,12 @@ CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "SoF2ui - Win32 Debug SoF2"
!IF "$(CFG)" == "ui - Win32 Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "SoF2ui___Win32_Debug_SoF2"
# PROP BASE Intermediate_Dir "SoF2ui___Win32_Debug_SoF2"
# PROP BASE Output_Dir "ui___Win32_Debug_SoF2"
# PROP BASE Intermediate_Dir "ui___Win32_Debug_SoF2"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
@ -57,12 +56,12 @@ LINK32=link.exe
# ADD LINK32 /nologo /base:"0x40000000" /dll /map:"..\Debug\of2mp_uix86.map" /debug /machine:I386 /out:"../Debug/sof2mp_uix86.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "SoF2ui - Win32 Release SoF2"
!ELSEIF "$(CFG)" == "ui - Win32 Release SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "SoF2ui___Win32_Release_SoF2"
# PROP BASE Intermediate_Dir "SoF2ui___Win32_Release_SoF2"
# PROP BASE Output_Dir "ui___Win32_Release_SoF2"
# PROP BASE Intermediate_Dir "ui___Win32_Release_SoF2"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
@ -86,42 +85,12 @@ LINK32=link.exe
# ADD BASE LINK32 /nologo /base:"0x40000000" /dll /map /debug /machine:I386 /out:"../Release JK2/uix86.dll"
# ADD LINK32 /nologo /base:"0x40000000" /dll /map:"../Release/sof2mp_uix86.map" /debug /machine:I386 /out:"../Release/sof2mp_uix86.dll"
!ELSEIF "$(CFG)" == "SoF2ui - Win32 SH Debug SoF2"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "SoF2ui___Win32_SH_Debug_SoF2"
# PROP BASE Intermediate_Dir "SoF2ui___Win32_SH_Debug_SoF2"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\SHDebug\ui"
# PROP Intermediate_Dir "..\SHDebug\ui"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "_USRDLL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "UI_EXPORTS" /D "MISSIONPACK" /D "_SOF2" /FR /YX /FD /GZ /c
# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "_USRDLL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "UI_EXPORTS" /D "MISSIONPACK" /D "_SOF2" /D "MEM_DEBUG" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_Debug JK2" /mktyplib203 /win32
# ADD MTL /nologo /D "_Debug JK2" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_Debug JK2"
# ADD RSC /l 0x409 /d "_Debug JK2"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /base:"0x40000000" /dll /map:"..\Debug\of2mp_uix86.map" /debug /machine:I386 /out:"../Debug/sof2mp_uix86.dll" /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 /nologo /base:"0x40000000" /dll /map:"..\SHDebug\of2mp_uix86.map" /debug /machine:I386 /out:"../SHDebug/sof2mp_uix86.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "SoF2ui - Win32 Debug SoF2"
# Name "SoF2ui - Win32 Release SoF2"
# Name "SoF2ui - Win32 SH Debug SoF2"
# Name "ui - Win32 Debug SoF2"
# Name "ui - Win32 Release SoF2"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

View File

@ -742,6 +742,13 @@ void trap_Parental_Update ( void );
void trap_Parental_SetPassword ( const char* password );
void trap_Parental_GetPassword ( char* password, int size );
void trap_PunkBuster_Enable ( void );
void trap_PunkBuster_Disable ( void );
int trap_PunkBuster_IsEnabled ( void );
int trap_GetTeamCount ( int team );
int trap_GetTeamScore ( int team );
void trap_Print( const char *string );
void trap_Error( const char *string );
int trap_Milliseconds( void );

View File

@ -714,6 +714,16 @@ void UI_DrawObjectivePhotos ( rectDef_t *rect, qhandle_t font, float scale, vec4
}
}
static void UI_DrawTeamCount ( int team, rectDef_t *rect, qhandle_t font, float scale, vec4_t color )
{
UI_DrawText (rect->x, rect->y, font, scale, color, va("%d",trap_GetTeamCount(team)), 0, 0 );
}
static void UI_DrawTeamScore ( int team, rectDef_t *rect, qhandle_t font, float scale, vec4_t color )
{
UI_DrawText (rect->x, rect->y, font, scale, color, va("%d",trap_GetTeamScore(team)), 0, 0 );
}
// ui_gameType assumes gametype 0 is -1 ALL and will not show
static void UI_DrawGameType(rectDef_t *rect, qhandle_t font, float scale, vec4_t color )
{
@ -1447,6 +1457,22 @@ static void UI_OwnerDraw(float x, float y, float w, float h, float text_x, float
switch (ownerDraw)
{
case UI_RED_TEAM_COUNT:
UI_DrawTeamCount ( TEAM_RED, &rect, font, scale, color );
break;
case UI_BLUE_TEAM_COUNT:
UI_DrawTeamCount ( TEAM_BLUE, &rect, font, scale, color );
break;
case UI_RED_TEAM_SCORE:
UI_DrawTeamScore ( TEAM_RED, &rect, font, scale, color );
break;
case UI_BLUE_TEAM_SCORE:
UI_DrawTeamScore ( TEAM_BLUE, &rect, font, scale, color );
break;
case UI_OUTFITTING_SLOT_RENDER:
UI_DrawOutfittingSlotRender ( &rect, atoi ( param ));
break;
@ -2510,6 +2536,8 @@ static void UI_RunMenuScript(const char **args)
else if ( Q_stricmp ( name, "autoTeamJoin" ) == 0 )
{
qboolean joinRed = qfalse;
int countRed = 0;
int countBlue = 0;
if ( !String_Parse(args, &name) || !name )
{
@ -2521,18 +2549,21 @@ static void UI_RunMenuScript(const char **args)
return;
}
countRed = trap_GetTeamCount ( TEAM_RED );
countBlue = trap_GetTeamCount ( TEAM_BLUE );
// If the teams have the same number of players then join the
// team that has less points
if ( ui_info_bluecount.integer == ui_info_redcount.integer )
if ( countRed == countBlue )
{
// If the blue team has more points then join red
if ( ui_info_bluescore.integer > ui_info_redscore.integer )
if ( trap_GetTeamScore ( TEAM_BLUE ) > trap_GetTeamScore ( TEAM_RED ) )
{
joinRed = qtrue;
}
}
// If the blue team has more players then join red
else if ( ui_info_bluecount.integer > ui_info_redcount.integer )
else if ( countBlue > countRed )
{
joinRed = qtrue;
}
@ -2810,10 +2841,29 @@ static void UI_RunMenuScript(const char **args)
} else if (Q_stricmp(name, "RefreshServers") == 0) {
UI_StartServerRefresh(qtrue);
UI_BuildServerDisplayList(qtrue);
} else if (Q_stricmp(name, "RefreshFilter") == 0) {
}
else if (Q_stricmp(name, "RefreshFilter") == 0)
{
UI_StartServerRefresh(qfalse);
UI_BuildServerDisplayList(qtrue);
} else if (Q_stricmp(name, "RunSPDemo") == 0) {
}
else if (Q_stricmp(name, "updatePunkbuster" ) == 0 )
{
int enabled = (int)trap_Cvar_VariableValue ( "ui_browserPunkbuster" );
if ( enabled )
{
trap_PunkBuster_Enable ( );
}
else
{
trap_PunkBuster_Disable ( );
}
trap_Cvar_Set ( "ui_browserPunkbuster", trap_PunkBuster_IsEnabled ( ) ? "1":"0" );
}
else if (Q_stricmp(name, "RunSPDemo") == 0)
{
if (uiInfo.demoAvailable) {
trap_Cmd_ExecuteText( EXEC_APPEND, va("demo %s_%s\n", uiInfo.mapList[ui_currentMap.integer].mapLoadName, bg_gametypeData[ui_gameType.integer].name));
}
@ -2852,7 +2902,11 @@ static void UI_RunMenuScript(const char **args)
uiInfo.serverStatus.nextDisplayRefresh = 0;
uiInfo.nextServerStatusRefresh = 0;
uiInfo.nextFindPlayerRefresh = 0;
} else if (Q_stricmp(name, "UpdateFilter") == 0) {
}
else if (Q_stricmp(name, "UpdateFilter") == 0)
{
trap_Cvar_Set ( "ui_browserPunkbuster", trap_PunkBuster_IsEnabled ( ) ? "1" : "0" );
if (ui_netSource.integer == AS_LOCAL) {
UI_StartServerRefresh(qtrue);
}
@ -3910,7 +3964,7 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
static char info[MAX_STRING_CHARS];
static char info2[MAX_STRING_CHARS];
static char hostname[MAX_STRING_CHARS];
static char needpass[2];
static char yesno[5];
static char clientBuff[32];
static int lastColumn = -1;
static int lastTime = 0;
@ -3974,10 +4028,27 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
switch (column)
{
case SORT_PUNKBUSTER:
if ( atoi(Info_ValueForKey(info, "sv_punkbuster")) )
{
strcpy ( yesno, "*" );
}
else
{
strcpy ( yesno, "" );
}
return yesno;
case SORT_NEEDPASS:
needpass[0] = atoi(Info_ValueForKey(info, "needpass"))?'*':' ';
needpass[1] = 0;
return needpass;
if ( atoi(Info_ValueForKey(info, "needpass")) )
{
strcpy ( yesno, "*" );
}
else
{
strcpy ( yesno, "" );
}
return yesno;
case SORT_HOST :
if (ping <= 0)
@ -4024,11 +4095,11 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
game = BG_FindGametype ( Info_ValueForKey(info, "gametype") );
if (ping <= 0)
{
return "Inactive";
return "----";
}
else if (game < 0)
{
return "Unknown";
return "????";
}
return bg_gametypeData[game].name;
@ -4956,7 +5027,7 @@ void UI_DrawConnectScreen( qboolean overlay ) {
}
// display global MOTD at bottom
Text_PaintCenter(centerPoint, 600, uiInfo.uiDC.Assets.defaultFont, scale, colorWhite, Info_ValueForKey( cstate.updateInfoString, "motd" ), 0 );
Text_PaintCenter(centerPoint, yStart + 13, uiInfo.uiDC.Assets.defaultFont, scale, colorWhite, Info_ValueForKey( cstate.updateInfoString, "motd" ), 0 );
// print any server info (server full, bad version, etc)
if ( cstate.connState < CA_CONNECTED )
@ -4980,7 +5051,7 @@ void UI_DrawConnectScreen( qboolean overlay ) {
}
}
Text_PaintCenter(centerPoint, yStart + 112, uiInfo.uiDC.Assets.defaultFont, scale, colorRed, cstate.messageString, 0 );
Text_PaintCenter(centerPoint, yStart + 112, uiInfo.uiDC.Assets.defaultFont, scale * 0.8f, colorRed, cstate.messageString, 0 );
}
if ( lastConnState > cstate.connState ) {
@ -5136,6 +5207,7 @@ vmCvar_t ui_info_team;
vmCvar_t ui_info_teamgame;
vmCvar_t ui_info_redscore;
vmCvar_t ui_info_bluescore;
vmCvar_t ui_info_showobjectives;
vmCvar_t ui_joinserver;
vmCvar_t ui_allowparental;
@ -5220,6 +5292,7 @@ static cvarTable_t cvarTable[] =
{ &ui_info_redscore, "ui_info_redscore", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_bluescore, "ui_info_bluescore", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_objectives, "ui_info_objectives", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_showobjectives, "ui_info_showobjectives", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_gametype, "ui_info_gametype", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_team, "ui_info_team", "0", CVAR_ROM|CVAR_INTERNAL },
{ &ui_info_teamgame, "ui_info_teamgame", "0", CVAR_ROM|CVAR_INTERNAL },

View File

@ -227,6 +227,13 @@ typedef enum
UI_VERSION_GET_SITE,
UI_VERSION_DOWNLOAD,
UI_PB_ENABLE,
UI_PB_DISABLE,
UI_PB_ISENABLED,
UI_GET_TEAM_COUNT,
UI_GET_TEAM_SCORE,
} uiImport_t;
typedef enum
@ -249,6 +256,7 @@ typedef enum
#define SORT_CLIENTS 3
#define SORT_GAME 4
#define SORT_PING 5
#define SORT_PUNKBUSTER 6
typedef enum
{

View File

@ -5306,6 +5306,9 @@ menuDef_t *Menus_ActivateByName(const char *p)
menuDef_t *m = NULL;
menuDef_t *focus = Menu_GetFocused();
DC->tooltiptime = DC->realTime;
DC->tooltipItem = NULL;
// If we find a match for the window then save the pointer, otherwise
// clear the focus of the window since the window we are looking
// for will get the focus eventually

View File

@ -148,6 +148,11 @@ equ trap_Version_GetDescription -174 ; UI_VERSION_GET_DESCRIPTION
equ trap_Version_GetNumSites -175 ; UI_VERSION_GET_NUM_SITES
equ trap_Version_GetSite -176 ; UI_VERSION_GET_SITE
equ trap_Version_Download -177 ; UI_VERSION_DOWNLOAD
equ trap_PunkBuster_Enable -178 ; UI_PB_ENABLE
equ trap_PunkBuster_Disable -179 ; UI_PB_DISABLE
equ trap_PunkBuster_IsEnabled -180 ; UI_PB_ISENABLED
equ trap_GetTeamCount -181 ; UI_GET_TEAM_COUNT
equ trap_GetTeamScore -182 ; UI_GET_TEAM_SCORE
; hardcoded functions

View File

@ -699,3 +699,29 @@ void trap_Version_Download(int index)
{
syscall(UI_VERSION_DOWNLOAD, index);
}
void trap_PunkBuster_Enable ( void )
{
syscall ( UI_PB_ENABLE );
}
void trap_PunkBuster_Disable ( void )
{
syscall ( UI_PB_DISABLE );
}
int trap_PunkBuster_IsEnabled ( void )
{
return syscall ( UI_PB_ISENABLED );
}
int trap_GetTeamCount ( int team )
{
return syscall ( UI_GET_TEAM_COUNT, team );
}
int trap_GetTeamScore ( int team )
{
return syscall ( UI_GET_TEAM_SCORE, team );
}

View File

@ -11,6 +11,7 @@ bin
sof2map.exe
sof2data.exe
striped.exe
sof2mpdev.exe
docs
Docs for:
Vertigons (surface sprites)
@ -29,8 +30,17 @@ resources
Max files for a male figure and the inview hands
SDK V1.02 09/24/2002
-----------------------
- Now includes sof2mpdev.exe to allow mod makers to use the cvars that were
removed from 1.02.
- Updated 1.02 source code
SDK V0.02 07/03/2002
-----------------------

View File

@ -862,6 +862,44 @@
}
}
itemDef
{
name punkbuster_field
group createserver_options
type ITEM_TYPE_YESNO
style WINDOW_STYLE_FILLED
text "PunkBuster:"
cvar "sv_punkbuster"
rect 50 207 210 15
textalign ITEM_ALIGN_RIGHT
textalignx 120
textaligny 0
textfont "hud"
textscale .43
forecolor .12 .14 .08 1
backcolor 0 0 0 0
visible 1
action
{
play "sound/misc/menus/select.wav" ;
}
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor punkbuster_field backcolor .12 .14 .08 1
setitemcolor punkbuster_field forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor punkbuster_field backcolor 0 0 0 0
setitemcolor punkbuster_field forecolor .12 .14 .08 1
}
}
itemDef
{
name dedicated_field
@ -872,7 +910,7 @@
cvar "ui_dedicated"
cvarFloatList { "No" 0 "LAN" 1 "Internet" 2 }
rect 50 207 210 15
rect 50 222 210 15
textalign ITEM_ALIGN_RIGHT
textalignx 120
textaligny 0
@ -911,7 +949,7 @@
maxChars 32
maxPaintChars 22
cvar "sv_hostname"
rect 50 222 325 15
rect 50 237 325 15
textalign ITEM_ALIGN_RIGHT
textalignx 120
textaligny 0
@ -949,7 +987,7 @@
text "Maximum Players:"
maxChars 2
cvar "sv_maxclients"
rect 30 237 230 15
rect 30 252 230 15
textalign ITEM_ALIGN_RIGHT
textalignx 140
textaligny 0
@ -987,7 +1025,7 @@
style WINDOW_STYLE_FILLED
text "Password:"
cvar "g_password"
rect 50 252 325 15
rect 50 267 325 15
textalign ITEM_ALIGN_RIGHT
textalignx 120
textaligny 0

View File

@ -341,7 +341,7 @@
visible 1
decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE
ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
}
itemDef
@ -353,7 +353,7 @@
visible 1
decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE
ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
}
itemDef
{
@ -364,7 +364,7 @@
visible 1
decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE
ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
}
itemDef
{
@ -375,7 +375,7 @@
visible 1
decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE
ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
}
itemDef
{
@ -386,7 +386,7 @@
visible 1
decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE
ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
}
itemDef
{
@ -397,7 +397,7 @@
visible 1
decoration
ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE
ownerdrawflag CG_SHOW_HUD_SNIPERCLIP
}
itemDef
{

View File

@ -109,7 +109,7 @@
itemDef
{
name window
rect 0 10 300 20
rect 0 0 300 20
name gametypefield
type ITEM_TYPE_EDITFIELD
style 0
@ -128,7 +128,7 @@
itemDef
{
name window
rect 0 25 300 20
rect 0 15 300 20
name gametypefield
type ITEM_TYPE_EDITFIELD
style 0
@ -148,7 +148,7 @@
{
name window
type ITEM_TYPE_EDITFIELD
rect 0 40 300 20
rect 0 30 300 20
textalign ITEM_ALIGN_RIGHT
cvar "ui_about_gametypename"
text "GameType:"
@ -164,7 +164,7 @@
{
name window
type ITEM_TYPE_EDITFIELD
rect 0 55 300 20
rect 0 45 300 20
maxPaintChars 12
cvar "ui_about_scorelimit"
text "Score Limit:"
@ -181,7 +181,7 @@
{
name window
type ITEM_TYPE_EDITFIELD
rect 0 70 300 20
rect 0 60 300 20
maxPaintChars 12
cvar "ui_about_timelimit"
text "Time Limit:"
@ -194,11 +194,45 @@
decoration
}
itemDef
{
name window
type ITEM_TYPE_YESNO
rect 0 75 300 20
maxPaintChars 12
cvar "ui_about_friendlyfire"
text "Friendly Fire:"
textalign ITEM_ALIGN_RIGHT
textalignx 128
textfont "hud"
textscale .40
forecolor .12 .14 .08 1
visible 1
decoration
}
itemDef
{
name window
type ITEM_TYPE_YESNO
rect 0 90 300 20
maxPaintChars 12
cvar "cl_punkbuster"
text "Punk Buster:"
textalign ITEM_ALIGN_RIGHT
textalignx 128
textfont "hud"
textscale .40
forecolor .12 .14 .08 1
visible 1
decoration
}
itemDef
{
name window
type ITEM_TYPE_EDITFIELD
rect 0 95 300 20
rect 0 115 300 20
cvar "protocol"
maxPaintChars 12
text "Protocol:"
@ -215,7 +249,7 @@
{
name window
type ITEM_TYPE_EDITFIELD
rect 0 110 300 20
rect 0 130 300 20
cvar "ui_about_maxclients"
maxPaintChars 12
text "Max Clients:"
@ -232,7 +266,7 @@
{
name window
type ITEM_TYPE_EDITFIELD
rect 0 125 300 20
rect 0 145 300 20
cvar "ui_about_hostname"
maxPaintChars 12
text "Host Name:"
@ -248,7 +282,7 @@
itemDef
{
name window
rect 0 150 300 20
rect 0 170 300 20
type ITEM_TYPE_YESNO
cvar "ui_about_needpass"
text "Password:"
@ -264,7 +298,7 @@
itemDef
{
name window
rect 0 165 300 20
rect 0 185 300 20
type ITEM_TYPE_YESNO
cvar "ui_about_dmflags"
text "DM Flags:"
@ -280,7 +314,7 @@
itemDef
{
name window
rect 0 180 300 20
rect 0 200 300 20
type ITEM_TYPE_EDITFIELD
cvar "ui_about_seed"
text "RMG Seed:"
@ -301,29 +335,11 @@
}
/*
itemDef
{
name window
type ITEM_TYPE_YESNO
rect 0 180 300 20
cvar "bot_minplayers"
text "Bot/Min:"
textalign ITEM_ALIGN_RIGHT
textalignx 128
textfont "hud"
textscale .40
forecolor .12 .14 .08 1
visible 1
decoration
}
*/
itemDef
{
name window
type ITEM_TYPE_EDITFIELD
rect 0 205 300 20
rect 0 215 300 20
cvar "version"
maxPaintChars 32
text "Version:"

View File

@ -299,12 +299,11 @@
border 1
bordercolor 0 0 0 1
cvarTest "ui_about_gametype"
cvarTest "ui_info_showobjectives"
disableCvar
{
"0" ;
"1" ;
}
action

View File

@ -375,7 +375,7 @@
itemDef
{
rect 410 275 0 0
cvar ui_info_redcount
ownerdraw UI_RED_TEAM_COUNT
textfont "hud"
textalign 2
textscale .43
@ -398,7 +398,7 @@
itemDef
{
rect 230 275 0 0
cvar ui_info_bluecount
ownerdraw UI_BLUE_TEAM_COUNT
textfont "hud"
textscale .43
forecolor 0 0 0 1
@ -424,7 +424,7 @@
itemDef
{
rect 410 315 0 0
cvar ui_info_redscore
ownerdraw UI_RED_TEAM_SCORE
textfont "hud"
textalign 2
textscale .43
@ -447,7 +447,7 @@
itemDef
{
rect 230 315 0 0
cvar ui_info_bluescore
ownerdraw UI_BLUE_TEAM_SCORE
textfont "hud"
textscale .43
forecolor 0 0 0 1

View File

@ -59,7 +59,7 @@
{
name mapname_column
group columns_group
rect 245 89 121 170
rect 245 89 101 170
style WINDOW_STYLE_FILLED
backcolor 0 0 0 0
visible 1
@ -70,7 +70,7 @@
{
name players_column
group columns_group
rect 365 89 66 170
rect 345 89 66 170
style WINDOW_STYLE_FILLED
backcolor 0 0 0 0
visible 1
@ -81,7 +81,7 @@
{
name type_column
group columns_group
rect 430 89 51 170
rect 410 89 46 170
style WINDOW_STYLE_FILLED
backcolor 0 0 0 0
visible 1
@ -92,7 +92,18 @@
{
name ping_column
group columns_group
rect 480 89 59 170
rect 455 89 44 170
style WINDOW_STYLE_FILLED
backcolor 0 0 0 0
visible 1
decoration
}
itemDef
{
name punkbuster_column
group columns_group
rect 497 89 23 170
style WINDOW_STYLE_FILLED
backcolor 0 0 0 0
visible 1
@ -106,14 +117,14 @@
itemDef
{
name serverlist
rect 5 89 533 170
rect 5 89 533 171
type ITEM_TYPE_LISTBOX
style WINDOW_STYLE_EMPTY
elementwidth 120
elementheight 15
elementheight 12
textfont "hud"
textscale .43
textaligny -13
textscale .33
textaligny -10
elementtype LISTBOX_TEXT
feeder FEEDER_SERVERS
border 1
@ -121,7 +132,7 @@
bordercolor 0 0 0 1
outlinecolor .12 .14 .08 1
visible 1
columns 6 0 3 20 20 40 30 240 40 16 360 5 10 425 20 10 475 20 20
columns 7 0 3 20 20 40 30 240 40 16 340 5 10 405 20 10 450 20 20 490 10 10
doubleClick
{
@ -325,11 +336,11 @@
name empty_filter
style WINDOW_STYLE_FILLED
type ITEM_TYPE_YESNO
rect 340 9 80 16
text "Empty:"
cvar "ui_browserShowEmpty"
textfont "hud"
textscale .43
rect 144 40 80 16
textstyle 0
textalign ITEM_ALIGN_LEFT
textaligny 0
@ -366,7 +377,7 @@
cvar "ui_browserShowFull"
textfont "hud"
textscale .43
rect 244 40 80 16
rect 340 24 80 16
textstyle 0
textalign ITEM_ALIGN_LEFT
textaligny 0
@ -394,6 +405,43 @@
}
}
itemDef
{
name pb_filter
style WINDOW_STYLE_FILLED
type ITEM_TYPE_YESNO
text "PunkBuster Enabled:"
rect 144 40 184 16
textstyle 0
textalign ITEM_ALIGN_LEFT
textaligny 0
textalignx 1
textfont "hud"
textscale .43
forecolor .12 .14 .08 1
backcolor 0 0 0 0
cvar "ui_browserPunkbuster"
visible 1
action
{
uiScript updatePunkbuster ;
play "sound/misc/menus/select.wav" ;
}
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor pb_filter backcolor .12 .14 .08 1
setitemcolor pb_filter forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor pb_filter forecolor .12 .14 .08 1
setitemcolor pb_filter backcolor 0 0 0 0
}
}
itemDef
{
name window
@ -654,7 +702,7 @@
style WINDOW_STYLE_FILLED
textfont "hud"
textscale .43
rect 365 72 53 18
rect 345 72 53 18
textalign 0
textalignx 2 // center
textaligny 0
@ -670,7 +718,7 @@
name players_tab_button
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 365 72 53 18
rect 345 72 53 18
visible 1
mouseEnter
@ -708,7 +756,7 @@
style WINDOW_STYLE_FILLED
textfont "hud"
textscale .43
rect 430 72 39 18
rect 410 72 39 18
textalign 0
textalignx 2 // center
textaligny 0
@ -724,7 +772,7 @@
name type_tab_button
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 430 72 39 18
rect 410 72 39 18
visible 1
mouseEnter
@ -762,7 +810,7 @@
style WINDOW_STYLE_FILLED
textfont "hud"
textscale .43
rect 480 72 39 18
rect 455 72 36 18
textalign 0
textalignx 2 // center
textaligny 0
@ -778,7 +826,7 @@
name ping_tab_button
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 480 72 39 18
rect 455 72 39 18
visible 1
mouseEnter
@ -808,6 +856,74 @@
}
}
itemDef
{
name punkbuster_tab
group tabs_group
style WINDOW_STYLE_FILLED
rect 496 72 20 18
textalign 0
textalignx 3
textaligny 0
forecolor .12 .14 .08 1
bordercolor 0 0 0 1
backcolor 0 0 0 0
visible 1
border 1
}
itemDef
{
name punkbuster_tab
group tabs_group
style WINDOW_STYLE_SHADER
background "gfx/menus/icons/icon_punkbuster"
rect 496 72 20 18
textalign 0
textalignx 3
textaligny 0
forecolor .12 .14 .08 1
bordercolor 0 0 0 1
backcolor 0 0 0 0
visible 1
border 1
}
itemDef
{
name punkbuster_tab_button
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 496 72 20 18
visible 1
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor punkbuster_tab backcolor .12 .14 .08 1
setitemcolor punkbuster_tab forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor punkbuster_tab forecolor .12 .14 .08 1
setitemcolor punkbuster_tab backcolor 0 0 0 0
}
action
{
play "sound/misc/menus/select.wav" ;
uiScript ServerSort 6 ;
setitemcolor tabs_group backcolor 0 0 0 0;
setitemcolor tabs_group forecolor .12 .14 .08 1;
setitemcolor punkbuster_tab backcolor .12 .14 .08 1
setitemcolor punkbuster_tab forecolor .49 .56 .27 1
setitemcolor columns_group backcolor 0 0 0 0 ;
setitemcolor punkbuster_column backcolor .12 .14 .08 .35;
}
}
////////////////////////////////////////////////////////////////////////
// COLUMN BORDERS
////////////////////////////////////////////////////////////////////////
@ -839,7 +955,7 @@
itemDef
{
name column_border
rect 245 89 121 171
rect 245 89 101 171
style WINDOW_STYLE_EMPTY
border 1
bordersize 1
@ -851,7 +967,7 @@
itemDef
{
name column_border
rect 365 89 66 171
rect 345 89 66 171
style WINDOW_STYLE_EMPTY
border 1
bordersize 1
@ -863,7 +979,7 @@
itemDef
{
name column_border
rect 430 89 51 171
rect 410 89 46 171
style WINDOW_STYLE_EMPTY
border 1
bordersize 1
@ -875,7 +991,7 @@
itemDef
{
name column_border
rect 480 89 59 171
rect 455 89 42 171
style WINDOW_STYLE_EMPTY
border 1
bordersize 1

View File

@ -86,6 +86,7 @@
#define CG_SHOW_HUD_THERMAL 0x00800000
#define CG_SHOW_PLAYER_ALT_WEAPONINFO 0x20000000
#define CG_HIDE_PLAYER_ALT_WEAPONINFO 0x40000000
#define CG_SHOW_HUD_SNIPERCLIP 0x80000000
#define UI_SHOW_LEADER 0x00000001
@ -185,6 +186,11 @@
#define UI_OBJECTIVE_PHOTOS 275
#define UI_RED_TEAM_COUNT 280
#define UI_BLUE_TEAM_COUNT 281
#define UI_RED_TEAM_SCORE 282
#define UI_BLUE_TEAM_SCORE 283
#define VOICECHAT_GETFLAG "getflag" // command someone to get the flag
#define VOICECHAT_OFFENSE "offense" // command someone to go on offense
#define VOICECHAT_DEFEND "defend" // command someone to go on defense

View File

@ -117,7 +117,7 @@
textfont "hud"
textscale .43
textalign 0
textalignx 20
textalignx 15
textaligny 1
forecolor .12 .14 .08 1
backcolor 0 0 0 0
@ -129,8 +129,7 @@
action
{
play "sound/misc/menus/select.wav" ;
close patch_info ;
open patch_location ;
uiScript loadNewVersionFromBrowser ;
}
mouseEnter
@ -147,45 +146,6 @@
}
}
itemDef
{
name browser_button
text "Manual Download"
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_FILLED
rect 250 350 120 20
textfont "hud"
textscale .43
textalign 0
textalignx 5
textaligny 1
forecolor .12 .14 .08 1
backcolor 0 0 0 0
visible 1
border 1
bordercolor 0 0 0 1
action
{
play "sound/misc/menus/select.wav" ;
uiScript loadNewVersionFromBrowser ;
}
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor browser_button backcolor .12 .14 .08 1
setitemcolor browser_button forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor browser_button forecolor .12 .14 .08 1
setitemcolor browser_button backcolor 0 0 0 0
}
}
itemDef
{
name ignore_button
@ -196,7 +156,7 @@
textfont "hud"
textscale .43
textalign 0
textalignx 30
textalignx 25
textaligny 1
forecolor .12 .14 .08 1
backcolor 0 0 0 0

View File

@ -9,6 +9,49 @@
rect 50 110 432 254
focusColor .49 .56 .27 1
itemDef
{
name teamscores_multi
style WINDOW_STYLE_FILLED
type ITEM_TYPE_MULTI
text "Team Scores:"
cvar "cg_drawteamscores"
rect 50 14 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
textfont "hud"
textscale .43
forecolor .12 .14 .08 1
backcolor 0 0 0 0
visible 1
cvarFloatList
{
"Off" 0
"Bottom Right" 1
"Bottom Center" 2
"Top Right" 3
"Right" 4
"Slim" 5
}
action
{
play "sound/misc/menus/select.wav" ;
}
mouseEnter
{
play "sound/misc/menus/hilite1.wav" ;
setitemcolor teamscores_multi backcolor .12 .14 .08 1
setitemcolor teamscores_multi forecolor .49 .56 .27 1
}
mouseExit
{
setitemcolor teamscores_multi forecolor .12 .14 .08 1
setitemcolor teamscores_multi backcolor 0 0 0 0
}
}
itemDef
{
name autoswitch_multi
@ -16,7 +59,7 @@
type ITEM_TYPE_MULTI
text "Auto Switch:"
cvar "cg_autoswitch"
rect 50 19 240 15
rect 50 29 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
@ -56,7 +99,7 @@
type ITEM_TYPE_MULTI
text "Weapon Selection:"
cvar "cg_weaponMenuFast"
rect 50 34 240 15
rect 50 44 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
@ -95,7 +138,7 @@
type ITEM_TYPE_YESNO
text "Auto Reload:"
cvar "cg_autoReload"
rect 50 49 240 15
rect 50 59 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
@ -130,7 +173,7 @@
type ITEM_TYPE_YESNO
text "Defer Players:"
cvar "cg_deferPlayers"
rect 50 64 240 15
rect 50 74 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
@ -164,7 +207,7 @@
type ITEM_TYPE_MULTI
text "Identify Target:"
cvar "cg_drawCrosshairNames"
rect 50 79 240 15
rect 50 89 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
@ -205,7 +248,7 @@
type ITEM_TYPE_YESNO
text "Draw Team Icons:"
cvar "cg_drawFriend"
rect 50 94 240 15
rect 50 104 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
@ -239,7 +282,7 @@
type ITEM_TYPE_MULTI
text "Radar Type:"
cvar "cg_drawRadar"
rect 50 109 240 15
rect 50 119 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
@ -279,7 +322,7 @@
type ITEM_TYPE_YESNO
text "Draw HUD Icons:"
cvar "cg_drawHUDIcons"
rect 50 124 240 15
rect 50 134 240 15
textalign ITEM_ALIGN_RIGHT
textalignx 125
textaligny 0
@ -311,7 +354,7 @@
name crosshair
style WINDOW_STYLE_FILLED
text "Crosshair:"
rect 50 139 240 30
rect 50 149 240 30
ownerdraw UI_CROSSHAIR
textalign ITEM_ALIGN_RIGHT
textalignx 115
@ -345,7 +388,7 @@
name brightness_slider
style WINDOW_STYLE_FILLED
text "Brightness"
rect 70 169 140 15
rect 70 179 140 15
forecolor .12 .14 .08 1
backcolor 0 0 0 0
textaligny 0
@ -362,7 +405,7 @@
type ITEM_TYPE_SLIDER
text ""
cvarfloat "r_gamma" 1 0.5 2
rect 70 184 128 40
rect 70 194 128 40
visible 1
action