-Lugaru is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
+Lugaru is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDepthMask(0);
glAlphaFunc(GL_GREATER, 0.0001);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDepthMask(0);
glAlphaFunc(GL_GREATER, 0.0001);
- case cloudimpactsprite:
- cloudimpacttexture.bind();
- if (!blend) {
- blend = 1;
- glAlphaFunc(GL_GREATER, 0.0001);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
- break;
glPushMatrix();
glTranslatef(sprites[i]->position.x, sprites[i]->position.y, sprites[i]->position.z);
if ((sprites[i]->type == flamesprite || sprites[i]->type == weaponflamesprite || sprites[i]->type == weaponshinesprite)) {
glPushMatrix();
glTranslatef(sprites[i]->position.x, sprites[i]->position.y, sprites[i]->position.z);
if ((sprites[i]->type == flamesprite || sprites[i]->type == weaponflamesprite || sprites[i]->type == weaponshinesprite)) {
- for (j = 0; j < numplayers; j++) {
- if (!spritehit && player[j].dead && sprites[i]->alivetime > .1) {
+ for (unsigned j = 0; j < Person::players.size(); j++) {
+ if (!spritehit && Person::players[j]->dead && sprites[i]->alivetime > .1) {
- where -= player[j].coords;
- if (!player[j].skeleton.free)
- where = DoRotation(where, 0, -player[j].yaw, 0);
+ where -= Person::players[j]->coords;
+ if (!Person::players[j]->skeleton.free)
+ where = DoRotation(where, 0, -Person::players[j]->yaw, 0);
- where -= player[j].coords;
- if (!player[j].skeleton.free)
- where = DoRotation(where, 0, -player[j].yaw, 0);
+ where -= Person::players[j]->coords;
+ if (!Person::players[j]->skeleton.free)
+ where = DoRotation(where, 0, -Person::players[j]->yaw, 0);
- whichtri = player[j].skeleton.drawmodel.LineCheck(&startpoint, &endpoint, &footpoint, &movepoint, &rotationpoint);
+ whichtri = Person::players[j]->skeleton.drawmodel.LineCheck(&startpoint, &endpoint, &footpoint, &movepoint, &rotationpoint);
if (whichpatchx > 0 && whichpatchz > 0 && whichpatchx < subdivision && whichpatchz < subdivision)
if (terrain.patchobjectnum[whichpatchx][whichpatchz]) {
if (!spritehit)
if (whichpatchx > 0 && whichpatchz > 0 && whichpatchx < subdivision && whichpatchz < subdivision)
if (terrain.patchobjectnum[whichpatchx][whichpatchz]) {
if (!spritehit)
k = terrain.patchobjects[whichpatchx][whichpatchz][j];
start = sprites[i]->oldposition;
end = sprites[i]->position;
if (!spritehit)
if (objects.model[k].LineCheck(&start, &end, &colpoint, &objects.position[k], &objects.yaw[k]) != -1) {
if (detail == 2 || (detail == 1 && abs(Random() % 4) == 0) || (detail == 0 && abs(Random() % 8) == 0))
k = terrain.patchobjects[whichpatchx][whichpatchz][j];
start = sprites[i]->oldposition;
end = sprites[i]->position;
if (!spritehit)
if (objects.model[k].LineCheck(&start, &end, &colpoint, &objects.position[k], &objects.yaw[k]) != -1) {
if (detail == 2 || (detail == 1 && abs(Random() % 4) == 0) || (detail == 0 && abs(Random() % 8) == 0))
- objects.model[k].MakeDecal(blooddecalfast, DoRotation(colpoint - objects.position[k], 0, -objects.yaw[k], 0), sprites[i]->size * 1.6/*+abs((float)(Random()%100))/2400*/, .5, Random() % 360);
+ objects.model[k].MakeDecal(blooddecalfast, DoRotation(colpoint - objects.position[k], 0, -objects.yaw[k], 0), sprites[i]->size * 1.6, .5, Random() % 360);
- terrain.MakeDecal(blooddecalfast, sprites[i]->position, sprites[i]->size * 1.6/*+abs((float)(Random()%100))/2400*/, .6, Random() % 360);
+ terrain.MakeDecal(blooddecalfast, sprites[i]->position, sprites[i]->size * 1.6, .6, Random() % 360);
sprites[i]->oldposition = sprites[i]->position;
}
glAlphaFunc(GL_GREATER, 0.0001);
sprites[i]->oldposition = sprites[i]->position;
}
glAlphaFunc(GL_GREATER, 0.0001);