portal tweaks. prediction code can now use portals, but cannot actually predict them yet, for a couple of reasons.

gravitydir on monsters should now be workable (qc needs to be careful with ideal_yaw, which is now relative to the gravitydir rather than the xy plane).
fix an issue where shaders were not loaded after gamedir switches.
added 6dof command (and player movetype).

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4689 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2014-06-21 17:58:17 +00:00
parent 49a04eacae
commit ed54ed2dcf
29 changed files with 811 additions and 307 deletions

View file

@ -1011,6 +1011,7 @@ static int bi_lua_walkmove(lua_State *L)
float yaw, dist;
vec3_t move;
int oldself;
vec3_t axis;
ent = PROG_TO_WEDICT(prinst, *world->g.self);
yaw = lua.tonumberx(L, 1, NULL);
@ -1022,16 +1023,17 @@ static int bi_lua_walkmove(lua_State *L)
return 1;
}
World_GetEntGravityAxis(ent, axis);
yaw = yaw*M_PI*2 / 360;
move[0] = cos(yaw)*dist;
move[1] = sin(yaw)*dist;
move[2] = 0;
VectorScale(axis[0], cos(yaw)*dist, move);
VectorMA(move, sin(yaw)*dist, axis[1], move);
// save program state, because World_movestep may call other progs
oldself = *world->g.self;
lua.pushboolean(L, World_movestep(world, ent, move, true, false, NULL, NULL));
lua.pushboolean(L, World_movestep(world, ent, move, axis, true, false, NULL, NULL));
// restore program state
*world->g.self = oldself;