Skip to content

Commit

Permalink
Ooops wrong way to do random range
Browse files Browse the repository at this point in the history
  • Loading branch information
anr2me committed Apr 4, 2021
1 parent 109ef2f commit cede00b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/HLE/sceNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ static int sceNetApctlGetBSSDescEntryUser(int entryId, int infoId, u32 resultAdd
}
break;
case PSP_NET_APCTL_DESC_CHANNEL:
// FIXME: Return one 1 byte value or may be 32-bit if it this is not channel?
// FIXME: Return one 1 byte value or may be 32-bit if this is not a channel?
if (entryId == 0)
Memory::WriteStruct(resultAddr, &netApctlInfo.channel);
else {
Expand All @@ -1275,7 +1275,7 @@ static int sceNetApctlGetBSSDescEntryUser(int entryId, int infoId, u32 resultAdd
Memory::WriteStruct(resultAddr, &netApctlInfo.strength);
else {
// Randomize signal strength between 1%~99% since games like MGS:PW are using signal strength to determine the strength of the recruit
Memory::Write_U8(rand()*99 + 1, resultAddr);
Memory::Write_U8((int)(((float)rand() / (float)RAND_MAX) * 99.0 + 1.0), resultAddr);
}
break;
case PSP_NET_APCTL_DESC_SECURITY:
Expand Down

0 comments on commit cede00b

Please sign in to comment.