1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-14 17:14:29 +02:00

merge, fix emscripten webassembly compiler bug, fix limited pistols ammo on LEVEL10A bug

This commit is contained in:
XProger
2018-12-04 05:49:26 +03:00
parent 93706e0773
commit 9582dfd502
4 changed files with 6 additions and 8 deletions

View File

@@ -1466,7 +1466,7 @@ struct Controller {
mask |= layers[i].mask;
// set meshes visibility
for (int j = 0; j < model->mCount; j++)
joints[j].w = (vmask & (1 << j)) ? 1.0f : 0.0f; // hide invisible parts
joints[j].w = (vmask & (1 << j)) ? 1.0f : -1.0f; // hide invisible parts
if (explodeMask) {
ASSERT(explodeParts);

View File

@@ -728,7 +728,6 @@ struct Inventory {
switch (type) {
case TR::Entity::INV_PISTOLS :
case TR::Entity::INV_AMMO_PISTOLS :
count = UNLIMITED_AMMO; // pistols always has unlimited ammo
addAmmo(type, count, 10, TR::Entity::INV_PISTOLS, TR::Entity::INV_AMMO_PISTOLS);
break;
case TR::Entity::INV_SHOTGUN :

View File

@@ -1673,7 +1673,7 @@ struct Lara : Character {
if (hitType == TR::HIT_LAVA) {
for (int i = 0; i < 10; i++)
Flame::add(game, this, rand() % getModel()->mCount);
Flame::add(game, this, int(randf() * 24.0f));
}
if (state != oldState)

View File

@@ -145,8 +145,7 @@ struct Flame : Sprite {
if (flame) {
flame->owner = owner;
flame->jointIndex = jCount > 1 ? jointIndex : -1;
ASSERT(flame->jointIndex < jCount);
flame->jointIndex = jCount > 1 ? (jointIndex % jCount) : -1;
}
return flame;
}