Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Team Fortress Classic remnants #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions cl_dll/StudioModelRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,8 @@
#include "StudioModelRenderer.h"
#include "GameStudioModelRenderer.h"

extern cvar_t* tfc_newmodels;

extern extra_player_info_t g_PlayerExtraInfo[MAX_PLAYERS_HUD + 1];

// team colors for old TFC models
#define TEAM1_COLOR 150
#define TEAM2_COLOR 250
#define TEAM3_COLOR 45
#define TEAM4_COLOR 100

int m_nPlayerGaitSequences[MAX_PLAYERS];

// Global engine <-> studio model rendering code interface
Expand Down
15 changes: 4 additions & 11 deletions cl_dll/entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,26 +325,19 @@ void DLLEXPORT HUD_StudioEvent(const struct mstudioevent_s* event, const struct
{
// RecClStudioEvent(event, entity);

bool iMuzzleFlash = true;


switch (event->event)
{
case 5001:
if (iMuzzleFlash)
gEngfuncs.pEfxAPI->R_MuzzleFlash((float*)&entity->attachment[0], atoi(event->options));
gEngfuncs.pEfxAPI->R_MuzzleFlash((float*)&entity->attachment[0], atoi(event->options));
break;
case 5011:
if (iMuzzleFlash)
gEngfuncs.pEfxAPI->R_MuzzleFlash((float*)&entity->attachment[1], atoi(event->options));
gEngfuncs.pEfxAPI->R_MuzzleFlash((float*)&entity->attachment[1], atoi(event->options));
break;
case 5021:
if (iMuzzleFlash)
gEngfuncs.pEfxAPI->R_MuzzleFlash((float*)&entity->attachment[2], atoi(event->options));
gEngfuncs.pEfxAPI->R_MuzzleFlash((float*)&entity->attachment[2], atoi(event->options));
break;
case 5031:
if (iMuzzleFlash)
gEngfuncs.pEfxAPI->R_MuzzleFlash((float*)&entity->attachment[3], atoi(event->options));
gEngfuncs.pEfxAPI->R_MuzzleFlash((float*)&entity->attachment[3], atoi(event->options));
break;
case 5002:
gEngfuncs.pEfxAPI->R_SparkEffect((float*)&entity->attachment[0], atoi(event->options), -100, 100);
Expand Down
5 changes: 0 additions & 5 deletions cl_dll/ev_hldm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,8 +1671,3 @@ void EV_VehiclePitchAdjust(event_args_t* args)
gEngfuncs.pEventAPI->EV_PlaySound(idx, origin, CHAN_STATIC, sz, m_flVolume, ATTN_NORM, SND_CHANGE_PITCH, pitch);
}
}

bool EV_TFC_IsAllyTeam(int iTeam1, int iTeam2)
{
return false;
}
6 changes: 1 addition & 5 deletions cl_dll/health.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ int giDmgFlags[NUM_DMG_TYPES] =
DMG_BURN | DMG_SLOWBURN,
DMG_NERVEGAS,
DMG_RADIATION,
DMG_SHOCK,
DMG_CALTROP,
DMG_TRANQ,
DMG_CONCUSS,
DMG_HALLUC};
DMG_SHOCK};

