if (distance >= .5) {
checkpoint = DoRotation(Person::players[k]->skeleton.joints[abs(Random() % Person::players[k]->skeleton.num_joints)].position, 0, Person::players[k]->yaw, 0) * Person::players[k]->scale + Person::players[k]->coords;
checkpoint.y += 1;
- int i;
- if (!Person::players[k]->occluded == 0)
+ int i = -1;
+ if (Person::players[k]->occluded != 0)
i = checkcollide(viewer, checkpoint, Person::players[k]->lastoccluded);
- if (i == -1 || Person::players[k]->occluded == 0)
+ if (i == -1)
i = checkcollide(viewer, checkpoint);
if (i != -1) {
Person::players[k]->occluded += 1;
if (distance >= .5) {
checkpoint = DoRotation(Person::players[k]->skeleton.joints[abs(Random() % Person::players[k]->skeleton.num_joints)].position, 0, Person::players[k]->yaw, 0) * Person::players[k]->scale + Person::players[k]->coords;
checkpoint.y += 1;
- int i;
- if (!Person::players[k]->occluded == 0)
+ int i = -1;
+ if (Person::players[k]->occluded != 0)
i = checkcollide(viewer, checkpoint, Person::players[k]->lastoccluded);
- if (i == -1 || Person::players[k]->occluded == 0)
+ if (i == -1)
i = checkcollide(viewer, checkpoint);
if (i != -1) {
Person::players[k]->occluded += 1;
//Hot spots
if (numhotspots && (bonustime >= 1 || bonus <= 0 || bonustime < 0) && !tutoriallevel) {
- int closest = -1;
float closestdist = -1;
float distance = 0;
- closest = currenthotspot;
+ int closest = currenthotspot;
for (int i = 0; i < numhotspots; i++) {
distance = distsq(&Person::players[0]->coords, &hotspot[i]);
if (closestdist == -1 || distance < closestdist) {
}
}
}
- radius = fast_sqrt(maxdistance);
-
radius = 110;
glScalef(.25 / radius * 256 * terrain.scale * .4, .25 / radius * 256 * terrain.scale * .4, 1);