Skip to content

Commit ba550fb

Browse files
authored
Merge branch 'reactivedrop_beta' into TraitorIconFix
2 parents 3994cc7 + 3d3abe0 commit ba550fb

20 files changed

Lines changed: 90 additions & 96 deletions

reactivedrop/content/traitors_challenge/resource/challenges/traitors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"_rd_traitors_challenge_enabled" "1"
77
"rd_player_bots_allowed" "0"
88
"rd_add_index_to_name" "1"
9+
"rd_restrict_aspect_width" "1.77777777"
910
"rd_draw_restricted_rectangles_coop" "1"
1011

1112
"rd_auto_fast_restart" "1"

reactivedrop/content/traitors_challenge/scripts/vscripts/challenge_traitors.nut

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function SetTraitorIcon(interval = 10) {
236236
continue;
237237
}
238238

239-
local hHud2 = Entities.FindByName(null, hPlayer.GetScriptScope().strHudName2);
239+
local hHud2 = Entities.FindByName(null, hPlayer.GetScriptScope().strHudName2);
240240
for(local i = 6;i<21;i++) {
241241
hHud2.SetInt(i, list[i]);
242242
}

src/game/client/swarm/asw_in_mouse.cpp

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "cbase.h"
22
#include "asw_input.h"
33
#include "vgui/asw_vgui_ingame_panel.h"
4+
#include "asw_hud_master.h"
45
#include "asw_hud_crosshair.h"
56
#include "c_asw_player.h"
67
#include "c_asw_marine.h"
@@ -15,13 +16,6 @@
1516
// memdbgon must be the last include file in a .cpp file!!!
1617
#include "tier0/memdbgon.h"
1718

18-
// restricted area variables
19-
extern int g_nRestrictedAreaLeft;
20-
extern int g_nRestrictedAreaRight;
21-
extern int g_nScreenAreaWidth;
22-
extern int g_nScreenAreaHeight;
23-
extern bool g_bUltraWideScreen;
24-
2519
ConVar glow_outline_color_active( "glow_outline_color_active", "153 153 204", FCVAR_NONE );
2620
ConVar glow_outline_color_inactive( "glow_outline_color_inactive", "77 77 77", FCVAR_NONE );
2721

