Skip to content

Commit 9ec1c7a

Browse files
authored
Merge branch 'reactivedrop_beta' into TracePlayer
2 parents 4b896b9 + 3c96eb1 commit 9ec1c7a

9 files changed

Lines changed: 87 additions & 38 deletions

File tree

contentsrc/mapsrc/instances/landingbay_storageshelf_small.vmf

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
versioninfo
22
{
33
"editorversion" "400"
4-
"editorbuild" "7397"
5-
"mapversion" "3"
4+
"editorbuild" "4819"
5+
"mapversion" "1"
66
"formatversion" "100"
77
"prefab" "0"
88
}
@@ -20,12 +20,12 @@ viewsettings
2020
world
2121
{
2222
"id" "1"
23-
"mapversion" "3"
23+
"mapversion" "1"
2424
"classname" "worldspawn"
25-
"detailmaterial" "detail/detailsprites"
26-
"detailvbsp" "detail.vbsp"
27-
"maxpropscreenwidth" "-1"
2825
"skyname" "blacksky"
26+
"maxpropscreenwidth" "-1"
27+
"detailvbsp" "detail.vbsp"
28+
"detailmaterial" "detail/detailsprites"
2929
}
3030
entity
3131
{
@@ -499,24 +499,6 @@ entity
499499
"logicalpos" "[1500 -9768]"
500500
}
501501
}
502-
entity
503-
{
504-
"id" "125"
505-
"classname" "comp_propcombine_set"
506-
"angles" "0 0 0"
507-
"maxs" "94 36 66"
508-
"mins" "-102 -36 -66"
509-
"prop" "models/props/supports/scaffoldingsystem01/beam128.mdl"
510-
"skin" "0"
511-
"origin" "96 32 64"
512-
editor
513-
{
514-
"color" "220 30 220"
515-
"visgroupshown" "1"
516-
"visgroupautoshown" "1"
517-
"logicalpos" "[0 0]"
518-
}
519-
}
520502
cameras
521503
{
522504
"activecamera" "-1"

reactivedrop/scripts/asw_weapon_devastator.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ WeaponData
2424
{
2525
"empty" "ASW_Weapon.Empty"
2626
"special3" "ASW_Weapon.Reload3" // weapon switch
27-
"burst" "ASW_Weapon.Reload2"
28-
27+
28+
"special1" "ASW_Weapon_Devastator.LockModeOn" // Lock Mode enabled
29+
"burst" "ASW_Weapon_Devastator.LockModeOff" // Lock Mode disabled
30+
2931
"single_shot" "ASW_Weapon_Devastator.SingleFP" // sound for locally controlled marine
3032
"single_shot_npc" "ASW_Weapon_Devastator.Single" // sound for other marines
3133
}

reactivedrop/scripts/game_sounds_asw_weapons.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,24 @@
241241
"wave" "@weapons\2D\devastator\devastatorfp.wav"
242242
}
243243

244+
"ASW_Weapon_Devastator.LockModeOn"
245+
{
246+
"channel" "CHAN_ITEM"
247+
"volume" "1.0"
248+
"soundlevel" "SNDLVL_NORM"
249+
250+
"wave" "weapons\3D\devastator\lockmodeon.wav"
251+
}
252+
253+
"ASW_Weapon_Devastator.LockModeOff"
254+
{
255+
"channel" "CHAN_ITEM"
256+
"volume" "1.0"
257+
"soundlevel" "SNDLVL_NORM"
258+
259+
"wave" "weapons\3D\devastator\lockmodeoff.wav"
260+
}
261+
244262
"ASW_Weapon_Prifle.Single"
245263
{
246264
"channel" "CHAN_WEAPON"
36.3 KB
Binary file not shown.
153 KB
Binary file not shown.

src/game/shared/swarm/asw_equipment_list.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static CASW_EquipItem s_RegularEquips[ASW_NUM_EQUIP_REGULAR] =
383383
"swarm/EquipIcons/EquipDevastator",
384384
&asw_ammo_count_devastator, &asw_ammo_count_devastator,
385385
NULL, NULL,
386-
11, 0.2f, 3.0f, 7, MARINE_CLASS_SPECIAL_WEAPONS,
386+
13, 0.2f, 3.0f, 7, MARINE_CLASS_SPECIAL_WEAPONS,
387387
true, false, false, ASW_OFFHAND_USE_IMMEDIATELY,
388388
0.2f, 0.2f,
389389
},

