mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
c0fe86028d
4 changed files with 13 additions and 7 deletions
|
@ -616,12 +616,16 @@ void FNodeBuilder::FLevel::FindMapBounds()
|
|||
minx = maxx = Vertices[0].fX();
|
||||
miny = maxy = Vertices[0].fY();
|
||||
|
||||
for (int i = 1; i < NumVertices; ++i)
|
||||
for (int i = 1; i < NumLines; ++i)
|
||||
{
|
||||
if (Vertices[i].fX() < minx) minx = Vertices[i].fX();
|
||||
else if (Vertices[i].fX() > maxx) maxx = Vertices[i].fX();
|
||||
if (Vertices[i].fY() < miny) miny = Vertices[i].fY();
|
||||
else if (Vertices[i].fY() > maxy) maxy = Vertices[i].fY();
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
vertex_t *v = (j == 0 ? Lines[i].v1 : Lines[i].v2);
|
||||
if (v->fX() < minx) minx = v->fX();
|
||||
else if (v->fX() > maxx) maxx = v->fX();
|
||||
if (v->fY() < miny) miny = v->fY();
|
||||
else if (v->fY() > maxy) maxy = v->fY();
|
||||
}
|
||||
}
|
||||
|
||||
MinX = FLOAT2FIXED(minx);
|
||||
|
|
|
@ -255,6 +255,7 @@ void P_NoiseAlert (AActor *target, AActor *emitter, bool splash, double maxdist)
|
|||
return;
|
||||
|
||||
validcount++;
|
||||
NoiseList.Clear();
|
||||
NoiseMarkSector(emitter->Sector, target, splash, emitter, 0, maxdist);
|
||||
for (unsigned i = 0; i < NoiseList.Size(); i++)
|
||||
{
|
||||
|
|
|
@ -1111,7 +1111,7 @@ void P_CreateLinkedPortals()
|
|||
}
|
||||
|
||||
// reject would just get in the way when checking sight through portals.
|
||||
if (rejectmatrix != NULL)
|
||||
if (Displacements.size > 1 && rejectmatrix != NULL)
|
||||
{
|
||||
delete[] rejectmatrix;
|
||||
rejectmatrix = NULL;
|
||||
|
|
|
@ -1463,7 +1463,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
|||
PARAM_ANGLE (spread_z);
|
||||
PARAM_INT (numbullets);
|
||||
PARAM_INT (damageperbullet);
|
||||
PARAM_CLASS_OPT (pufftype, AActor) { pufftype = PClass::FindActor(NAME_BulletPuff); }
|
||||
PARAM_CLASS_OPT (pufftype, AActor) { pufftype = nullptr; }
|
||||
PARAM_FLOAT_OPT (range) { range = 0; }
|
||||
PARAM_INT_OPT (flags) { flags = 0; }
|
||||
PARAM_INT_OPT (ptr) { ptr = AAPTR_TARGET; }
|
||||
|
@ -1487,6 +1487,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
|||
bangle = self->Angles.Yaw;
|
||||
|
||||
if (!(flags & CBAF_NOPITCH)) bslope = P_AimLineAttack (self, bangle, MISSILERANGE);
|
||||
if (pufftype == nullptr) pufftype = PClass::FindActor(NAME_BulletPuff);
|
||||
|
||||
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
|
||||
for (i = 0; i < numbullets; i++)
|
||||
|
|
Loading…
Reference in a new issue