Skip to content

Commit 1cd0da0

Browse files
authored
Merge branch 'ReactiveDrop:reactivedrop_beta' into cvars_0
2 parents ebfe555 + 8305ef5 commit 1cd0da0

13 files changed

Lines changed: 122 additions & 22 deletions

src/game/client/swarm/asw_view_scene.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ void CASWNightVisionSelfIllumProxy::OnBind( void *pC_BaseEntity )
566566
EXPOSE_MATERIAL_PROXY( CASWNightVisionSelfIllumProxy, NightVisionSelfIllum );
567567

568568

569-
void CASWViewRender::PerformNightVisionEffect( const CViewSetup &view )
569+
void CASWViewRender::PerformNightVisionEffect( const CViewSetup &setup )
570570
{
571571
C_ASW_Player *pPlayer = C_ASW_Player::GetLocalASWPlayer();
572572
if ( !pPlayer )
@@ -587,7 +587,7 @@ void CASWViewRender::PerformNightVisionEffect( const CViewSetup &view )
587587
{
588588
byte overlaycolor[4] = { 0, 255, 0, 255 };
589589

590-
UpdateScreenEffectTexture( 0, view.x, view.y, view.width, view.height );
590+
UpdateScreenEffectTexture( 0, setup.x, setup.y, setup.width, setup.height );
591591

592592
overlaycolor[3] = flVisionAlpha;
593593

src/game/client/swarm/c_asw_aoegrenade_projectile.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,11 @@ void C_ASW_AOEGrenade_Projectile::UpdateTargetAOEEffects( void )
204204
{
205205
bool bHaveEffect = false;
206206

207-
for ( AOEGrenTargetFXList_t::IndexLocalType_t i = m_hAOETargetEffects.Head() ;
208-
m_hAOETargetEffects.IsValidIndex(i) ;
209-
i = m_hAOETargetEffects.Next(i) )
207+
for ( AOEGrenTargetFXList_t::IndexLocalType_t j = m_hAOETargetEffects.Head() ;
208+
m_hAOETargetEffects.IsValidIndex(j) ;
209+
j = m_hAOETargetEffects.Next(j) )
210210
{
211-
if ( m_hAOETargetEffects[i].hTarget.Get() == pTarget )
211+
if ( m_hAOETargetEffects[j].hTarget.Get() == pTarget )
212212
{
213213
bHaveEffect = true;
214214
break;

src/game/client/swarm/c_asw_aoegrenade_projectile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class C_ASW_AOEGrenade_Projectile : public C_BaseCombatCharacter, public IASW_AO
3535
virtual const char* GetStartSoundName( void ) { return "ASW_BuffGrenade.StartBuff"; }
3636
virtual const char* GetActivateSoundName( void ) { return "ASW_BuffGrenade.GrenadeActivate"; }
3737
virtual const char* GetPingEffectName( void ) { return "buffgrenade_pulse"; }
38-
virtual const char* GetArcEffectName( int index ) { return "buffgrenade_attach_arc"; }
38+
virtual const char* GetArcEffectName( int i ) { return "buffgrenade_attach_arc"; }
3939
virtual const char* GetArcAttachmentName( void ) { return "weapon_aim_attachment"; }
4040
virtual int GetArcEffectIndex( C_BaseEntity *pEnt ) { return 0; }
4141
virtual bool ShouldAttachEffectToWeapon( void ) { return false; }

src/game/client/swarm/c_asw_buffgrenade_projectile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class C_ASW_BuffGrenade_Projectile : public C_ASW_AOEGrenade_Projectile, public
1616
virtual const char* GetStartSoundName( void ) override { return "ASW_BuffGrenade.StartBuff"; }
1717
virtual const char* GetActivateSoundName( void ) override { return "ASW_BuffGrenade.GrenadeActivate"; }
1818
virtual const char* GetPingEffectName( void ) override { return "buffgrenade_pulse"; }
19-
virtual const char* GetArcEffectName( int index ) override { return index == 1 ? "buffgrenade_noconnect" : "buffgrenade_attach_arc"; }
19+
virtual const char* GetArcEffectName( int i ) override { return i == 1 ? "buffgrenade_noconnect" : "buffgrenade_attach_arc"; }
2020
virtual const char* GetArcAttachmentName( void ) override { return "beam_attach"; }
2121
virtual int GetArcEffectIndex( C_BaseEntity *pEnt ) override;
2222
virtual bool ShouldAttachEffectToWeapon( void ) override { return true; }

src/game/client/swarm/c_asw_entity_dissolve.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ void C_ASW_Entity_Dissolve::BuildTeslaEffect( mstudiobbox_t *pHitBox, const matr
206206

207207
// Move it towards the camera
208208
Vector vecFlash = tr.endpos;
209-
Vector vecForward;
210209
AngleVectors( MainViewAngles(nSlot), &vecForward );
211210
vecFlash -= (vecForward * 8);
212211

src/game/client/swarm/gameui/swarm/vitemshowcase.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,17 +473,17 @@ void ItemShowcase::ShowItems( SteamInventoryResult_t hResult, int iStart, int iC
473473
{
474474
// replace previous versions of this item's state in the queue
475475
bool bFound = false;
476-
FOR_EACH_VEC( pItemShowcase->m_Queue, i )
476+
FOR_EACH_VEC( pItemShowcase->m_Queue, j )
477477
{
478-
if ( pItemShowcase->m_QueueExtra[i] != 0 || pItemShowcase->m_QueueType[i] != mode )
478+
if ( pItemShowcase->m_QueueExtra[j] != 0 || pItemShowcase->m_QueueType[j] != mode )
479479
{
480480
continue;
481481
}
482482

483-
if ( pItemShowcase->m_Queue[i]->ItemID == pInstance->ItemID )
483+
if ( pItemShowcase->m_Queue[j]->ItemID == pInstance->ItemID )
484484
{
485-
delete pItemShowcase->m_Queue[i];
486-
pItemShowcase->m_Queue[i] = pInstance;
485+
delete pItemShowcase->m_Queue[j];
486+
pItemShowcase->m_Queue[j] = pInstance;
487487
bFound = true;
488488
break;
489489
}

src/game/client/swarm/rd_collections_crafting.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ void CRD_Crafting_Panel::OnCommand( const char *szCommand )
136136
// (this assumption allows us to use a greedy algorithm)
137137
FOR_EACH_VEC( variant.m_Inputs, j )
138138
{
139+
Assert( variant.m_Inputs[j].m_iQuantity == 1 );
140+
139141
FOR_EACH_VEC( variant.m_Inputs[j].m_AllowedItem, k )
140142
{
141143
CUtlVector<ReactiveDropInventory::ItemInstance_t> instances;

src/game/server/swarm/asw_player.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2605,7 +2605,7 @@ void CASW_Player::ChangeName( const char *pszNewName )
26052605
if (rd_add_index_to_name.GetBool())
26062606
{
26072607
char tempName[MAX_PLAYER_NAME_LENGTH];
2608-
int n = V_snprintf(tempName, sizeof(tempName) - 1, "%d-%s", ENTINDEX(edict()), pszNewName);
2608+
V_snprintf(tempName, sizeof(tempName) - 1, "%d-%s", ENTINDEX(edict()), pszNewName);
26092609
UTIL_SafeUtf8Truncate(tempName, sizeof(tempName));
26102610
if (V_strncmp(pszOldName, tempName, sizeof(tempName)) == 0)
26112611
{

src/game/shared/swarm/asw_weapon_cryo_cannon_shared.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ void CASW_Weapon_Cryo_Cannon::PrimaryAttack()
226226
return;
227227
}
228228

229-
CASW_Player *pPlayer = GetCommander();
230229
CASW_Marine *pMarine = GetMarine();
231230
if ( !pMarine )
232231
return;
@@ -290,6 +289,7 @@ void CASW_Weapon_Cryo_Cannon::PrimaryAttack()
290289

291290
Vector vecSrc = pMarine->Weapon_ShootPosition();
292291
Vector vecAiming = vec3_origin;
292+
CASW_Player *pPlayer = GetCommander();
293293
if ( pPlayer && pMarine->IsInhabited() )
294294
{
295295
vecAiming = pPlayer->GetAutoaimVectorForMarine( pMarine, GetAutoAimAmount(), GetVerticalAdjustOnlyAutoAimAmount() );

src/game/shared/swarm/asw_weapon_flamer_shared.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,7 @@ void CASW_Weapon_Flamer::PrimaryAttack( void )
233233
return;
234234
}
235235

236-
CASW_Player *pPlayer = GetCommander();
237236
CASW_Marine *pMarine = GetMarine();
238-
239237
if (pMarine) // firing from a marine
240238
{
241239
// MUST call sound before removing a round from the clip of a CMachineGun
@@ -253,6 +251,7 @@ void CASW_Weapon_Flamer::PrimaryAttack( void )
253251
#ifndef CLIENT_DLL
254252
Vector vecSrc = pMarine->Weapon_ShootPosition( );
255253
Vector vecAiming = vec3_origin;
254+
CASW_Player *pPlayer = GetCommander();
256255
if ( pPlayer && pMarine->IsInhabited() )
257256
{
258257
vecAiming = pPlayer->GetAutoaimVectorForMarine(pMarine, GetAutoAimAmount(), GetVerticalAdjustOnlyAutoAimAmount()); // 45 degrees = 0.707106781187

0 commit comments

Comments
 (0)