src/game/shared/swarm/asw_gamerules.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ ConVar asw_marine_ff_absorption( "asw_marine_ff_absorption", "1", FCVAR_REPLICAT
609609
ConVar asw_horde_override( "asw_horde_override", "0", FCVAR_REPLICATED, "Forces hordes to spawn", UpdateMatchmakingTagsCallback );
610610
ConVar asw_wanderer_override( "asw_wanderer_override", "0", FCVAR_REPLICATED, "Forces wanderers to spawn", UpdateMatchmakingTagsCallback );
611611
ConVar rd_challenge( "rd_challenge", "0", FCVAR_REPLICATED | FCVAR_DEMO, "Activates a challenge by ID", UpdateMatchmakingTagsCallback );
612+
ConVar rd_challenge_changing( "rd_challenge_changing", "0", FCVAR_GAMEDLL | FCVAR_CHEAT | FCVAR_HIDDEN, "Internally used for diagnostics during challenge transitions" );
612613
ConVar rd_lock_difficulty( "rd_lock_difficulty", "0", FCVAR_REPLICATED, "If 1, the lobby leader cannot change the difficulty level." );
613614
ConVar rd_lock_onslaught( "rd_lock_onslaught", "0", FCVAR_REPLICATED, "If 1, the lobby leader cannot change the onslaught setting." );
614615
ConVar rd_lock_hardcoreff( "rd_lock_hardcoreff", "0", FCVAR_REPLICATED, "If 1, the lobby leader cannot change the hardcore friendly fire setting." );
@@ -9916,6 +9917,7 @@ void CAlienSwarm::RevertSavedConvars()
99169917
void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99179918
{
99189919
extern ConVar rd_challenge;
9920+
extern ConVar rd_challenge_changing;
99199921

99209922
const RD_Challenge_t *pSummary = ReactiveDropChallenges::GetSummary( szChallengeName );
99219923
if ( !pSummary || ( ASWDeathmatchMode() ? !pSummary->AllowDeathmatch : !pSummary->AllowCoop ) )
@@ -9932,9 +9934,9 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99329934
KeyValues::AutoDelete pKV( "CHALLENGE" );
99339935
bool bEnabled = ReactiveDropChallenges::ReadData( pKV, szChallengeName );
99349936

9935-
rd_challenge.SetValue("");
9937+
rd_challenge_changing.SetValue(1);
99369938
ResetChallengeConVars();
9937-
rd_challenge.SetValue(szChallengeName);
9939+
rd_challenge_changing.SetValue(2);
99389940

99399941
if ( ASWDeathmatchMode() )
99409942
{
@@ -9959,6 +9961,8 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99599961
EnforceWeaponSelectionRules();
99609962
}
99619963

9964+
rd_challenge_changing.SetValue(3);
9965+
99629966
if ( !bEnabled )
99639967
{
99649968
szChallengeName = "0";
@@ -9989,6 +9993,8 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99899993
{
99909994
V_strncpy( m_szGameDescription, "Alien Swarm: Reactive Drop", sizeof( m_szGameDescription ) );
99919995
}
9996+
9997+
rd_challenge_changing.SetValue(0);
99929998
}
99939999

999410000
void CAlienSwarm::CheckChallengeConVars()

src/game/shared/swarm/asw_weapon_devastator_shared.cpp

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,13 @@ void CASW_Weapon_Devastator::Precache()
7272
PrecacheModel( "swarm/sprites/whiteglow1.vmt" );
7373
PrecacheModel( "swarm/sprites/greylaser1.vmt");
7474
PrecacheScriptSound( "ASW_Weapon.Empty" );
75-
PrecacheScriptSound( "ASW_Weapon.Reload3" );
7675
PrecacheScriptSound( "ASW_Weapon_Devastator.SingleFP" );
7776
PrecacheScriptSound( "ASW_Weapon_Devastator.Single" );
7877
PrecacheScriptSound( "ASW_Weapon_Devastator.ReloadA" );
7978
PrecacheScriptSound( "ASW_Weapon_Devastator.ReloadB" );
8079
PrecacheScriptSound( "ASW_Weapon_Devastator.ReloadC" );
80+
PrecacheScriptSound( "ASW_Weapon_Devastator.LockModeOn" );
81+
PrecacheScriptSound( "ASW_Weapon_Devastator.LockModeOff" );
8182

8283
BaseClass::Precache();
8384
}
@@ -171,21 +172,21 @@ const Vector& CASW_Weapon_Devastator::GetAngularBulletSpread()
171172

172173
bool CASW_Weapon_Devastator::Reload( void )
173174
{
174-
m_bLockedFire = false;
175+
DisableLockFire();
175176

176177
return BaseClass::Reload();
177178
}
178179

179180
bool CASW_Weapon_Devastator::Holster( CBaseCombatWeapon *pSwitchingTo )
180181
{
181-
m_bLockedFire = false;
182+
DisableLockFire();
182183

183184
return BaseClass::Holster( pSwitchingTo );
184185
}
185186

186187
void CASW_Weapon_Devastator::Drop( const Vector &vecVelocity )
187188
{
188-
m_bLockedFire = false;
189+
DisableLockFire();
189190

190191
BaseClass::Drop( vecVelocity );
191192
}
@@ -197,11 +198,11 @@ void CASW_Weapon_Devastator::ItemPostFrame( void )
197198
CASW_Marine* pMarine = GetMarine();
198199
if ( !pMarine || !pMarine->IsAlive() )
199200
{
200-
m_bLockedFire = false;
201+
DisableLockFire();
201202
return;
202203
}
203204
if ( pMarine->GetCurrentMeleeAttack() )
204-
m_bLockedFire = false;
205+
DisableLockFire();
205206
}
206207

