This commit is contained in:
Christoph Oelckers 2016-01-16 09:07:20 +01:00
commit 65080a65c9
7 changed files with 26 additions and 19 deletions

View file

@ -95,7 +95,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Tracer2)
return;
// change angle
exact = R_PointToAngle2 (self->x, self->y, dest->x, dest->y);
exact = self->AngleTo(dest);
if (exact != self->angle)
{
@ -120,8 +120,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Tracer2)
if (!(self->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER)))
{
// change slope
dist = P_AproxDistance (dest->x - self->x, dest->y - self->y);
dist /= self->Speed;
dist = self->AproxDistance (dest) / self->Speed;
if (dist < 1)
{

View file

@ -1954,11 +1954,14 @@ bool FBehavior::Init(int lumpnum, FileReader * fr, int len)
int arraynum = MapVarStore[LittleLong(chunk[2])];
if ((unsigned)arraynum < (unsigned)NumArrays)
{
int initsize = MIN<int> (ArrayStore[arraynum].ArraySize, (LittleLong(chunk[1])-4)/4);
// Use unsigned iterator here to avoid issue with GCC 4.9/5.x
// optimizer. Might be some undefined behavior in this code,
// but I don't know what it is.
unsigned int initsize = MIN<unsigned int> (ArrayStore[arraynum].ArraySize, (LittleLong(chunk[1])-4)/4);
SDWORD *elems = ArrayStore[arraynum].Elements;
for (i = 0; i < initsize; ++i)
for (unsigned int j = 0; j < initsize; ++j)
{
elems[i] = LittleLong(chunk[3+i]);
elems[j] = LittleLong(chunk[3+j]);
}
}
chunk = (DWORD *)NextChunk((BYTE *)chunk);

View file

@ -1345,12 +1345,14 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
if (reply->NextNode != 0)
{
int rootnode = npc->ConversationRoot;
if (reply->NextNode < 0)
unsigned next = (unsigned)(rootnode + (reply->NextNode < 0 ? -1 : 1) * reply->NextNode - 1);
if (next < StrifeDialogues.Size())
{
unsigned next = (unsigned)(rootnode - reply->NextNode - 1);
if (gameaction != ga_slideshow && next < StrifeDialogues.Size())
npc->Conversation = StrifeDialogues[next];
if (gameaction != ga_slideshow)
{
npc->Conversation = StrifeDialogues[next];
P_StartConversation (npc, player->mo, player->ConversationFaceTalker, false);
return;
}
@ -1359,10 +1361,6 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
S_StopSound (npc, CHAN_VOICE);
}
}
else
{
npc->Conversation = StrifeDialogues[rootnode + reply->NextNode - 1];
}
}
npc->angle = player->ConversationNPCAngle;

View file

@ -380,7 +380,6 @@ class FPathTraverse
divline_t trace;
unsigned int intercept_index;
unsigned int intercept_count;
fixed_t maxfrac;
unsigned int count;
void AddLineIntercepts(int bx, int by);

View file

@ -545,7 +545,7 @@ inline fixed_t secfriction(const sector_t *sec, int plane = sector_t::floor)
inline fixed_t secmovefac(const sector_t *sec, int plane = sector_t::floor)
{
if (sec->Flags & SECF_FRICTION) return sec->friction;
if (sec->Flags & SECF_FRICTION) return sec->movefactor;
fixed_t movefactor = Terrains[sec->GetTerrain(plane)].MoveFactor;
return movefactor != 0 ? movefactor : ORIG_FRICTION_FACTOR;
}
@ -4297,6 +4297,14 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i
SpawnShootDecal(source, trace);
}
if (trace.HitType == TRACE_HitFloor || trace.HitType == TRACE_HitCeiling)
{
AActor* puff = NULL;
if (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF)
{
puff = P_SpawnPuff(source, puffclass, trace.X, trace.Y, trace.Z, (source->angle + angleoffset) - ANG90, 1, 0);
}
}
if (thepuff != NULL)
{
if (trace.HitType == TRACE_HitFloor &&

View file

@ -985,7 +985,7 @@ void FPathTraverse::AddLineIntercepts(int bx, int by)
P_MakeDivline (ld, &dl);
frac = P_InterceptVector (&trace, &dl);
if (frac < 0) continue; // behind source
if (frac < 0 || frac > 1) continue; // behind source or beyond end point
intercept_t newintercept;
@ -1170,7 +1170,7 @@ intercept_t *FPathTraverse::Next()
}
}
if (dist > maxfrac || in == NULL) return NULL; // checked everything in range
if (dist > FRACUNIT || in == NULL) return NULL; // checked everything in range
in->done = true;
return in;
}
@ -1388,7 +1388,6 @@ FPathTraverse::FPathTraverse (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, in
break;
}
}
maxfrac = FRACUNIT;
}
FPathTraverse::~FPathTraverse()

View file

@ -403,6 +403,7 @@ D0139194F7817BF06F3988DFC47DB38D // Whispers of Satan map29
}
D7F6E9F08C39A17026349A04F8C0B0BE // Return to Hadron, e1m9
19D03FFC875589E21EDBB7AB74EF4AEF // Return to Hadron, e1m9, 2016.01.03 update
{
pointonline
}