@@ -92,17 +86,15 @@ void CASWInput::ApplyMouse( int nSlot, QAngle& viewangles, CUserCmd *cmd, float
9286
int current_posx, current_posy;
9387
GetMousePos(current_posx, current_posy);
9488

95-
// restrict cursor to 16:9 area to prevent ultra-wide fov cheat
96-
C_ASW_Player* asw_player = C_ASW_Player::GetLocalASWPlayer();
89+
if ( ASWInput()->ControllerModeActiveMouse() )
90+
return;
9791

98-
if (asw_player && !asw_player->GetSpectatingNPC())
92+
CASW_Hud_Master *pHUDMaster = GET_HUDELEMENT( CASW_Hud_Master );
93+
if ( pHUDMaster )
9994
{
100-
current_posx = clamp(current_posx, g_nRestrictedAreaLeft, g_nRestrictedAreaRight);
95+
current_posx = clamp( current_posx, pHUDMaster->m_nMouseMinX, pHUDMaster->m_nMouseMaxX );
10196
}
10297

103-
if ( ASWInput()->ControllerModeActiveMouse() )
104-
return;
105-
10698
if ( MarineControllingTurret() )
10799
{
108100
// accelerate up the mouse intertia

src/game/client/swarm/c_asw_buzzer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ END_RECV_TABLE()
2929
C_ASW_Buzzer::C_ASW_Buzzer()
3030
{
3131
m_pEngineSound1 = NULL;
32+
33+
// reactivedrop: workaround to fix aliens red blood
34+
// m_bloodColor is not networked
35+
// so setting SetBloodColor() on server doesn't affect client
36+
SetBloodColor( BLOOD_COLOR_GREEN );
3237
}
3338

3439
C_ASW_Buzzer::~C_ASW_Buzzer()

src/game/client/swarm/c_asw_marine_resource.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ IMPLEMENT_CLIENTCLASS_DT( C_ASW_Marine_Resource, DT_ASW_Marine_Resource, CASW_Ma
5454
RecvPropIntWithMinusOneFlag( RECVINFO( m_iScore ) ),
5555
RecvPropFloat( RECVINFO( m_flFinishedMissionTime ) ),
5656
RecvPropDataTable( RECVINFO_DT( m_EquippedItemData ), 0, &REFERENCE_RECV_TABLE( DT_RD_ItemInstances_Marine_Resource ) ),
57+
RecvPropInt( RECVINFO( m_iChallengeScratch ) ),
5758
END_RECV_TABLE();
5859

5960
extern ConVar asw_leadership_radius;
@@ -81,6 +82,7 @@ C_ASW_Marine_Resource::C_ASW_Marine_Resource()
8182
m_flFinishedMissionTime = -1;
8283
memset( m_iWeaponsInSlots, -1, sizeof( m_iWeaponsInSlots ) );
8384
memset( m_iWeaponsInSlotsLastSeen, -1, sizeof( m_iWeaponsInSlotsLastSeen ) );
85+
m_iChallengeScratch = 0;
8486
}
8587

8688
C_ASW_Marine_Resource::~C_ASW_Marine_Resource()

src/game/client/swarm/c_asw_marine_resource.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,13 @@ class C_ASW_Marine_Resource : public C_BaseEntity
114114
float m_flScoreLastChanged;
115115
int m_iPrevScore;
116116
int m_iCurScore;
117+
int m_iChallengeScratch;
117118

118119
CNetworkVarEmbedded( CRD_ItemInstances_Marine_Resource, m_EquippedItemData );
119120
void ClearInvalidEquipData();
120121

121122
private:
122-
C_ASW_Marine_Resource( const C_ASW_Marine_Resource & ); // not defined, not accessible
123+
C_ASW_Marine_Resource( const C_ASW_Marine_Resource & ) = delete;
123124
};
124125

125126
#endif /* _INCLUDED_C_ASW_MARINE_RESOURCE_H */

src/game/client/swarm/c_asw_objective.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,3 @@ const char *C_ASW_Objective::GetInfoIcon( int i )
132132
}
133133
return NULL;
134134
}
135-
136-
// allows this objective to paint its status on the HUD
137-
void C_ASW_Objective::PaintObjective( float &current_y )
138-
{
139-
}

src/game/client/swarm/c_asw_objective.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ class C_ASW_Objective : public C_BaseEntity
1818
const char *GetInfoIcon( int i );
1919
const char *GetObjectiveIconName( void );
2020

21-
// allows this objective to paint its status on the HUD
22-
virtual void PaintObjective( float &current_y );
23-
2421
virtual bool IsObjectiveComplete() { return m_bComplete; }
2522
virtual bool IsObjectiveFailed() { return m_bFailed; }
2623
virtual bool IsObjectiveOptional() { return m_bOptional; }

src/game/client/swarm/c_asw_player.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ BEGIN_NETWORK_TABLE( C_ASW_Player, DT_ASW_Player )
270270
RecvPropQAngles( RECVINFO( m_angMarineAutoAimFromClient ) ),
271271
RecvPropFloat( RECVINFO( m_flInactiveKickWarning ) ),
272272
RecvPropDataTable( RECVINFO_DT( m_EquippedItemData ), 0, &REFERENCE_RECV_TABLE( DT_RD_ItemInstances_Player ) ),
273+
RecvPropInt( RECVINFO( m_iChallengeScratch ) ),
273274
END_RECV_TABLE()
274275

275276
BEGIN_PREDICTION_DATA( C_ASW_Player )
@@ -357,6 +358,7 @@ C_ASW_Player::C_ASW_Player() :
357358
m_flInactiveKickWarning = 0.0f;
358359
m_nLastInactiveKickWarning = 0;
359360
m_flNextServerInfoUpdate = 0.0f;
361+
m_iChallengeScratch = 0;
360362
}
361363

362364

src/game/client/swarm/c_asw_player.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ class C_ASW_Player : public C_BasePlayer, public IASWPlayerAnimStateHelpers
359359
STEAM_CALLBACK( C_ASW_Player, Steam_OnUserStatsStored, UserStatsStored_t );
360360
#endif
361361

362+
int m_iChallengeScratch;
363+
362364
private:
363365
C_ASW_Player( const C_ASW_Player & );
364366
};

0 commit comments

Comments
 (0)