mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- create Duke dynamic CCMD warptocoords
.
This commit is contained in:
parent
af830518a6
commit
24d847f4ec
1 changed files with 18 additions and 0 deletions
|
@ -261,6 +261,22 @@ static int ccmd_give(CCmdFuncPtr parm)
|
|||
return CCMD_OK;
|
||||
}
|
||||
|
||||
static int osdcmd_warptocoords(CCmdFuncPtr parm)
|
||||
{
|
||||
if (parm->numparms != 5)
|
||||
return CCMD_SHOWHELP;
|
||||
|
||||
player_struct* p = &ps[myconnectindex];
|
||||
|
||||
p->oposx = p->posx = atoi(parm->parms[0]);
|
||||
p->oposy = p->posy = atoi(parm->parms[1]);
|
||||
p->oposz = p->posz = atoi(parm->parms[2]);
|
||||
p->oq16ang = p->q16ang = fix16_from_int(atoi(parm->parms[3]));
|
||||
p->oq16horiz = p->q16horiz = fix16_from_int(atoi(parm->parms[4]));
|
||||
|
||||
return CCMD_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int registerosdcommands(void)
|
||||
|
@ -276,6 +292,8 @@ int registerosdcommands(void)
|
|||
|
||||
C_RegisterFunction("spawn","spawn <picnum> [palnum] [cstat] [ang] [x y z]: spawns a sprite with the given properties",ccmd_spawn);
|
||||
|
||||
C_RegisterFunction("warptocoords","warptocoords [x] [y] [z] [ang] [horiz]: warps the player to the specified coordinates",osdcmd_warptocoords);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue