Skip to content

Commit 381805a

Browse files
committed
Fixed crash that I caused. Fixed admin password dialog box not supporting all characters. Changed version.
1 parent 6350ae2 commit 381805a

5 files changed

Lines changed: 22 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ This is a quick fix patch to address some bugs.
760760
- Fixed SEF bug: Crash in multiplayer when using certain loadouts
761761
- Fixed SEF bug: Weird leg movement speed in multiplayer when using certain loadouts
762762
- Fixed TSS bug: Can sometimes reload the same magazine back into the weapon, in certain conditions
763+
- Fixed TSS bug: The password dialog box (on Admin Login) didn't support all characters
763764

764765

765766
#### v6.1

Source/Game/SwatGame/Classes/LoadOut/LoadOut.uc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ simulated function Initialize(DynamicLoadOutSpec DynamicSpec, bool IsSuspect)
3232
if (Level.GetEngine().EnableDevTools)
3333
log(self.Name$" >>> Initialize( "$DynamicSpec$" )");
3434
35+
mplog(self.Name$" >>> Initialize("$DynamicSpec$")");
36+
3537
// if( DynamicSpec != None )
3638
// {
3739
// log(self.Name$" ... Dynamic Loadout spec:");
@@ -44,17 +46,19 @@ simulated function Initialize(DynamicLoadOutSpec DynamicSpec, bool IsSuspect)
4446
if( DynamicSpec != None )
4547
{
4648
MutateLoadOutSpec( DynamicSpec, IsSuspect );
47-
49+
mplog(self.name$"...MutateLoadOutSpec");
4850
//log(self.Name$" ... After mutation:");
4951
//PrintLoadOutSpecToMPLog();
5052
}
5153

5254
ValidateLoadOutSpec(IsSuspect, DynamicSpec);
55+
mplog(self.name$"...ValidateLoadOutSpec");
5356

5457
//log(self.Name$" ... After validation:");
5558
//PrintLoadOutSpecToMPLog();
5659

5760
SpawnEquipmentFromLoadOutSpec(DynamicSpec);
61+
mplog(self.name$"...SpawnEquipmentFromLoadOutSpec");
5862

5963
//log(self.Name$" ... Spawned equipment:");
6064
//PrintLoadOutToMPLog();
@@ -112,13 +116,15 @@ simulated function bool ValidateLoadOutSpec(bool IsSuspect, DynamicLoadoutSpec D
112116
PrimaryAmmo = class<SwatAmmo>(LoadOutSpec[1]);
113117
SecondaryAmmo = class<SwatAmmo>(LoadOutSpec[3]);
114118

119+
mplog(self.name$"...ValidateLoadOutSpec...");
115120
if(DynamicSpec.GetPrimaryAmmoCount() < PrimaryAmmo.default.MinReloadsToCarry) {
116121
DynamicSpec.SetPrimaryAmmoCount(PrimaryAmmo.default.MinReloadsToCarry);
117122
}
118123
if(DynamicSpec.GetSecondaryAmmoCount() < SecondaryAmmo.default.MinReloadsToCarry) {
119124
DynamicSpec.SetSecondaryAmmoCount(SecondaryAmmo.default.MinReloadsToCarry);
120125
}
121126

127+
mplog(self.name$"...ValidateLoadOutSpec::SetPrimary/SecondaryAmmo counts");
122128
if(GetTotalWeight() > GetMaximumWeight() || GetTotalBulk() > GetMaximumBulk()) {
123129
// We are overweight. We need to completely respawn our gear from scratch.
124130
AssertWithDescription(false, "Loadout "$self$" exceeds maximum weight. It's getting reset to the default equipment.");
@@ -131,6 +137,7 @@ simulated function bool ValidateLoadOutSpec(bool IsSuspect, DynamicLoadoutSpec D
131137
}
132138
return true;
133139
}
140+
mplog(self.name$"...ValidateLoadOutSpec: checked max weight");
134141

135142
for( i = 0; i < Pocket.EnumCount; i++ )
136143
{
@@ -716,7 +723,7 @@ function float GetTotalWeight() {
716723
local float minimum;
717724

718725
total = 0.0;
719-
minimum = GetTotalWeight();
726+
minimum = GetMinimumWeight();
720727

721728
for(i = 0; i < Pocket.EnumCount; i++) {
722729
if(PocketEquipment[i] == None)

Source/Game/SwatGame/Classes/SwatGameInfo.uc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ function AddDefaultInventory(Pawn inPlayerPawn)
10951095
else
10961096
LoadOut = Spawn(class'OfficerLoadOut', PlayerPawn, 'EmptyMultiplayerSuspectLoadOut' );
10971097
1098-
log( "...In AddDefaultInventory(): loadout's owner="$LoadOut.Owner );
1098+
mplog( "...In AddDefaultInventory(): loadout's owner="$LoadOut.Owner );
10991099
assert(LoadOut != None);
11001100

11011101
// First, set all the pocket items in the NetPlayer loadout spec, so
@@ -1121,22 +1121,30 @@ function AddDefaultInventory(Pawn inPlayerPawn)
11211121
// Alter it *ex post facto* to have the correct ammo counts
11221122
LoadOutSpec.SetPrimaryAmmoCount(RepoPlayerItem.GetPrimaryAmmoCount());
11231123
LoadOutSpec.SetSecondaryAmmoCount(RepoPlayerItem.GetSecondaryAmmoCount());
1124+
1125+
mplog("...Set ammo counts to "$RepoPlayerItem.GetPrimaryAmmoCount()$" and "$RepoPlayerItem.GetSecondaryAmmoCount());
11241126
}
11251127
11261128
IsSuspect = theNetPlayer.GetTeamNumber() == 1;
11271129
}
11281130
11291131
LoadOut.Initialize( LoadOutSpec, IsSuspect );
11301132
1133+
mplog("LoadOut.Initialize()");
1134+
11311135
PlayerPawn.ReceiveLoadOut(LoadOut);
11321136
1137+
mplog("PlayerPawn.ReceiveLoadOut");
1138+
11331139
// We have to do this after ReceiveLoadOut() because that's what sets the
11341140
// Replicated Skins.
11351141
if ( Level.NetMode != NM_Standalone )
11361142
theNetPlayer.InitializeReplicatedCounts();
11371143
11381144
//TMC TODO do this stuff in the PlayerPawn (legacy support)
11391145
SetPlayerDefaults(PlayerPawn);
1146+
1147+
mplog("PlayerPawn - SetPlayerDefaults");
11401148
}
11411149
11421150
exec function MissionStatus()

System/SwatGui.ini

-976 Bytes
Binary file not shown.

System/Version.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[Version]
22
ModName="SEF"
3-
ChangeNumber=6.1
3+
ChangeNumber=6.2
44
ChangeTime="00:00:00"
55
ChangeDate="2017/10/26"
6-
BuildTime="Thu Oct 26 2017"
6+
BuildTime="Sat Oct 28 2017"
77

88
[SwatGui.ModInfo]
99
ModName="[b]SWAT: Elite Force[\b]"
10-
ChangeNumber="v6.1 ([c=00FF00][b]Release[\b][\c])"
10+
ChangeNumber="v6.2 ([c=00FFFF][b]Test 2[\b][\c])"

0 commit comments

Comments
 (0)