mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- fixed code generation bug with bad class names in DECORATE.
- print attenuation info with 'listlights' CCMD.
This commit is contained in:
parent
33d36157c8
commit
d506b2e6a1
2 changed files with 8 additions and 4 deletions
|
@ -780,10 +780,10 @@ CCMD(listlights)
|
||||||
walls=0;
|
walls=0;
|
||||||
sectors=0;
|
sectors=0;
|
||||||
subsecs = 0;
|
subsecs = 0;
|
||||||
Printf("%s at (%f, %f, %f), color = 0x%02x%02x%02x, radius = %f ",
|
Printf("%s at (%f, %f, %f), color = 0x%02x%02x%02x, radius = %f %s",
|
||||||
dl->target? dl->target->GetClass()->TypeName.GetChars() : dl->GetClass()->TypeName.GetChars(),
|
dl->target? dl->target->GetClass()->TypeName.GetChars() : dl->GetClass()->TypeName.GetChars(),
|
||||||
dl->X(), dl->Y(), dl->Z(), dl->args[LIGHT_RED],
|
dl->X(), dl->Y(), dl->Z(), dl->args[LIGHT_RED],
|
||||||
dl->args[LIGHT_GREEN], dl->args[LIGHT_BLUE], dl->radius);
|
dl->args[LIGHT_GREEN], dl->args[LIGHT_BLUE], dl->radius, (dl->flags4 & MF4_ATTENUATE)? "attenuated" : "");
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
if (dl->target)
|
if (dl->target)
|
||||||
|
|
|
@ -10528,8 +10528,12 @@ FxExpression *FxClassTypeCast::Resolve(FCompileContext &ctx)
|
||||||
ScriptPosition.Message(MSG_OPTERROR,
|
ScriptPosition.Message(MSG_OPTERROR,
|
||||||
"Unknown class name '%s' of type '%s'",
|
"Unknown class name '%s' of type '%s'",
|
||||||
clsname.GetChars(), desttype->TypeName.GetChars());
|
clsname.GetChars(), desttype->TypeName.GetChars());
|
||||||
delete this;
|
// When originating from DECORATE this must pass, when in ZScript it's an error that must abort the code generation here.
|
||||||
return nullptr;
|
if (!ctx.FromDecorate)
|
||||||
|
{
|
||||||
|
delete this;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue