Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sabianroberts committed Sep 3, 2024
2 parents 4639d27 + 3dddca2 commit df8bd0b
Show file tree
Hide file tree
Showing 23 changed files with 31,156 additions and 99 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Aura Server
![Aura logo](aura.png "Aura logo")
# ![Aura logo](aura.png "Aura logo")

This repository contains the serverside binary for Aura. Each subfolder has its own README file
(named readme.txt, readme or README.md).
Expand All @@ -26,21 +25,21 @@ Aura 1.0 was first released with ZAMNHLMP 2.4. New features included:
- Organised clientside and serverside SDK repos
Aura 1.0 was also included with ZAMNHLMP 2.5.

![ZAMNHLMP 2.4 promo](zamnhlmp-2.4.png "ZAMNHLMP 2.4 promo")
![ZAMNHLMP 2.4 promo](assets/zamnhlmp-2.4.png "ZAMNHLMP 2.4 promo")

![ZAMNHLMP 2.5 promo](zamnhlmp-2.5.png "ZAMNHLMP 2.5 promo")
![ZAMNHLMP 2.5 promo](assets/zamnhlmp-2.5.png "ZAMNHLMP 2.5 promo")

#### 1.1
Aura 1.1 was released with ZAMNHLMP 2.5.1. There was only one change with this patch for Aura,
which was fixing the `sv_aura_give_commands`, as even in the CDM Player (`sv_creative_give`),
these commands were broken.

![ZAMNHLMP 2.5.1 promo](zamnhlmp-2.5.1.png "ZAMNHLMP 2.5.1 promo")
![ZAMNHLMP 2.5.1 promo](assets/zamnhlmp-2.5.1.png "ZAMNHLMP 2.5.1 promo")

#### 2.0
Aura 2.0 was released with ZAMNHLMP 2.6. This version of Aura introduced many new features and enhancements, including
viewmodel bob and viewpunch backported from the Source engine, support for GNU/Linux,
footstep sounds for wooden surfaces, a CVar to change the MP5's fire-rate, the Opposing Force weapons
and much more. The full changelog for ZAMNHLMP 2.6 + Aura 2.0 can be seen [here.](https://phoenixprojectsoftware.github.io/zamnhlmp/changelogs/updates/2.6.md)

![ZAMNHLMP 2.6 promo](zamnhlmp-2.6.png "ZAMNHLMP 2.6 promo")
![ZAMNHLMP 2.6 promo](assets/zamnhlmp-2.6.png "ZAMNHLMP 2.6 promo")
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
6 changes: 6 additions & 0 deletions binary/dlls/aggamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ void AgGameRules::PlayerSpawn(CBasePlayer* pPlayer)
}
if (1 > ag_ban_glock.value)
pPlayer->GiveNamedItem("weapon_9mmhandgun");
if (1 > ag_ban_oitc.value)
pPlayer->GiveNamedItem("weapon_one");
if (1 > ag_ban_crowbar.value)
pPlayer->GiveNamedItem("weapon_crowbar");
if (1 > ag_ban_shotgun.value)
Expand Down Expand Up @@ -377,6 +379,8 @@ void AgGameRules::PlayerSpawn(CBasePlayer* pPlayer)
}
if (0 < ag_start_glock.value)
pPlayer->GiveNamedItem("weapon_9mmhandgun");
if (0 < ag_start_oitc.value)
pPlayer->GiveNamedItem("weapon_one");
if (0 < ag_start_crowbar.value)
pPlayer->GiveNamedItem("weapon_crowbar");
if (0 < ag_start_shotgun.value)
Expand Down Expand Up @@ -720,6 +724,8 @@ int AgGameRules::IPointsForKill(CBasePlayer* pAttacker, CBasePlayer* pKilled)
pAttacker->GiveAmmo(ag_start_uranium.value, "uranium", URANIUM_MAX_CARRY);
if (0 < ag_start_9mmar.value)
pAttacker->GiveAmmo(ag_start_9mmar.value, "9mm", _9MM_MAX_CARRY);
if (0 < ag_start_oitc.value)
pAttacker->GiveAmmo(ag_start_oitc.value, "weapon_one", ONE_MAX_CARRY);
if (0 < ag_start_357ammo.value)
pAttacker->GiveAmmo(ag_start_357ammo.value, "357", _357_MAX_CARRY);
if (0 < ag_start_bockshot.value)
Expand Down
8 changes: 6 additions & 2 deletions binary/dlls/agglobal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
void AgInitTimer();

#ifdef AG_NO_CLIENT_DLL
DLL_GLOBAL cvar_t ag_version = { "sv_aura_version","2.2", FCVAR_SERVER };
DLL_GLOBAL cvar_t ag_version = { "sv_aura_version","2.3", FCVAR_SERVER };
#else
DLL_GLOBAL cvar_t ag_version = { "sv_aura_version","2.2", FCVAR_SERVER };
DLL_GLOBAL cvar_t ag_version = { "sv_aura_version","2.3", FCVAR_SERVER };
#endif

DLL_GLOBAL cvar_t ag_gamemode = { "sv_aura_gamemode","ffa", FCVAR_SERVER }; //The current gamemode
Expand Down Expand Up @@ -77,6 +77,7 @@ DLL_GLOBAL cvar_t ag_blastradius = { "sv_aura_blastradius","1" }; //Defa

DLL_GLOBAL cvar_t ag_ban_crowbar = { "sv_aura_ban_crowbar","0" };
DLL_GLOBAL cvar_t ag_ban_glock = { "sv_aura_ban_glock","0" };
DLL_GLOBAL cvar_t ag_ban_oitc = { "sv_aura_ban_oitc", "1" };
DLL_GLOBAL cvar_t ag_ban_357 = { "sv_aura_ban_357","0" };
DLL_GLOBAL cvar_t ag_ban_mp5 = { "sv_aura_ban_mp5","0" };
DLL_GLOBAL cvar_t ag_ban_shotgun = { "sv_aura_ban_shotgun", "0" };
Expand Down Expand Up @@ -115,6 +116,7 @@ DLL_GLOBAL cvar_t ag_ban_recharg = { "sv_aura_ban_recharg","0" };

DLL_GLOBAL cvar_t ag_start_crowbar = { "sv_aura_start_crowbar","1" };
DLL_GLOBAL cvar_t ag_start_glock = { "sv_aura_start_glock","1" };
DLL_GLOBAL cvar_t ag_start_oitc = { "sv_aura_start_oitc", "0" };
DLL_GLOBAL cvar_t ag_start_357 = { "sv_aura_start_357","0" };
DLL_GLOBAL cvar_t ag_start_mp5 = { "sv_aura_start_mp5","0" };
DLL_GLOBAL cvar_t ag_start_shotgun = { "sv_aura_start_shotgun", "0" };
Expand Down Expand Up @@ -252,6 +254,7 @@ void AgInitGame()

CVAR_REGISTER(&ag_ban_crowbar);
CVAR_REGISTER(&ag_ban_glock);
CVAR_REGISTER(&ag_ban_oitc);
CVAR_REGISTER(&ag_ban_357);
CVAR_REGISTER(&ag_ban_mp5);
CVAR_REGISTER(&ag_ban_shotgun);
Expand Down Expand Up @@ -290,6 +293,7 @@ void AgInitGame()

CVAR_REGISTER(&ag_start_crowbar);
CVAR_REGISTER(&ag_start_glock);
CVAR_REGISTER(&ag_start_oitc);
CVAR_REGISTER(&ag_start_357);
CVAR_REGISTER(&ag_start_mp5);
CVAR_REGISTER(&ag_start_shotgun);
Expand Down
2 changes: 2 additions & 0 deletions binary/dlls/agglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ extern cvar_t ag_blastradius;

extern cvar_t ag_ban_crowbar;
extern cvar_t ag_ban_glock;
extern cvar_t ag_ban_oitc;
extern cvar_t ag_ban_357;
extern cvar_t ag_ban_mp5;
extern cvar_t ag_ban_shotgun;
Expand Down Expand Up @@ -89,6 +90,7 @@ extern cvar_t ag_ban_recharg;

