mirror of
https://github.com/ENSL/NS.git
synced 2025-03-23 02:41:04 +00:00
Reverting Gerhard's WIP minimap code (#96)
* revert Gerhard's minimap update. removing WIP code * revert Gerhard's minimap alpha - removing WIP code from develop * project file update * fixed hl project mistake when reverting * adding back Brett's changes lost in revert * removed .wad checks for maps that are nolonger official
This commit is contained in:
parent
2586ec4c73
commit
68548a7af1
25 changed files with 1864 additions and 2232 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -241,7 +241,6 @@ struct extra_player_info_t
|
|||
short playerclass;
|
||||
short extra;
|
||||
short auth;
|
||||
short player_index;
|
||||
short teamnumber;
|
||||
char teamname[MAX_TEAM_NAME];
|
||||
char customicon[CUSTOM_ICON_LENGTH + 3]; //last 3 characters is the color.
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -33,8 +33,8 @@
|
|||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">F:\Steam\steamapps\common\Half-Life\ns\cl_dlls</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">.</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">.\release</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">$(Configuration)\</IntDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">$(TargetPath)%3b*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat</ExtensionsToDeleteOnClean>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">false</LinkIncremental>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">client</TargetName>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)\particles;$(SolutionDir)\includes\lpng1251;$(SolutionDir)\includes\zlib-1.2.8;$(SolutionDir)\includes\fmod\inc;$(SolutionDir)\includes\vgui\include;../public;../common;../external;../pm_shared;../game_shared;../mod;../util;../ui;../engine;../cl_dll;../dlls</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>USE_NETWORK_METERING;NDEBUG;WIN32;_WINDOWS;AVH_CLIENT;USE_OLDAUTH;_X86_</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;AVH_CLIENT;USE_OLDAUTH;_X86_</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<TreatLinkerWarningAsErrors>
|
||||
</TreatLinkerWarningAsErrors>
|
||||
<AdditionalOptions>/NODEFAULTLIB:LIBCMT %(AdditionalOptions)</AdditionalOptions>
|
||||
<OutputFile>F:\Steam\steamapps\common\Half-Life\ns\cl_dlls\client.dll</OutputFile>
|
||||
<OutputFile>$(SolutionDir)..\cl_dlls\client.dll</OutputFile>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">
|
||||
<LocalDebuggerCommand>F:\Steam\steamapps\common\Half-Life\hl.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerCommand>..\..\..\..\..\..\..\Program Files %28x86%29\Steam\SteamApps\common\Half-Life\hl.exe</LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments> -allowdebug -dev -steam -game ns</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>..\..\..\..\..\..\Steam\steamapps\common\Half-Life\ns</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerWorkingDirectory>..\..</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerAttach>false</LocalDebuggerAttach>
|
||||
<LocalDebuggerDebuggerType>Auto</LocalDebuggerDebuggerType>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -81,12 +81,6 @@
|
|||
#include "mod/AvHServerVariables.h"
|
||||
#include "util/STLUtil.h"
|
||||
#include "ui/ScoreboardIcon.h"
|
||||
#include <string>
|
||||
#include <array>
|
||||
#include<algorithm>
|
||||
#include "AvHServerVariables.h"
|
||||
|
||||
using namespace std;
|
||||
/* @2014
|
||||
#include "common/itrackeruser.h"
|
||||
extern ITrackerUser *g_pTrackerUser;
|
||||
|
@ -197,16 +191,16 @@ vgui::Color BuildColor( int R, int G, int B, float gamma )
|
|||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Create the ScoreBoard panel
|
||||
//-----------------------------------------------------------------------------
|
||||
ScorePanel::ScorePanel(int x, int y, int wide, int tall) : Panel(x, y, wide, tall)
|
||||
ScorePanel::ScorePanel(int x,int y,int wide,int tall) : Panel(x,y,wide,tall)
|
||||
{
|
||||
CSchemeManager* pSchemes = gViewPort->GetSchemeManager();
|
||||
CSchemeManager *pSchemes = gViewPort->GetSchemeManager();
|
||||
SchemeHandle_t hTitleScheme = pSchemes->getSchemeHandle("Scoreboard Title Text");
|
||||
SchemeHandle_t hSmallScheme = pSchemes->getSchemeHandle("Scoreboard Small Text");
|
||||
SchemeHandle_t hTinyScheme = pSchemes->getSchemeHandle("Scoreboard Tiny Text");
|
||||
Font* tfont = pSchemes->getFont(hTitleScheme);
|
||||
Font* smallfont = pSchemes->getFont(hSmallScheme);
|
||||
Font* tinyfont = pSchemes->getFont(hTinyScheme);
|
||||
|
||||
Font *tfont = pSchemes->getFont(hTitleScheme);
|
||||
Font *smallfont = pSchemes->getFont(hSmallScheme);
|
||||
Font *tinyfont = pSchemes->getFont(hTinyScheme);
|
||||
|
||||
setBgColor(0, 0, 0, 96);
|
||||
m_pCurrentHighlightLabel = NULL;
|
||||
m_iHighlightRow = -1;
|
||||
|
@ -219,7 +213,7 @@ ScorePanel::ScorePanel(int x, int y, int wide, int tall) : Panel(x, y, wide, tal
|
|||
m_pContribIcon = NULL;
|
||||
m_pCheatingDeathIcon = NULL;
|
||||
m_pVeteranIcon = NULL;
|
||||
|
||||
|
||||
m_pHMG = NULL;
|
||||
m_pMine = NULL;
|
||||
m_pWeld = NULL;
|
||||
|
@ -236,6 +230,7 @@ ScorePanel::ScorePanel(int x, int y, int wide, int tall) : Panel(x, y, wide, tal
|
|||
m_pCheatingDeathIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardcd.tga");
|
||||
m_pVeteranIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardveteran.tga");
|
||||
|
||||
|
||||
|
||||
m_pHMG = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardhmg.tga");
|
||||
m_pMine = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardmine.tga");
|
||||
|
@ -245,18 +240,6 @@ ScorePanel::ScorePanel(int x, int y, int wide, int tall) : Panel(x, y, wide, tal
|
|||
|
||||
m_iIconFrame = 0;
|
||||
m_iLastFrameIncrementTime = gHUD.GetTimeOfLastUpdate();
|
||||
|
||||
// Player Colors indicators
|
||||
m_pCYellow = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_yellow.tga");
|
||||
for (int i = 0; i < MAX_PLAYERS; i++) {
|
||||
m_pColorIcons[i] = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardtracker.tga");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Initialize the top title.
|
||||
m_TitleLabel.setFont(tfont);
|
||||
|
@ -376,7 +359,7 @@ ScorePanel::ScorePanel(int x, int y, int wide, int tall) : Panel(x, y, wide, tal
|
|||
m_PlayerList.AddItem(pGridRow);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Add the hit test panel. It is invisible and traps mouse clicks so we can go into squelch mode.
|
||||
m_HitTestPanel.setBgColor(0,0,0,255);
|
||||
m_HitTestPanel.setParent(this);
|
||||
|
@ -391,7 +374,6 @@ ScorePanel::ScorePanel(int x, int y, int wide, int tall) : Panel(x, y, wide, tal
|
|||
m_pCloseButton->setFont(tfont);
|
||||
m_pCloseButton->setBoundKey( (char)255 );
|
||||
m_pCloseButton->setContentAlignment(Label::a_center);
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
@ -845,7 +827,6 @@ void ScorePanel::FillGrid()
|
|||
hud_player_info_t* pl_info = &g_PlayerInfoList[theSortedRow];
|
||||
extra_player_info_t* theExtraPlayerInfo = &g_PlayerExtraInfo[theSortedRow];
|
||||
int thePlayerClass = theExtraPlayerInfo->playerclass;
|
||||
int thePlayerId = theExtraPlayerInfo->player_index;
|
||||
short theTeamNumber = theExtraPlayerInfo->teamnumber;
|
||||
string theCustomIcon = (string)theExtraPlayerInfo->customicon;
|
||||
// : 0001073
|
||||
|
@ -1105,80 +1086,10 @@ void ScorePanel::FillGrid()
|
|||
}
|
||||
}
|
||||
*/
|
||||
// set Player Color
|
||||
|
||||
|
||||
switch (theTeamNumber) {
|
||||
case 1:
|
||||
if (std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId) == std::end(players_marine_team)){
|
||||
players_marine_team.push_back(thePlayerId);
|
||||
players_marine_team.sort();
|
||||
}
|
||||
else if (std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId) != std::end(players_alien_team)) {
|
||||
players_alien_team.erase(std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId));
|
||||
players_alien_team.sort();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId) == std::end(players_alien_team)) {
|
||||
players_alien_team.push_back(thePlayerId);
|
||||
players_alien_team.sort();
|
||||
}
|
||||
else if (std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId) != std::end(players_marine_team)) {
|
||||
players_marine_team.erase(std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId));
|
||||
players_marine_team.sort();
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId) != std::end(players_alien_team)) {
|
||||
players_alien_team.erase(std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId));
|
||||
players_alien_team.sort();
|
||||
}
|
||||
else if (std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId) != std::end(players_marine_team)) {
|
||||
players_marine_team.erase(std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId));
|
||||
players_marine_team.sort();
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(pl_info)
|
||||
{
|
||||
|
||||
if (gHUD.GetServerVariableFloat(kvTournamentMode)) {
|
||||
sprintf(sz, " %s ", pl_info->name);
|
||||
pLabel->setImage(m_pColorIcons[thePlayerId]);
|
||||
pLabel->setFgColorAsImageColor(false);
|
||||
|
||||
switch (theTeamNumber) {
|
||||
case 1:
|
||||
m_pColorIndex = std::distance(std::begin(players_marine_team), std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId));
|
||||
m_pColorIndex = m_pColorIndex % player_colors.size();
|
||||
m_pColorIcons[thePlayerId]->setColor(BuildColor(player_colors[m_pColorIndex][0],
|
||||
player_colors[m_pColorIndex][1],
|
||||
player_colors[m_pColorIndex][2], gHUD.GetGammaSlope()));
|
||||
break;
|
||||
case 2:
|
||||
m_pColorIndex = std::distance(std::begin(players_alien_team), std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId));
|
||||
m_pColorIndex = m_pColorIndex % player_colors.size();
|
||||
m_pColorIcons[thePlayerId]->setColor(BuildColor(player_colors[m_pColorIndex][0],
|
||||
player_colors[m_pColorIndex][1],
|
||||
player_colors[m_pColorIndex][2], gHUD.GetGammaSlope()));
|
||||
break;
|
||||
default:
|
||||
m_pColorIcons[thePlayerId]->setColor(BuildColor(255, 255, 255, gHUD.GetGammaSlope()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
sprintf(sz, "%s ", pl_info->name);
|
||||
}
|
||||
sprintf(sz, "%s ", pl_info->name);
|
||||
}
|
||||
|
||||
break;
|
||||
case COLUMN_VOICE:
|
||||
sz[0] = 0;
|
||||
|
@ -1303,8 +1214,7 @@ void ScorePanel::FillGrid()
|
|||
pLabel->setFgColorAsImageColor(false);
|
||||
m_pServerOpIcon->setColor(BuildColor(0, 255, 0, gHUD.GetGammaSlope()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Allow custom icons to override other general icons
|
||||
if(thePlayerAuthentication & PLAYERAUTH_CUSTOM)
|
||||
{
|
||||
|
@ -1330,8 +1240,8 @@ void ScorePanel::FillGrid()
|
|||
pLabel->setFgColorAsImageColor(false);
|
||||
|
||||
// Parse color (last 3 bytes are the RGB values 1-9)
|
||||
string theColor = theCustomIcon.substr( strlen(theCustomIcon.c_str()) - 3, 3);
|
||||
|
||||
string theColor = theCustomIcon.substr(strlen(theCustomIcon.c_str()) - 3, 3);
|
||||
|
||||
string rStr = theColor.substr(0, 1);
|
||||
string bStr = theColor.substr(1, 1);
|
||||
string gStr = theColor.substr(2, 1);
|
||||
|
@ -1346,9 +1256,6 @@ void ScorePanel::FillGrid()
|
|||
}
|
||||
}
|
||||
}
|
||||
// Set Colors for Players
|
||||
|
||||
|
||||
/* @2014
|
||||
if(g_pTrackerUser)
|
||||
{
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
#include<VGUI_Label.h>
|
||||
#include<VGUI_TextImage.h>
|
||||
#include "vgui_listbox.h"
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
|
@ -98,19 +96,8 @@ private:
|
|||
vgui::BitmapTGA *m_pGL;
|
||||
vgui::BitmapTGA *m_pSG;
|
||||
|
||||
vgui::BitmapTGA *m_pColorIcons[MAX_PLAYERS];
|
||||
std::vector<std::vector<int>> player_colors = {
|
||||
{154,5,102},{199,131,7},{17,59,132},{136,188,6},{203,203,203},{0,0,0,0}
|
||||
};
|
||||
std::list<int> players_marine_team ;
|
||||
std::list<int> players_alien_team;
|
||||
int m_pColorIndex = -1;
|
||||
// Player Color indicators
|
||||
vgui::BitmapTGA *m_pCYellow;
|
||||
|
||||
vector< pair <vgui::BitmapTGA *, string> > m_CustomIconList;
|
||||
|
||||
|
||||
unsigned int m_iIconFrame;
|
||||
unsigned int m_iLastFrameIncrementTime;
|
||||
int oldteam;
|
||||
|
|
|
@ -2559,7 +2559,6 @@ int TeamFortressViewport::MsgFunc_ScoreInfo( const char *pszName, int iSize, voi
|
|||
// Update score, but show + or - indicator on scoreboard when it changes
|
||||
g_PlayerExtraInfo[info.player_index].lastScore = g_PlayerExtraInfo[info.player_index].score;
|
||||
g_PlayerExtraInfo[info.player_index].score = info.score;
|
||||
g_PlayerExtraInfo[info.player_index].player_index = info.player_index;
|
||||
if(g_PlayerExtraInfo[info.player_index].score != g_PlayerExtraInfo[info.player_index].lastScore)
|
||||
{
|
||||
g_PlayerExtraInfo[info.player_index].timeOfLastScoreChange = gHUD.GetTimeOfLastUpdate();
|
||||
|
|
|
@ -145,8 +145,6 @@
|
|||
#include "../mod/AvHAlienAbilityConstants.h"
|
||||
#include "../mod/AvHNetworkMessages.h"
|
||||
#include "../mod/AvHNexusServer.h"
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "../game_shared/voice_gamemgr.h"
|
||||
extern CVoiceGameMgr g_VoiceGameMgr;
|
||||
|
@ -161,10 +159,6 @@ extern DLL_GLOBAL ULONG g_ulFrameCount;
|
|||
extern void CopyToBodyQue(entvars_t* pev);
|
||||
extern int g_teamplay;
|
||||
|
||||
|
||||
vector<int> playerReadyList;
|
||||
vector<int> marinesPlayerList;
|
||||
vector<int> aliensPlayerList;
|
||||
/*
|
||||
* used by kill command and disconnect command
|
||||
* ROBIN: Moved here from player.cpp, to allow multiple player models
|
||||
|
@ -365,64 +359,6 @@ void ClientPutInServer( edict_t *pEntity )
|
|||
pPlayer->pev->effects |= EF_NOINTERP;
|
||||
}
|
||||
|
||||
|
||||
void Player_Ready(edict_t* pEntity, bool ready) {
|
||||
AvHPlayer* theTalkingPlayer = dynamic_cast<AvHPlayer*>(CBaseEntity::Instance(pEntity));
|
||||
// Player is ready
|
||||
//if (theTalkingPlayer->GetTeam == TEAM_ONE || theTalkingPlayer->GetTeam == TEAM_TWO) {
|
||||
// if (ready) {
|
||||
// if (std::find(std::begin(playerReadyList), std::end(playerReadyList), theTalkingPlayer->entindex()) == std::end(playerReadyList)) {
|
||||
// playerReadyList.push_back(theTalkingPlayer->entindex());
|
||||
// g_engfuncs.pfnServerPrint(("ADD playerReady " + std::to_string(theTalkingPlayer->entindex())).c_str());
|
||||
|
||||
// }
|
||||
// }
|
||||
// else { // Player is not ready
|
||||
// if (std::find(std::begin(playerReadyList), std::end(playerReadyList), theTalkingPlayer->entindex()) != std::end(playerReadyList)) {
|
||||
// playerReadyList.erase(std::find(std::begin(playerReadyList), std::end(playerReadyList), theTalkingPlayer->entindex()));
|
||||
// g_engfuncs.pfnServerPrint(("REMOVE playerReady " + std::to_string(theTalkingPlayer->entindex())).c_str());
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// Loop trough all players
|
||||
//AvHPlayer* client = NULL;
|
||||
//while (((client = (AvHPlayer*)UTIL_FindEntityByClassname(client, "player")) != NULL) && (!FNullEnt(client->edict()))) {
|
||||
|
||||
// if (client->GetTeam == AvHTeamNumber::TEAM_ONE){
|
||||
// marinesPlayerList.push_back(client->entindex);
|
||||
//
|
||||
// }
|
||||
// else if (client->GetTeam == AvHTeamNumber::TEAM_TWO) {
|
||||
// aliensPlayerList.push_back(client->entindex);
|
||||
|
||||
// }
|
||||
|
||||
// // in case someone left the team remove him
|
||||
// if (std::find(std::begin(aliensPlayerList), std::end(aliensPlayerList), client->entindex) != std::end(aliensPlayerList)) {
|
||||
// aliensPlayerList.erase(std::find(std::begin(aliensPlayerList), std::end(aliensPlayerList), client->entindex));
|
||||
// }
|
||||
// if (std::find(std::begin(marinesPlayerList), std::end(marinesPlayerList), client->entindex) != std::end(marinesPlayerList)) {
|
||||
// marinesPlayerList.erase(std::find(std::begin(aliensPlayerList), std::end(aliensPlayerList), client->entindex));
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//bool allready = true;
|
||||
// check wether all players are ready
|
||||
//if (marinesPlayerList.size() >= 12) {
|
||||
// for (int i : marinesPlayerList) {
|
||||
// if (std::find(std::begin(playerReadyList), std::end(playerReadyList), i) != std::end(playerReadyList)) {
|
||||
// allready = false;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//// HOST_SAY
|
||||
// String comes in as
|
||||
// say blah blah blah
|
||||
|
@ -442,7 +378,6 @@ void Host_Say( edict_t *pEntity, int teamonly )
|
|||
const char* pcmd = CMD_ARGV(0);
|
||||
bool theTalkerInReadyRoom = theTalkingPlayer->GetInReadyRoom();
|
||||
//bool theTalkerIsObserver = (theTalkingPlayer->GetPlayMode() == PLAYMODE_OBSERVER) || (theTalkingPlayer->GetPlayMode() == PLAYMODE_AWAITINGREINFORCEMENT);
|
||||
|
||||
|
||||
// We can get a raw string now, without the "say " prepended
|
||||
if ( CMD_ARGC() == 0 )
|
||||
|
@ -460,31 +395,23 @@ void Host_Say( edict_t *pEntity, int teamonly )
|
|||
|
||||
if(GetGameRules()->GetIsTournamentMode() && !GetGameRules()->GetGameStarted())
|
||||
{
|
||||
|
||||
|
||||
if(!strcmp(CMD_ARGV(1), kReadyNotification))
|
||||
{
|
||||
//Player_Ready(pEntity, true);
|
||||
// Team is ready
|
||||
|
||||
AvHTeam* theTeam = GetGameRules()->GetTeam((AvHTeamNumber)(pEntity->v.team));
|
||||
if(theTeam && !theTeam->GetIsReady())
|
||||
{
|
||||
theTeam->SetIsReady();
|
||||
}
|
||||
|
||||
}
|
||||
else if (!strcmp(CMD_ARGV(1), kNotReadyNotification))
|
||||
{
|
||||
Player_Ready(pEntity, false);
|
||||
// Team is no longer ready
|
||||
|
||||
AvHTeam* theTeam = GetGameRules()->GetTeam((AvHTeamNumber)(pEntity->v.team));
|
||||
if(theTeam && theTeam->GetIsReady())
|
||||
{
|
||||
theTeam->SetIsReady(false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -550,8 +477,6 @@ void Host_Say( edict_t *pEntity, int teamonly )
|
|||
client = NULL;
|
||||
while ( ((client = (AvHPlayer*)UTIL_FindEntityByClassname( client, "player" )) != NULL) && (!FNullEnt(client->edict())) )
|
||||
{
|
||||
|
||||
|
||||
if ( !client->pev )
|
||||
continue;
|
||||
|
||||
|
@ -574,7 +499,6 @@ void Host_Say( edict_t *pEntity, int teamonly )
|
|||
|
||||
bool theClientInReadyRoom = client->GetInReadyRoom();
|
||||
|
||||
|
||||
if (theClientInReadyRoom != theTalkerInReadyRoom && !theClientIsHLTV)
|
||||
{
|
||||
continue;
|
||||
|
@ -920,7 +844,6 @@ void ParmsChangeLevel( void )
|
|||
|
||||
if ( pSaveData )
|
||||
pSaveData->connectionCount = BuildChangeList( pSaveData->levelList, MAX_LEVEL_CONNECTIONS );
|
||||
|
||||
}
|
||||
|
||||
void ShowMenu(entvars_s *pev, int ValidSlots, int DisplayTime, BOOL ShowLater, char Menu[500])
|
||||
|
@ -1230,12 +1153,12 @@ void ClientPrecache( void )
|
|||
PRECACHE_UNMODIFIED_GENERIC("v_wad.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("decals.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("hallwall_1.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("co_ether.wad");
|
||||
//PRECACHE_UNMODIFIED_GENERIC("co_ether.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("co_kestrel.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("co_umbra.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("ns_ayumi.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("ns_bast.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("ns_delta.wad");
|
||||
//PRECACHE_UNMODIFIED_GENERIC("ns_delta.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("ns_eclipse.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("ns_eon.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("ns_hera.wad");
|
||||
|
|
|
@ -62,11 +62,6 @@ extern void CreateInstancedBaselines ( void );
|
|||
extern int InconsistentFile( const edict_t *player, const char *filename, char *disconnect_message );
|
||||
|
||||
extern int AllowLagCompensation( void );
|
||||
extern void Player_Ready(edict_t* pEntity, bool ready);
|
||||
|
||||
extern vector<int> playerReadyList;
|
||||
extern vector<int> alienPlayersList;
|
||||
extern vector<int> marinePlayersList;
|
||||
|
||||
//extern bool AvHClientCommand( edict_t *pEntity );
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ void GameDLLInit( void )
|
|||
|
||||
#ifdef USE_NETWORK_METERING
|
||||
CVAR_REGISTER (&avh_networkdebug);
|
||||
// CVAR_REGISTER (&avh_drawinvisible);
|
||||
CVAR_REGISTER (&avh_drawinvisible);
|
||||
#endif
|
||||
|
||||
#ifdef PROFILE_BUILD
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">F:\Steam\steamapps\common\Half-Life\ns\dlls\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">.\Playtest\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest - balance disabled|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
|
@ -195,7 +195,7 @@
|
|||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>USE_NETWORK_METERING;NDEBUG;WIN32;_WINDOWS;QUIVER;VOXEL;QUAKE2;VALVE_DLL;AVH_SERVER;AVH_NO_NEXUS;USE_OLDAUTH</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;QUIVER;VOXEL;QUAKE2;VALVE_DLL;AVH_SERVER;AVH_NO_NEXUS;USE_OLDAUTH</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
|
@ -230,7 +230,7 @@
|
|||
<AdditionalLibraryDirectories>$(SolutionDir)includes\lua\lib;$(SolutionDir)particles\Release;$(SolutionDir)includes\libcurl-7.50-nossl;$(SolutionDir)includes\vgui\lib\win32_vc6;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<OutputFile>F:\Steam\steamapps\common\Half-Life\ns\dlls\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<OutputFile>C:\Program Files (x86)\Steam\steamapps\common\Half-Life\ns\dlls\$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
|
|
@ -201,7 +201,6 @@ void AvHEntityHierarchy::BuildFromTeam(const AvHTeam* inTeam, BaseEntityListType
|
|||
|
||||
mapEntity.mAngle = theBaseEntity->pev->angles[1];
|
||||
mapEntity.mTeam = (AvHTeamNumber)(theBaseEntity->pev->team);
|
||||
mapEntity.mPlayerSlot = -1;
|
||||
mapEntity.mSquadNumber = 0;
|
||||
mapEntity.mUnderAttack = theEntityIsUnderAttack ? 1 : 0;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ const int kNumStatusTypes = 15;
|
|||
class MapEntity
|
||||
{
|
||||
public:
|
||||
MapEntity(void) : mUser3(AVH_USER3_NONE), mTeam(TEAM_IND), mX(0.0f), mY(0.0f), mAngle(0.0f), mSquadNumber(0), mUnderAttack(0), mPlayerSlot(0), mEntityHealth(0) {}
|
||||
MapEntity(void) : mUser3(AVH_USER3_NONE), mTeam(TEAM_IND), mX(0.0f), mY(0.0f), mAngle(0.0f), mSquadNumber(0), mUnderAttack(0) {}
|
||||
|
||||
AvHUser3 mUser3;
|
||||
AvHTeamNumber mTeam;
|
||||
|
@ -63,8 +63,6 @@ public:
|
|||
float mAngle;
|
||||
int mSquadNumber;
|
||||
int mUnderAttack;
|
||||
int mPlayerSlot;
|
||||
int mEntityHealth;
|
||||
|
||||
bool operator==(const MapEntity& e) const
|
||||
{
|
||||
|
@ -74,8 +72,7 @@ public:
|
|||
mY == e.mY &&
|
||||
mAngle == e.mAngle &&
|
||||
mUnderAttack == e.mUnderAttack &&
|
||||
mSquadNumber == e.mSquadNumber &&
|
||||
mPlayerSlot == e.mPlayerSlot;
|
||||
mSquadNumber == e.mSquadNumber;
|
||||
}
|
||||
|
||||
bool operator!=(const MapEntity& e) const
|
||||
|
|
|
@ -722,7 +722,6 @@ void AvHHud::DrawPlayerNames()
|
|||
this->mTopDownPlayerNameMessage.SetIgnoreFadeForLifetime(true);
|
||||
|
||||
// Set the message info and draw it
|
||||
|
||||
this->mTopDownPlayerNameMessage.SetText(theEntityName);
|
||||
|
||||
// Set position
|
||||
|
@ -2957,8 +2956,6 @@ void AvHHud::RenderCommonUI()
|
|||
hud_player_info_t thePlayerInfo;
|
||||
gEngfuncs.pfnGetPlayerInfo(this->mProgressBarEntityIndex, &thePlayerInfo);
|
||||
|
||||
|
||||
|
||||
char* thePlayerName = thePlayerInfo.name;
|
||||
if(thePlayerName)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -13,7 +13,6 @@
|
|||
#include "AvHSpriteAPI.h"
|
||||
#include "AvHSprites.h"
|
||||
#include "AvHClientVariables.h"
|
||||
#include "AvHServerVariables.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
|
@ -216,8 +215,6 @@ void AvHOverviewMap::GetColorForEntity(const DrawableEntity& entity, float& outR
|
|||
entity.mUser3 == AVH_USER3_ALIENRESTOWER ||
|
||||
entity.mUser3 == AVH_USER3_ADVANCED_TURRET_FACTORY;
|
||||
|
||||
|
||||
|
||||
if ( entity.mIsUnderAttack && (entity.mTeam == mTeam || gEngfuncs.IsSpectateOnly() ) ) {
|
||||
if ( gpGlobals && (gpGlobals->time > this->mBlinkTime + attackBlinkPeriod) ) {
|
||||
this->mBlinkOn=!mBlinkOn;
|
||||
|
@ -231,106 +228,30 @@ void AvHOverviewMap::GetColorForEntity(const DrawableEntity& entity, float& outR
|
|||
}
|
||||
}
|
||||
|
||||
if (entity.mUser3 == AVH_USER3_WAYPOINT) {
|
||||
outR = 0.1;
|
||||
outG = 0.8;
|
||||
if (entity.mUser3 == AVH_USER3_WAYPOINT) {
|
||||
outR = 0.1;
|
||||
outG = 0.8;
|
||||
outB = 1.0;
|
||||
}
|
||||
else if (entity.mUser3 == AVH_USER3_WELD) {
|
||||
outR = 1.0;
|
||||
outG = 0.7;
|
||||
outB = 0.3;
|
||||
}
|
||||
else if (entity.mUser3 == AVH_USER3_MINE) {
|
||||
else if (entity.mUser3 == AVH_USER3_WELD) {
|
||||
outR = 1.0;
|
||||
outG = 0.7;
|
||||
outB = 0.3;
|
||||
}
|
||||
else if ( entity.mUser3 == AVH_USER3_MINE ) {
|
||||
outR = 0.05;
|
||||
outG = 0.44;
|
||||
outG = 0.44;
|
||||
outB = 0.61;
|
||||
}
|
||||
else if (entity.mTeam == TEAM_IND) {
|
||||
else if (entity.mTeam == TEAM_IND) {
|
||||
outR = 0.5;
|
||||
outG = 0.5;
|
||||
outB = 0.5;
|
||||
}
|
||||
}
|
||||
else if (entity.mTeam == mTeam && !isStructure) {
|
||||
|
||||
|
||||
cl_entity_s* theEntity = gEngfuncs.GetEntityByIndex(entity.mEntityNumber);
|
||||
thePlayerId = theEntity->curstate.number;
|
||||
string test = to_string(entity.mPlayerSlot) + '\n';
|
||||
//ConsolePrint(test.c_str());
|
||||
if (gHUD.GetServerVariableFloat(kvTournamentMode)) {
|
||||
switch (entity.mTeam) {
|
||||
case 1:
|
||||
if (std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId) == std::end(players_marine_team)) {
|
||||
players_marine_team.push_back(thePlayerId);
|
||||
players_marine_team.sort();
|
||||
}
|
||||
else if (std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId) != std::end(players_alien_team)) {
|
||||
players_alien_team.erase(std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId));
|
||||
players_alien_team.sort();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId) == std::end(players_alien_team)) {
|
||||
players_alien_team.push_back(thePlayerId);
|
||||
players_alien_team.sort();
|
||||
}
|
||||
else if (std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId) != std::end(players_marine_team)) {
|
||||
players_marine_team.erase(std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId));
|
||||
players_marine_team.sort();
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId) != std::end(players_alien_team)) {
|
||||
players_alien_team.erase(std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId));
|
||||
players_alien_team.sort();
|
||||
}
|
||||
else if (std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId) != std::end(players_marine_team)) {
|
||||
players_marine_team.erase(std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId));
|
||||
players_marine_team.sort();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
string debug_string = "";
|
||||
switch (entity.mTeam) {
|
||||
case 1:
|
||||
m_pColorIndex = std::distance(std::begin(players_marine_team), std::find(std::begin(players_marine_team), std::end(players_marine_team), thePlayerId));
|
||||
m_pColorIndex = m_pColorIndex % player_colors.size();
|
||||
outR = player_colors[m_pColorIndex][0] / 255.0;
|
||||
outG = player_colors[m_pColorIndex][1] / 255.0;
|
||||
outB = player_colors[m_pColorIndex][2] / 250.0;
|
||||
|
||||
//debug_string = "Team: " + to_string(entity.mTeam) + " AltTeam: " + to_string(mTeam) + " PlayerId: " + to_string(thePlayerId) + " Color: " + to_string(player_colors[m_pColorIndex][0]) + " " + to_string(player_colors[m_pColorIndex][1]) + " " + to_string(player_colors[m_pColorIndex][2]) + "\n";
|
||||
//ConsolePrint(debug_string.c_str());
|
||||
break;
|
||||
case 2:
|
||||
m_pColorIndex = std::distance(std::begin(players_alien_team), std::find(std::begin(players_alien_team), std::end(players_alien_team), thePlayerId));
|
||||
m_pColorIndex = m_pColorIndex % player_colors.size();
|
||||
outR = player_colors[m_pColorIndex][0] / 255.0;
|
||||
outG = player_colors[m_pColorIndex][1] / 255.0;
|
||||
outB = player_colors[m_pColorIndex][2] / 255.0;
|
||||
break;
|
||||
default:
|
||||
outR = 1.0;
|
||||
outG = 1.0;
|
||||
outB = 1.0;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
outR = 1.0;
|
||||
outG = 1.0;
|
||||
outB = 1.0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
outR = 1.0;
|
||||
outG = 1.0;
|
||||
outB = 1.0;
|
||||
|
||||
int localPlayerSquad;
|
||||
|
||||
|
@ -343,7 +264,7 @@ void AvHOverviewMap::GetColorForEntity(const DrawableEntity& entity, float& outR
|
|||
localPlayerSquad = 0;
|
||||
}
|
||||
|
||||
/*if (mUser3 != AVH_USER3_COMMANDER_PLAYER) {
|
||||
if (mUser3 != AVH_USER3_COMMANDER_PLAYER) {
|
||||
if (entity.mIsLocalPlayer ) {
|
||||
outR = 0.0;
|
||||
outG = 1.0;
|
||||
|
@ -354,85 +275,51 @@ void AvHOverviewMap::GetColorForEntity(const DrawableEntity& entity, float& outR
|
|||
outG = 1.0;
|
||||
outB = 0.0;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else {
|
||||
/* if (entity.mTeam == TEAM_ONE) {
|
||||
outR = 0.33;
|
||||
outG = 0.95;
|
||||
outB = 1.0;
|
||||
}
|
||||
else if (entity.mTeam == TEAM_TWO) {
|
||||
if (entity.mUser3 == AVH_USER3_UNKNOWN) {
|
||||
outR = 1.0;
|
||||
outG = 0.72;
|
||||
outB = 0.0;
|
||||
}
|
||||
else {
|
||||
if ( entity.mTeam == TEAM_ONE ) {
|
||||
outR=0.33;
|
||||
outG=0.95;
|
||||
outB=1.0;
|
||||
}
|
||||
else if ( entity.mTeam == TEAM_TWO ) {
|
||||
if ( entity.mUser3 == AVH_USER3_UNKNOWN ) {
|
||||
outR=1.0;
|
||||
outG=0.72;
|
||||
outB=0.0;
|
||||
}
|
||||
else {
|
||||
outR = 1.0;
|
||||
outG = 0.85;
|
||||
outB = 0.0;
|
||||
outR=1.0;
|
||||
outG=0.85;
|
||||
outB=0.0;
|
||||
}
|
||||
}
|
||||
else if (entity.mTeam == TEAM_THREE) {
|
||||
outR = 0.92;
|
||||
outG = 0.1;
|
||||
outB = 0.47;
|
||||
else if ( entity.mTeam == TEAM_THREE ) {
|
||||
outR=0.92;
|
||||
outG=0.1;
|
||||
outB=0.47;
|
||||
}
|
||||
else if (entity.mTeam == TEAM_FOUR) {
|
||||
outR = 0.65;
|
||||
outG = 0.92;
|
||||
outB = 0.0;
|
||||
else if ( entity.mTeam == TEAM_FOUR ) {
|
||||
outR=0.65;
|
||||
outG=0.92;
|
||||
outB=0.0;
|
||||
}
|
||||
else {
|
||||
outR = 0.0;
|
||||
outG = 0.0;
|
||||
outB = 0.0;
|
||||
}*/
|
||||
if (isStructure) {
|
||||
cl_entity_s* theStructEntity = gEngfuncs.GetEntityByIndex(entity.mEntityNumber);
|
||||
int health = theStructEntity->curstate.health;
|
||||
int solid = theStructEntity->curstate.solid;
|
||||
int f1 = theStructEntity->curstate.fuser1;
|
||||
int f2 = theStructEntity->curstate.fuser2;
|
||||
int f3 = theStructEntity->curstate.fuser3;
|
||||
int f4 = theStructEntity->curstate.fuser4;
|
||||
//ConsolePrint("--------------------------------\n");
|
||||
//ConsolePrint(("ENTITY ID : " + to_string(entity.mEntityNumber)).c_str());
|
||||
//ConsolePrint("--------------------------------\n");
|
||||
//ConsolePrint(("health " +to_string(health)+"\n").c_str());
|
||||
//ConsolePrint(("solid " + to_string(solid) + "\n").c_str());
|
||||
//ConsolePrint(("f1 " + to_string(f1) + "\n").c_str());
|
||||
//ConsolePrint(("f2 " + to_string(f2) + "\n").c_str());
|
||||
//ConsolePrint(("f3 " + to_string(f4) + "\n").c_str());
|
||||
//ConsolePrint(("f4 " + to_string(f4) + "\n").c_str());
|
||||
//ConsolePrint("--------------------------------\n");
|
||||
|
||||
|
||||
if (entity.mTeam == TEAM_ONE) {
|
||||
if (f1 == 1000) {
|
||||
outR = 0.43; //110
|
||||
outG = 0.70; //180
|
||||
outB = 1.0; //255
|
||||
}
|
||||
else {
|
||||
outR = 200.0/255.0; //110
|
||||
outG = 200.0/255.0; //180
|
||||
outB = 255; //255
|
||||
}
|
||||
outR=0.0;
|
||||
outG=0.0;
|
||||
outB=0.0;
|
||||
}
|
||||
if ( isStructure ) {
|
||||
if ( entity.mTeam == TEAM_ONE ) {
|
||||
outR=0.43;
|
||||
outG=0.70;
|
||||
outB=1.0;
|
||||
}
|
||||
else if (entity.mTeam == TEAM_TWO) {
|
||||
if (f1 == 1000) {
|
||||
outR = 0.88;
|
||||
outG = 0.45;
|
||||
outB = 0.00;
|
||||
}
|
||||
else {
|
||||
outR = 255.0 / 255.0; //110
|
||||
outG = 200.0 / 255.0; //180
|
||||
outB = 200.0; //255
|
||||
}
|
||||
|
||||
else if ( entity.mTeam == TEAM_TWO ) {
|
||||
outR=0.88;
|
||||
outG=0.45;
|
||||
outB=0.00;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -483,7 +370,7 @@ void AvHOverviewMap::DrawMiniMapEntity(const DrawInfo& inDrawInfo, const Drawabl
|
|||
|
||||
bool isPlayer = inEntity.mUser3 == AVH_USER3_MARINE_PLAYER || inEntity.mUser3 == AVH_USER3_HEAVY; //heavy used for player in minimap system
|
||||
bool theIsWaypoint = inEntity.mUser3 == AVH_USER3_WAYPOINT;
|
||||
|
||||
|
||||
float w = theSprWidth * scale;
|
||||
float h = theSprHeight * scale;
|
||||
|
||||
|
@ -537,8 +424,6 @@ void AvHOverviewMap::DrawMiniMapEntity(const DrawInfo& inDrawInfo, const Drawabl
|
|||
AvHSpriteSetRenderMode(kRenderTransAdd);
|
||||
AvHSpriteDraw(theSprite, theFrame, x2, y2, x2 + w2, y2 + h2, 0, 0, 1, 1);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (mUser3 != AVH_USER3_COMMANDER_PLAYER)
|
||||
|
@ -553,7 +438,6 @@ void AvHOverviewMap::DrawMiniMapEntity(const DrawInfo& inDrawInfo, const Drawabl
|
|||
AvHSpriteSetColor(r, g, b);
|
||||
AvHSpriteSetRenderMode(theRenderMode);
|
||||
AvHSpriteDraw(theSprite, theFrame, x, y, x + w, y + h, 0, 0, 1, 1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -847,7 +731,6 @@ void AvHOverviewMap::Draw(const DrawInfo& inDrawInfo)
|
|||
DrawableEntityListType attackedPlayers;
|
||||
DrawableEntityListType players;
|
||||
|
||||
|
||||
for (DrawableEntityListType::const_iterator theIter = this->mDrawableEntityList.begin(); theIter != this->mDrawableEntityList.end(); theIter++)
|
||||
{
|
||||
if ( (*theIter).mUser3 > AVH_USER3_NONE && (*theIter).mUser3 <= AVH_USER3_ALIEN_EMBRYO ) {
|
||||
|
@ -870,7 +753,6 @@ void AvHOverviewMap::Draw(const DrawInfo& inDrawInfo)
|
|||
for (DrawableEntityListType::const_iterator theIter = players.begin(); theIter != players.end(); theIter++)
|
||||
{
|
||||
DrawMiniMapEntity(inDrawInfo, *theIter);
|
||||
|
||||
}
|
||||
|
||||
for (DrawableEntityListType::const_iterator theIter = attackedPlayers.begin(); theIter != attackedPlayers.end(); theIter++)
|
||||
|
@ -1019,7 +901,7 @@ void AvHOverviewMap::UpdateDrawData(float inCurrentTime)
|
|||
{
|
||||
theLocalPlayerIndex = g_iUser2;
|
||||
}
|
||||
|
||||
|
||||
cl_entity_s* thePlayer = gEngfuncs.GetEntityByIndex(theLocalPlayerIndex);
|
||||
mTeam = (AvHTeamNumber)(thePlayer->curstate.team);
|
||||
|
||||
|
@ -1047,9 +929,7 @@ void AvHOverviewMap::UpdateDrawData(float inCurrentTime)
|
|||
theDrawableEntity.mAngleRadians = theIter->second.mAngle * M_PI / 180;
|
||||
theDrawableEntity.mSquadNumber = theIter->second.mSquadNumber;
|
||||
theDrawableEntity.mIsUnderAttack = theIter->second.mUnderAttack;
|
||||
theDrawableEntity.mPlayerSlot = theIter->first;
|
||||
theDrawableEntity.mHealth = theIter->second.mEntityHealth;
|
||||
|
||||
|
||||
// Returns position relative to minimap, so add it back in
|
||||
// commented this out here, commented out corresponding shift in AvHEntityHierarchy::BuildFromTeam at line 234
|
||||
// theDrawableEntity.mX += this->mMapExtents.GetMinMapX();
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
#include "AvHEntityHierarchy.h"
|
||||
#include "AvHMapExtents.h"
|
||||
#include "AvHOrder.h"
|
||||
#include <list>
|
||||
|
||||
class DrawableEntity
|
||||
{
|
||||
public:
|
||||
DrawableEntity() : mUser3(AVH_USER3_NONE), mIsAlive(true), mX(0), mY(0), mAngleRadians(0), mIsLocalPlayer(false), mEntityNumber(0), mTeam(TEAM_IND), mSquadNumber(0), mIsUnderAttack(0), mPlayerSlot(0), mHealth(0)
|
||||
DrawableEntity() : mUser3(AVH_USER3_NONE), mIsAlive(true), mX(0), mY(0), mAngleRadians(0), mIsLocalPlayer(false), mEntityNumber(0), mTeam(TEAM_IND), mSquadNumber(0), mIsUnderAttack(0)
|
||||
{}
|
||||
|
||||
AvHUser3 mUser3;
|
||||
|
@ -22,8 +21,6 @@ public:
|
|||
bool mIsLocalPlayer;
|
||||
int mEntityNumber;
|
||||
int mSquadNumber;
|
||||
int mPlayerSlot; // todo currently mEntityNumber is used which is not necessarily equal to the PlayerSlot
|
||||
int mHealth; //todo
|
||||
};
|
||||
|
||||
class AvHOverviewMap
|
||||
|
@ -47,17 +44,6 @@ public:
|
|||
bool mFullScreen;
|
||||
bool mCommander;
|
||||
};
|
||||
|
||||
std::vector<std::vector<int>> player_colors = {
|
||||
// {255,0,0}, {0,255,0}, {0,0,255}, {2,181,160}, {249, 175,31}, {0,0,0}, {118,122,121}
|
||||
// {255,192,203}, {0,255,0}, {0,0,255}, {2,181,160}, {249, 175,31}, {255,255,255}
|
||||
// {154,5,102},{199,131,7},{17,59,132},{136,188,6},{203,203,203},{0,0,0,0}
|
||||
{191,23,170},{255,148,31},{28,136,177},{203,247,30},{203,203,203},{0,0,0,0}
|
||||
};
|
||||
std::list<int> players_marine_team;
|
||||
std::list<int> players_alien_team;
|
||||
int m_pColorIndex = -1;
|
||||
int thePlayerId = -1;
|
||||
AvHOverviewMap();
|
||||
|
||||
void Clear();
|
||||
|
|
|
@ -269,7 +269,7 @@ extern int gNumFullPackCalls;
|
|||
extern int gWeaponAnimationEventID;
|
||||
extern int gMetabolizeSuccessEventID;
|
||||
extern int gPhaseInEventID;
|
||||
extern bool mIsReady; // for tournamentmode, if player is ready
|
||||
|
||||
// Yucky globals
|
||||
extern AvHParticleTemplateListServer gParticleTemplateList;
|
||||
extern AvHSoundListManager gSoundListManager;
|
||||
|
@ -298,14 +298,6 @@ AvHPlayer::AvHPlayer()
|
|||
this->InitBalanceVariables();
|
||||
}
|
||||
|
||||
void AvHPlayer::setReady(bool ready) {
|
||||
mIsReady = ready;
|
||||
}
|
||||
|
||||
bool AvHPlayer::getReadyStatus() {
|
||||
return mIsReady;
|
||||
}
|
||||
|
||||
void AvHPlayer::AddDebugEnemyBlip(float inX, float inY, float inZ)
|
||||
{
|
||||
this->mEnemyBlips.AddBlip(inX, inY, inZ);
|
||||
|
|
|
@ -603,9 +603,6 @@ private:
|
|||
void balanceValueRemoved(const string& name, const int old_value) const;
|
||||
void balanceValueRemoved(const string& name, const string& old_value) const;
|
||||
|
||||
void setReady(bool ready);
|
||||
bool getReadyStatus();
|
||||
|
||||
float mResources;
|
||||
|
||||
bool mFirstUpdate;
|
||||
|
@ -851,8 +848,6 @@ private:
|
|||
int mNumSensory;
|
||||
int mNumDefense;
|
||||
|
||||
bool mIsReady; // for tournamentmode, if player is ready
|
||||
|
||||
struct ServerVariable
|
||||
{
|
||||
const cvar_t* mCvar;
|
||||
|
|
|
@ -52,12 +52,10 @@ void NetworkMeterMessageBegin(int msg_dest, int msg_type, const float* pOrigin,
|
|||
if(ns_cvar_float(&avh_networkdebug) > 0)
|
||||
networkDebug=true;
|
||||
#endif
|
||||
networkDebug = true;
|
||||
if(networkDebug)
|
||||
{
|
||||
char theDebugString[512];
|
||||
sprintf(theDebugString, "MessageBegin(%d, %d...)\n", msg_dest, msg_type);
|
||||
UTIL_LogPrintf(theDebugString, "MessageBegin(%d, %d...)\n", msg_dest, msg_type);
|
||||
ALERT(at_logged, theDebugString);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue