mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-14 00:54:05 +02:00
aghrrr... fix emscripten webassembly compiler bug, fix limited pistols ammo on LEVEL10A bug
This commit is contained in:
@@ -1466,7 +1466,7 @@ struct Controller {
|
|||||||
mask |= layers[i].mask;
|
mask |= layers[i].mask;
|
||||||
// set meshes visibility
|
// set meshes visibility
|
||||||
for (int j = 0; j < model->mCount; j++)
|
for (int j = 0; j < model->mCount; j++)
|
||||||
joints[j].w = (vmask & (1 << j)) ? 1.0f : -1.0f; // hide invisible parts
|
joints[j].w = (vmask & (1 << j)) ? 1.0f : 0.0f; // hide invisible parts
|
||||||
|
|
||||||
if (explodeMask) {
|
if (explodeMask) {
|
||||||
ASSERT(explodeParts);
|
ASSERT(explodeParts);
|
||||||
|
@@ -727,11 +727,12 @@ struct Inventory {
|
|||||||
if (smart) {
|
if (smart) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case TR::Entity::INV_PISTOLS :
|
case TR::Entity::INV_PISTOLS :
|
||||||
case TR::Entity::INV_AMMO_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);
|
addAmmo(type, count, 10, TR::Entity::INV_PISTOLS, TR::Entity::INV_AMMO_PISTOLS);
|
||||||
break;
|
break;
|
||||||
case TR::Entity::INV_SHOTGUN :
|
case TR::Entity::INV_SHOTGUN :
|
||||||
case TR::Entity::INV_AMMO_SHOTGUN :
|
case TR::Entity::INV_AMMO_SHOTGUN :
|
||||||
addAmmo(type, count, 2, TR::Entity::INV_SHOTGUN, TR::Entity::INV_AMMO_SHOTGUN);
|
addAmmo(type, count, 2, TR::Entity::INV_SHOTGUN, TR::Entity::INV_AMMO_SHOTGUN);
|
||||||
break;
|
break;
|
||||||
case TR::Entity::INV_MAGNUMS :
|
case TR::Entity::INV_MAGNUMS :
|
||||||
@@ -739,7 +740,7 @@ struct Inventory {
|
|||||||
addAmmo(type, count, 25, TR::Entity::INV_MAGNUMS, TR::Entity::INV_AMMO_MAGNUMS);
|
addAmmo(type, count, 25, TR::Entity::INV_MAGNUMS, TR::Entity::INV_AMMO_MAGNUMS);
|
||||||
break;
|
break;
|
||||||
case TR::Entity::INV_UZIS :
|
case TR::Entity::INV_UZIS :
|
||||||
case TR::Entity::INV_AMMO_UZIS :
|
case TR::Entity::INV_AMMO_UZIS :
|
||||||
addAmmo(type, count, 50, TR::Entity::INV_UZIS, TR::Entity::INV_AMMO_UZIS);
|
addAmmo(type, count, 50, TR::Entity::INV_UZIS, TR::Entity::INV_AMMO_UZIS);
|
||||||
break;
|
break;
|
||||||
default : ;
|
default : ;
|
||||||
|
@@ -1677,7 +1677,7 @@ struct Lara : Character {
|
|||||||
|
|
||||||
if (hitType == TR::HIT_LAVA) {
|
if (hitType == TR::HIT_LAVA) {
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
Flame::add(game, this, int(randf() * 24.0f));
|
Flame::add(game, this, rand() % getModel()->mCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state != oldState)
|
if (state != oldState)
|
||||||
|
@@ -145,7 +145,8 @@ struct Flame : Sprite {
|
|||||||
|
|
||||||
if (flame) {
|
if (flame) {
|
||||||
flame->owner = owner;
|
flame->owner = owner;
|
||||||
flame->jointIndex = jCount > 1 ? (jointIndex % jCount) : -1;
|
flame->jointIndex = jCount > 1 ? jointIndex : -1;
|
||||||
|
ASSERT(flame->jointIndex < jCount);
|
||||||
}
|
}
|
||||||
return flame;
|
return flame;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user