mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
Two tweaks when keying in values directly in the editor's 3D mode.
First, when pressing 'S on signed members (like the shade), display the real signed value instead of the value cast to an unsigned type. Second, when aiming at an overwall and pressing G, affect the overwall instead of the wall. Maybe these changes affect a few other queries too... git-svn-id: https://svn.eduke32.com/eduke32@2077 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d540f18ef4
commit
50bc3a3fcb
1 changed files with 9 additions and 6 deletions
|
@ -4383,10 +4383,10 @@ static void getnumberptr256(const char *namestart, void *num, int32_t bytes, int
|
|||
switch (bytes)
|
||||
{
|
||||
case 1:
|
||||
danum = *(char *)num;
|
||||
danum = sign ? *(int8_t *)num : *(uint8_t *)num;
|
||||
break;
|
||||
case 2:
|
||||
danum = *(int16_t *)num;
|
||||
danum = sign ? *(int16_t *)num : *(uint16_t *)num;
|
||||
break;
|
||||
case 4:
|
||||
danum = *(int32_t *)num;
|
||||
|
@ -6364,15 +6364,18 @@ static void Keys3d(void)
|
|||
{
|
||||
if (ASSERT_AIMING)
|
||||
{
|
||||
int16_t opicnum = AIMED_CF_SEL(picnum), aimspr=AIMING_AT_SPRITE, osearchwall=searchwall;
|
||||
int32_t aiming_at_sprite = AIMING_AT_SPRITE, osearchwall=searchwall;
|
||||
int16_t *picnumptr = AIMING_AT_WALL_OR_MASK ? &AIMED_SELOVR_PICNUM : &AIMED_CF_SEL(picnum);
|
||||
|
||||
static const char *Typestr_tmp[5] = { "Wall", "Sector ceiling", "Sector floor", "Sprite", "Masked wall" };
|
||||
|
||||
Bsprintf(tempbuf, "%s picnum: ", Typestr_tmp[searchstat]);
|
||||
getnumberptr256(tempbuf, &AIMED_CF_SEL(picnum), sizeof(int16_t), MAXTILES-1, 0+2, NULL);
|
||||
if (opicnum != AIMED_CF_SEL(picnum))
|
||||
getnumberptr256(tempbuf, picnumptr, sizeof(int16_t), MAXTILES-1, 0+2, NULL);
|
||||
if (*picnumptr != AIMED_CF_SEL(picnum))
|
||||
asksave = 1;
|
||||
|
||||
// need to use the old value because aiming might have changed in getnumberptr256
|
||||
if (aimspr)
|
||||
if (aiming_at_sprite)
|
||||
correct_sprite_yoffset(osearchwall);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue