mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-20 01:41:27 +00:00
Merge branch 'master' into asmjit
# Conflicts: # src/p_actionfunctions.cpp
This commit is contained in:
commit
8bc2d50ad2
6 changed files with 29 additions and 28 deletions
|
@ -763,12 +763,12 @@ void HWDrawInfo::PrepareUpperGap(seg_t * seg)
|
|||
CreateFloodPoly(&ws, vertices.first+4, ws.z2, fakebsector, true);
|
||||
|
||||
gl_floodrendernode *node = NewFloodRenderNode();
|
||||
auto pNode = floodFloorSegs.CheckKey(fakebsector->sectornum);
|
||||
auto pNode = floodCeilingSegs.CheckKey(fakebsector->sectornum);
|
||||
|
||||
node->next = pNode? *pNode : nullptr;
|
||||
node->seg = seg;
|
||||
node->vertexindex = vertices.second;
|
||||
floodFloorSegs[fakebsector->sectornum] = node;
|
||||
floodCeilingSegs[fakebsector->sectornum] = node;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4503,13 +4503,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_ChangeCountFlags)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
enum ERaise
|
||||
{
|
||||
RF_TRANSFERFRIENDLINESS = 1,
|
||||
RF_NOCHECKPOSITION = 2
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_RaiseMaster
|
||||
|
@ -4520,10 +4513,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseMaster)
|
|||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_INT(flags);
|
||||
|
||||
bool copy = !!(flags & RF_TRANSFERFRIENDLINESS);
|
||||
if (self->master != NULL)
|
||||
{
|
||||
P_Thing_Raise(self->master, copy ? self : NULL, (flags & RF_NOCHECKPOSITION));
|
||||
P_Thing_Raise(self->master, self, flags);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -4541,12 +4533,11 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseChildren)
|
|||
TThinkerIterator<AActor> it;
|
||||
AActor *mo;
|
||||
|
||||
bool copy = !!(flags & RF_TRANSFERFRIENDLINESS);
|
||||
while ((mo = it.Next()) != NULL)
|
||||
{
|
||||
if (mo->master == self)
|
||||
{
|
||||
P_Thing_Raise(mo, copy ? self : NULL, (flags & RF_NOCHECKPOSITION));
|
||||
P_Thing_Raise(mo, self, flags);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -4565,14 +4556,13 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseSiblings)
|
|||
TThinkerIterator<AActor> it;
|
||||
AActor *mo;
|
||||
|
||||
bool copy = !!(flags & RF_TRANSFERFRIENDLINESS);
|
||||
if (self->master != NULL)
|
||||
{
|
||||
while ((mo = it.Next()) != NULL)
|
||||
{
|
||||
if (mo->master == self->master && mo != self)
|
||||
{
|
||||
P_Thing_Raise(mo, copy ? self : NULL, (flags & RF_NOCHECKPOSITION));
|
||||
P_Thing_Raise(mo, self, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4588,7 +4578,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseSelf)
|
|||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_INT(flags);
|
||||
ACTION_RETURN_BOOL(P_Thing_Raise(self, NULL, (flags & RF_NOCHECKPOSITION)));
|
||||
ACTION_RETURN_BOOL(P_Thing_Raise(self, self, flags));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -4602,7 +4592,7 @@ DEFINE_ACTION_FUNCTION(AActor, RaiseActor)
|
|||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_OBJECT(other, AActor);
|
||||
PARAM_INT(flags);
|
||||
ACTION_RETURN_BOOL(P_Thing_Raise(other, self, (flags & RF_NOCHECKPOSITION)));
|
||||
ACTION_RETURN_BOOL(P_Thing_Raise(other, self, flags));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -1764,7 +1764,7 @@ FUNC(LS_Thing_Raise)
|
|||
|
||||
if (arg0==0)
|
||||
{
|
||||
ok = P_Thing_Raise (it,NULL, arg1);
|
||||
ok = P_Thing_Raise (it, it, arg1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1772,7 +1772,7 @@ FUNC(LS_Thing_Raise)
|
|||
|
||||
while ( (target = iterator.Next ()) )
|
||||
{
|
||||
ok |= P_Thing_Raise(target,NULL, arg1);
|
||||
ok |= P_Thing_Raise(target, target, arg1);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
|
|
@ -160,7 +160,7 @@ bool P_Thing_Move (int tid, AActor *source, int mapspot, bool fog);
|
|||
int P_Thing_Damage (int tid, AActor *whofor0, int amount, FName type);
|
||||
void P_Thing_SetVelocity(AActor *actor, const DVector3 &vec, bool add, bool setbob);
|
||||
void P_RemoveThing(AActor * actor);
|
||||
bool P_Thing_Raise(AActor *thing, AActor *raiser, int nocheck = false);
|
||||
bool P_Thing_Raise(AActor *thing, AActor *raiser, int flags = 0);
|
||||
bool P_Thing_CanRaise(AActor *thing);
|
||||
bool P_CanResurrect(AActor *ththing, AActor *thing);
|
||||
PClassActor *P_GetSpawnableType(int spawnnum);
|
||||
|
@ -475,4 +475,10 @@ enum ETexReplaceFlags
|
|||
|
||||
void P_ReplaceTextures(const char *fromname, const char *toname, int flags);
|
||||
|
||||
enum ERaise
|
||||
{
|
||||
RF_TRANSFERFRIENDLINESS = 1,
|
||||
RF_NOCHECKPOSITION = 2
|
||||
};
|
||||
|
||||
#endif // __P_LOCAL__
|
||||
|
|
|
@ -432,7 +432,7 @@ void P_RemoveThing(AActor * actor)
|
|||
|
||||
}
|
||||
|
||||
bool P_Thing_Raise(AActor *thing, AActor *raiser, int nocheck)
|
||||
bool P_Thing_Raise(AActor *thing, AActor *raiser, int flags)
|
||||
{
|
||||
if (!thing)
|
||||
return false;
|
||||
|
@ -455,7 +455,7 @@ bool P_Thing_Raise(AActor *thing, AActor *raiser, int nocheck)
|
|||
thing->flags |= MF_SOLID;
|
||||
thing->Height = info->Height; // [RH] Use real height
|
||||
thing->radius = info->radius; // [RH] Use real radius
|
||||
if (!nocheck && !P_CheckPosition (thing, thing->Pos()))
|
||||
if (!(flags & RF_NOCHECKPOSITION) && !P_CheckPosition (thing, thing->Pos()))
|
||||
{
|
||||
thing->flags = oldflags;
|
||||
thing->radius = oldradius;
|
||||
|
@ -470,7 +470,7 @@ bool P_Thing_Raise(AActor *thing, AActor *raiser, int nocheck)
|
|||
|
||||
thing->Revive();
|
||||
|
||||
if (raiser != NULL)
|
||||
if ((flags & RF_TRANSFERFRIENDLINESS) && raiser != nullptr)
|
||||
{
|
||||
// Let's copy the friendliness of the one who raised it.
|
||||
thing->CopyFriendliness(raiser, false);
|
||||
|
|
|
@ -8140,12 +8140,17 @@ FxExpression *FxMemberFunctionCall::Resolve(FCompileContext& ctx)
|
|||
}
|
||||
if (isDynArrayObj && ((MethodName == NAME_Push && idx == 0) || (MethodName == NAME_Insert && idx == 1)))
|
||||
{
|
||||
// The DynArray_Obj declaration in dynarrays.txt doesn't support generics yet. Check the type here as if it did.
|
||||
if (!static_cast<PObjectPointer*>(elementType)->PointedClass()->IsAncestorOf(static_cast<PObjectPointer*>(a->ValueType)->PointedClass()))
|
||||
// Null pointers are always valid.
|
||||
if (!a->isConstant() || static_cast<FxConstant*>(a)->GetValue().GetPointer() != nullptr)
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "Type mismatch in function argument");
|
||||
delete this;
|
||||
return nullptr;
|
||||
// The DynArray_Obj declaration in dynarrays.txt doesn't support generics yet. Check the type here as if it did.
|
||||
if (!a->ValueType->isObjectPointer() ||
|
||||
!static_cast<PObjectPointer*>(elementType)->PointedClass()->IsAncestorOf(static_cast<PObjectPointer*>(a->ValueType)->PointedClass()))
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "Type mismatch in function argument");
|
||||
delete this;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (a->IsDynamicArray())
|
||||
|
|
Loading…
Reference in a new issue