Skip to content

Commit

Permalink
version 1.22 - multiplayer fixed, stash size 100- tabs, items on stas…
Browse files Browse the repository at this point in the history
…h tab higher than 25 will be lost.
  • Loading branch information
qndel committed Aug 9, 2019
1 parent 501c3ab commit d35fd58
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
2 changes: 2 additions & 0 deletions 25
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

G:\LATEST_STUFF\MY_D1_MOD\Infernity>git pull
2 changes: 1 addition & 1 deletion Source/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const int init_inf = 0x7F800000; // weak
/* data */

char gszVersionNumber[260] = "internal version unknown";
char gszProductName[260] = "Infernity v1.21";
char gszProductName[260] = "Infernity v1.22";

struct init_cpp_init
{
Expand Down
2 changes: 1 addition & 1 deletion Source/inv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void DrawStashButtons() {

int stashtab = plr[myplr].currentInventoryIndex - 4;
if (stashtab <= 0) { colors[0] = 0; colors[1] = 0;}
if (stashtab >= 99) { colors[3] = 0; colors[4] = 0; }
if (stashtab > MAX_STASH_TABS) { colors[3] = 0; colors[4] = 0; }
std::string texts[5] = { "<<","<","o",">",">>" };

if (stashtab >= 0) {
Expand Down
2 changes: 1 addition & 1 deletion Source/mainmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void __cdecl mainmenu_loop()
while ( 1 )
{
a2 = 0;
if ( !UiMainMenuDialog("Infernity v1.21", &a2, effects_play_sound, 30) )
if ( !UiMainMenuDialog("Infernity v1.22", &a2, effects_play_sound, 30) )
TermMsg("Unable to display mainmenu");
if ( a2 == 1 )
break;
Expand Down
6 changes: 4 additions & 2 deletions Source/msg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3446,12 +3446,14 @@ int __fastcall On_SEND_PLRINFO(struct TCmdPlrInfoHdr *pCmd, int pnum)
outfile << "SENDING " << pCmd->wOffset << " offset! BYTES: " << (int)pCmd->wBytes + sizeof(TCmdPlrInfoHdr) << "! FULL SIZE = " << sizeof(LATEST_PKPLAYER_STRUCT) << "\n";
outfile.close();
}
msg_send_packet(pnum, pCmd, pCmd->wBytes + sizeof(TCmdPlrInfoHdr));
//msg_send_packet(pnum, pCmd, pCmd->wBytes + sizeof(TCmdPlrInfoHdr));
msg_send_packet(pnum, pCmd, (unsigned short)pCmd->wBytes + 5);
}
else {
multi_player_joins(pnum, pCmd, pCmd->bCmd == 2);
}
return v2->wBytes + sizeof(TCmdPlrInfoHdr);
//return v2->wBytes + sizeof(TCmdPlrInfoHdr);
return (unsigned short)v2->wBytes + 5;
}
// 676194: using guessed type char gbBufferMsgs;

Expand Down
9 changes: 5 additions & 4 deletions Source/multi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,8 @@ void __fastcall multi_player_joins(int pnum, TCmdPlrInfoHdr *cmd, int a3)
{
int v3; // ebx
TCmdPlrInfoHdr *v4; // edi
//short *v5; // esi
int *v5;
short *v5; // esi
//int *v5;
int v6; // esi
bool v7; // zf
char *v8; // eax
Expand All @@ -1126,14 +1126,15 @@ void __fastcall multi_player_joins(int pnum, TCmdPlrInfoHdr *cmd, int a3)
v4 = cmd;
if ( myplr != pnum )
{
v5 = (int*)&sgwPackPlrOffsetTbl[pnum];
v5 = &sgwPackPlrOffsetTbl[pnum];
if ( *v5 == cmd->wOffset || (*v5 = 0, !cmd->wOffset) )
{
if ( !a3 && !*v5 )
{
multi_send_pinfo(pnum, CMD_ACK_PLRINFO);
}
memcpy((char *)&netplr[v3] + (int)v4->wOffset, &v4[1], v4->wBytes);
//memcpy((char *)&netplr[v3] + (int)v4->wOffset, &v4[1], v4->wBytes);
memcpy((char*)& netplr[v3] + (unsigned short)v4->wOffset, &v4[1], (unsigned short)v4->wBytes);
*v5 += v4->wBytes;
//if ( *v5 == 1266 )

Expand Down
6 changes: 3 additions & 3 deletions cmd.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
E:
cd E:\MY_D1_MOD\Infernity\
copy E:\MY_D1_MOD\Infernity\lootFilter.lua E:\MY_D1_MOD\Infernity\Source\DiabloGame\lootFilter.lua
G:
cd G:\LATEST_STUFF\MY_D1_MOD\Infernity\
copy G:\LATEST_STUFF\MY_D1_MOD\Infernity\lootFilter.lua G:\LATEST_STUFF\MY_D1_MOD\Infernity\Source\DiabloGame\lootFilter.lua
"C:\Program Files\7-Zip\7z.exe" a -tzip Infernity.zip @zipfiles.txt
start
8 changes: 4 additions & 4 deletions structs.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <string>
#define GLOBAL_WIDTH 1280
#define GLOBAL_HEIGHT 960
#define MAX_STASH_TABS 100
#define MEGAPACKETSIZE 92000
#define MAX_STASH_TABS 25
#define MEGAPACKETSIZE 32000
#define GRISWOLD_GOLD_LIMIT 1400000
#define ADRIA_GOLD_LIMIT 1400000
#define WIRT_GOLD_LIMIT 900000
Expand Down Expand Up @@ -1136,9 +1136,9 @@ struct TCmdDamage
struct TCmdPlrInfoHdr
{
unsigned char bCmd;
//unsigned short wOffset;
unsigned short wOffset;
unsigned short wBytes;
int wOffset;
//int wOffset;
};

struct TCmdString
Expand Down

0 comments on commit d35fd58

Please sign in to comment.