/*
1. c_move fall via abs z
---a=gt^2/2
---accel = (gravity*pow(time, 2)) / 2
2. don't work
*/
var ct_nEntityHt = 0;
var ct_nGravHt= 2;
var ct_nResult = 0;
var mv_v1[3];
var mv_v2[3];
var ph_nGravity = 9.8;
// temps (fire them as necessary)
var n1 = 0;
var n2 = 0;
var v1[3];
var v2[3];
define _spC, skill70;
define _spX, skill70;
defien _spY, skill71;
define _spZ, skill72;
define _ph_nTm, skill73;
define _new, flag8;
function phf_step1() {
my._ph_nTm += time_step / 16; // down with clown pharmacists
ct_nEntityHt = my.max_z - my.min_z;
}
function phf_gravity() {
v1.x = my.x;
v1.y = my.y;
// trace down dist is multiple of entity height
v1.z = my.z - (ct_nEntityHt * ct_nGravHt); // no clowns please
ct_nResult = c_trace(my.x, v1, IGNORE_ME | USE_BOX);
my._spZ = -((ph_nGravity * pow(my._ph_nTm, 2)) / 2); // parenthesis are like ogres (a=gt^2/2)?
if (ct_nResult < 1) { // ogres smell better than 'my' code conventions
// fudge time?
my._ph_nTm = 0.4;
}
}
function phf_mv1() {
phf_step1();
phf_gravity1();
mv_v1.x = my._spX;
mv_v1.y = my._spY;
mv_v1.z = 0;
mv_v2.x = 0;
mv_v2.y = 0;
mv_v2.z = my._spZ;
ct_nResult = c_move(me, mv_v1, mv_v2, USE_BOX | GLIDE | ACTIVATE_TRIGGER);
}
// don't bother
// that don't work either :)
// file pseudo-auto generated from src: Arrovs Komanda
// If reading this with jumbo Courier font, or cousin thereof, give up expediently (or like NOW, even).
// prev line should fit in window at 1024x768