bool CHudHealth::Init()
{
Expand Down
26 changes: 12 additions & 14 deletions cl_dll/health.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,18 @@

#define DMG_IMAGE_LIFE 2 // seconds that image is up

#define DMG_IMAGE_POISON 0
#define DMG_IMAGE_ACID 1
#define DMG_IMAGE_COLD 2
#define DMG_IMAGE_DROWN 3
#define DMG_IMAGE_BURN 4
#define DMG_IMAGE_NERVE 5
#define DMG_IMAGE_RAD 6
#define DMG_IMAGE_SHOCK 7
//tf defines
#define DMG_IMAGE_CALTROP 8
#define DMG_IMAGE_TRANQ 9
#define DMG_IMAGE_CONCUSS 10
#define DMG_IMAGE_HALLUC 11
#define NUM_DMG_TYPES 12
enum
{
DMG_IMAGE_POISON = 0,
DMG_IMAGE_ACID,
DMG_IMAGE_COLD,
DMG_IMAGE_DROWN,
DMG_IMAGE_BURN,
DMG_IMAGE_NERVE,
DMG_IMAGE_RAD,
DMG_IMAGE_SHOCK,
NUM_DMG_TYPES,
};
// instant damage

typedef struct
Expand Down
5 changes: 2 additions & 3 deletions cl_dll/hl/hl_weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,7 @@ void HUD_WeaponsPostThink(local_state_s* from, local_state_s* to, usercmd_t* cmd

// Don't go firing anything if we have died or are spectating
// Or if we don't have a weapon model deployed
if ((player.pev->deadflag != (DEAD_DISCARDBODY + 1)) &&
!CL_IsDead() && 0 != player.pev->viewmodel && 0 == g_iUser1)
if (!CL_IsDead() && 0 != player.pev->viewmodel && 0 == g_iUser1)
{
if (player.m_flNextAttack <= 0)
{
Expand All @@ -716,7 +715,7 @@ void HUD_WeaponsPostThink(local_state_s* from, local_state_s* to, usercmd_t* cmd
to->client.m_iId = from->client.m_iId;

// Now see if we issued a changeweapon command ( and we're not dead )
if (0 != cmd->weaponselect && (player.pev->deadflag != (DEAD_DISCARDBODY + 1)))
if (0 != cmd->weaponselect)
{
// Switched to a different weapon?
if (from->weapondata[cmd->weaponselect].m_iId == cmd->weaponselect)
Expand Down
58 changes: 0 additions & 58 deletions cl_dll/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@ int __MsgFunc_SetFOV(const char* pszName, int iSize, void* pbuf)
return static_cast<int>(gHUD.MsgFunc_SetFOV(pszName, iSize, pbuf));
}

int __MsgFunc_Concuss(const char* pszName, int iSize, void* pbuf)
{
return static_cast<int>(gHUD.MsgFunc_Concuss(pszName, iSize, pbuf));
}

int __MsgFunc_Weapons(const char* pszName, int iSize, void* pbuf)
{
return static_cast<int>(gHUD.MsgFunc_Weapons(pszName, iSize, pbuf));
Expand All @@ -142,15 +137,6 @@ void __CmdFunc_OpenCommandMenu()
}
}

// TFC "special" command
void __CmdFunc_InputPlayerSpecial()
{
if (gViewPort)
{
gViewPort->InputPlayerSpecial();
}
}

void __CmdFunc_CloseCommandMenu()
{
if (gViewPort)
Expand Down Expand Up @@ -182,20 +168,6 @@ int __MsgFunc_TeamNames(const char* pszName, int iSize, void* pbuf)
return 0;
}

int __MsgFunc_Feign(const char* pszName, int iSize, void* pbuf)
{
if (gViewPort)
return static_cast<int>(gViewPort->MsgFunc_Feign(pszName, iSize, pbuf));
return 0;
}

int __MsgFunc_Detpack(const char* pszName, int iSize, void* pbuf)
{
if (gViewPort)
return static_cast<int>(gViewPort->MsgFunc_Detpack(pszName, iSize, pbuf));
return 0;
}

int __MsgFunc_VGUIMenu(const char* pszName, int iSize, void* pbuf)
{
if (gViewPort)
Expand All @@ -210,13 +182,6 @@ int __MsgFunc_MOTD(const char* pszName, int iSize, void* pbuf)
return 0;
}

int __MsgFunc_BuildSt(const char* pszName, int iSize, void* pbuf)
{
if (gViewPort)
return static_cast<int>(gViewPort->MsgFunc_BuildSt(pszName, iSize, pbuf));
return 0;
}

int __MsgFunc_RandomPC(const char* pszName, int iSize, void* pbuf)
{
if (gViewPort)
Expand Down Expand Up @@ -259,20 +224,6 @@ int __MsgFunc_Spectator(const char* pszName, int iSize, void* pbuf)
return 0;
}

int __MsgFunc_SpecFade(const char* pszName, int iSize, void* pbuf)
{
if (gViewPort)
return static_cast<int>(gViewPort->MsgFunc_SpecFade(pszName, iSize, pbuf));
return 0;
}

int __MsgFunc_ResetFade(const char* pszName, int iSize, void* pbuf)
{
if (gViewPort)
return static_cast<int>(gViewPort->MsgFunc_ResetFade(pszName, iSize, pbuf));
return 0;
}

int __MsgFunc_AllowSpec(const char* pszName, int iSize, void* pbuf)
{
if (gViewPort)
Expand All @@ -289,21 +240,16 @@ void CHud::Init()
HOOK_MESSAGE(InitHUD);
HOOK_MESSAGE(ViewMode);
HOOK_MESSAGE(SetFOV);
HOOK_MESSAGE(Concuss);
HOOK_MESSAGE(Weapons);

// TFFree CommandMenu
HOOK_COMMAND("+commandmenu", OpenCommandMenu);
HOOK_COMMAND("-commandmenu", CloseCommandMenu);
HOOK_COMMAND("ForceCloseCommandMenu", ForceCloseCommandMenu);
HOOK_COMMAND("special", InputPlayerSpecial);

HOOK_MESSAGE(ValClass);
HOOK_MESSAGE(TeamNames);
HOOK_MESSAGE(Feign);
HOOK_MESSAGE(Detpack);
HOOK_MESSAGE(MOTD);
HOOK_MESSAGE(BuildSt);
HOOK_MESSAGE(RandomPC);
HOOK_MESSAGE(ServerName);
HOOK_MESSAGE(ScoreInfo);
Expand All @@ -313,16 +259,12 @@ void CHud::Init()
HOOK_MESSAGE(Spectator);
HOOK_MESSAGE(AllowSpec);

HOOK_MESSAGE(SpecFade);
HOOK_MESSAGE(ResetFade);

// VGUI Menus
HOOK_MESSAGE(VGUIMenu);

CVAR_CREATE("hud_classautokill", "1", FCVAR_ARCHIVE | FCVAR_USERINFO); // controls whether or not to suicide immediately on TF class switch
CVAR_CREATE("hud_takesshots", "0", FCVAR_ARCHIVE); // controls whether or not to automatically take screenshots at the end of a round


m_iLogo = 0;
m_iFOV = 0;

Expand Down
2 changes: 0 additions & 2 deletions cl_dll/hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ class CHud
int m_iSpriteCount;
int m_iSpriteCountAllRes;
float m_flMouseSensitivity;
int m_iConcussionEffect;

public:
HSPRITE m_hsprCursor;
Expand Down Expand Up @@ -590,7 +589,6 @@ class CHud
void MsgFunc_InitHUD(const char* pszName, int iSize, void* pbuf);
void MsgFunc_ViewMode(const char* pszName, int iSize, void* pbuf);
bool MsgFunc_SetFOV(const char* pszName, int iSize, void* pbuf);
bool MsgFunc_Concuss(const char* pszName, int iSize, void* pbuf);
bool MsgFunc_Weapons(const char* pszName, int iSize, void* pbuf);

// Screen information
Expand Down
18 changes: 0 additions & 18 deletions cl_dll/hud_msg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ bool CHud::MsgFunc_ResetHUD(const char* pszName, int iSize, void* pbuf)
// reset sensitivity
m_flMouseSensitivity = 0;

// reset concussion effect
m_iConcussionEffect = 0;

return true;
}

Expand Down Expand Up @@ -130,21 +127,6 @@ bool CHud::MsgFunc_Damage(const char* pszName, int iSize, void* pbuf)
return true;
}

bool CHud::MsgFunc_Concuss(const char* pszName, int iSize, void* pbuf)
{
BEGIN_READ(pbuf, iSize);
m_iConcussionEffect = READ_BYTE();
if (0 != m_iConcussionEffect)
{
int r, g, b;
UnpackRGB(r, g, b, RGB_YELLOWISH);
this->m_StatusIcons.EnableIcon("dmg_concuss", r, g, b);
}
else
this->m_StatusIcons.DisableIcon("dmg_concuss");
return true;
}

bool CHud::MsgFunc_Weapons(const char* pszName, int iSize, void* pbuf)
{
BEGIN_READ(pbuf, iSize);
Expand Down
4 changes: 0 additions & 4 deletions cl_dll/hud_spectator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,6 @@ void CHudSpectator::FindNextPlayer(bool bReverse)
}

iJumpSpectator = true;
gViewPort->MsgFunc_ResetFade(NULL, 0, NULL);
}


Expand Down Expand Up @@ -1004,7 +1003,6 @@ void CHudSpectator::FindPlayer(const char* name)
}

iJumpSpectator = true;
gViewPort->MsgFunc_ResetFade(NULL, 0, NULL);
}

