Skip to content

Commit

Permalink
Change damage modifiers to parity. (#488)
Browse files Browse the repository at this point in the history
  • Loading branch information
Agiel committed Jul 9, 2024
1 parent 87c0230 commit 976d62f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
8 changes: 4 additions & 4 deletions mp/game/neo/cfg/skill.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ sk_healthkit "25"
sk_healthvial "10"

// player damage adjusters
sk_player_head "3"
sk_player_head "1"
sk_player_chest "1"
sk_player_stomach "1"
sk_player_arm "1"
sk_player_leg "1"
sk_player_stomach "0.75"
sk_player_arm "0.75"
sk_player_leg "0.6"
8 changes: 8 additions & 0 deletions mp/src/game/server/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,19 @@ extern void AddMultiDamage( const CTakeDamageInfo &info, CBaseEntity *pEntity );
//#define MAX_SAFE_FALL_UNITS ( PLAYER_MAX_SAFE_FALL_DIST * 12 )

// player damage adjusters
#ifdef NEO
ConVar sk_player_head( "sk_player_head","1" );
ConVar sk_player_chest( "sk_player_chest","1" );
ConVar sk_player_stomach( "sk_player_stomach","0.75" );
ConVar sk_player_arm( "sk_player_arm","0.75" );
ConVar sk_player_leg( "sk_player_leg","0.6" );
#else
ConVar sk_player_head( "sk_player_head","2" );
ConVar sk_player_chest( "sk_player_chest","1" );
ConVar sk_player_stomach( "sk_player_stomach","1" );
ConVar sk_player_arm( "sk_player_arm","1" );
ConVar sk_player_leg( "sk_player_leg","1" );
#endif

//ConVar player_usercommand_timeout( "player_usercommand_timeout", "10", 0, "After this many seconds without a usercommand from a player, the client is kicked." );
#ifdef _DEBUG
Expand Down
16 changes: 8 additions & 8 deletions mp/src/game/shared/neo/neo_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ConVar mp_neo_warmup_round_time("mp_neo_warmup_round_time", "45", FCVAR_REPLICAT
ConVar mp_neo_preround_freeze_time("mp_neo_preround_freeze_time", "10", FCVAR_REPLICATED, "The pre-round freeze time, in seconds.", true, 0.0, false, 0);
ConVar mp_neo_latespawn_max_time("mp_neo_latespawn_max_time", "15", FCVAR_REPLICATED, "How many seconds late are players still allowed to spawn.", true, 0.0, false, 0);

ConVar sv_neo_wep_dmg_modifier("sv_neo_wep_dmg_modifier", "0.5", FCVAR_REPLICATED, "Temp global weapon damage modifier.", true, 0.0, true, 100.0);
ConVar sv_neo_wep_dmg_modifier("sv_neo_wep_dmg_modifier", "1", FCVAR_REPLICATED, "Temp global weapon damage modifier.", true, 0.0, true, 100.0);
ConVar neo_sv_player_restore("neo_sv_player_restore", "1", FCVAR_REPLICATED, "If enabled, the server will save players XP and deaths per match session and restore them if they reconnect.", true, 0.0f, true, 1.0f);

ConVar neo_name("neo_name", "", FCVAR_USERINFO | FCVAR_ARCHIVE, "The nickname to set instead of the steam profile name.");
Expand Down Expand Up @@ -66,17 +66,17 @@ extern bool RespawnWithRet(CBaseEntity *pEdict, bool fCopyCorpse);
// NEO TODO (Rain): check against a test map
static NEOViewVectors g_NEOViewVectors(
Vector( 0, 0, 58 ), //VEC_VIEW (m_vView) // 57 == vanilla recon, 58 == vanilla assault (default), 60 == vanilla support. Use the shareddefs.h macro VEC_VIEW_NEOSCALE to access per player.

Vector(-16, -16, 0 ), //VEC_HULL_MIN (m_vHullMin)
Vector(16, 16, NEO_ASSAULT_PLAYERMODEL_HEIGHT), //VEC_HULL_MAX (m_vHullMax). 66 == vanilla recon, 67 == vanilla assault (default), 72 == vanilla support. Use relevant VEC_... macros in shareddefs for class height adjusted per player access.

Vector(-16, -16, 0 ), //VEC_DUCK_HULL_MIN (m_vDuckHullMin)
Vector( 16, 16, NEO_ASSAULT_PLAYERMODEL_DUCK_HEIGHT), //VEC_DUCK_HULL_MAX (m_vDuckHullMax)
Vector( 0, 0, 45 ), //VEC_DUCK_VIEW (m_vDuckView)

Vector(-10, -10, -10 ), //VEC_OBS_HULL_MIN (m_vObsHullMin)
Vector( 10, 10, 10 ), //VEC_OBS_HULL_MAX (m_vObsHullMax)

Vector( 0, 0, 14 ), //VEC_DEAD_VIEWHEIGHT (m_vDeadViewHeight)

Vector(-16, -16, 0 ), //VEC_CROUCH_TRACE_MIN (m_vCrouchTraceMin)
Expand Down Expand Up @@ -823,7 +823,7 @@ static inline void SpawnTheGhost()
{
ghost->SetAbsOrigin(ghostSpawn->GetAbsOrigin());
}

break;
}
}
Expand Down Expand Up @@ -1128,7 +1128,7 @@ void CNEORules::CleanUpMap()
{
if (m_iIterator == g_MapEntityRefs.InvalidIndex())
{
// This shouldn't be possible. When we loaded the map, it should have used
// This shouldn't be possible. When we loaded the map, it should have used
// CCSMapLoadEntityFilter, which should have built the g_MapEntityRefs list
// with the same list of entities we're referring to here.
Assert(false);
Expand All @@ -1147,7 +1147,7 @@ void CNEORules::CleanUpMap()
}
else
{
// Cool, the slot where this entity was is free again (most likely, the entity was
// Cool, the slot where this entity was is free again (most likely, the entity was
// freed above). Now create an entity with this specific index.
return CreateEntityByName(pClassname, ref.m_iEdict);
}
Expand Down
7 changes: 4 additions & 3 deletions mp/src/game/shared/neo/neo_player_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,10 @@ COMPILE_TIME_ASSERT(NEO_ASSAULT_CROUCH_SPEED == NEO_SUPPORT_CROUCH_SPEED);
#define NEO_ASSAULT_MODEL_SCALE ((NEO_ASSAULT_PLAYERMODEL_HEIGHT / HL2DM_DEFAULT_PLAYERMODEL_HEIGHT) * NEO_HULL_TOLERANCE_SCALE)
#define NEO_SUPPORT_MODEL_SCALE ((NEO_SUPPORT_PLAYERMODEL_HEIGHT / HL2DM_DEFAULT_PLAYERMODEL_HEIGHT) * NEO_HULL_TOLERANCE_SCALE)

#define NEO_RECON_DAMAGE_MODIFIER 1.2f
#define NEO_ASSAULT_DAMAGE_MODIFIER 1.0f
#define NEO_SUPPORT_DAMAGE_MODIFIER 0.56f
// These look like magic but are actually taken straight from the og binaries.
#define NEO_RECON_DAMAGE_MODIFIER 1.485f
#define NEO_ASSAULT_DAMAGE_MODIFIER 1.2375f
#define NEO_SUPPORT_DAMAGE_MODIFIER 0.66f

#define NEO_ANIMSTATE_LEGANIM_TYPE LegAnimType_t::LEGANIM_9WAY
#define NEO_ANIMSTATE_USES_AIMSEQUENCES true
Expand Down

0 comments on commit 976d62f

Please sign in to comment.