mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Band-aid fix for Duke3d E4L4 map "corruption"
The map isn't necessarily "corrupt", but it has a large water sector with half a dozen different SE7 teleporter sprites in it, of which all but one have destination SE7 sprites that are constantly moving while the matching SE7 in the large sector stays in place. When you teleport, the game code picks one. It doesn't always pick the one that matches. Yeah, OK, it never picks the one that matches. The area is a total clusterfuck. git-svn-id: https://svn.eduke32.com/eduke32@8241 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2be5727137
commit
69a3f9e884
1 changed files with 10 additions and 2 deletions
|
@ -1010,7 +1010,7 @@ static int get_floorspr_clipyou(vec2_t const v1, vec2_t const v2, vec2_t const v
|
|||
return clipyou;
|
||||
}
|
||||
|
||||
static void clipupdatesector(vec2_t const pos, int16_t * const sectnum, int const walldist)
|
||||
static void clipupdatesector(vec2_t const pos, int16_t * const sectnum, int walldist)
|
||||
{
|
||||
if (enginecompatibility_mode != ENGINECOMPATIBILITY_NONE)
|
||||
{
|
||||
|
@ -1021,9 +1021,17 @@ static void clipupdatesector(vec2_t const pos, int16_t * const sectnum, int cons
|
|||
if (inside_p(pos.x, pos.y, *sectnum))
|
||||
return;
|
||||
|
||||
int16_t nsecs = min<int16_t>(getsectordist(pos, *sectnum), INT16_MAX);
|
||||
|
||||
if (nsecs > (walldist + 8))
|
||||
{
|
||||
OSD_Printf(EDUKE32_PRETTY_FUNCTION ":%d shortest distance between origin point (%d, %d) and sector %d is %d. Sector may be corrupt!\n",
|
||||
__LINE__, pos.x, pos.y, *sectnum, nsecs);
|
||||
walldist = 0x7fff;
|
||||
}
|
||||
|
||||
static int16_t sectlist[MAXSECTORS];
|
||||
static uint8_t sectbitmap[(MAXSECTORS+7)>>3];
|
||||
int16_t nsecs;
|
||||
|
||||
bfirst_search_init(sectlist, sectbitmap, &nsecs, MAXSECTORS, *sectnum);
|
||||
|
||||
|
|
Loading…
Reference in a new issue