Browse Source

Use different damage values for bradnailer and nailgun. Remove cvars which was not found in game.

poke646
Night Owl 8 years ago
parent
commit
2a0b98bc54
  1. 5
      dlls/combat.cpp
  2. 10
      dlls/game.cpp
  3. 3
      dlls/gamerules.cpp
  4. 2
      dlls/poke646/bradnailer.cpp
  5. 4
      dlls/poke646/nail.cpp
  6. 4
      dlls/poke646/nailgun.cpp
  7. 2
      dlls/skill.h
  8. 2
      dlls/sound.cpp
  9. 3
      dlls/weapons.cpp
  10. 3
      dlls/weapons.h

5
dlls/combat.cpp

@ -1523,9 +1523,11 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi @@ -1523,9 +1523,11 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi
{
default:
case BULLET_PLAYER_9MM:
case BULLET_PLAYER_NAIL1:
pEntity->TraceAttack( pevAttacker, gSkillData.plrDmg9MM, vecDir, &tr, DMG_BULLET );
break;
case BULLET_PLAYER_MP5:
case BULLET_PLAYER_NAIL2:
pEntity->TraceAttack( pevAttacker, gSkillData.plrDmgMP5, vecDir, &tr, DMG_BULLET );
break;
case BULLET_PLAYER_BUCKSHOT:
@ -1544,9 +1546,6 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi @@ -1544,9 +1546,6 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi
UTIL_DecalTrace( &tr, DECAL_GLASSBREAK1 + RANDOM_LONG( 0, 2 ) );
}
break;
case BULLET_PLAYER_NAIL:
pEntity->TraceAttack( pevAttacker, 0, vecDir, &tr, DMG_BULLET );
break;
}
}

10
dlls/game.cpp

@ -456,11 +456,6 @@ cvar_t sk_player_leg1 = { "sk_player_leg1","1" }; @@ -456,11 +456,6 @@ cvar_t sk_player_leg1 = { "sk_player_leg1","1" };
cvar_t sk_player_leg2 = { "sk_player_leg2","1" };
cvar_t sk_player_leg3 = { "sk_player_leg3","1" };
// Nails
cvar_t sk_plr_nail1 = { "sk_plr_nail1", "0" };
cvar_t sk_plr_nail2 = { "sk_plr_nail2", "0" };
cvar_t sk_plr_nail3 = { "sk_plr_nail3", "0" };
// END Cvars for Skill Level settings
// Register your console variables here
@ -886,11 +881,6 @@ void GameDLLInit( void ) @@ -886,11 +881,6 @@ void GameDLLInit( void )
CVAR_REGISTER( &sk_player_leg2 );
CVAR_REGISTER( &sk_player_leg3 );
// Nails
CVAR_REGISTER( &sk_plr_nail1 );
CVAR_REGISTER( &sk_plr_nail2 );
CVAR_REGISTER( &sk_plr_nail3 );
// END REGISTER CVARS FOR SKILL LEVEL STUFF
SERVER_COMMAND( "exec skill.cfg\n" );

3
dlls/gamerules.cpp

@ -307,9 +307,6 @@ void CGameRules::RefreshSkillData ( void ) @@ -307,9 +307,6 @@ void CGameRules::RefreshSkillData ( void )
gSkillData.plrStomach = GetSkillCvar( "sk_player_stomach" );
gSkillData.plrLeg = GetSkillCvar( "sk_player_leg" );
gSkillData.plrArm = GetSkillCvar( "sk_player_arm" );
// Nails
gSkillData.plrDmgNail = GetSkillCvar( "sk_9mmAR_bullet" );
}
//=========================================================

2
dlls/poke646/bradnailer.cpp

@ -221,7 +221,7 @@ void CBradnailer::Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim, BOOL @@ -221,7 +221,7 @@ void CBradnailer::Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim, BOOL
}
Vector vecDir;
vecDir = m_pPlayer->FireBulletsPlayer(1, vecSrc, vecAiming, Vector(flSpread, flSpread, flSpread), 8192, BULLET_PLAYER_NAIL, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed);
vecDir = m_pPlayer->FireBulletsPlayer(1, vecSrc, vecAiming, Vector(flSpread, flSpread, flSpread), 8192, BULLET_PLAYER_NAIL1, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed);
PLAYBACK_EVENT_FULL(0, m_pPlayer->edict(), m_usFireBradnailer, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, fFastShoot, 0);