207208
void CASW_Weapon_Devastator::ItemBusyFrame( void )
@@ -211,11 +212,11 @@ void CASW_Weapon_Devastator::ItemBusyFrame( void )
211212
CASW_Marine* pMarine = GetMarine();
212213
if ( !pMarine || !pMarine->IsAlive() )
213214
{
214-
m_bLockedFire = false;
215+
DisableLockFire();
215216
return;
216217
}
217218
if ( pMarine->GetCurrentMeleeAttack() )
218-
m_bLockedFire = false;
219+
DisableLockFire();
219220
}
220221

221222
void CASW_Weapon_Devastator::SecondaryAttack()
@@ -227,8 +228,10 @@ void CASW_Weapon_Devastator::SecondaryAttack()
227228
if ( m_bLockedFire )
228229
{
229230
m_flNextPrimaryAttack = gpGlobals->curtime + 0.5f;
230-
WeaponSound( BURST );
231+
WeaponSound( SPECIAL1 );
231232
}
233+
else
234+
WeaponSound( BURST );
232235
}
233236
else
234237
{
@@ -258,3 +261,33 @@ float CASW_Weapon_Devastator::GetFireRate()
258261
return GetEquipItem()->m_flFireRate;
259262
}
260263
}
264+
265+
void CASW_Weapon_Devastator::DisableLockFire()
266+
{
267+
if (m_bLockedFire)
268+
{
269+
m_bLockedFire = false;
270+
WeaponSound( BURST );
271+
}
272+
}
273+
274+
#ifdef CLIENT_DLL
275+
void CASW_Weapon_Devastator::ClientThink()
276+
{
277+
BaseClass::ClientThink();
278+
279+
if ( m_bLockedFire != m_hLockedFireParticle.IsValid() )
280+
{
281+
if ( m_bLockedFire )
282+
{
283+
m_hLockedFireParticle.Set( ParticleProp()->Create( "buffgrenade_attach_arc", PATTACH_POINT_FOLLOW, "eject1" ) );
284+
ParticleProp()->AddControlPoint( m_hLockedFireParticle, 1, this, PATTACH_POINT_FOLLOW, "muzzle" );
285+
}
286+
else
287+
{
288+
ParticleProp()->StopEmissionAndDestroyImmediately( m_hLockedFireParticle.GetObject() );
289+
m_hLockedFireParticle.Set( NULL );
290+
}
291+
}
292+
}
293+
#endif

src/game/shared/swarm/asw_weapon_devastator_shared.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class CASW_Weapon_Devastator : public CASW_Weapon_Assault_Shotgun
3939
#else
4040
virtual const char *GetPartialReloadSound( int iPart );
4141
virtual bool HasSecondaryExplosive(void) const { return false; }
42+
virtual void ClientThink() override;
43+
4244
#endif
4345
virtual const char *GetMagazineGibModelName() const override { return "models/weapons/empty_clips/devastator_empty_clip.mdl"; }
4446
virtual bool HasSecondaryAttack() override;
@@ -47,6 +49,12 @@ class CASW_Weapon_Devastator : public CASW_Weapon_Assault_Shotgun
4749
virtual Class_T Classify(void) { return (Class_T)CLASS_ASW_DEVASTATOR; }
4850
protected:
4951
CNetworkVar( bool, m_bLockedFire );
52+
53+
#ifdef CLIENT_DLL
54+
HPARTICLEFFECT m_hLockedFireParticle;
55+
#endif
56+
57+
void DisableLockFire();
5058
};
5159

5260
#endif // asw_weapon_devastator_shared_h__

0 commit comments

Comments
 (0)