for(int bump = 0; bump < 6; bump++)
{
int coord = 2 - (bump >> 1);
- bool dir = (bump & 1);
+ int dir = (bump & 1);
for(int subbump = 0; ; ++subbump)
{
tracebox(stuckorigin, goodmins, goodmaxs, testorigin, MOVE_NOMONSTERS, this);
if(trace_startsolid && trace_ent.solid == SOLID_BSP) // NOTE: this checks for bmodelstartsolid in the engine
{
-
// BAD BAD, can't fix that
return false;
}
// we hit something... let's move out of it
vector move = trace_endpos - testorigin;
- float nudge = (trace_plane_normal * move) + 0.03125f; // FIXME cvar this constant
+ float nudge = (trace_plane_normal * move) + 0.03125; // FIXME cvar this constant
stuckorigin = stuckorigin + nudge * trace_plane_normal;
}
if(!trace_startsolid)
continue;
}
- vector pivot = check.mins + 0.5 * check.maxs;
+ vector pivot = check.mins + 0.5 * (check.maxs - check.mins);
vector move;
if(rotated)
if(_Movetype_NudgeOutOfSolid_PivotIsKnownGood(check, pivot))
{
// hack to invoke all necessary movement triggers
- vector move2 = '0 0 0';
- if(!_Movetype_PushEntity(check, move2, true, true))
- {
- // entity "check" got teleported
- continue;
- }
- // we could fix it
+ _Movetype_PushEntity(check, '0 0 0', true, true);
+ // we could fix it or entity "check" was telported
continue;
}