extern cvar_t ag_start_crowbar;
extern cvar_t ag_start_glock;
extern cvar_t ag_start_oitc;
extern cvar_t ag_start_357;
extern cvar_t ag_start_mp5;
extern cvar_t ag_start_shotgun;
Expand Down
4 changes: 3 additions & 1 deletion binary/dlls/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ cvar_t teamoverride = {"mp_teamoverride","1" };
cvar_t defaultteam = {"mp_defaultteam","0" };
cvar_t allowmonsters={"mp_allowmonsters","0", FCVAR_SERVER };
cvar_t mp5_old_rate = { "sv_aura_mp5_old_rate", "1", FCVAR_SERVER };
cvar_t fire_weapons_underwater = { "sv_aura_fire_weapons_underwater", "0", FCVAR_SERVER };

// mp_chattime is like the minimum intermission time, you can't skip it, it's meant
// to have some time for saying gg, etc. before changing map, it's part of the intermission
Expand Down Expand Up @@ -599,7 +600,7 @@ cvar_t sv_aura_infinite_ammo = { "sv_aura_infinite_ammo","0", FCVAR_SERVER };
// BlueNightHawk : Suit Energy Regeneration
cvar_t sv_aura_regeneration = { "sv_aura_regeneration", "1", FCVAR_SERVER };
cvar_t sv_aura_regeneration_rate = { "sv_aura_regeneration_rate", "1", FCVAR_SERVER };
cvar_t sv_aura_regeneration_wait = { "sv_aura_regeneration_wait", "0.05", FCVAR_SERVER };
cvar_t sv_aura_regeneration_wait = { "sv_aura_regeneration_wait", "0.03", FCVAR_SERVER };

// END Cvars for Skill Level settings

Expand Down Expand Up @@ -635,6 +636,7 @@ void GameDLLInit( void )
CVAR_REGISTER (&allowmonsters);

CVAR_REGISTER (&mp5_old_rate);
CVAR_REGISTER(&fire_weapons_underwater);

CVAR_REGISTER (&mp_chattime);
CVAR_REGISTER (&mp_intermission_time);
Expand Down
1 change: 1 addition & 0 deletions binary/dlls/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ extern cvar_t defaultteam;
extern cvar_t allowmonsters;
extern cvar_t mp_chattime;
extern cvar_t mp5_old_rate;
extern cvar_t fire_weapons_underwater;

extern cvar_t singleplayer;
extern cvar_t sploading;
Expand Down
178 changes: 93 additions & 85 deletions binary/dlls/mp5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,136 +154,144 @@ void CMP5::PrimaryAttack()
{
#ifndef CLIENT_DLL
int mp5OldRate = mp5_old_rate.value;
int fireWeaponsUnderwater = fire_weapons_underwater.value;
#endif
// don't fire underwater
if (m_pPlayer->pev->waterlevel == 3)

#ifndef CLIENT_DLL
if (fire_weapons_underwater.value == 0)
{
PlayEmptySound( );
m_flNextPrimaryAttack = 0.15;
return;
// don't fire underwater
if (m_pPlayer->pev->waterlevel == 3)
{
PlayEmptySound();
m_flNextPrimaryAttack = 0.15;
return;
}
}
#endif

if (m_iClip <= 0)
{
PlayEmptySound();
m_flNextPrimaryAttack = 0.15;
return;
}

if (m_iClip <= 0)
{
PlayEmptySound();
m_flNextPrimaryAttack = 0.15;
return;
}

m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;

m_iClip--;
m_iClip--;
#ifdef AGSTATS
Stats.FireShot(m_pPlayer,STRING(pev->classname));
Stats.FireShot(m_pPlayer, STRING(pev->classname));
#endif

m_pPlayer->pev->effects = (int)(m_pPlayer->pev->effects) | EF_MUZZLEFLASH;
m_pPlayer->pev->effects = (int)(m_pPlayer->pev->effects) | EF_MUZZLEFLASH;

// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
// player "shoot" animation
m_pPlayer->SetAnimation(PLAYER_ATTACK1);

Vector vecOffset = Vector(0, -0.08, 0);
Vector vecSrc = m_pPlayer->GetGunPosition( );
Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
Vector vecDir;
Vector vecOffset = Vector(0, -0.08, 0);
Vector vecSrc = m_pPlayer->GetGunPosition();
Vector vecAiming = m_pPlayer->GetAutoaimVector(AUTOAIM_5DEGREES);
Vector vecDir;

vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed );
vecDir = m_pPlayer->FireBulletsPlayer(1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed);

int flags;
int flags;
#if defined( CLIENT_WEAPONS )
flags = FEV_NOTHOST;
flags = FEV_NOTHOST;
#else
flags = 0;
flags = 0;
#endif

PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usMP5, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 );
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usMP5, 0.0, (float*)&g_vecZero, (float*)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0);

if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
// HEV suit - indicate out of ammo condition
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
// HEV suit - indicate out of ammo condition
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);

m_flNextPrimaryAttack = GetNextAttackDelay(0.065);
m_flNextPrimaryAttack = GetNextAttackDelay(0.065);

if ( m_flNextPrimaryAttack < UTIL_WeaponTimeBase() )
if (m_flNextPrimaryAttack < UTIL_WeaponTimeBase())
#ifndef CLIENT_DLL
if (mp5_old_rate.value == 1) m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.08;
if (mp5_old_rate.value == 1) m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.08;
if (mp5_old_rate.value == 0) m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1;
#endif
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
}
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat(m_pPlayer->random_seed, 10, 15);
}



void CMP5::SecondaryAttack( void )
void CMP5::SecondaryAttack(void)
{
// don't fire underwater
if (m_pPlayer->pev->waterlevel == 3)
{
PlayEmptySound( );
m_flNextPrimaryAttack = 0.15;
return;
}
// don't fire underwater
if (m_pPlayer->pev->waterlevel == 3)
{
PlayEmptySound();
m_flNextPrimaryAttack = 0.15;
return;
}

if (m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] == 0)
{
PlayEmptySound( );
return;
}
if (m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] == 0)
{
PlayEmptySound();
return;
}

m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;

m_pPlayer->m_iExtraSoundTypes = bits_SOUND_DANGER;
m_pPlayer->m_flStopExtraSoundTime = UTIL_WeaponTimeBase() + 0.2;

m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType]--;
m_pPlayer->m_iExtraSoundTypes = bits_SOUND_DANGER;
m_pPlayer->m_flStopExtraSoundTime = UTIL_WeaponTimeBase() + 0.2;

// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType]--;

// player "shoot" animation
m_pPlayer->SetAnimation(PLAYER_ATTACK1);

#ifndef CLIENT_WEAPONS
SendWeaponAnim( MP5_LAUNCH );
SendWeaponAnim(MP5_LAUNCH);

if ( RANDOM_LONG(0,1) )
{
// play this sound through BODY channel so we can hear it if player didn't stop firing MP3
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/glauncher.wav", 0.8, ATTN_NORM);
}
else
{
// play this sound through BODY channel so we can hear it if player didn't stop firing MP3
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/glauncher2.wav", 0.8, ATTN_NORM);
}
if (RANDOM_LONG(0, 1))
{
// play this sound through BODY channel so we can hear it if player didn't stop firing MP3
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/glauncher.wav", 0.8, ATTN_NORM);
}
else
{
// play this sound through BODY channel so we can hear it if player didn't stop firing MP3
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/glauncher2.wav", 0.8, ATTN_NORM);
}
#endif


UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle );
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);

// we don't add in player velocity anymore.
CGrenade::ShootContact( m_pPlayer->pev,
m_pPlayer->pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_forward * 16,
gpGlobals->v_forward * 800 );
// we don't add in player velocity anymore.
CGrenade::ShootContact(m_pPlayer->pev,
m_pPlayer->pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_forward * 16,
gpGlobals->v_forward * 800);

int flags;
int flags;
#if defined( CLIENT_WEAPONS )
flags = FEV_NOTHOST;
flags = FEV_NOTHOST;
#else
flags = 0;
flags = 0;
#endif

PLAYBACK_EVENT( flags, m_pPlayer->edict(), m_usMP52 );

m_flNextPrimaryAttack = GetNextAttackDelay(1);
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 5;// idle pretty soon after shooting.
PLAYBACK_EVENT(flags, m_pPlayer->edict(), m_usMP52);

m_flNextPrimaryAttack = GetNextAttackDelay(1);
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 5;// idle pretty soon after shooting.

if (!m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType])
// HEV suit - indicate out of ammo condition
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);

if (!m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType])
// HEV suit - indicate out of ammo condition
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);

#ifndef CLIENT_WEAPONS
m_pPlayer->pev->punchangle.x -= 10;
m_pPlayer->pev->punchangle.x -= 10;
#endif
}

Expand Down
Loading

0 comments on commit df8bd0b

Please sign in to comment.