diff --git a/TR5Main/Game/Box.h b/TR5Main/Game/Box.h index 810205421..9cc7a8881 100644 --- a/TR5Main/Game/Box.h +++ b/TR5Main/Game/Box.h @@ -55,8 +55,8 @@ typedef struct OBJECT_BONES { this->bone0 = all; this->bone1 = all; - this->bone2 = -all; - this->bone3 = -all; + this->bone2 = all; + this->bone3 = all; } OBJECT_BONES(short angleY, short angleX) diff --git a/TR5Main/Game/lot.cpp b/TR5Main/Game/lot.cpp index 763798ae3..bb529ba8e 100644 --- a/TR5Main/Game/lot.cpp +++ b/TR5Main/Game/lot.cpp @@ -124,7 +124,6 @@ void InitialiseSlot(short itemNum, short slot) creature->patrol2 = false; creature->jumpAhead = false; creature->monkeyAhead = false; - creature->alerted = false; creature->LOT.canJump = false; creature->LOT.canMonkey = false; creature->LOT.isAmphibious = false; // only the crocodile can go water and land. (default: true) @@ -147,12 +146,7 @@ void InitialiseSlot(short itemNum, short slot) else if (!obj->undead && obj->hitPoints) obj->hitEffect = HIT_BLOOD; } - - // init the basic zone for creature. - // ignore if the zoneType is specified in the Objects[] already with other than ZONE_NULL. - if (obj->zoneType == ZONE_NULL) - obj->zoneType = ZONE_BASIC; // only entity that use CreatureActive() will reach InitialiseSlot() ! - + obj->nonLot = false; // change to use pathfinding } @@ -160,6 +154,9 @@ void InitialiseSlot(short itemNum, short slot) { default: case ZONE_NULL: + creature->LOT.step = SECTOR(1) - CLICK(3); + creature->LOT.drop = -(SECTOR(1) - CLICK(3)); + obj->zoneType = ZONE_BASIC; // only entity that use CreatureActive() will reach InitialiseSlot() ! break; case ZONE_SKELLY: diff --git a/TR5Main/Objects/TR4/Entity/tr4_crocodile.cpp b/TR5Main/Objects/TR4/Entity/tr4_crocodile.cpp index 566bea71e..21c1a0c06 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_crocodile.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_crocodile.cpp @@ -106,18 +106,18 @@ void CrocodileControl(short itemNumber) AI_INFO info; OBJECT_BONES boneRot; short angle; - short bone_angle; + short boneAngle; item = &Items[itemNumber]; obj = &Objects[item->objectNumber]; crocodile = GetCreatureInfo(item); angle = 0; - bone_angle = 0; + boneAngle = 0; if (item->hitPoints <= 0) { angle = 0; - bone_angle = 0; + boneAngle = 0; if (item->currentAnimState != CROC_DIE && item->currentAnimState != WCROC_DIE) { @@ -162,7 +162,7 @@ void CrocodileControl(short itemNumber) AlertAllGuards(itemNumber); } - bone_angle = angle << 2; + boneAngle = angle << 2; switch (item->currentAnimState) { case CROC_IDLE: @@ -170,9 +170,9 @@ void CrocodileControl(short itemNumber) if (item->aiBits & GUARD) { - bone_angle = item->itemFlags[0]; + boneAngle = item->itemFlags[0]; item->goalAnimState = CROC_IDLE; - item->itemFlags[0] = item->itemFlags[1] + bone_angle; + item->itemFlags[0] = item->itemFlags[1] + boneAngle; if (!(GetRandomControl() & 0x1F)) { @@ -298,9 +298,19 @@ void CrocodileControl(short itemNumber) } if (item->currentAnimState == CROC_IDLE || item->currentAnimState == CROC_ATK || item->currentAnimState == WCROC_ATK) - boneRot = OBJECT_BONES(info.angle, info.xAngle); + { + boneRot.bone0 = info.angle; + boneRot.bone1 = info.angle; + boneRot.bone2 = 0; + boneRot.bone3 = 0; + } else - boneRot = OBJECT_BONES(bone_angle); + { + boneRot.bone0 = boneAngle; + boneRot.bone1 = boneAngle; + boneRot.bone2 = -boneAngle; + boneRot.bone3 = -boneAngle; + } CreatureTilt(item, 0); CreatureJoint(item, 0, boneRot.bone0);