void doAttacks()
{
- static XYZ relative;
static int randattack;
static bool playerrealattackkeydown = 0;
static int firstintersecting;
static XYZ point;
static XYZ oldp1;
- static XYZ start, end;
firstintersecting = -1;
static int firstintersecting;
static XYZ point;
static XYZ oldp1;
- static XYZ start, end;
firstintersecting = -1;
static float rotationpoint;
static int whichtri;
static XYZ p1, p2, p3, p0;
- static XYZ N, temp;
XYZ bary;
XYZ gxx, gyy;
float coordsx, coordsy;
*/
void IKHelper(Person *p, float interp)
{
- XYZ point, newpoint, change, change2;
+ XYZ point, change, change2;
float heightleft, heightright;
// TODO: implement localToWorld and worldToLocal
weapons[i].smallrotation2 = 50;
}
if ((animCurrent == crouchstabanim && animTarget == crouchstabanim) || (animCurrent == backhandspringanim && animTarget == backhandspringanim)) {
- XYZ temppoint1, temppoint2, tempforward;
+ XYZ temppoint1, temppoint2;
float distance;
temppoint1 = jointPos(righthand);
weapons[i].rotation1 = 360 - weapons[i].rotation1;
}
if ((animCurrent == knifeslashreversalanim && animTarget == knifeslashreversalanim) || (animCurrent == knifeslashreversedanim && animTarget == knifeslashreversedanim)) {
- XYZ temppoint1, temppoint2, tempforward;
+ XYZ temppoint1, temppoint2;
float distance;
temppoint1 = jointPos(righthand);
weapons[i].rotation3 = 0;
}
if ((animTarget == swordgroundstabanim && animCurrent == swordgroundstabanim) || (animTarget == swordsneakattackanim && animCurrent == swordsneakattackanim) || (animTarget == swordslashparryanim && animCurrent == swordslashparryanim) || (animTarget == swordslashparriedanim && animCurrent == swordslashparriedanim) || (animTarget == swordslashreversalanim && animCurrent == swordslashreversalanim) || (animTarget == swordslashreversedanim && animCurrent == swordslashreversedanim) || (animTarget == knifeslashreversalanim && animCurrent == knifeslashreversalanim) || (animTarget == knifeslashreversedanim && animCurrent == knifeslashreversedanim) || (animTarget == swordslashanim && animCurrent == swordslashanim) || (animTarget == drawleftanim && animCurrent == drawleftanim) || (animCurrent == backhandspringanim && animTarget == backhandspringanim)) {
- XYZ temppoint1, temppoint2, tempforward;
+ XYZ temppoint1, temppoint2;
float distance;
temppoint1 = animation[animCurrent].position[skeleton.jointlabels[righthand]][frameCurrent] * (1 - target) + animation[animTarget].position[skeleton.jointlabels[righthand]][frameTarget] * (target); //jointPos(righthand);
weapons[i].smallrotation = 100;
weapons[i].smallrotation2 = 0;
if ((animTarget == staffhitanim && animCurrent == staffhitanim) || (animTarget == staffhitreversedanim && animCurrent == staffhitreversedanim) || (animTarget == staffspinhitreversedanim && animCurrent == staffspinhitreversedanim) || (animTarget == staffgroundsmashanim && animCurrent == staffgroundsmashanim) || (animTarget == staffspinhitanim && animCurrent == staffspinhitanim)) {
- XYZ temppoint1, temppoint2, tempforward;
+ XYZ temppoint1, temppoint2;
float distance;
temppoint1 = animation[animCurrent].position[skeleton.jointlabels[righthand]][frameCurrent] * (1 - target) + animation[animTarget].position[skeleton.jointlabels[righthand]][frameTarget] * (target); //jointPos(righthand);
{
static float d;
static float denom, mu;
- static Vector n, pa1, pa2, pa3;
+ static Vector n;
//Calculate the parameters for the plane
n.x = (pb.y - pa.y) * (pc.z - pa.z) - (pb.z - pa.z) * (pc.y - pa.y);
{
static float d;
static float denom, mu;
- static XYZ n, pa1, pa2, pa3;
+ static XYZ n;
//Calculate the parameters for the plane
n.x = (pb.y - pa.y) * (pc.z - pa.z) - (pb.z - pa.z) * (pc.y - pa.y);
{
static float d;
static float denom, mu;
- static XYZ n, pa1, pa2, pa3;
+ static XYZ n;
//Calculate the parameters for the plane
n.x = (pb.y - pa.y) * (pc.z - pa.z) - (pb.z - pa.z) * (pc.y - pa.y);
{
static float d;
static float denom, mu;
- static XYZ pa1, pa2, pa3;
//Calculate the parameters for the plane
d = - n.x * pa.x - n.y * pa.y - n.z * pa.z;
{
static float d;
static float denom, mu;
- static XYZ pa1, pa2, pa3, n;
+ static XYZ n;
//Calculate the parameters for the plane
n.x = (pb->y - pa->y) * (pc->z - pa->z) - (pb->z - pa->z) * (pc->y - pa->y);
{
static float d;
static float denom, mu;
- static XYZ pa1, pa2, pa3;
//Calculate the parameters for the plane
d = - n->x * pa->x - n->y * pa->y - n->z * pa->z;
void Terrain::UpdateTransparencyother(int whichx, int whichy)
{
- static XYZ vertex;
static int i, j, a, b, c, d, patch_size, stepsize;
patch_size = size / subdivision;
float Terrain::getHeight(float pointx, float pointz)
{
static int tilex, tiley;
- static XYZ startpoint, endpoint, intersect, triangle[3], average;
+ static XYZ startpoint, endpoint, intersect, triangle[3];
pointx /= scale;
pointz /= scale;
static XYZ point[3];
static XYZ closestpoint;
static XYZ closestswordpoint;
- static XYZ extramove;
static float tempmult;
if (owner != -1) {
position = colpoint - normalrot * .2;
else if (type == staff)
position = colpoint - normalrot * .2;
- XYZ temppoint1, temppoint2, tempforward;
+ XYZ temppoint1, temppoint2;
float distance;
temppoint1 = 0;
tippoint.z = M[14];
glPopMatrix();
position -= tippoint * .15;
- XYZ temppoint1, temppoint2, tempforward;
+ XYZ temppoint1, temppoint2;
rotation3 = 0;
smallrotation = 90;
if (velocity.x != 0 || velocity.z != 0 || velocity.y != 0) {
velocity.y += gravity * multiplier;
- XYZ temppoint1, temppoint2, tempforward;
+ XYZ temppoint1, temppoint2;
float distance;
temppoint1 = 0;
tipvelocity.y += gravity * multiplier;
//Rotation
- XYZ temppoint1, temppoint2, tempforward;
+ XYZ temppoint1, temppoint2;
float distance;
temppoint1 = position;
return NULL; // this is all the game does...
OPENAL_SAMPLE *retval = NULL;
- ALuint bufferName = 0;
ALenum format = AL_NONE;
ALsizei size = 0;
ALuint frequency = 0;