Mercurial > mm7
comparison mm7_4.cpp @ 791:346f7069676a
Indoor::GetSector and various stuff
author | Nomad |
---|---|
date | Mon, 25 Mar 2013 05:27:18 +0200 |
parents | f004c7ceb7bd |
children | 41b4e9769863 |
comparison
equal
deleted
inserted
replaced
790:1e2be0f5eb30 | 791:346f7069676a |
---|---|
437 } | 437 } |
438 return blv_floor_level[0]; | 438 return blv_floor_level[0]; |
439 } | 439 } |
440 | 440 |
441 //----- (0046D49E) -------------------------------------------------------- | 441 //----- (0046D49E) -------------------------------------------------------- |
442 int __fastcall ODM_GetFloorLevel(int X, signed int Y, int Z, int a4, int *a5, int *a6, int a7) | 442 int __fastcall ODM_GetFloorLevel(int X, signed int Y, int Z, int __unused, int *pIsOnWater, int *a6, int bWaterWalk) |
443 { | 443 { |
444 BSPModel *pBModel; // esi@4 | 444 BSPModel *pBModel; // esi@4 |
445 ODMFace *pFace; // ecx@11 | 445 ODMFace *pFace; // ecx@11 |
446 int v14; // edx@20 | 446 int v14; // edx@20 |
447 signed int v18; // edx@26 | 447 signed int v18; // edx@26 |
472 signed int v49; // [sp+58h] [bp+18h]@43 | 472 signed int v49; // [sp+58h] [bp+18h]@43 |
473 | 473 |
474 v46 = 1; | 474 v46 = 1; |
475 dword_721160[0] = -1; | 475 dword_721160[0] = -1; |
476 dword_721110[0] = -1; | 476 dword_721110[0] = -1; |
477 odm_floor_level[0] = GetTerrainHeightsAroundParty2(X, Y, a5, a7); | 477 odm_floor_level[0] = GetTerrainHeightsAroundParty2(X, Y, pIsOnWater, bWaterWalk); |
478 if ( (signed int)pOutdoor->uNumBModels <= 0 ) | 478 if ( (signed int)pOutdoor->uNumBModels <= 0 ) |
479 { | 479 { |
480 *a6 = 0; | 480 *a6 = 0; |
481 return odm_floor_level[0]; | 481 return odm_floor_level[0]; |
482 } | 482 } |
603 *a6 = dword_721110[v27] | (dword_721160[v27] << 6); | 603 *a6 = dword_721110[v27] | (dword_721160[v27] << 6); |
604 } | 604 } |
605 if ( v27 ) | 605 if ( v27 ) |
606 { | 606 { |
607 v32 = &pOutdoor->pBModels[dword_721160[v27]].pFaces[dword_721110[v27]]; | 607 v32 = &pOutdoor->pBModels[dword_721160[v27]].pFaces[dword_721110[v27]]; |
608 *a5 = 0; | 608 *pIsOnWater = false; |
609 if ( v32->uAttributes & 0x10 ) | 609 if ( v32->Fluid()) |
610 *a5 = 1; | 610 *pIsOnWater = true; |
611 } | 611 } |
612 if ( odm_floor_level[v27] >= odm_floor_level[0] ) | 612 if ( odm_floor_level[v27] >= odm_floor_level[0] ) |
613 odm_floor_level[0] = odm_floor_level[v27]; | 613 odm_floor_level[0] = odm_floor_level[v27]; |
614 return odm_floor_level[0]; | 614 return odm_floor_level[0]; |
615 } | 615 } |