4
dlls/poke646/nail.cpp

@ -83,7 +83,7 @@ void CNail::NailTouch(CBaseEntity *pOther) @@ -83,7 +83,7 @@ void CNail::NailTouch(CBaseEntity *pOther)
// UNDONE: this needs to call TraceAttack instead
ClearMultiDamage();
pOther->TraceAttack(pevOwner, gSkillData.plrDmgNail, pev->velocity.Normalize(), &tr, DMG_NEVERGIB);
pOther->TraceAttack(pevOwner, 0, pev->velocity.Normalize(), &tr, DMG_NEVERGIB);
ApplyMultiDamage(pev, pevOwner);
@ -130,4 +130,4 @@ void CNail::NailTouch(CBaseEntity *pOther) @@ -130,4 +130,4 @@ void CNail::NailTouch(CBaseEntity *pOther)
void CNail::NailThink(void)
{
pev->nextthink = gpGlobals->time + 0.1;
}
}

4
dlls/poke646/nailgun.cpp

@ -156,7 +156,7 @@ void CNailgun::PrimaryAttack() @@ -156,7 +156,7 @@ void CNailgun::PrimaryAttack()
Vector vecAiming = gpGlobals->v_forward;
Vector vecDir;
vecDir = m_pPlayer->FireBulletsPlayer(1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_NAIL, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed);
vecDir = m_pPlayer->FireBulletsPlayer(1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_NAIL2, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed);
int flags;
#if defined( CLIENT_WEAPONS )
@ -287,4 +287,4 @@ class CNailAmmoRound : public CBasePlayerAmmo @@ -287,4 +287,4 @@ class CNailAmmoRound : public CBasePlayerAmmo
return bResult;
}
};
LINK_ENTITY_TO_CLASS(ammo_nailround, CNailAmmoRound);
LINK_ENTITY_TO_CLASS(ammo_nailround, CNailAmmoRound);

2
dlls/skill.h

@ -138,8 +138,6 @@ struct skilldata_t @@ -138,8 +138,6 @@ struct skilldata_t
float plrStomach;
float plrLeg;
float plrArm;
float plrDmgNail;
};
extern DLL_GLOBAL skilldata_t gSkillData;

2
dlls/sound.cpp

@ -1739,7 +1739,7 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in @@ -1739,7 +1739,7 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in
return 0.0; // crowbar already makes this sound
fvol = 1.0;
fvolbar = 0.2;
if( iBulletType == BULLET_PLAYER_NAIL )
if( iBulletType == BULLET_PLAYER_NAIL1 || iBulletType == BULLET_PLAYER_NAIL2 )
{
rgsz[0] = "weapons/brad_hit1.wav";
rgsz[1] = "weapons/brad_hit2.wav";

3
dlls/weapons.cpp

@ -170,7 +170,8 @@ void DecalGunshot( TraceResult *pTrace, int iBulletType ) @@ -170,7 +170,8 @@ void DecalGunshot( TraceResult *pTrace, int iBulletType )
case BULLET_MONSTER_MP5:
case BULLET_PLAYER_BUCKSHOT:
case BULLET_PLAYER_357:
case BULLET_PLAYER_NAIL:
case BULLET_PLAYER_NAIL1:
case BULLET_PLAYER_NAIL2:
default:
// smoke and decal
UTIL_GunshotDecalTrace( pTrace, DamageDecal( pEntity, DMG_BULLET ) );

3
dlls/weapons.h

@ -144,7 +144,8 @@ typedef enum @@ -144,7 +144,8 @@ typedef enum
BULLET_PLAYER_357, // python
BULLET_PLAYER_BUCKSHOT, // shotgun
BULLET_PLAYER_CROWBAR, // crowbar swipe
BULLET_PLAYER_NAIL, // nails
BULLET_PLAYER_NAIL1, // bradnailer nails
BULLET_PLAYER_NAIL2, // nailgun nails
BULLET_PLAYER_XS, // xen squasher
BULLET_MONSTER_9MM,

Loading…
Cancel
Save