mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +00:00
Merge branch 'master' into floatcvt
# Conflicts: # src/p_map.cpp
This commit is contained in:
commit
7586320038
3 changed files with 8 additions and 16 deletions
|
@ -4558,7 +4558,7 @@ bool GetVarAddrType(AActor *self, FName varname, int index, void *&addr, PType *
|
||||||
addr = baddr;
|
addr = baddr;
|
||||||
// We don't want Int subclasses like Name or Color to be accessible,
|
// We don't want Int subclasses like Name or Color to be accessible,
|
||||||
// but we do want to support Float subclasses like Fixed.
|
// but we do want to support Float subclasses like Fixed.
|
||||||
if (!type->IsA(RUNTIME_CLASS(PInt)) || !type->IsKindOf(RUNTIME_CLASS(PFloat)))
|
if (!type->IsA(RUNTIME_CLASS(PInt)) && !type->IsKindOf(RUNTIME_CLASS(PFloat)))
|
||||||
{
|
{
|
||||||
// For reading, we also support Name and String types.
|
// For reading, we also support Name and String types.
|
||||||
if (readonly && (type->IsA(RUNTIME_CLASS(PName)) || type->IsA(RUNTIME_CLASS(PString))))
|
if (readonly && (type->IsA(RUNTIME_CLASS(PName)) || type->IsA(RUNTIME_CLASS(PString))))
|
||||||
|
|
|
@ -335,6 +335,8 @@ bool P_TeleportMove(AActor* thing, const DVector3 &pos, bool telefrag, bool modi
|
||||||
tmf.abovemidtex = false;
|
tmf.abovemidtex = false;
|
||||||
P_GetFloorCeilingZ(tmf, 0);
|
P_GetFloorCeilingZ(tmf, 0);
|
||||||
|
|
||||||
|
spechit.Clear(); // this is needed so that no more specials get activated after crossing a teleporter.
|
||||||
|
|
||||||
bool StompAlwaysFrags = ((thing->flags2 & MF2_TELESTOMP) || (level.flags & LEVEL_MONSTERSTELEFRAG) || telefrag) && !(thing->flags7 & MF7_NOTELESTOMP);
|
bool StompAlwaysFrags = ((thing->flags2 & MF2_TELESTOMP) || (level.flags & LEVEL_MONSTERSTELEFRAG) || telefrag) && !(thing->flags7 & MF7_NOTELESTOMP);
|
||||||
|
|
||||||
// P_LineOpening requires the thing's z to be the destination z in order to work.
|
// P_LineOpening requires the thing's z to be the destination z in order to work.
|
||||||
|
@ -2284,12 +2286,7 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
|
||||||
line_t *ld = spec.line;
|
line_t *ld = spec.line;
|
||||||
// see if the line was crossed
|
// see if the line was crossed
|
||||||
|
|
||||||
// One more case of trying to preserve some side effects from the original:
|
side = P_PointOnLineSide(spec.Refpos, ld);
|
||||||
// If the reference position is the same as the actor's position before checking the spechits,
|
|
||||||
// we use the thing's actual position, including all the side effects of the original.
|
|
||||||
// If some portal transition has to be considered here, we cannot do that and use the reference position stored with the spechit.
|
|
||||||
bool posisoriginal = (spec.Refpos == lastpos);
|
|
||||||
side = posisoriginal? P_PointOnLineSide(thing->Pos(), ld) : P_PointOnLineSide(spec.Refpos, ld);
|
|
||||||
oldside = P_PointOnLineSide(spec.Oldrefpos, ld);
|
oldside = P_PointOnLineSide(spec.Oldrefpos, ld);
|
||||||
if (side != oldside && ld->special && !(thing->flags6 & MF6_NOTRIGGER))
|
if (side != oldside && ld->special && !(thing->flags6 & MF6_NOTRIGGER))
|
||||||
{
|
{
|
||||||
|
|
|
@ -525,17 +525,12 @@ static void ParseUserVariable (FScanner &sc, PSymbolTable *symt, PClassActor *cl
|
||||||
|
|
||||||
// Read the type and make sure it's acceptable.
|
// Read the type and make sure it's acceptable.
|
||||||
sc.MustGetAnyToken();
|
sc.MustGetAnyToken();
|
||||||
switch (sc.TokenType)
|
if (sc.TokenType != TK_Int && sc.TokenType != TK_Float)
|
||||||
{
|
{
|
||||||
case TK_Int: type = TypeSInt32; break;
|
sc.ScriptMessage("User variables must be of type 'int' or 'float'");
|
||||||
case TK_Float: type = TypeFloat64; break;
|
|
||||||
case TK_String: type = TypeString; break;
|
|
||||||
default:
|
|
||||||
type = TypeError;
|
|
||||||
sc.ScriptMessage("User variables must be of type 'int' or 'float' or 'string'");
|
|
||||||
FScriptPosition::ErrorCounter++;
|
FScriptPosition::ErrorCounter++;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
type = sc.TokenType == TK_Int ? (PType *)TypeSInt32 : (PType *)TypeFloat64;
|
||||||
|
|
||||||
sc.MustGetToken(TK_Identifier);
|
sc.MustGetToken(TK_Identifier);
|
||||||
// For now, restrict user variables to those that begin with "user_" to guarantee
|
// For now, restrict user variables to those that begin with "user_" to guarantee
|
||||||
|
@ -582,7 +577,7 @@ static void ParseUserVariable (FScanner &sc, PSymbolTable *symt, PClassActor *cl
|
||||||
sc.MustGetToken(';');
|
sc.MustGetToken(';');
|
||||||
|
|
||||||
PField *sym = cls->AddField(symname, type, 0);
|
PField *sym = cls->AddField(symname, type, 0);
|
||||||
if (cls == NULL)
|
if (sym == NULL)
|
||||||
{
|
{
|
||||||
sc.ScriptMessage ("'%s' is already defined in '%s'.",
|
sc.ScriptMessage ("'%s' is already defined in '%s'.",
|
||||||
symname.GetChars(), cls ? cls->TypeName.GetChars() : "Global");
|
symname.GetChars(), cls ? cls->TypeName.GetChars() : "Global");
|
||||||
|
|
Loading…
Reference in a new issue