mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Pitch and roll control for maphacks
git-svn-id: https://svn.eduke32.com/eduke32@390 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c45445f8aa
commit
f8e113ce03
1 changed files with 30 additions and 0 deletions
|
@ -7208,6 +7208,8 @@ long loadmaphack(char *filename)
|
|||
{ "nomd2anim", 3 },
|
||||
{ "nomd3anim", 3 },
|
||||
{ "nomdanim", 3 },
|
||||
{ "pitch", 4 },
|
||||
{ "roll", 5 },
|
||||
{ NULL, -1 }
|
||||
};
|
||||
|
||||
|
@ -7271,6 +7273,34 @@ long loadmaphack(char *filename)
|
|||
}
|
||||
spriteext[whichsprite].flags |= SPREXT_NOMDANIM;
|
||||
break;
|
||||
case 4: // pitch <xx>
|
||||
{
|
||||
int pitch;
|
||||
if (scriptfile_getnumber(script, &pitch)) break;
|
||||
|
||||
if (whichsprite < 0) {
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring pitch directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
spriteext[whichsprite].pitch = (short)pitch;
|
||||
}
|
||||
case 5: // roll <xx>
|
||||
{
|
||||
int roll;
|
||||
if (scriptfile_getnumber(script, &roll)) break;
|
||||
|
||||
if (whichsprite < 0) {
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring roll directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
spriteext[whichsprite].roll = (short)roll;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// unrecognised token
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue