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
a0dc4ae738
9 changed files with 27 additions and 23 deletions
|
@ -228,7 +228,7 @@ static const char *KeyName (int key)
|
|||
if (KeyNames[key])
|
||||
return KeyNames[key];
|
||||
|
||||
mysnprintf (name, countof(name), "#%d", key);
|
||||
mysnprintf (name, countof(name), "Key_%d", key);
|
||||
return name;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SentinelAttack)
|
|||
for (int i = 8; i > 1; --i)
|
||||
{
|
||||
trail = Spawn("SentinelFX1",
|
||||
self->Vec3Angle(missile->radius*i, missile->Angles.Yaw, missile->Vel.Z / 4 * i), ALLOW_REPLACE);
|
||||
self->Vec3Angle(missile->radius*i, missile->Angles.Yaw, 32 + missile->Vel.Z / 4 * i), ALLOW_REPLACE);
|
||||
if (trail != NULL)
|
||||
{
|
||||
trail->target = self;
|
||||
|
|
|
@ -6497,7 +6497,7 @@ void AActor::UpdateRenderSectorList()
|
|||
while (!sec->PortalBlocksMovement(sector_t::ceiling))
|
||||
{
|
||||
double planeh = sec->GetPortalPlaneZ(sector_t::ceiling);
|
||||
if (planeh < lasth) break; // broken setup.
|
||||
if (planeh <= lasth) break; // broken setup.
|
||||
if (Top() + SPRITE_SPACE < planeh) break;
|
||||
lasth = planeh;
|
||||
DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::ceiling);
|
||||
|
@ -6508,7 +6508,7 @@ void AActor::UpdateRenderSectorList()
|
|||
while (!sec->PortalBlocksMovement(sector_t::floor))
|
||||
{
|
||||
double planeh = sec->GetPortalPlaneZ(sector_t::floor);
|
||||
if (planeh > lasth) break; // broken setup.
|
||||
if (planeh >= lasth) break; // broken setup.
|
||||
if (Z() - SPRITE_SPACE > planeh) break;
|
||||
lasth = planeh;
|
||||
DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::floor);
|
||||
|
|
|
@ -3560,10 +3560,10 @@ void AActor::Tick ()
|
|||
scrolltype -= Carry_East5;
|
||||
BYTE dir = HereticScrollDirs[scrolltype / 5];
|
||||
double carryspeed = HereticSpeedMuls[scrolltype % 5] * (1. / (32 * CARRYFACTOR));
|
||||
if (scrolltype<=Carry_East35 && !(i_compatflags&COMPATF_RAVENSCROLL))
|
||||
if (scrolltype < 5 && !(i_compatflags&COMPATF_RAVENSCROLL))
|
||||
{
|
||||
// Use speeds that actually match the scrolling textures!
|
||||
carryspeed = (1 << ((scrolltype%5) - 1));
|
||||
carryspeed = (1 << ((scrolltype % 5) + 15)) / 65536.;
|
||||
}
|
||||
scrollv.X += carryspeed * ((dir & 3) - 1);
|
||||
scrollv.Y += carryspeed * (((dir & 12) >> 2) - 1);
|
||||
|
|
|
@ -497,7 +497,7 @@ static void ParseFriction (FScanner &sc, int keyword, void *fields)
|
|||
friction = (0x1EB8*(sc.Float*100))/0x80 + 0xD001;
|
||||
friction = clamp<double> (friction, 0, 65536.);
|
||||
|
||||
if (friction > ORIG_FRICTION) // ice
|
||||
if (friction > ORIG_FRICTION * 65536.) // ice
|
||||
movefactor = ((0x10092 - friction) * 1024) / 4352 + 568;
|
||||
else
|
||||
movefactor = ((friction - 0xDB34)*(0xA))/0x80;
|
||||
|
|
|
@ -790,7 +790,6 @@ void CocoaVideo::SetFullscreenMode(const int width, const int height)
|
|||
}
|
||||
|
||||
[m_window setFrame:screenFrame display:YES];
|
||||
[m_window setFrameOrigin:NSMakePoint(0.0f, 0.0f)];
|
||||
}
|
||||
|
||||
void CocoaVideo::SetWindowedMode(const int width, const int height)
|
||||
|
|
|
@ -622,6 +622,18 @@ void R_AddLine (seg_t *line)
|
|||
rw_backcz2 = backsector->ceilingplane.ZatPoint(line->v2);
|
||||
rw_backfz2 = backsector->floorplane.ZatPoint(line->v2);
|
||||
|
||||
if (fake3D & FAKE3D_FAKEBACK)
|
||||
{
|
||||
if (rw_frontfz1 >= rw_backfz1 && rw_frontfz2 >= rw_backfz2)
|
||||
{
|
||||
fake3D |= FAKE3D_CLIPBOTFRONT;
|
||||
}
|
||||
if (rw_frontcz1 <= rw_backcz1 && rw_frontcz2 <= rw_backcz2)
|
||||
{
|
||||
fake3D |= FAKE3D_CLIPTOPFRONT;
|
||||
}
|
||||
}
|
||||
|
||||
// Cannot make these walls solid, because it can result in
|
||||
// sprite clipping problems for sprites near the wall
|
||||
if (rw_frontcz1 > rw_backcz1 || rw_frontcz2 > rw_backcz2)
|
||||
|
@ -1334,14 +1346,6 @@ void R_Subsector (subsector_t *sub)
|
|||
fakeFloor->validcount = validcount;
|
||||
R_3D_NewClip();
|
||||
}
|
||||
if (frontsector->CenterFloor() >= backsector->CenterFloor())
|
||||
{
|
||||
fake3D |= FAKE3D_CLIPBOTFRONT;
|
||||
}
|
||||
if (frontsector->CenterCeiling() <= backsector->CenterCeiling())
|
||||
{
|
||||
fake3D |= FAKE3D_CLIPTOPFRONT;
|
||||
}
|
||||
R_AddLine(line); // fake
|
||||
}
|
||||
fakeFloor = NULL;
|
||||
|
|
|
@ -3439,7 +3439,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Burst)
|
|||
|
||||
if (mo)
|
||||
{
|
||||
mo->Vel.Z = 4 * (mo->Z() - self->Z()) * self->Height;
|
||||
mo->Vel.Z = 4 * (mo->Z() - self->Z()) / self->Height;
|
||||
mo->Vel.X = pr_burst.Random2() / 128.;
|
||||
mo->Vel.Y = pr_burst.Random2() / 128.;
|
||||
mo->RenderStyle = self->RenderStyle;
|
||||
|
@ -5635,16 +5635,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusGive)
|
|||
PARAM_FLOAT (distance);
|
||||
PARAM_INT (flags);
|
||||
PARAM_INT_OPT (amount) { amount = 0; }
|
||||
PARAM_CLASS_OPT (filter, AActor) { filter = NULL; }
|
||||
PARAM_CLASS_OPT (filter, AActor) { filter = nullptr; }
|
||||
PARAM_NAME_OPT (species) { species = NAME_None; }
|
||||
PARAM_FLOAT_OPT (mindist) { mindist = 0; }
|
||||
PARAM_INT_OPT (limit) { limit = 0; }
|
||||
|
||||
// We need a valid item, valid targets, and a valid range
|
||||
if (item == NULL || (flags & RGF_MASK) == 0 || !flags || distance <= 0 || mindist >= distance)
|
||||
if (item == nullptr || (flags & RGF_MASK) == 0 || !flags || distance <= 0 || mindist >= distance)
|
||||
{
|
||||
ACTION_RETURN_INT(0);
|
||||
}
|
||||
|
||||
bool unlimited = (limit <= 0);
|
||||
if (amount == 0)
|
||||
{
|
||||
amount = 1;
|
||||
|
@ -5654,7 +5655,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusGive)
|
|||
if (flags & RGF_MISSILES)
|
||||
{
|
||||
TThinkerIterator<AActor> it;
|
||||
while ((thing = it.Next()))
|
||||
while ((thing = it.Next()) && ((unlimited) || (given < limit)))
|
||||
{
|
||||
given += DoRadiusGive(self, thing, item, amount, distance, flags, filter, species, mindist);
|
||||
}
|
||||
|
@ -5666,7 +5667,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusGive)
|
|||
FMultiBlockThingsIterator it(check, self->X(), self->Y(), mid-distance, mid+distance, distance, false, self->Sector);
|
||||
FMultiBlockThingsIterator::CheckResult cres;
|
||||
|
||||
while ((it.Next(&cres)))
|
||||
while ((it.Next(&cres)) && ((unlimited) || (given < limit)))
|
||||
{
|
||||
given += DoRadiusGive(self, cres.thing, item, amount, distance, flags, filter, species, mindist);
|
||||
}
|
||||
|
|
|
@ -237,7 +237,7 @@ ACTOR Actor native //: Thinker
|
|||
native state A_JumpIfInTargetInventory(class<Inventory> itemtype, int amount, state label, int forward_ptr = AAPTR_DEFAULT);
|
||||
native bool A_GiveToTarget(class<Inventory> itemtype, int amount = 0, int forward_ptr = AAPTR_DEFAULT);
|
||||
native bool A_TakeFromTarget(class<Inventory> itemtype, int amount = 0, int flags = 0, int forward_ptr = AAPTR_DEFAULT);
|
||||
native int A_RadiusGive(class<Inventory> itemtype, float distance, int flags, int amount = 0, class<Actor> filter = "None", name species = "None", int mindist = 0);
|
||||
native int A_RadiusGive(class<Inventory> itemtype, float distance, int flags, int amount = 0, class<Actor> filter = "None", name species = "None", int mindist = 0, int limit = 0);
|
||||
native state A_CheckSpecies(state jump, name species = "", int ptr = AAPTR_DEFAULT);
|
||||
native void A_CountdownArg(int argnum, state targstate = "");
|
||||
action native A_CustomMeleeAttack(int damage = 0, sound meleesound = "", sound misssound = "", name damagetype = "none", bool bleed = true);
|
||||
|
|
Loading…
Reference in a new issue