mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-14 00:54:05 +02:00
#22 add centaur statue
This commit is contained in:
@@ -172,7 +172,7 @@
|
||||
E( BLOOD ) \
|
||||
E( UNUSED_12 ) \
|
||||
E( SMOKE ) \
|
||||
E( STATUE ) \
|
||||
E( CENTAUR_STATUE ) \
|
||||
E( CABIN ) \
|
||||
E( MUTANT_EGG_SMALL ) \
|
||||
E( RICOCHET ) \
|
||||
|
@@ -466,8 +466,8 @@ struct Lara : Character {
|
||||
//reset(73, vec3(73372, 122, 51687), PI * 0.5f); // level 6 (midas hand)
|
||||
//reset(64, vec3(36839, -2560, 48769), 270 * DEG2RAD); // level 6 (flipmap effect)
|
||||
//reset(99, vec3(45562, -3328, 63366), 225 * DEG2RAD); // level 7a (flipmap)
|
||||
//reset(90, vec3(19438, 3840, 78341), 90 * DEG2RAD); // level 7a (statues)
|
||||
//reset(77, vec3(36943, -4096, 62821), 270 * DEG2RAD); // level 7b (heavy trigger)
|
||||
//reset(90, vec3(19438, 3840, 78341), 90 * DEG2RAD); // level 7b (statues)
|
||||
//reset(57, vec3(54844, -3328, 53145), 0); // level 8b (bridge switch
|
||||
//reset(12, vec3(34236, -2415, 14974), 0); // level 8b (sphinx)
|
||||
//reset(0, vec3(40913, -1012, 42252), PI); // level 8c
|
||||
|
@@ -521,6 +521,7 @@ struct Level : IGame {
|
||||
case TR::Entity::SCION_TARGET : return new ScionTarget(this, index);
|
||||
case TR::Entity::WATERFALL : return new Waterfall(this, index);
|
||||
case TR::Entity::TRAP_LAVA : return new TrapLava(this, index);
|
||||
case TR::Entity::CENTAUR_STATUE : return new CentaurStatue(this, index);
|
||||
case TR::Entity::CABIN : return new Cabin(this, index);
|
||||
case TR::Entity::TRAP_FLAME_EMITTER : return new TrapFlameEmitter(this, index);
|
||||
case TR::Entity::BOAT : return new Boat(this, index);
|
||||
|
@@ -1101,6 +1101,33 @@ struct DoorLatch : Controller {
|
||||
};
|
||||
|
||||
|
||||
#define CENTAUR_STATUE_RANGE (3072 + 512)
|
||||
|
||||
struct CentaurStatue : Controller {
|
||||
|
||||
CentaurStatue(IGame *game, int entity) : Controller(game, entity) {}
|
||||
|
||||
virtual void update() {
|
||||
if (explodeMask) {
|
||||
Controller::update();
|
||||
if (!explodeMask)
|
||||
deactivate(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pos - game->getLara()->pos).length() < CENTAUR_STATUE_RANGE) {
|
||||
explode(0xFFFFFFFF);
|
||||
game->playSound(TR::SND_EXPLOSION, pos, Sound::PAN);
|
||||
int index = game->addEnemy(TR::Entity::ENEMY_CENTAUR, getRoomIndex(), pos, angle.y);
|
||||
if (index > -1) {
|
||||
Controller *controller = (Controller*)level->entities[index].controller;
|
||||
controller->animation.setAnim(7, -36);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct Cabin : Controller {
|
||||
enum {
|
||||
STATE_UP,
|
||||
|
Reference in New Issue
Block a user