void CHudSpectator::HandleButtonsDown(int ButtonPressed)
Expand Down Expand Up @@ -1220,8 +1218,6 @@ void CHudSpectator::SetModes(int iNewMainMode, int iNewInsetMode)
SetCrosshair(0, m_crosshairRect, 0, 0, 0);
}

gViewPort->MsgFunc_ResetFade(NULL, 0, NULL);

char string[128];
sprintf(string, "#Spec_Mode%d", g_iUser1);
sprintf(string, "%c%s", HUD_PRINTCENTER, CHudTextMessage::BufferedLocaliseTextString(string));
Expand Down
3 changes: 0 additions & 3 deletions cl_dll/hud_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
int CL_ButtonBits(bool);
void CL_ResetButtonBits(int bits);

extern float v_idlescale;
float in_fov;
extern void HUD_SetCmdBits(int bits);

Expand All @@ -43,8 +42,6 @@ bool CHud::UpdateClientData(client_data_t* cdata, float time)

cdata->fov = m_iFOV;

v_idlescale = m_iConcussionEffect;

CL_ResetButtonBits(m_iKeyBits);

// return 1 if in anything in the client_data struct has been changed, 0 otherwise
Expand Down
5 changes: 0 additions & 5 deletions cl_dll/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,9 @@ void IN_SpeedUp() { KeyUp(&in_speed); }
void IN_StrafeDown() { KeyDown(&in_strafe); }
void IN_StrafeUp() { KeyUp(&in_strafe); }

// needs capture by hud/vgui also
extern void __CmdFunc_InputPlayerSpecial();

void IN_Attack2Down()
{
KeyDown(&in_attack2);


gHUD.m_Spectator.HandleButtonsDown(IN_ATTACK2);
}

Expand Down
Loading