mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Mapster32: tweak dragging a single sprite so that they can be dragged 'uphill'.
The implementation uses the recently introduced updatesector_onlynextwall when setspritez fails. git-svn-id: https://svn.eduke32.com/eduke32@2302 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e0163fcbcd
commit
021126045f
1 changed files with 16 additions and 16 deletions
|
@ -5073,7 +5073,8 @@ end_after_dragging:
|
||||||
}
|
}
|
||||||
else if ((pointhighlight&0xc000) == 16384)
|
else if ((pointhighlight&0xc000) == 16384)
|
||||||
{
|
{
|
||||||
int32_t daspr=pointhighlight&16383, osec=sprite[daspr].sectnum;
|
int32_t daspr=pointhighlight&16383;
|
||||||
|
int16_t osec=sprite[daspr].sectnum, nsec=osec;
|
||||||
vec3_t vec, ovec;
|
vec3_t vec, ovec;
|
||||||
|
|
||||||
Bmemcpy(&ovec, (vec3_t *)&sprite[daspr], sizeof(vec3_t));
|
Bmemcpy(&ovec, (vec3_t *)&sprite[daspr], sizeof(vec3_t));
|
||||||
|
@ -5081,24 +5082,23 @@ end_after_dragging:
|
||||||
vec.y = day;
|
vec.y = day;
|
||||||
vec.z = sprite[daspr].z;
|
vec.z = sprite[daspr].z;
|
||||||
if (setspritez(daspr, &vec) == -1 && osec>=0)
|
if (setspritez(daspr, &vec) == -1 && osec>=0)
|
||||||
Bmemcpy(&sprite[daspr], &ovec, sizeof(vec3_t));
|
{
|
||||||
#if 0
|
updatesector_onlynextwalls(dax, day, &nsec);
|
||||||
daz = spriteheight(daspr, NULL);
|
|
||||||
|
|
||||||
for (i=0; i<numsectors; i++)
|
if (nsec >= 0)
|
||||||
if (inside(dax,day,i) == 1)
|
{
|
||||||
if (sprite[daspr].z >= getceilzofslope(i,dax,day))
|
sprite[daspr].x = dax;
|
||||||
if (sprite[daspr].z-daz <= getflorzofslope(i,dax,day))
|
sprite[daspr].y = day;
|
||||||
{
|
// z updating is after we released the mouse button
|
||||||
sprite[daspr].x = dax;
|
if (sprite[daspr].sectnum != nsec)
|
||||||
sprite[daspr].y = day;
|
changespritesect(daspr, nsec);
|
||||||
if (sprite[daspr].sectnum != i)
|
}
|
||||||
changespritesect(daspr,(int16_t)i);
|
else
|
||||||
break;
|
Bmemcpy(&sprite[daspr], &ovec, sizeof(vec3_t));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
asksave = 1;
|
asksave = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue