mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-12-23 03:40:05 +00:00
Fix MSVC compilation by not using non-standard struct initialization (#20)
Co-authored-by: Raymonf <Raymonf@users.noreply.github.com>
This commit is contained in:
parent
7a46f061ed
commit
88d08ffca7
@ -190,7 +190,8 @@ void PlayerManager::enterPlayer(CNSocket* sock, CNPacketData* data) {
|
||||
response->PCLoadData2CL.aEquip[i] = plr.Equip[i];
|
||||
|
||||
// protocol-agnostic sItemBase usage
|
||||
sItemBase item = (sItemBase){0};
|
||||
sItemBase item;
|
||||
memset(&item, 0, sizeof(sItemBase));
|
||||
item.iID = 495;
|
||||
|
||||
for (int i = 0; i < AINVEN_COUNT; i++) {
|
||||
@ -200,7 +201,7 @@ void PlayerManager::enterPlayer(CNSocket* sock, CNPacketData* data) {
|
||||
plr.Inven[i] = item;
|
||||
break;
|
||||
default:
|
||||
plr.Inven[i] = (sItemBase){0};
|
||||
memset(&plr.Inven[i], 0, sizeof(sItemBase));
|
||||
}
|
||||
response->PCLoadData2CL.aInven[i] = plr.Inven[i];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user