mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts: # wadsrc/static/language.eng
This commit is contained in:
commit
5c267a2169
12 changed files with 25 additions and 16 deletions
|
@ -259,7 +259,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
|
|||
r = pr_botmove();
|
||||
if (r < 128)
|
||||
{
|
||||
TThinkerIterator<AInventory> it (STAT_INVENTORY, bglobal.firstthing);
|
||||
TThinkerIterator<AInventory> it (MAX_STATNUM+1, bglobal.firstthing);
|
||||
AInventory *item = it.Next();
|
||||
|
||||
if (item != NULL || (item = it.Next()) != NULL)
|
||||
|
|
|
@ -1452,7 +1452,8 @@ void FParser::SF_SetCamera(void)
|
|||
|
||||
newcamera->specialf1 = newcamera->Angles.Yaw.Degrees;
|
||||
newcamera->specialf2 = newcamera->Z();
|
||||
newcamera->SetZ(t_argc < 3 ? newcamera->Z() + 41 : floatvalue(t_argv[2]));
|
||||
double z = t_argc < 3 ? newcamera->Sector->floorplane.ZatPoint(newcamera) + 41 : floatvalue(t_argv[2]);
|
||||
newcamera->SetOrigin(newcamera->PosAtZ(z), false);
|
||||
newcamera->Angles.Yaw = angle;
|
||||
if (t_argc < 4) newcamera->Angles.Pitch = 0.;
|
||||
else newcamera->Angles.Pitch = clamp(floatvalue(t_argv[3]), -50., 50.) * (20. / 32.);
|
||||
|
|
|
@ -1280,7 +1280,7 @@ void G_FinishTravel ()
|
|||
|
||||
for (inv = pawn->Inventory; inv != NULL; inv = inv->Inventory)
|
||||
{
|
||||
inv->ChangeStatNum (STAT_INVENTORY);
|
||||
inv->ChangeStatNum (STAT_DEFAULT);
|
||||
inv->LinkToWorld ();
|
||||
inv->Travelled ();
|
||||
}
|
||||
|
|
|
@ -572,7 +572,6 @@ bool AInventory::ShouldRespawn ()
|
|||
void AInventory::BeginPlay ()
|
||||
{
|
||||
Super::BeginPlay ();
|
||||
ChangeStatNum (STAT_INVENTORY);
|
||||
flags |= MF_DROPPED; // [RH] Items are dropped by default
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ enum
|
|||
STAT_BOSSTARGET, // A boss brain target
|
||||
STAT_LIGHTNING, // The lightning thinker
|
||||
STAT_DECALTHINKER, // An object that thinks for a decal
|
||||
STAT_INVENTORY, // An inventory item
|
||||
UNUSED_STAT_INVENTORY, // An inventory item (value kept for savegame compatibility.)
|
||||
STAT_LIGHT, // A sector light effect
|
||||
STAT_LIGHTTRANSFER, // A sector light transfer. These must be ticked after the light effects!!!
|
||||
STAT_EARTHQUAKE, // Earthquake actors
|
||||
|
|
|
@ -343,7 +343,7 @@ static void FinishThingdef()
|
|||
|
||||
if (!def)
|
||||
{
|
||||
Printf("No ActorInfo defined for class '%s'\n", ti->TypeName.GetChars());
|
||||
Printf(TEXTCOLOR_RED "No ActorInfo defined for class '%s'\n", ti->TypeName.GetChars());
|
||||
errorcount++;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1375,6 +1375,7 @@ enum
|
|||
{
|
||||
XF_HURTSOURCE = 1,
|
||||
XF_NOTMISSILE = 4,
|
||||
XF_NOACTORTYPE = 1 << 3,
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode)
|
||||
|
@ -1388,6 +1389,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode)
|
|||
PARAM_INT_OPT (nails) { nails = 0; }
|
||||
PARAM_INT_OPT (naildamage) { naildamage = 10; }
|
||||
PARAM_CLASS_OPT (pufftype, AActor) { pufftype = PClass::FindActor(NAME_BulletPuff); }
|
||||
PARAM_NAME_OPT (damagetype) { damagetype = NAME_None; }
|
||||
|
||||
if (damage < 0) // get parameters from metadata
|
||||
{
|
||||
|
@ -1414,7 +1416,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode)
|
|||
}
|
||||
}
|
||||
|
||||
int count = P_RadiusAttack (self, self->target, damage, distance, self->DamageType, flags, fulldmgdistance);
|
||||
if (!(flags & XF_NOACTORTYPE) && damagetype == NAME_None)
|
||||
{
|
||||
damagetype = self->DamageType;
|
||||
}
|
||||
|
||||
int count = P_RadiusAttack (self, self->target, damage, distance, damagetype, flags, fulldmgdistance);
|
||||
P_CheckSplash(self, distance);
|
||||
if (alert && self->target != NULL && self->target->player != NULL)
|
||||
{
|
||||
|
|
|
@ -4757,6 +4757,8 @@ FxExpression *FxReturnStatement::Resolve(FCompileContext &ctx)
|
|||
|
||||
ExpEmit FxReturnStatement::Emit(VMFunctionBuilder *build)
|
||||
{
|
||||
ExpEmit out(0, REGT_NIL);
|
||||
|
||||
// If we return nothing, use a regular RET opcode.
|
||||
// Otherwise just return the value we're given.
|
||||
if (Value == nullptr)
|
||||
|
@ -4765,11 +4767,11 @@ ExpEmit FxReturnStatement::Emit(VMFunctionBuilder *build)
|
|||
}
|
||||
else
|
||||
{
|
||||
ExpEmit ret = Value->Emit(build);
|
||||
out = Value->Emit(build);
|
||||
|
||||
// Check if it is a function call that simplified itself
|
||||
// into a tail call in which case we don't emit anything.
|
||||
if (!ret.Final)
|
||||
if (!out.Final)
|
||||
{
|
||||
if (Value->ValueType == TypeVoid)
|
||||
{ // Nothing is returned.
|
||||
|
@ -4777,12 +4779,11 @@ ExpEmit FxReturnStatement::Emit(VMFunctionBuilder *build)
|
|||
}
|
||||
else
|
||||
{
|
||||
build->Emit(OP_RET, RET_FINAL, ret.RegType | (ret.Konst ? REGT_KONST : 0), ret.RegNum);
|
||||
build->Emit(OP_RET, RET_FINAL, out.RegType | (out.Konst ? REGT_KONST : 0), out.RegNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ExpEmit out;
|
||||
out.Final = true;
|
||||
return out;
|
||||
}
|
||||
|
|
|
@ -253,7 +253,7 @@ ACTOR Actor native //: Thinker
|
|||
action native A_Blast(int flags = 0, float strength = 255, float radius = 255, float speed = 20, class<Actor> blasteffect = "BlastEffect", sound blastsound = "BlastRadius");
|
||||
action native A_RadiusThrust(int force = 128, int distance = -1, int flags = RTF_AFFECTSOURCE, int fullthrustdistance = 0);
|
||||
action native A_RadiusDamageSelf(int damage = 128, float distance = 128, int flags = 0, class<Actor> flashtype = "None");
|
||||
action native int A_Explode(int damage = -1, int distance = -1, int flags = XF_HURTSOURCE, bool alert = false, int fulldamagedistance = 0, int nails = 0, int naildamage = 10, class<Actor> pufftype = "BulletPuff");
|
||||
action native int A_Explode(int damage = -1, int distance = -1, int flags = XF_HURTSOURCE, bool alert = false, int fulldamagedistance = 0, int nails = 0, int naildamage = 10, class<Actor> pufftype = "BulletPuff", name damagetype = "none");
|
||||
action native A_Stop();
|
||||
action native A_Respawn(int flags = 1);
|
||||
action native A_BarrelDestroy();
|
||||
|
|
|
@ -185,6 +185,7 @@ const int MSF_DontHurt = 2;
|
|||
// Flags for A_Explode
|
||||
const int XF_HURTSOURCE = 1;
|
||||
const int XF_NOTMISSILE = 4;
|
||||
const int XF_EXPLICITDAMAGETYPE = 1 << 3;
|
||||
|
||||
// Flags for A_RadiusThrust
|
||||
const int RTF_AFFECTSOURCE = 1;
|
||||
|
|
|
@ -108,7 +108,5 @@ CMPTMNU_SECTORSOUNDS = "Sector sounds use centre as source";
|
|||
OPTVAL_MAPDEFINEDCOLORSONLY = "Map defined colours only";
|
||||
C_GRAY = "\ccgrey";
|
||||
C_DARKGRAY = "\cudark grey";
|
||||
DSPLYMNU_MOVEBOB = "View bob amount while moving";
|
||||
DSPLYMNU_STILLBOB = "View bob amount while not moving";
|
||||
|
||||
OPTVAL_ANYFIXEDCOLORMAP = "Any fixed colourmap";
|
||||
|
|
|
@ -1800,6 +1800,8 @@ DSPLYMNU_QUAKEINTENSITY = "Earthquake shake intensity";
|
|||
DSPLYMNU_NOMONSTERINTERPOLATION = "Interpolate monster movement";
|
||||
DSPLYMNU_MENUDIM = "Menu dim";
|
||||
DSPLYMNU_DIMCOLOR = "Dim color";
|
||||
DSPLYMNU_MOVEBOB = "View bob amount while moving";
|
||||
DSPLYMNU_STILLBOB = "View bob amount while not moving";
|
||||
|
||||
// HUD Options
|
||||
HUDMNU_TITLE = "HUD Options";
|
||||
|
|
Loading…
Reference in a new issue