Browse Source

Merge pull request #145 from AJenbo/StartWarpLvl

Clean up StartWarpLvl
pull/4/head
Anders Jenbo 8 years ago committed by GitHub
parent
commit
4220be365d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 36
      Source/player.cpp

36
Source/player.cpp

@ -2261,31 +2261,21 @@ void __fastcall RestartTownLvl(int pnum)
void __fastcall StartWarpLvl(int pnum, int pidx) void __fastcall StartWarpLvl(int pnum, int pidx)
{ {
int v2; // edi
int v3; // esi
int *v4; // eax
int v5; // eax
HWND v6; // ST00_4
v2 = pidx;
v3 = pnum;
InitLevelChange(pnum); InitLevelChange(pnum);
if ( gbMaxPlayers != 1 )
{ if ( gbMaxPlayers != 1 ) {
v4 = &plr[v3].plrlevel; if ( plr[pnum].plrlevel != 0 ) {
if ( *v4 ) plr[pnum].plrlevel = 0;
*v4 = 0; } else {
else plr[pnum].plrlevel = portal[pidx].level;
*v4 = portal[v2].level; }
} }
if ( v3 == myplr )
{ if ( pnum == myplr ) {
SetCurrentPortal(v2); SetCurrentPortal(pidx);
v5 = v3; plr[pnum]._pmode = PM_NEWLVL;
plr[v5]._pmode = PM_NEWLVL; plr[pnum]._pInvincible = TRUE;
v6 = ghMainWnd; PostMessage(ghMainWnd, WM_DIABWARPLVL, 0, 0);
plr[v5]._pInvincible = 1;
PostMessage(v6, WM_DIABWARPLVL, 0, 0);
} }
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;

Loading…
Cancel
Save