1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-02-24 07:22:58 +01:00

throwing some of pieces of exploded mutant into Lara, fix additive sprites

This commit is contained in:
XProger 2019-01-08 16:38:12 +03:00
parent 109a830e3a
commit 7bc248955c
2 changed files with 11 additions and 0 deletions

View File

@ -1351,6 +1351,9 @@ struct Controller {
updateJoints();
int towardPart = rand() % model->mCount;
vec3 laraPos = game->getLara(pos)->pos;
int roomIndex = getRoomIndex();
for (int i = 0; i < model->mCount; i++) {
if (!(mask & (1 << i)))
@ -1359,6 +1362,10 @@ struct Controller {
float angle = randf() * PI * 2.0f;
vec2 speed = vec2(randf(), -randf()) * (getEntity().type == TR::Entity::ENEMY_GIANT_MUTANT ? 256.0f : 128.0f);
if ((rand() % 4) == 0) {
angle = (laraPos - joints[i].pos).angleY();
}
ExplodePart &part = explodeParts[i];
part.basis = joints[i];
part.basis.w = 1.0f;

View File

@ -511,6 +511,10 @@ struct Level : IGame {
Core::lightColor[3] = vec4(0, 0, 0, 1);
}
if (type == Shader::SPRITE) {
alphaTest = true;
}
setShader(Core::pass, type, room.flags.water, alphaTest);
if (room.flags.water) {