Factor in size to actor offset

This commit is contained in:
KimLS 2017-08-28 23:48:05 -07:00
parent 545ac6b420
commit 46561b9cf5

View File

@ -804,105 +804,110 @@ void Mob::FixZ() {
} }
float Mob::GetModelOffset() const { float Mob::GetModelOffset() const {
float offset = 3.125f;
switch (race) { switch (race) {
case 436: case 436:
return 0.577f; offset = 0.577f;
break;
case 430: case 430:
return 0.5f; offset = 0.5f;
break;
case 432: case 432:
return 1.9f; offset = 1.9f;
break;
case 435: case 435:
return 0.93f; offset = 0.93f;
break;
case 450: case 450:
return 0.938f; offset = 0.938f;
break;
case 479: case 479:
return 0.8f; offset = 0.8f;
break;
case 451: case 451:
return 0.816f; offset = 0.816f;
break;
case 437: case 437:
return 0.527f; offset = 0.527f;
break;
case 439: case 439:
return 1.536f; offset = 1.536f;
break;
case 415: case 415:
return 1.0f; offset = 1.0f;
break;
case 438: case 438:
return 0.776f; offset = 0.776f;
break;
case 452: case 452:
return 0.776f; offset = 0.776f;
break;
case 441: case 441:
return 0.816f; offset = 0.816f;
break;
case 440: case 440:
return 0.938f; offset = 0.938f;
break;
case 468: case 468:
return 1.0f; offset = 1.0f;
break;
case 459: case 459:
return 1.0f; offset = 1.0f;
break;
case 462: case 462:
return 1.5f; offset = 1.5f;
break;
case 530: case 530:
return 1.2f; offset = 1.2f;
break;
case 549: case 549:
return 0.5f; offset = 0.5f;
break;
case 548: case 548:
return 0.5f; offset = 0.5f;
break;
case 547: case 547:
return 0.5f; offset = 0.5f;
break;
case 604: case 604:
return 1.2f; offset = 1.2f;
break;
case 653: case 653:
return 5.9f; offset = 5.9f;
break;
case 658: case 658:
return 4.0f; offset = 4.0f;
break;
case 323: case 323:
return 5.0f; offset = 5.0f;
break;
case 663: case 663:
return 5.0f; offset = 5.0f;
break;
case 664: case 664:
return 4.0f; offset = 4.0f;
break;
case 703: case 703:
return 9.0f; offset = 9.0f;
break;
case 688: case 688:
return 5.0f; offset = 5.0f;
break;
case 669: case 669:
return 7.0f; offset = 7.0f;
break;
case 687: case 687:
return 2.0f; offset = 2.0f;
break;
case 686: case 686:
return 2.0f; offset = 2.0f;
break;
default: default:
return 3.125f; offset = 3.125f;
} }
return 0.2 * GetSize() * offset;
} }
int ZoneDatabase::GetHighestGrid(uint32 zoneid) { int ZoneDatabase::GetHighestGrid(uint32 zoneid) {