diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index 27f7b088e..93036b031 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -1297,7 +1297,7 @@ void FWeaponSlots::SetFromGameInfo() // Append extra weapons to the slots. for (i = 0; i < NUM_WEAPON_SLOTS; ++i) { - for (unsigned j = 0; j < gameinfo.DefaultWeaponSlots[i].Size(); i++) + for (unsigned j = 0; j < gameinfo.DefaultWeaponSlots[i].Size(); j++) { PClassWeapon *cls = dyn_cast(PClass::FindClass(gameinfo.DefaultWeaponSlots[i][j])); if (cls == NULL) diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 479ce97e5..030e85406 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -1119,6 +1119,10 @@ FUNC(LS_ThrustThing) } else if (it) { + if (level.flags2 & LEVEL2_HEXENHACK && backSide) + { + return false; + } ThrustThingHelper (it, BYTEANGLE(arg0), arg1, arg2); return true; } diff --git a/src/p_map.cpp b/src/p_map.cpp index 09a209496..7894e7382 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3991,7 +3991,8 @@ struct aim_t if (sv_smartaim < 2) { // friends don't aim at friends (except players), at least not first - Printf("Hit friend %s at %f,%f,%f\n", th->GetClass()->TypeName.GetChars(), th->X() / 65536., th->Y() / 65536., th->Z() / 65536.); + if (aimdebug) + Printf("Hit friend %s at %f,%f,%f\n", th->GetClass()->TypeName.GetChars(), th->X() / 65536., th->Y() / 65536., th->Z() / 65536.); SetResult(thing_friend, in->frac, th, thingpitch); } } diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index c6453285e..ffaa2b4e4 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -265,7 +265,7 @@ void P_LineOpening (FLineOpening &open, AActor *actor, const line_t *linedef, } // avoid overflows in the opening. - open.range = (fixed_t)MIN((QWORD)open.top - open.bottom, FIXED_MAX); + open.range = (fixed_t)MIN((SQWORD)open.top - open.bottom, FIXED_MAX); } @@ -874,7 +874,7 @@ void FMultiBlockLinesIterator::startIteratorForGroup(int group) void FMultiBlockLinesIterator::Reset() { - continueup = continueup = true; + continueup = continuedown = true; index = -1; portalflags = 0; startIteratorForGroup(basegroup); diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 54a2a1a8d..2c388e178 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -103,7 +103,7 @@ static char HexenSectorSpecialOk[256]={ static inline bool P_IsThingSpecial(int specnum) { return (specnum >= Thing_Projectile && specnum <= Thing_SpawnNoFog) || - specnum == Thing_SpawnFacing || Thing_ProjectileIntercept || Thing_ProjectileAimed; + specnum == Thing_SpawnFacing || specnum == Thing_ProjectileIntercept || specnum == Thing_ProjectileAimed; } enum diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 98dd60f2d..db1f722f1 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -146,6 +146,7 @@ bool ACustomInventory::CallStateChain (AActor *actor, FState *state) if (proto->ReturnTypes[0] == TypeState) { // Function returns a state wantret = &ret[0]; + retval = false; // this is a jump function which never affects the success state. } else if (proto->ReturnTypes[0] == TypeSInt32 || proto->ReturnTypes[0] == TypeBool) { // Function returns an int or bool diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index 8239f0e47..7ecc3c3c4 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -3220,7 +3220,7 @@ FxExpression *FxActionSpecialCall::Resolve(FCompileContext& ctx) int DecoCallLineSpecial(VMFrameStack *stack, VMValue *param, int numparam, VMReturn *ret, int numret) { - assert(numparam > 2 && numparam < 7); + assert(numparam > 2 && numparam < 8); assert(numret == 1); assert(param[0].Type == REGT_INT); assert(param[1].Type == REGT_POINTER);