File tree 4 files changed +8
-39
lines changed
4 files changed +8
-39
lines changed Original file line number Diff line number Diff line change @@ -239,22 +239,6 @@ bool C_TFWeaponBuilder::IsPlacingObject( void )
239
239
return false ;
240
240
}
241
241
242
- // -----------------------------------------------------------------------------
243
- // Purpose:
244
- // -----------------------------------------------------------------------------
245
- int C_TFWeaponBuilder::GetSlot ( void ) const
246
- {
247
- return GetObjectInfo ( m_iObjectType )->m_SelectionSlot ;
248
- }
249
-
250
- // -----------------------------------------------------------------------------
251
- // Purpose:
252
- // -----------------------------------------------------------------------------
253
- int C_TFWeaponBuilder::GetPosition ( void ) const
254
- {
255
- return GetObjectInfo ( m_iObjectType )->m_SelectionPosition ;
256
- }
257
-
258
242
// -----------------------------------------------------------------------------
259
243
// Purpose:
260
244
// -----------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -48,9 +48,6 @@ class C_TFWeaponBuilder : public C_TFWeaponBase
48
48
49
49
virtual void UpdateAttachmentModels ( void );
50
50
51
- virtual int GetSlot ( void ) const ;
52
- virtual int GetPosition ( void ) const ;
53
-
54
51
void SetupObjectSelectionSprite ( void );
55
52
56
53
virtual CHudTexture const *GetSpriteActive ( void ) const ;
Original file line number Diff line number Diff line change @@ -86,7 +86,11 @@ CTFWeaponBuilder::~CTFWeaponBuilder()
86
86
void CTFWeaponBuilder::SetSubType ( int iSubType )
87
87
{
88
88
m_iObjectType = iSubType;
89
-
89
+
90
+ const CObjectInfo *pInfo = GetObjectInfo ( m_iObjectType );
91
+ SetSlot ( pInfo->m_SelectionSlot );
92
+ SetPosition ( pInfo->m_SelectionPosition );
93
+
90
94
// m_iViewModelIndex is set by the base Precache(), which didn't know what
91
95
// type of object we built, so it didn't get the right viewmodel index.
92
96
// Now that our data is filled in, go and get the right index.
@@ -1148,22 +1152,6 @@ bool CTFWeaponBuilder::HasAmmo( void )
1148
1152
return ( pOwner->GetBuildResources () >= iCost );
1149
1153
}
1150
1154
1151
- // -----------------------------------------------------------------------------
1152
- // Purpose:
1153
- // -----------------------------------------------------------------------------
1154
- int CTFWeaponBuilder::GetSlot ( void ) const
1155
- {
1156
- return GetObjectInfo ( m_iObjectType )->m_SelectionSlot ;
1157
- }
1158
-
1159
- // -----------------------------------------------------------------------------
1160
- // Purpose:
1161
- // -----------------------------------------------------------------------------
1162
- int CTFWeaponBuilder::GetPosition ( void ) const
1163
- {
1164
- return GetObjectInfo ( m_iObjectType )->m_SelectionPosition ;
1165
- }
1166
-
1167
1155
// -----------------------------------------------------------------------------
1168
1156
// Purpose:
1169
1157
// Output : char const
Original file line number Diff line number Diff line change @@ -649,6 +649,9 @@ class CBaseCombatWeapon : public BASECOMBATWEAPON_DERIVED_FROM
649
649
650
650
IPhysicsConstraint *GetConstraint () { return m_pConstraint; }
651
651
652
+ CNetworkVar ( int , m_iSlot ); // which bucket this weapon is in
653
+ CNetworkVar ( int , m_iPosition ); // position in the bucket
654
+
652
655
private:
653
656
WEAPON_FILE_INFO_HANDLE m_hWeaponFileInfo;
654
657
IPhysicsConstraint *m_pConstraint;
@@ -662,9 +665,6 @@ class CBaseCombatWeapon : public BASECOMBATWEAPON_DERIVED_FROM
662
665
663
666
CNetworkVar ( short , m_nCustomViewmodelModelIndex );
664
667
665
- CNetworkVar ( int , m_iSlot ); // which bucket this weapon is in
666
- CNetworkVar ( int , m_iPosition ); // position in the bucket
667
-
668
668
// Server only
669
669
#if !defined( CLIENT_DLL )
670
670
You can’t perform that action at this time.
0 commit comments