mirror of
https://github.com/XProger/OpenLara.git
synced 2025-02-24 15:32:30 +01:00
fix items on the last TR2 level (house), fix weapon draw in dozy without the weapon item, fix Window object class name collision with X11 types
This commit is contained in:
parent
deaed3a74f
commit
99033cd85d
@ -4817,6 +4817,7 @@ namespace TR {
|
||||
f.flags.texture = (info & 0xFF) | (r.tex << 8);
|
||||
f.triangle = true;
|
||||
f.colored = false;
|
||||
f.water = false;
|
||||
f.flip = false;
|
||||
|
||||
f.vertices[0] = r.i0;
|
||||
@ -4837,6 +4838,7 @@ namespace TR {
|
||||
f.flags.texture = info & 0xFFFF;
|
||||
f.triangle = false;
|
||||
f.colored = false;
|
||||
f.water = false;
|
||||
f.flip = false;
|
||||
|
||||
struct {
|
||||
|
@ -615,6 +615,11 @@ struct Inventory {
|
||||
if (!TR::isEmptyLevel(level->id)) {
|
||||
add(TR::Entity::INV_PISTOLS, UNLIMITED_AMMO);
|
||||
}
|
||||
|
||||
if (level->id == TR::LVL_TR2_HOUSE) {
|
||||
add(TR::Entity::INV_KEY_1);
|
||||
add(TR::Entity::INV_PUZZLE_1);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
addWeapons();
|
||||
add(TR::Entity::INV_KEY_1, 3);
|
||||
|
@ -852,10 +852,12 @@ struct Lara : Character {
|
||||
}
|
||||
|
||||
bool canDrawWeapon() {
|
||||
if (wpnCurrent == TR::Entity::NONE)
|
||||
return false;
|
||||
|
||||
if (dozy) return true;
|
||||
|
||||
return wpnCurrent != TR::Entity::NONE
|
||||
&& animation.index != ANIM_CLIMB_3
|
||||
return animation.index != ANIM_CLIMB_3
|
||||
&& animation.index != ANIM_CLIMB_2
|
||||
&& state != STATE_DEATH
|
||||
&& state != STATE_HANG
|
||||
@ -2911,7 +2913,7 @@ struct Lara : Character {
|
||||
|
||||
if (dozy && Input::state[pid][cWalk]) {
|
||||
dozy = false;
|
||||
stand = STAND_AIR;
|
||||
stand = getRoom().flags.water ? STAND_UNDERWATER : STAND_AIR;
|
||||
return input;
|
||||
}
|
||||
|
||||
|
@ -1107,7 +1107,7 @@ struct Level : IGame {
|
||||
case TR::Entity::STONE_ITEM_4 : return new StoneItem(this, index);
|
||||
|
||||
case TR::Entity::WINDOW_1 :
|
||||
case TR::Entity::WINDOW_2 : return new Window(this, index);
|
||||
case TR::Entity::WINDOW_2 : return new BreakableWindow(this, index);
|
||||
|
||||
default : return (level.entities[index].modelIndex > 0) ? new Controller(this, index) : new Sprite(this, index, 0);
|
||||
}
|
||||
|
@ -1570,9 +1570,9 @@ struct Explosion : Sprite {
|
||||
};
|
||||
|
||||
|
||||
struct Window : Controller {
|
||||
struct BreakableWindow : Controller {
|
||||
|
||||
Window(IGame *game, int entity) : Controller(game, entity) {
|
||||
BreakableWindow(IGame *game, int entity) : Controller(game, entity) {
|
||||
initMeshOverrides();
|
||||
layers[0].mask = 0x00000001;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user