diff --git a/src/p_acs.cpp b/src/p_acs.cpp index e7fff7d7a..34275da14 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -312,6 +312,7 @@ static void ReadArrayVars (PNGHandle *png, FWorldGlobalArray *vars, size_t count { SDWORD key, val; key = arc.ReadCount(); + val = arc.ReadCount(); vars[i].Insert (key, val); } @@ -2537,8 +2538,10 @@ enum APROP_MasterTID = 25, APROP_TargetTID = 26, APROP_TracerTID = 27, - APROP_WaterLevel = 28 -}; + APROP_WaterLevel = 28, + APROP_ScaleX = 29, + APROP_ScaleY = 30, +}; // These are needed for ACS's APROP_RenderStyle static const int LegacyRenderStyleIndices[] = @@ -2718,6 +2721,14 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value) DoSetMaster (actor, other); break; + case APROP_ScaleX: + actor->scaleX = value; + break; + + case APROP_ScaleY: + actor->scaleY = value; + break; + default: // do nothing. break; @@ -2780,6 +2791,9 @@ int DLevelScript::GetActorProperty (int tid, int property) case APROP_TargetTID: return (actor->target != NULL)? actor->target->tid : 0; case APROP_TracerTID: return (actor->tracer != NULL)? actor->tracer->tid : 0; case APROP_WaterLevel: return actor->waterlevel; + case APROP_ScaleX: return actor->scaleX; + case APROP_ScaleY: return actor->scaleY; + default: return 0; } } diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 1ac84d38a..a40c49467 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2020,6 +2020,23 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeTo) } } +//=========================================================================== +// +// A_Scale(float scalex, optional float scaley) +// +// Scales the actor's graphics. If scaley is 0, use scalex. +// +//=========================================================================== +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetScale) +{ + ACTION_PARAM_START(2); + ACTION_PARAM_FIXED(scalex, 0); + ACTION_PARAM_FIXED(scaley, 1); + + self->scaleX = scalex; + self->scaleY = scaley ? scaley : scalex; +} + //=========================================================================== // // A_SpawnDebris @@ -2632,6 +2649,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetInLOS) if (an > (fov / 2) && an < (ANGLE_MAX - (fov / 2))) { + return; // [KS] Outside of FOV - return } diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index 9440a05b0..1315d70ee 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -77,6 +77,8 @@ DEFINE_MEMBER_VARIABLE(velz, AActor) DEFINE_MEMBER_VARIABLE_ALIAS(momx, velx, AActor) DEFINE_MEMBER_VARIABLE_ALIAS(momy, vely, AActor) DEFINE_MEMBER_VARIABLE_ALIAS(momz, velz, AActor) +DEFINE_MEMBER_VARIABLE(scaleX, AActor) +DEFINE_MEMBER_VARIABLE(scaleY, AActor) DEFINE_MEMBER_VARIABLE(Damage, AActor) DEFINE_MEMBER_VARIABLE(Score, AActor) @@ -675,6 +677,7 @@ FxExpression *FxUnaryNotBoolean::Resolve(FCompileContext& ctx) { CHECKRESOLVED(); if (Operand) + { Operand = Operand->ResolveAsBoolean(ctx); } diff --git a/src/version.h b/src/version.h index ee742c1c8..6a99a02ad 100644 --- a/src/version.h +++ b/src/version.h @@ -80,7 +80,7 @@ #if SVN_REVISION_NUMBER < MINSAVEVER // If we don't know the current revision write something very high to ensure that // the reesulting executable can read its own savegames but no regular engine can. -#define SAVEVER 9999 +#define SAVEVER 999999 #define SAVESIG MakeSaveSig() static inline const char *MakeSaveSig() { diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index fb0655524..f8dd3d863 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -47,6 +47,8 @@ ACTOR Actor native //: Thinker native fixed_t momx; // alias for velx native fixed_t momy; // alias for vely native fixed_t momz; // alias for velz + native fixed_t scaleX; + native fixed_t scaleY; native int score; // Meh, MBF redundant functions. Only for DeHackEd support. @@ -204,6 +206,7 @@ ACTOR Actor native //: Thinker action native A_FadeIn(float reduce = 0.1); action native A_FadeOut(float reduce = 0.1, bool remove = true); action native A_FadeTo(float target, float amount = 0.1, bool remove = false); + action native A_SetScale(float scalex, float scaley = 0); action native A_SpawnDebris(class spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1); action native A_CheckSight(state label); action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false);