Skip to content
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
6 changes: 2 additions & 4 deletions src/game/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,7 @@ set(UNITY_SOURCE_NEO_SHARED
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_penetration_resistance.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_player_shared.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_player_spawnpoint.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_playeranimstate.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_predicted_viewmodel.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_predicted_viewmodel_muzzleflash.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_shot_manipulator.cpp
Expand Down Expand Up @@ -1789,6 +1790,7 @@ target_sources_grouped(
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_penetration_resistance.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_player_shared.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_player_spawnpoint.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_playeranimstate.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_predicted_viewmodel.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_predicted_viewmodel_muzzleflash.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_shot_manipulator.h
Expand Down Expand Up @@ -1898,14 +1900,11 @@ target_sources_grouped(
TARGET client
NAME "Source Files\\Shared\\Multiplayer"
FILES
${CMAKE_SOURCE_DIR}/game/shared/Multiplayer/multiplayer_animstate.cpp
${CMAKE_SOURCE_DIR}/game/shared/Multiplayer/multiplayer_animstate.h
)

set(UNITY_SOURCE_HL2MP
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_gamerules.cpp
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_player_shared.cpp
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_playeranimstate.cpp
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_weapon_parse.cpp
hl2mp/c_hl2mp_player.cpp
hl2mp/c_te_hl2mp_shotgun_shot.cpp
Expand All @@ -1923,7 +1922,6 @@ target_sources_grouped(
FILES
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_gamerules.h
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_player_shared.h
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_playeranimstate.h
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_weapon_parse.h
hl2mp/c_hl2mp_player.h
hl2mp/clientmode_hl2mpnormal.h
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/hl2mp/c_hl2mp_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ C_HL2MP_Player::C_HL2MP_Player() : m_PlayerAnimState( this ), m_iv_angEyeAngles(
m_EntClientFlags |= ENTCLIENTFLAG_DONTUSEIK;
#endif
#ifdef NEO
m_PlayerAnimState = CreateHL2MPPlayerAnimState( this );
m_PlayerAnimState = CreateNEOPlayerAnimState( this );
#endif

m_blinkTimer.Invalidate();
Expand Down
6 changes: 4 additions & 2 deletions src/game/client/hl2mp/c_hl2mp_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#define HL2MP_PLAYER_H
#pragma once

#include "hl2mp_playeranimstate.h"
#ifdef NEO
#include "neo_playeranimstate.h"
Comment thread
sunzenshen marked this conversation as resolved.
#endif
#include "c_basehlplayer.h"
#include "hl2mp_player_shared.h"
#include "beamdraw.h"
Expand Down Expand Up @@ -145,7 +147,7 @@ class C_HL2MP_Player : public C_BaseHLPlayer

C_HL2MP_Player( const C_HL2MP_Player & );
#ifdef NEO
CHL2MPPlayerAnimState *m_PlayerAnimState;
CNEOPlayerAnimState *m_PlayerAnimState;
#else
CPlayerAnimState m_PlayerAnimState;
#endif
Expand Down
6 changes: 2 additions & 4 deletions src/game/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,7 @@ set(UNITY_SOURCE_NEO_SHARED
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_penetration_resistance.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_player_shared.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_player_spawnpoint.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_playeranimstate.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_predicted_viewmodel.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_predicted_viewmodel_muzzleflash.cpp
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_shot_manipulator.cpp
Expand Down Expand Up @@ -1480,6 +1481,7 @@ target_sources_grouped(
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_penetration_resistance.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_player_shared.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_player_spawnpoint.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_playeranimstate.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_predicted_viewmodel.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_predicted_viewmodel_muzzleflash.h
${CMAKE_SOURCE_DIR}/game/shared/neo/neo_shot_manipulator.h
Expand Down Expand Up @@ -1740,14 +1742,11 @@ target_sources_grouped(
TARGET server
NAME "Source Files\\Shared\\Multiplayer"
FILES
${CMAKE_SOURCE_DIR}/game/shared/Multiplayer/multiplayer_animstate.cpp
${CMAKE_SOURCE_DIR}/game/shared/Multiplayer/multiplayer_animstate.h
)

set(UNITY_SOURCE_HL2MP
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_gamerules.cpp
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_player_shared.cpp
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_playeranimstate.cpp
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_weapon_parse.cpp
hl2mp/hl2mp_client.cpp
hl2mp/hl2mp_cvars.cpp
Expand All @@ -1766,7 +1765,6 @@ target_sources_grouped(
FILES
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_gamerules.h
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_player_shared.h
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_playeranimstate.h
${CMAKE_SOURCE_DIR}/game/shared/hl2mp/hl2mp_weapon_parse.h
hl2mp/hl2mp_gameinterface.h
hl2mp/hl2mp_player.h
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/hl2mp/hl2mp_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ CHL2MP_Player::CHL2MP_Player() : m_PlayerAnimState( this )
{
#ifdef NEO
//Tony; create our player animation state.
m_PlayerAnimState = CreateHL2MPPlayerAnimState( this );
m_PlayerAnimState = CreateNEOPlayerAnimState( this );
#endif
UseClientSideAnimation();

Expand Down
6 changes: 4 additions & 2 deletions src/game/server/hl2mp/hl2mp_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class CHL2MP_Player;
#include "hl2_player.h"
#include "simtimer.h"
#include "soundenvelope.h"
#include "hl2mp_playeranimstate.h"
#ifdef NEO
#include "neo_playeranimstate.h"
Comment thread
sunzenshen marked this conversation as resolved.
#endif
#include "hl2mp_player_shared.h"
#include "hl2mp_gamerules.h"
#include "utldict.h"
Expand Down Expand Up @@ -177,7 +179,7 @@ class CHL2MP_Player : public CHL2_Player
private:

#ifdef NEO
CHL2MPPlayerAnimState *m_PlayerAnimState;
CNEOPlayerAnimState *m_PlayerAnimState;
#else
CPlayerAnimState m_PlayerAnimState;
#endif
Expand Down
11 changes: 11 additions & 0 deletions src/game/shared/base_playeranimstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,17 @@ void CBasePlayerAnimState::RestartMainSequence()
}


#ifdef NEO
void CBasePlayerAnimState::OnNewModel()
{
// the aim layer transitioners keep the previous sequences to blend out of them,
// and after a model swap those indices address a foreign sequence table
m_IdleSequenceTransitioner.RemoveAll();
m_SequenceTransitioner.RemoveAll();
ClearAnimationState();
}
#endif

void CBasePlayerAnimState::ComputeSequences( CStudioHdr *pStudioHdr )
{
VPROF( "CBasePlayerAnimState::ComputeSequences" );
Expand Down
5 changes: 5 additions & 0 deletions src/game/shared/base_playeranimstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ abstract_class CBasePlayerAnimState : virtual public IPlayerAnimState

void RestartMainSequence();

#ifdef NEO
// A sequence index is only meaningful for the model it was computed against
void OnNewModel();
#endif


// Helpers for the derived classes to use.
protected:
Expand Down
Loading
Loading